Repository navigation
Conversation
This was referenced Oct 21, 2026
jdsika
force-pushed
the
feat/declared-annotation-terms
branch
from
October 21, 2026 20:54
9020d54 to
cb6a6f1
Compare
jdsika
force-pushed
the
feat/owl-annotation-property-roles
branch
from
October 21, 2026 20:55
29ce5c7 to
26630f9
Compare
jdsika
force-pushed
the
feat/declared-annotation-terms
branch
from
October 23, 2026 08:47
cb6a6f1 to
6fe02bc
Compare
jdsika
force-pushed
the
feat/owl-annotation-property-roles
branch
from
October 23, 2026 08:47
26630f9 to
4b55b0c
Compare
jdsika
force-pushed
the
feat/declared-annotation-terms
branch
from
October 23, 2026 11:55
6fe02bc to
0fa8f65
Compare
jdsika
force-pushed
the
feat/owl-annotation-property-roles
branch
from
October 23, 2026 11:57
4b55b0c to
596bb1d
Compare
…l axioms A slot that implements owl:AnnotationProperty, or whose property IRI is one of the built-in annotation properties of OWL 2 (Structural Specification §5.5), is an annotation property: it is declared as such, produces no class restriction or cardinality axiom (annotations have no logical meaning, §10.1), and its domain, datatype or class range and super-properties are emitted as annotation axioms (§10.2). Built-in properties get neither a declaration nor axioms. The predicate of a declared annotation whose metaclass slot has the role is declared too. A slot that implements two roles is an error (§5.8.1), as is an inverse or a property characteristic, a unique key, a type designator, or a rule or class-expression condition on an annotation property. Every other predicate gen-owl writes outside the reserved vocabulary, such as skos:definition and skos:inScheme for element metadata, is declared as an annotation property: OWL 2 DL requires a declaration for each property (section 5.8.1), and without one OWLAPI found every generated ontology outside the profile. A predicate a restriction uses keeps its logical role. OWL snapshots gain only these declarations. A super-property must have the role of its sub-property: a sub-property axiom relates two annotation properties (§10.2.1) or two logical properties (§9.2.1, §9.3.1), so an annotation property under a data or object property, or the reverse, is an error. Signed-off-by: jdsika <carlo.van-driesten@vdl.digital>
jdsika
force-pushed
the
feat/owl-annotation-property-roles
branch
from
October 23, 2026 14:25
596bb1d to
63c711c
Compare
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.
Mirror of linkml#4158, same head. Review there; this PR tracks the fork stack.
gen-owl now gives annotation properties their OWL role and nothing else: a slot that
implements: [owl:AnnotationProperty], or whose property IRI is one of the nine built-in annotation properties, is declared as an annotation property and produces no class restriction. Its domain, range and super-properties become annotation axioms; logical uses are errors.Example
gen-owl --no-use-native-urismaindcterms:descriptiona owl:AnnotationPropertyandowl:allValuesFrom,owl:maxCardinalityrestrictions onThinga owl:AnnotationProperty ; rdfs:range xsd:string, no restrictionrdfs:labela owl:DatatypePropertyand three restrictionsOn
mainthe declaration from linkml#2095 is emitted, but the restrictions make the ontology leave OWL 2 DL, and a slot mapped tordfs:labelredeclares a reserved IRI as a data property (linkml#3249).The rule
owl:AnnotationPropertyor when its property IRI isrdfs:label,rdfs:comment,rdfs:seeAlso,rdfs:isDefinedBy,owl:deprecated,owl:versionInfo,owl:priorVersion,owl:backwardCompatibleWithorowl:incompatibleWith(OWL 2 §5.5, Table 5, the complete list).nodeidentifiergives no range axiom. Built-in properties get no declaration and no axioms, since OWL 2 reserves them.is_aor a mixin) must have the same role: a sub-property axiom relates two annotation properties (§10.2.1) or two logical properties (§9.2.1, §9.3.1).skos:definitionandskos:inSchemefor element metadata, is declared as an annotation property, since OWL 2 DL requires a declaration for each property (§5.8.1). A predicate a restriction uses keeps its logical role.dcterms:creatorin the documented example is an annotation property with native URIs as well.Behaviour changes
implements: [owl:AnnotationProperty]lose their restrictions and gain annotation axioms. Slots emitted with a built-in annotation property IRI lose theirowl:DatatypePropertydeclaration and restrictions.OwlSchemaGenerator.is_annotation_property(slot)is public. No option; the role is already expressed byimplements.Not in this PR
Testing
test_owl_annotation_properties.py(12): declared and built-in annotation properties with native and mapped URIs, annotation axioms, the declared predicate of the documented example, contradictory roles, and five logical uses that fail.test_declared_annotations.py(43) and the OWL, compliance, issue and snapshot suites pass.Draft, stacked on linkml#4156 and linkml#4157: this PR's own change is its last commit. It will be rebased as those land. Fork review: #59. Refs linkml#3249, linkml#2091, linkml#2095.