Repository navigation
Stop declaring dct:modified and dct:issued as annotation properties (#276) - #277
Conversation
|
@matthiasautrata is attempting to deploy a commit to the EKGF Team on Vercel. A member of the Team first needs to authorize it. |
DCAT uses dct:modified and dct:issued as dates on dcat:Resource, so DPROD data products and contracts carry them as data. Declaring them owl:AnnotationProperty hid those values from OWL reasoning and makes any graph that also types them owl:DatatypeProperty illegal OWL 2 DL punning. They now stay rdf:Property as Dublin Core defines them, as in DCAT. Resolves: EKGF#276 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
With the annotation declarations gone, add a helper SHACL shape that checks any dct:issued or dct:modified value is an xsd:date, xsd:dateTime, xsd:gYear or xsd:gYearMonth literal, following DCAT 3. It has no sh:targetClass, so it doesn't appear in the spec's class tables. No sh:maxCount: DCAT's own vocabulary carries several dct:modified values. Resolves: EKGF#276 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
d1e9740 to
80d603a
Compare
|
I'm OK with us removing the declaration but I think others may need to declare as annotation properties if applied to ontology elements. |
tonyseale
left a comment
There was a problem hiding this comment.
Approved. Tested on top of current develop: core 101 OK, contracts 109 OK, and also combined with #281 and #282. dct:modified and dct:issued are only used on ontology/profile headers in DPROD's own files, never on classes or properties, so dropping the annotation-property declarations introduces no punning.
rivettp
left a comment
There was a problem hiding this comment.
I'm OK with us removing the declaration but I think others may need to declare as annotation properties if applied to ontology elements.
Closes #276.
Changes
dct:modified a owl:AnnotationPropertyfromdprod-ontology.ttlanddprod-contracts.ttl, anddct:issued a owl:AnnotationPropertyfromdprod-ontology.ttl. Both stayrdf:Propertyas Dublin Core defines them, which is consistent with DCAT's use as dates ondcat:Resource. A comment at the declarations explains why.dprod-shapes:ResourceDateShape(sh:targetSubjectsOf dct:issued, dct:modified), which checks that values arexsd:date,xsd:dateTime,xsd:gYearorxsd:gYearMonthliterals (the DCAT 3 range guidance). It has nosh:targetClass, so the spec generator skips it and it isn't rendered as a class. It has nosh:maxCount, because DCAT's own vocabulary carries severaldct:modifiedvalues.tests/test_resource_dates.py: neither ontology declares these as annotation properties, typed dates conform, and plain strings or language-tagged literals are rejected.dct:modifiedon the DPROD ontology, the DPROD shapes, the contracts ontology and the contracts profile (the profile must match the contracts ontology).The second commit (the SHACL shape and its test) is separable if reviewers prefer to drop the optional part.
Verification
python -m unittest discover -s tests: 29 tests OKpython -m unittest discover -s dprod-contracts/tests: 49 tests OKpython spec-generator/main.py: succeeds; the helper shape is absent fromindex.htmland present in the serialized shapes🤖 Generated with Claude Code