Skip to content

Stop declaring dct:modified and dct:issued as annotation properties (#276) - #277

Merged
tonyseale merged 2 commits into
EKGF:developfrom
matthiasautrata:issue/276-dct-date-properties
Nov 19, 2026
Merged

tonyseale merged 2 commits into
EKGF:developfrom
matthiasautrata:issue/276-dct-date-properties

Conversation

@matthiasautrata

Copy link
Copy Markdown
Contributor

Closes #276.

Changes

  • Remove dct:modified a owl:AnnotationProperty from dprod-ontology.ttl and dprod-contracts.ttl, and dct:issued a owl:AnnotationProperty from dprod-ontology.ttl. Both stay rdf:Property as Dublin Core defines them, which is consistent with DCAT's use as dates on dcat:Resource. A comment at the declarations explains why.
  • Add dprod-shapes:ResourceDateShape (sh:targetSubjectsOf dct:issued, dct:modified), which checks that values are xsd:date, xsd:dateTime, xsd:gYear or xsd:gYearMonth literals (the DCAT 3 range guidance). It has no sh:targetClass, so the spec generator skips it and it isn't rendered as a class. It has no sh:maxCount, because DCAT's own vocabulary carries several dct:modified values.
  • Add tests/test_resource_dates.py: neither ontology declares these as annotation properties, typed dates conform, and plain strings or language-tagged literals are rejected.
  • Bump dct:modified on 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 OK
  • python -m unittest discover -s dprod-contracts/tests: 49 tests OK
  • python spec-generator/main.py: succeeds; the helper shape is absent from index.html and present in the serialized shapes

🤖 Generated with Claude Code

@matthiasautrata matthiasautrata added modeling Modeling decisions & ontology design shapes SHACL shapes and validation Data Contracts Work related to DPROD data contracts, agreements, data rights, and the ODRL profile. labels Oct 13, 2026
@vercel

vercel Bot commented Oct 13, 2026

Copy link
Copy Markdown

@matthiasautrata is attempting to deploy a commit to the EKGF Team on Vercel.

A member of the Team first needs to authorize it.

matthiasautrata and others added 2 commits October 21, 2026 17:35
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>
@jgeluk
jgeluk force-pushed the issue/276-dct-date-properties branch from d1e9740 to 80d603a Compare October 21, 2026 16:37
@rivettp

rivettp commented Nov 19, 2026

Copy link
Copy Markdown
Contributor

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 tonyseale left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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 rivettp left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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
tonyseale merged commit 1d83360 into EKGF:develop Nov 19, 2026
2 of 3 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Data Contracts Work related to DPROD data contracts, agreements, data rights, and the ODRL profile. modeling Modeling decisions & ontology design shapes SHACL shapes and validation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Drop owl:AnnotationProperty declarations for dct:modified and dct:issued

3 participants