Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add @id and @type to the codelist files #46

Open
onthebreeze opened this issue Jan 18, 2021 · 1 comment
Open

add @id and @type to the codelist files #46

onthebreeze opened this issue Jan 18, 2021 · 1 comment
Assignees

Comments

@onthebreeze
Copy link
Contributor

onthebreeze commented Jan 18, 2021

It would be helpful to add @id and @type atttributes to the codelist files - so, for example

https://edi3.org/vocabulary/rec20.jsonld

{
@context: {
unece: "https://service.unece.org/trade/uncefact/vocabulary/unece#",
uncl4237: "https://service.unece.org/trade/uncefact/vocabulary/uncl4237#",
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
rdfs: "http://www.w3.org/2000/01/rdf-schema#"
},
@graph: [
{
@id: "uncl4237:Payable_elsewhere",
@type: "unece:UNECECL4237Code",
rdfs:comment: "Responsibility for payment of transport charges unknown at time of departure.",
rdf:value: "A"
},
etc..
]}

becomes

{
@context: {
unece: "https://service.unece.org/trade/uncefact/vocabulary/unece#",
uncl4237: "https://service.unece.org/trade/uncefact/vocabulary/uncl4237#",
rdf: "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
rdfs: "http://www.w3.org/2000/01/rdf-schema#",
@id:"https://edi3.org/vocabulary/uncl4237.jsonld,
@types:"unece:Codelist"
},
@graph: [
{
@id: "uncl4237:Payable_elsewhere",
@type: "unece:UNECECL4237Code",
rdfs:comment: "Responsibility for payment of transport charges unknown at time of departure.",
rdf:value: "A"
},
etc..
]}

so that processors can uniquely identify the codelist ID and also know that they are processing a codelist.

@Fak3
Copy link
Contributor

Fak3 commented Jul 14, 2021

This can be done with named graphs:

{
  "@context": { ... },
  "@id": "https://service.unece.org/trade/uncefact/vocabulary/rec21",
  "@type": "unece:Codelist",
  "generatedAt": "2012-04-09T00:00:00",
  "@graph": [ {}, {}, ... ]
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants