axiom.property_axiom ==================== .. py:module:: axiom.property_axiom .. autoapi-nested-parse:: OWL 2 property, key, and individual-difference structural axioms. Binary relational axioms mimic :class:`~rdflib_reasoning.axiom.class_axiom.SubClassOf` (one vocabulary triple over two node references). Seq-backed forms mimic owned-list patterns such as :class:`~rdflib_reasoning.axiom.object_expression.DisjointUnion` and :class:`~rdflib_reasoning.axiom.object_expression.DisjointClassesNary`. Binary relational: - :class:`SubObjectPropertyOf` --- ``SubObjectPropertyOf( OPE1 OPE2 )`` - :class:`SubDataPropertyOf` --- ``SubDataPropertyOf( DPE1 DPE2 )`` - :class:`ObjectPropertyDomain` / :class:`ObjectPropertyRange` - :class:`DataPropertyDomain` / :class:`DataPropertyRange` - :class:`InverseObjectProperties` - :class:`DatatypeDefinition` --- binary ``DT owl:equivalentClass DR`` only - :class:`EquivalentObjectProperties` / :class:`EquivalentDataProperties` --- binary ``owl:equivalentProperty`` (n-ary forms serialize to chains) - :class:`DisjointObjectProperties` / :class:`DisjointDataProperties` - :class:`DifferentIndividuals` --- binary ``owl:differentFrom`` - :class:`SameIndividual` --- binary ``owl:sameAs`` (n-ary forms serialize to chains) - :class:`ObjectPropertyAssertion` --- ``a OPE b`` (resource value; known OPE) - :class:`DataPropertyAssertion` --- ``a DPE lt`` (literal value; known DPE) - :class:`NegativeObjectPropertyAssertion` --- reified NPA with ``owl:targetIndividual`` - :class:`NegativeDataPropertyAssertion` --- reified NPA with ``owl:targetValue`` Seq-backed: - :class:`SubObjectPropertyOfChain` --- ``OPE owl:propertyChainAxiom SEQ`` - :class:`DisjointObjectPropertiesNary` / :class:`DisjointDataPropertiesNary` - :class:`HasKey` --- ``CE owl:hasKey SEQ`` - :class:`DifferentIndividualsNary` --- ``owl:AllDifferent`` + ``owl:members`` Classes ------- .. autoapisummary:: axiom.property_axiom.SubObjectPropertyOf axiom.property_axiom.SubDataPropertyOf axiom.property_axiom.SubObjectPropertyOfChain axiom.property_axiom.ObjectPropertyDomain axiom.property_axiom.ObjectPropertyRange axiom.property_axiom.DataPropertyDomain axiom.property_axiom.DataPropertyRange axiom.property_axiom.InverseObjectProperties axiom.property_axiom.DatatypeDefinition axiom.property_axiom.EquivalentObjectProperties axiom.property_axiom.EquivalentDataProperties axiom.property_axiom.DisjointObjectProperties axiom.property_axiom.DisjointDataProperties axiom.property_axiom.DisjointObjectPropertiesNary axiom.property_axiom.DisjointDataPropertiesNary axiom.property_axiom.HasKey axiom.property_axiom.ObjectPropertyAssertion axiom.property_axiom.DataPropertyAssertion axiom.property_axiom.NegativeObjectPropertyAssertion axiom.property_axiom.NegativeDataPropertyAssertion axiom.property_axiom.DifferentIndividuals axiom.property_axiom.SameIndividual axiom.property_axiom.DifferentIndividualsNary Module Contents --------------- .. py:class:: SubObjectPropertyOf Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``SubObjectPropertyOf( OPE1 OPE2 )`` of the OWL 2 structural specification. Both operands are RDF node references. This is the simple (non-chain) form; property chains use :class:`SubObjectPropertyOfChain`. Triples:: OPE1 rdfs:subPropertyOf OPE2 . .. py:attribute:: kind :type: Literal['SubObjectPropertyOf'] :value: 'SubObjectPropertyOf' .. py:attribute:: sub_object_property_expression :type: axiom.common.N3Resource .. py:attribute:: super_object_property_expression :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: SubDataPropertyOf Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``SubDataPropertyOf( DPE1 DPE2 )`` of the OWL 2 structural specification. Both operands are data property IRIs. The RDF mapping shares ``rdfs:subPropertyOf`` with :class:`SubObjectPropertyOf`; graph lifting prefers the data form when the subject is typed ``owl:DatatypeProperty``. Triples:: DPE1 rdfs:subPropertyOf DPE2 . .. py:attribute:: kind :type: Literal['SubDataPropertyOf'] :value: 'SubDataPropertyOf' .. py:attribute:: sub_data_property_expression :type: axiom.common.N3IRIRef .. py:attribute:: super_data_property_expression :type: axiom.common.N3IRIRef .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: SubObjectPropertyOfChain Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``SubObjectPropertyOf( ObjectPropertyChain( OPE1 ... OPEn ) OPE )``. ``object_property_expression`` is the super-property. ``property_chain`` is an owned ``Seq`` of chain operands (``n >= 2``) sharing this element's ``context``. The OWL 2 RDF mapping does not emit an ``rdf:type`` triple. Triples:: OPE owl:propertyChainAxiom T(SEQ OPE1 ... OPEn) . .. py:attribute:: kind :type: Literal['SubObjectPropertyOfChain'] :value: 'SubObjectPropertyOfChain' .. py:attribute:: object_property_expression :type: axiom.common.N3Resource .. py:attribute:: property_chain :type: axiom.structural_element.Seq .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: ObjectPropertyDomain Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``ObjectPropertyDomain( OPE CE )`` of the OWL 2 structural specification. Triples:: OPE rdfs:domain CE . .. py:attribute:: kind :type: Literal['ObjectPropertyDomain'] :value: 'ObjectPropertyDomain' .. py:attribute:: object_property_expression :type: axiom.common.N3Resource .. py:attribute:: class_expression :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: ObjectPropertyRange Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``ObjectPropertyRange( OPE CE )`` of the OWL 2 structural specification. Triples:: OPE rdfs:range CE . .. py:attribute:: kind :type: Literal['ObjectPropertyRange'] :value: 'ObjectPropertyRange' .. py:attribute:: object_property_expression :type: axiom.common.N3Resource .. py:attribute:: class_expression :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DataPropertyDomain Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DataPropertyDomain( DPE CE )`` of the OWL 2 structural specification. Shares ``rdfs:domain`` with :class:`ObjectPropertyDomain`; lifting prefers the data form when the property is typed ``owl:DatatypeProperty``. Triples:: DPE rdfs:domain CE . .. py:attribute:: kind :type: Literal['DataPropertyDomain'] :value: 'DataPropertyDomain' .. py:attribute:: data_property_expression :type: axiom.common.N3IRIRef .. py:attribute:: class_expression :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DataPropertyRange Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DataPropertyRange( DPE DR )`` of the OWL 2 structural specification. Shares ``rdfs:range`` with :class:`ObjectPropertyRange`; lifting prefers the data form when the property is typed ``owl:DatatypeProperty``. Triples:: DPE rdfs:range DR . .. py:attribute:: kind :type: Literal['DataPropertyRange'] :value: 'DataPropertyRange' .. py:attribute:: data_property_expression :type: axiom.common.N3IRIRef .. py:attribute:: data_range :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: InverseObjectProperties Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``InverseObjectProperties( OPE1 OPE2 )`` of the OWL 2 structural specification. Triples:: OPE1 owl:inverseOf OPE2 . Note that ``ObjectInverseOf( OP )`` uses the same predicate with a blank-node expression subject; graph lifting treats IRI subjects as this axiom. .. py:attribute:: kind :type: Literal['InverseObjectProperties'] :value: 'InverseObjectProperties' .. py:attribute:: object_property_expression_1 :type: axiom.common.N3Resource .. py:attribute:: object_property_expression_2 :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DatatypeDefinition Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DatatypeDefinition( DT DR )`` of the OWL 2 structural specification. Binary form only: a single ``owl:equivalentClass`` triple. Shares that predicate with binary :class:`~rdflib_reasoning.axiom.object_expression.EquivalentClasses`; graph lifting prefers this class when the subject is typed ``rdfs:Datatype``. Triples:: DT owl:equivalentClass DR . .. py:attribute:: kind :type: Literal['DatatypeDefinition'] :value: 'DatatypeDefinition' .. py:attribute:: datatype :type: axiom.common.N3IRIRef .. py:attribute:: data_range :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: EquivalentObjectProperties Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``EquivalentObjectProperties( OPE1 OPE2 )`` of the OWL 2 structural specification. Binary form only. An n-ary structural equivalence axiom serializes to multiple ``owl:equivalentProperty`` triples; reverse parse yields binaries. Shares that predicate with :class:`EquivalentDataProperties`. Triples:: OPE1 owl:equivalentProperty OPE2 . .. py:attribute:: kind :type: Literal['EquivalentObjectProperties'] :value: 'EquivalentObjectProperties' .. py:attribute:: object_property_expression_1 :type: axiom.common.N3Resource .. py:attribute:: object_property_expression_2 :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: EquivalentDataProperties Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``EquivalentDataProperties( DPE1 DPE2 )`` of the OWL 2 structural specification. Binary form only. Shares ``owl:equivalentProperty`` with :class:`EquivalentObjectProperties`; lifting prefers the data form when the subject is typed ``owl:DatatypeProperty``. Triples:: DPE1 owl:equivalentProperty DPE2 . .. py:attribute:: kind :type: Literal['EquivalentDataProperties'] :value: 'EquivalentDataProperties' .. py:attribute:: data_property_expression_1 :type: axiom.common.N3IRIRef .. py:attribute:: data_property_expression_2 :type: axiom.common.N3IRIRef .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DisjointObjectProperties Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DisjointObjectProperties( OPE1 OPE2 )`` of the OWL 2 structural specification. Triples:: OPE1 owl:propertyDisjointWith OPE2 . .. py:attribute:: kind :type: Literal['DisjointObjectProperties'] :value: 'DisjointObjectProperties' .. py:attribute:: object_property_expression_1 :type: axiom.common.N3Resource .. py:attribute:: object_property_expression_2 :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DisjointDataProperties Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DisjointDataProperties( DPE1 DPE2 )`` of the OWL 2 structural specification. Shares ``owl:propertyDisjointWith`` with :class:`DisjointObjectProperties`; lifting prefers the data form when the subject is typed ``owl:DatatypeProperty``. Triples:: DPE1 owl:propertyDisjointWith DPE2 . .. py:attribute:: kind :type: Literal['DisjointDataProperties'] :value: 'DisjointDataProperties' .. py:attribute:: data_property_expression_1 :type: axiom.common.N3IRIRef .. py:attribute:: data_property_expression_2 :type: axiom.common.N3IRIRef .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DisjointObjectPropertiesNary Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DisjointObjectProperties( OPE1 ... OPEn )``, n > 2. The RDF subject is typically an anonymous blank node of type ``owl:AllDisjointProperties``. ``members`` is an owned ``Seq`` fragment. Triples:: _:x rdf:type owl:AllDisjointProperties . _:x owl:members T(SEQ OPE1 ... OPEn) . .. py:attribute:: kind :type: Literal['DisjointObjectPropertiesNary'] :value: 'DisjointObjectPropertiesNary' .. py:attribute:: name_value :type: axiom.common.N3Resource :value: None .. py:attribute:: members :type: axiom.structural_element.Seq .. py:property:: name :type: rdflib.IdentifiedNode AllDisjointProperties node identifier (alias of ``name_value``). .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DisjointDataPropertiesNary Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DisjointDataProperties( DPE1 ... DPEn )``, n > 2. Shares the ``owl:AllDisjointProperties`` mapping with :class:`DisjointObjectPropertiesNary`; lifting prefers the data form when members are typed ``owl:DatatypeProperty``. Triples:: _:x rdf:type owl:AllDisjointProperties . _:x owl:members T(SEQ DPE1 ... DPEn) . .. py:attribute:: kind :type: Literal['DisjointDataPropertiesNary'] :value: 'DisjointDataPropertiesNary' .. py:attribute:: name_value :type: axiom.common.N3Resource :value: None .. py:attribute:: members :type: axiom.structural_element.Seq .. py:property:: name :type: rdflib.IdentifiedNode AllDisjointProperties node identifier (alias of ``name_value``). .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: HasKey Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``HasKey( CE ( OPE1 ... OPEm ) ( DPE1 ... DPEn ) )``. ``class_expression`` is the key-bearing class. ``key_properties`` is an owned ``Seq`` of property node references (object and/or data properties concatenated as in the OWL 2 RDF mapping). At least one key property is required. Triples:: CE owl:hasKey T(SEQ OPE1 ... OPEm DPE1 ... DPEn) . .. py:attribute:: kind :type: Literal['HasKey'] :value: 'HasKey' .. py:attribute:: class_expression :type: axiom.common.N3Resource .. py:attribute:: key_properties :type: axiom.structural_element.Seq .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: ObjectPropertyAssertion Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``ObjectPropertyAssertion( OPE a1 a2 )`` of the OWL 2 structural specification. Binary RDF form ``a1 OPE a2`` with a resource (individual) value. Graph lifting claims a triple only when ``OPE`` is a known object property expression (declaration, object-property characteristic, object restriction ``onProperty``, ``ObjectInverseOf`` blank node, or OPE operand of an already-parsed axiom). Unknown predicates remain unconsumed. Triples:: a1 OPE a2 . .. py:attribute:: kind :type: Literal['ObjectPropertyAssertion'] :value: 'ObjectPropertyAssertion' .. py:attribute:: object_property_expression :type: axiom.common.N3Resource .. py:attribute:: individual :type: axiom.common.N3Resource .. py:attribute:: value :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DataPropertyAssertion Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DataPropertyAssertion( DPE a lt )`` of the OWL 2 structural specification. Binary RDF form ``a DPE lt`` with a literal value. Graph lifting claims a triple only when ``DPE`` is a known data property expression (declaration, data restriction ``onProperty`` / ``onProperties``, or DPE operand of an already-parsed axiom). Unknown predicates remain unconsumed. Triples:: a DPE lt . .. py:attribute:: kind :type: Literal['DataPropertyAssertion'] :value: 'DataPropertyAssertion' .. py:attribute:: data_property_expression :type: axiom.common.N3IRIRef .. py:attribute:: individual :type: axiom.common.N3Resource .. py:attribute:: value :type: axiom.common.N3Node .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: NegativeObjectPropertyAssertion Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``NegativeObjectPropertyAssertion( OPE a1 a2 )`` of the OWL 2 structural specification. Reified RDF form headed by ``owl:NegativePropertyAssertion`` with a resource ``owl:targetIndividual``. Graph lifting claims a node only when ``owl:assertionProperty`` is a known object property expression. Nodes that use ``owl:targetValue`` are claimed as :class:`NegativeDataPropertyAssertion` instead. Triples:: _:x rdf:type owl:NegativePropertyAssertion . _:x owl:sourceIndividual a1 . _:x owl:assertionProperty OPE . _:x owl:targetIndividual a2 . .. py:attribute:: kind :type: Literal['NegativeObjectPropertyAssertion'] :value: 'NegativeObjectPropertyAssertion' .. py:attribute:: name_value :type: axiom.common.N3Resource :value: None .. py:attribute:: object_property_expression :type: axiom.common.N3Resource .. py:attribute:: individual :type: axiom.common.N3Resource .. py:attribute:: value :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode NegativePropertyAssertion node identifier (alias of ``name_value``). .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: NegativeDataPropertyAssertion Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``NegativeDataPropertyAssertion( DPE a lt )`` of the OWL 2 structural specification. Reified RDF form headed by ``owl:NegativePropertyAssertion`` with a literal ``owl:targetValue``. Graph lifting claims a node only when ``owl:assertionProperty`` is a known data property expression. Nodes that use ``owl:targetIndividual`` are claimed as :class:`NegativeObjectPropertyAssertion` instead. Triples:: _:x rdf:type owl:NegativePropertyAssertion . _:x owl:sourceIndividual a . _:x owl:assertionProperty DPE . _:x owl:targetValue lt . .. py:attribute:: kind :type: Literal['NegativeDataPropertyAssertion'] :value: 'NegativeDataPropertyAssertion' .. py:attribute:: name_value :type: axiom.common.N3Resource :value: None .. py:attribute:: data_property_expression :type: axiom.common.N3IRIRef .. py:attribute:: individual :type: axiom.common.N3Resource .. py:attribute:: value :type: axiom.common.N3Node .. py:property:: name :type: rdflib.IdentifiedNode NegativePropertyAssertion node identifier (alias of ``name_value``). .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DifferentIndividuals Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DifferentIndividuals( a1 a2 )`` of the OWL 2 structural specification. Triples:: a1 owl:differentFrom a2 . .. py:attribute:: kind :type: Literal['DifferentIndividuals'] :value: 'DifferentIndividuals' .. py:attribute:: individual_1 :type: axiom.common.N3Resource .. py:attribute:: individual_2 :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: SameIndividual Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``SameIndividual( a1 a2 )`` of the OWL 2 structural specification. Binary form only. An n-ary structural ``SameIndividual( a1 ... an )`` serializes to n-1 ``owl:sameAs`` triples; reverse parse yields binaries. Triples:: a1 owl:sameAs a2 . .. py:attribute:: kind :type: Literal['SameIndividual'] :value: 'SameIndividual' .. py:attribute:: individual_1 :type: axiom.common.N3Resource .. py:attribute:: individual_2 :type: axiom.common.N3Resource .. py:property:: name :type: rdflib.IdentifiedNode .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple] .. py:class:: DifferentIndividualsNary Bases: :py:obj:`axiom.structural_element.StructuralElement` Element ``DifferentIndividuals( a1 ... an )``, n > 2. Serializes with the OWL 2 RDF forward-mapping form ``owl:members``. Graph lifting also accepts the OWL 1 legacy reverse-mapping form ``owl:distinctMembers`` for the same structural axiom; round-trip therefore normalizes legacy graphs to ``owl:members``. Triples:: _:x rdf:type owl:AllDifferent . _:x owl:members T(SEQ a1 ... an) . .. py:attribute:: kind :type: Literal['DifferentIndividualsNary'] :value: 'DifferentIndividualsNary' .. py:attribute:: name_value :type: axiom.common.N3Resource :value: None .. py:attribute:: members :type: axiom.structural_element.Seq .. py:property:: name :type: rdflib.IdentifiedNode AllDifferent node identifier (alias of ``name_value``). .. py:property:: as_triples :type: collections.abc.Sequence[axiom.common.Triple]