Examples are important. Busy people may have no time to read your spec, and often start from examples.
Examples also validate that all your infrastructure works together.
$ jsonld format -q example1.jsonld
<ex:DataProductAgreement> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <rdfs:class> .
<ex:DataProductAgreement> <rdfs:label> "DataProductAgreement" .
<ex:DataProductAgreement> <rdfs:subClassOf> <fibo:Agreement> .
<http://example.org/dp#isSubjectToAgreement> <http://www.w3.org/1999/02/22-rdf-syntax-ns#type> <http://www.w3.org/1999/02/22-rdf-syntax-ns#Property> .
<http://example.org/dp#isSubjectToAgreement> <http://www.w3.org/2000/01/rdf-schema#label> "Data Product is Subject To FIBO Agreement" .
$ jsonld format -q example2.jsonld
no DPROD terms are present whatsoever
URLs like <ex:DataProductAgreement> <rdfs:subClassOf> <fibo:Agreement> are wrong
I can't even guess how you produce both <rdfs:label> (wrong) and <http://www.w3.org/2000/01/rdf-schema#label> (right but unprefixed) from the same example
Examples are important. Busy people may have no time to read your spec, and often start from examples. Examples also validate that all your infrastructure works together.
*/README.md
) into separate .jsonld files,rdfpuml
to generate diagramsWe had such workflow in GS1 EPCIS, and it helped both spec development, and then actual deployments:
I extracted the 2 examples from https://github.com/EKGF/dprod/tree/main/examples/core-data-product-extensions. Until https://github.com/EKGF/dprod/issues/90 is fixed, we can't use
riot
but can use https://www.npmjs.com/package/jsonld (the same code as in the JSONLD Playground).Here's the result, and it's pretty tragic:
<ex:DataProductAgreement> <rdfs:subClassOf> <fibo:Agreement>
are wrong<rdfs:label>
(wrong) and<http://www.w3.org/2000/01/rdf-schema#label>
(right but unprefixed) from the same example