uncefact / spec-jsonld

Exposing the UN/CEFACT vocabulary as web semantics
https://service.unece.org/trade/uncefact/vocabulary/uncefact/
13 stars 5 forks source link

add jsonld representation of codelists, move them to a sub-namespace #190

Open VladimirAlexiev opened 11 months ago

VladimirAlexiev commented 11 months ago

Trying to obtain a codelist as jsonld returns an error:

curl https://vocabulary.uncefact.org/AccessRightsTypeCodeList -H 'Accept: application/ld+json'
<html>
<head><title>404 Not Found</title></head>
<body>
<h1>404 Not Found</h1>
<ul>
<li>Code: NoSuchKey</li>
<li>Message: The specified key does not exist.</li>
<li>Key: AccessRightsTypeCodeList.jsonld</li>
<li>RequestId: H9FWVSG54NRFQQ93</li>
<li>HostId: 2kHv3mSLD+g2v8J3WQBWsx1kI8bpmDuD+Z9sxxPNSYkEqHy5duGcYMn/iflygSz9VSJxCmcuoVQ=</li>
</ul>
<hr/>
</body>
</html>

Related to #189, which shows that codelists are also missing from the main uncefact ontology.

I think the home page of all lists should be https://vocabulary.uncefact.org/codeList (or code-list but not code-lists as at present), and an individual list URL should be https://vocabulary.uncefact.org/codeList/AccessRights (rather than https://vocabulary.uncefact.org/AccessRightsTypeCodeList as at present)

This is even more important if you decide to move the ontology and classes/props to the https://vocabulary.uncefact.org/uncefact namespace.

VladimirAlexiev commented 11 months ago

The ontology includes number-based classes for the codelists, eg

uncefact:UNCL1001Code
        rdf:type      rdfs:Class ;
        rdfs:comment  "Code specifying the document name." ;
        rdfs:label    "Document name code" .
uncefact:accountingDocumentSetTriggerCode
        schema:rangeIncludes            uncefact:UNCL1001Code ;
uncefact:documentTypeCode
        schema:rangeIncludes            uncefact:UNCL1001Code ;

But these don't relate to the codelists on the website: eg at https://vocabulary.uncefact.org/code-lists there are unece:AccountingDocumentCodeList and unece:AccountingDocumentTypeCodeList and one could only guess which of the two (if any) is UNCL1001.

https://vocabulary.uncefact.org/search?q=UNCL1001 finds nothing.

Also, the ontology doesn't include code values.