Repository navigation
Conversation
jdsika
force-pushed
the
feat/owlgen-iri-valued-metadata
branch
from
October 2, 2026 15:03
d674fbc to
6ac1208
Compare
This was referenced Oct 2, 2026
jdsika
marked this pull request as draft
October 5, 2026 10:57
jdsika
force-pushed
the
feat/owlgen-iri-valued-metadata
branch
from
October 5, 2026 11:13
6ac1208 to
4cf65e0
Compare
jdsika
marked this pull request as ready for review
October 5, 2026 11:25
jdsika
force-pushed
the
feat/owlgen-iri-valued-metadata
branch
from
October 12, 2026 14:24
4cf65e0 to
8f65be9
Compare
jdsika
force-pushed
the
feat/owlgen-iri-valued-metadata
branch
2 times, most recently
from
October 12, 2026 16:14
1e6c491 to
134f7db
Compare
Resolve declared scalar annotation ranges through imported and inherited metaclasses in OWL and SHACL. A value gets the RDF term its declared range gives a slot value: nodeidentifier yields a node, other types a literal of their datatype (curie included), and gen-owl --xsd-anyuri-as-iri turns uri and uriorcurie values into IRIs as it does for slot values. Nothing is coerced from vocabulary names or URL-like text. Complete the existing implements annotation-property mapping. Declare emitted metadata predicates, omit AP logical restrictions, and reject AP/data-role collisions, reserved structural predicates, and unsupported logical AP uses. Preserve existing ordinary property projection and native metadata fields. Exercise direct generated artifacts and real OWLAPI round-trips, SHACL, JSON Schema, ShEx, Python, RDF and JSON-LD consumers. Test the documentation example and add a required OWLAPI CI gate. Update RDF snapshots only for annotation-property declarations and document remaining support boundaries. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
jdsika
force-pushed
the
feat/owlgen-iri-valued-metadata
branch
from
October 14, 2026 06:44
134f7db to
6120dbf
Compare
jdsika
changed the base branch from
main
to
fix/string-derived-anyuri-types-stay-literals
October 14, 2026 06:44
jdsika
added a commit
that referenced
this pull request
Oct 14, 2026
Review update replacing the earlier declared-annotation implementation with the reviewed #33/#36: annotation values get the RDF term their declared range gives slot values (curie stays a literal; gen-owl --xsd-anyuri-as-iri makes uri/uriorcurie values IRIs), emitted metadata predicates are declared as annotation properties, role collisions fail, and the DCMI example and OWLAPI consumer gate are included. The integration test declares its metadata slot an annotation property, as the reviewed contract requires. Snapshots are regenerated; they differ from the previous ones only by the annotation-property declarations. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
jdsika
added a commit
that referenced
this pull request
Oct 14, 2026
Review update replacing the earlier declared-annotation implementation with the reviewed #33/#36: annotation values get the RDF term their declared range gives slot values (curie stays a literal; gen-owl --xsd-anyuri-as-iri makes uri/uriorcurie values IRIs), emitted metadata predicates are declared as annotation properties, role collisions fail, and the DCMI example and OWLAPI consumer gate are included. The integration test declares its metadata slot an annotation property, as the reviewed contract requires. Snapshots are regenerated; they differ from the previous ones only by the annotation-property declarations. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Declared scalar metadata needs both the correct RDF term and the correct OWL property role. Previously, IRI-valued annotations could lose their identity, metadata slots could be emitted as ordinary data/object properties, and explicit annotation-property declarations still appeared in logical restrictions. An OWL consumer could therefore lose ontology annotations or load invalid OWL.
This change uses existing LinkML declarations:
instantiatessupplies metadata slots; their scalar ranges select RDF values;implements: [owl:AnnotationProperty]selects the OWL projection. For example, an annotation slot withrange: nodeidentifierand thatimplementsmapping emits a node-valued annotation, whilerange: stringpreserves literal text, including URL-looking text. Arbitrary custom predicates use the same mechanism.Contract and standards
unique_keys, inverses, characteristics and rule conditions fail. LinkML identifier/singular-key flags retain their identity, requiredness and inlining meaning in other consumers; they do not themselves request an OWLhasKeyaxiom, and AP projection does not enforce their uniqueness in OWL. Legal annotation subproperties and named-IRI domain/range axioms are retained without claiming logical validation of annotation values.Logical uses are recorded as they are generated. Unknown legacy metadata receives an AP declaration only after all logical intent has been collected, so early and late metadata behave consistently. Anonymous and nested rule conditions resolve the owning class attribute, including when it shadows a global slot. Synthetic type-object value properties are registered on every generation, including reuse and preconfigured IRIs.
No new flag or metamodel field is needed. OWL projection is a real choice already expressed by
implements: annotation properties deliberately lack OWL logical constraint semantics, while normal data properties retain their existing projection. No DCMI allowlist, value URL heuristic or vocabulary lookup is introduced. Untyped metadata retains the existing fallback, including skipping unknown CURIE prefixes. Untyped annotations and native metadata on already declared logical predicates retain their legacy RDF projection; this is necessary for models such as Biolink and for importing the metamodel itself. It does not silently convert an existing logical property into an AP or establish DL conformance for that legacy projection. Declared annotation/AP requests retain strict collision checks.Cross-generator behavior and limits
Real consumers check generated OWL, SHACL, JSON Schema, ShEx, Python and schema RDF/JSON-LD. Shape annotations do not become instance constraints. An AP declaration does not erase the metadata class's instance validation in other formats. JSON strings do not distinguish RDF nodes from literals, and generated Python retains its existing coercion behavior.
The published generic YAML example is included directly in the documentation and compiled in tests. With metaclasses disabled, all four native-URI/type-object combinations load, save and reload in OWLAPI 5.5.0 with zero OWL 2 DL profile violations and retained ontology annotations. Class, slot, type, enum and permissible-value annotation assertions also survive the independent consumer.
This is scalar RDF serialization, not complete metadata-extension validation. Structured agent descriptions, native-field RDF export mappings, existing datatype-alias and type-object class/datatype profile defects, and unrelated inferred object/datatype ambiguities remain separate work. LinkML identifiers and singular keys remain distinct from explicit OWL key axioms. Native
licenseremains authoritative and string-valued; nativecontributorsretains its existing identifier representation. This PR does not establish full OWL 2 DL conformance for every schema or the default metaclass projection, and does not claim a completed downstream migration.Related community requests: #3249, #3543, and #3546. The structured part of linkml#3543 remains outside this change.
Validation
All five adversarial findings of the 2026-10-12 review are resolved. CI: see the checks on the current head (including the required OWLAPI consumer job).
Merge order
Stack: #32 → #33 → #36. This is the prerequisite for PR #36, which demonstrates DCMI metadata using this generic implementation. Merge #32, then #33 into main first after review and green final-head CI. Then rebase #36 onto the resulting main commit, retarget its base to main, preserve its single feature commit and rerun CI for its resulting head. A squash merge changes the prerequisite SHA; do not assume the pre-merge stacked head remains valid. Do not merge #36 into this feature branch as a substitute for merging it into main. No merge is performed by this review.