fix(#93): make dprod.jsonld a proper JSON-LD context; split out ontology to dprod-ontology.jsonld#135
fix(#93): make dprod.jsonld a proper JSON-LD context; split out ontology to dprod-ontology.jsonld#135
Conversation
22d8554 to
39171b7
Compare
- dprod.jsonld is now a proper JSON-LD context document with term mappings extracted from the ontology (classes and properties), namespace prefixes, and id/type aliases for @id/@type. - The OWL ontology JSON-LD serialization moves to dprod-ontology.jsonld. - All example @context references updated to use dprod.jsonld. - Added tests validating context structure, ontology structure, term resolution via PyLD, and id/type alias expansion. Resolves: #93
39171b7 to
14b6756
Compare
|
I rebased this branch onto current Rebased onto developThe branch was significantly behind Removed
|
|
Closing as superseded: the fix for issue #93 is already on |
|
Superseded by the fix already on |
Summary
dprod.jsonldis now a proper JSON-LD context document — it contains only an@contextobject with namespace prefixes, DPROD term mappings (classes and properties extracted from the ontology), andid/typealiases for@id/@type.dprod-ontology.jsonldis the OWL ontology serialized as JSON-LD (whatdprod.jsonldpreviously was).@contextreferences updated fromdprod-context.jsonldtodprod.jsonld.dprod-all.jsonld,*.ttl,*.rdf, shapes) remain unchanged.Resolves #93
What changed
spec-generator/main.py):generate_jsonld_context()function extracts all DPROD term names from the ontology graph and maps them todprod:prefixed terms."id": "@id"and"type": "@type"aliases for convenience.dist/dprod.jsonld.dist/dprod-ontology.jsonld.dprod-context.jsonld(no longer needed).respec/template.html):dprod.jsonld) and "DPROD Ontology — JSON-LD" (dprod-ontology.jsonld).@contextupdated todprod.jsonld.@contextreferences changed fromdprod-context.jsonldtodprod.jsonld.tests/test_context.py):dprod.jsonldis a pure context (only@contextkey, includes prefixes and term mappings).dprod-ontology.jsonldcontains@graph.id/typealiases resolve correctly.How to consume
Reference the context in JSON-LD instance documents:
Verification
.venv