axiom.object_expression¶
OWL 2 object class-expression and class-axiom structural elements.
This module models object-side mirrors of the data-range patterns in
axiom.datatype, plus Seq-backed class axioms that share
the same owned-list mapping style.
Class expressions (subclasses of ClassExpression):
ObjectIntersectionOf—ObjectIntersectionOf( CE1 ... CEn ),n >= 2; owns anSeqfragment.ObjectUnionOf—ObjectUnionOf( CE1 ... CEn ),n >= 2; owns anSeqfragment.ObjectComplementOf—ObjectComplementOf( CE ); the operand is a cross-axiom node reference.ObjectOneOf—ObjectOneOf( a1 ... an ),n >= 1; owns anSeqfragment of individual resources (not literals).
Object property expression:
ObjectInverseOf—ObjectInverseOf( OP ); RDF mapping emits only_:x owl:inverseOf OP(nordf:typetriple).
Class axioms:
DisjointClasses— binaryDisjointClasses( CE1 CE2 )viaowl:disjointWith.EquivalentClasses— binaryEquivalentClasses( CE1 CE2 )viaowl:equivalentClass(n-ary structural forms serialize to multiple triples; reverse parse yields binaries).DisjointClassesNary—DisjointClasses( CE1 ... CEn ),n > 2;owl:AllDisjointClasseswith ownedowl:membersSeq.DisjointUnion—DisjointUnion( C CE1 ... CEn ),n >= 2; named class with ownedowl:disjointUnionOfSeq.
ClassExpression is an abstract umbrella: it blocks direct
instantiation, provides the shared owl:Class declaration triple via
as_triples, and concrete subclasses extend that projection with their own
predicate-specific triples. Owned fragments share their owning element’s
context and contribute their as_triples to the owner’s RDF partition;
cross-axiom operands are RDF node identifiers via the package’s annotated
aliases.
Classes¶
Abstract umbrella for OWL 2 class expressions that declare |
|
Element |
|
Element |
|
Element |
|
Element |
|
Element |
|
Element |
|
Element |
|
Element |
|
Element |
Module Contents¶
- class axiom.object_expression.ClassExpression¶
Bases:
axiom.structural_element.DeclarationElement,abc.ABCAbstract umbrella for OWL 2 class expressions that declare
owl:Class.Not directly instantiable. Concrete subclasses include
ObjectIntersectionOf,ObjectUnionOf,ObjectComplementOf, andObjectOneOf. All concrete class expressions declarerdf:type owl:Classforname.- property rdf_type: rdflib.IdentifiedNode¶
- class axiom.object_expression.ObjectIntersectionOf¶
Bases:
ClassExpressionElement
ObjectIntersectionOf( CE1 ... CEn )of the OWL 2 structural specification.The main RDF node is an anonymous blank node (written
_:xbelow). OWL 2 structural syntax requires n >= 2 class expression operands.Triples:
_:x rdf:type owl:Class . _:x owl:intersectionOf T(SEQ CE1 ... CEn) .
- kind: Literal['ObjectIntersectionOf'] = 'ObjectIntersectionOf'¶
- intersection_of: axiom.structural_element.Seq¶
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.ObjectUnionOf¶
Bases:
ClassExpressionElement
ObjectUnionOf( CE1 ... CEn )of the OWL 2 structural specification.The main RDF node is an anonymous blank node (written
_:xbelow). OWL 2 structural syntax requires n >= 2 class expression operands.Triples:
_:x rdf:type owl:Class . _:x owl:unionOf T(SEQ CE1 ... CEn) .
- kind: Literal['ObjectUnionOf'] = 'ObjectUnionOf'¶
- union_of: axiom.structural_element.Seq¶
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.ObjectComplementOf¶
Bases:
ClassExpressionElement
ObjectComplementOf( CE )of the OWL 2 structural specification.The main RDF node is an anonymous blank node (written
_:xbelow).complement_ofis the RDF subject of the complemented class expression (IRI or blank node);as_triplesemits only this axiom’s triples (shallow projection). Declaration and other triples forCEbelong in a separate axiom instance or graph partition, not inlined here.Triples:
_:x rdf:type owl:Class . _:x owl:complementOf CE .
- kind: Literal['ObjectComplementOf'] = 'ObjectComplementOf'¶
- complement_of: axiom.common.N3Resource¶
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.ObjectOneOf¶
Bases:
ClassExpressionElement
ObjectOneOf( a1 ... an )of the OWL 2 structural specification.The main RDF node is an anonymous blank node (written
_:xbelow).one_ofis an ownedSeqfragment carrying the enumerated individuals asrdf:firstvalues (IRIs or blank nodes, not literals); the fragment shares this element’scontext. OWL 2 structural syntax requires n >= 1 individual operands.Triples:
_:x rdf:type owl:Class . _:x owl:oneOf T(SEQ a1 ... an) .
- kind: Literal['ObjectOneOf'] = 'ObjectOneOf'¶
- one_of: axiom.structural_element.Seq¶
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.ObjectInverseOf¶
Bases:
axiom.structural_element.StructuralElementElement
ObjectInverseOf( OP )of the OWL 2 structural specification.The main RDF node is an anonymous blank node (written
_:xbelow).inverse_ofis the RDF node of the inverted object property expression;as_triplesemits only this axiom’s triples (shallow projection). The OWL 2 RDF mapping does not emit anrdf:typetriple for this form.Triples:
_:x owl:inverseOf OP .
- kind: Literal['ObjectInverseOf'] = 'ObjectInverseOf'¶
- name_value: axiom.common.N3Resource = None¶
- inverse_of: axiom.common.N3Resource¶
- property name: rdflib.IdentifiedNode¶
Inverse property expression node identifier (alias of
name_value).
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.DisjointClasses¶
Bases:
axiom.structural_element.StructuralElementElement
DisjointClasses( CE1 CE2 )of the OWL 2 structural specification.Both operands are RDF node references. If an operand is itself represented by another structural element, that element belongs to a separate partition.
Triples:
CE1 owl:disjointWith CE2 .
- kind: Literal['DisjointClasses'] = 'DisjointClasses'¶
- class_expression_1: axiom.common.N3Resource¶
- class_expression_2: axiom.common.N3Resource¶
- property name: rdflib.IdentifiedNode¶
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.EquivalentClasses¶
Bases:
axiom.structural_element.StructuralElementElement
EquivalentClasses( CE1 CE2 )of the OWL 2 structural specification.Binary form only. An n-ary structural
EquivalentClasses( CE1 ... CEn )serializes to n-1owl:equivalentClasstriples; OWL 2 RDF reverse mapping parses each triple as a binary axiom. This class models that binary parse shape. Sharesowl:equivalentClasswithDatatypeDefinition.Both operands are RDF node references. If an operand is itself represented by another structural element, that element belongs to a separate partition.
Triples:
CE1 owl:equivalentClass CE2 .
- kind: Literal['EquivalentClasses'] = 'EquivalentClasses'¶
- class_expression_1: axiom.common.N3Resource¶
- class_expression_2: axiom.common.N3Resource¶
- property name: rdflib.IdentifiedNode¶
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.DisjointClassesNary¶
Bases:
axiom.structural_element.StructuralElementElement
DisjointClasses( CE1 ... CEn ), n > 2, of the OWL 2 structural specification.The RDF subject is typically an anonymous blank node (written
_:xbelow) of typeowl:AllDisjointClasses.membersis an ownedSeqfragment carrying the class expression operands; the fragment shares this element’scontext.Triples:
_:x rdf:type owl:AllDisjointClasses . _:x owl:members T(SEQ CE1 ... CEn) .
- kind: Literal['DisjointClassesNary'] = 'DisjointClassesNary'¶
- name_value: axiom.common.N3Resource = None¶
- members: axiom.structural_element.Seq¶
- property name: rdflib.IdentifiedNode¶
AllDisjointClasses node identifier (alias of
name_value).
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶
- class axiom.object_expression.DisjointUnion¶
Bases:
axiom.structural_element.StructuralElementElement
DisjointUnion( C CE1 ... CEn )of the OWL 2 structural specification.union_classis the named classC.disjoint_union_ofis an ownedSeqfragment carrying the covering class expression operands (n >= 2); the fragment shares this element’scontext. The OWL 2 RDF mapping does not emit anrdf:typetriple for this axiom.Triples:
C owl:disjointUnionOf T(SEQ CE1 ... CEn) .
- kind: Literal['DisjointUnion'] = 'DisjointUnion'¶
- union_class: axiom.common.N3Resource¶
- disjoint_union_of: axiom.structural_element.Seq¶
- property name: rdflib.IdentifiedNode¶
- property as_triples: collections.abc.Sequence[axiom.common.Triple]¶