:py:mod:`owlapy.owl_axiom` ========================== .. py:module:: owlapy.owl_axiom .. autoapi-nested-parse:: OWL Axioms Module Contents --------------- Classes ~~~~~~~ .. autoapisummary:: owlapy.owl_axiom.OWLAxiom owlapy.owl_axiom.OWLLogicalAxiom owlapy.owl_axiom.OWLPropertyAxiom owlapy.owl_axiom.OWLObjectPropertyAxiom owlapy.owl_axiom.OWLDataPropertyAxiom owlapy.owl_axiom.OWLIndividualAxiom owlapy.owl_axiom.OWLClassAxiom owlapy.owl_axiom.OWLDeclarationAxiom owlapy.owl_axiom.OWLDatatypeDefinitionAxiom owlapy.owl_axiom.OWLHasKeyAxiom owlapy.owl_axiom.OWLNaryAxiom owlapy.owl_axiom.OWLNaryClassAxiom owlapy.owl_axiom.OWLEquivalentClassesAxiom owlapy.owl_axiom.OWLDisjointClassesAxiom owlapy.owl_axiom.OWLNaryIndividualAxiom owlapy.owl_axiom.OWLDifferentIndividualsAxiom owlapy.owl_axiom.OWLSameIndividualAxiom owlapy.owl_axiom.OWLNaryPropertyAxiom owlapy.owl_axiom.OWLEquivalentObjectPropertiesAxiom owlapy.owl_axiom.OWLDisjointObjectPropertiesAxiom owlapy.owl_axiom.OWLInverseObjectPropertiesAxiom owlapy.owl_axiom.OWLEquivalentDataPropertiesAxiom owlapy.owl_axiom.OWLDisjointDataPropertiesAxiom owlapy.owl_axiom.OWLSubClassOfAxiom owlapy.owl_axiom.OWLDisjointUnionAxiom owlapy.owl_axiom.OWLClassAssertionAxiom owlapy.owl_axiom.OWLAnnotationProperty owlapy.owl_axiom.OWLAnnotation owlapy.owl_axiom.OWLAnnotationAxiom owlapy.owl_axiom.OWLAnnotationAssertionAxiom owlapy.owl_axiom.OWLSubAnnotationPropertyOfAxiom owlapy.owl_axiom.OWLAnnotationPropertyDomainAxiom owlapy.owl_axiom.OWLAnnotationPropertyRangeAxiom owlapy.owl_axiom.OWLSubPropertyAxiom owlapy.owl_axiom.OWLSubObjectPropertyOfAxiom owlapy.owl_axiom.OWLSubDataPropertyOfAxiom owlapy.owl_axiom.OWLPropertyAssertionAxiom owlapy.owl_axiom.OWLObjectPropertyAssertionAxiom owlapy.owl_axiom.OWLNegativeObjectPropertyAssertionAxiom owlapy.owl_axiom.OWLDataPropertyAssertionAxiom owlapy.owl_axiom.OWLNegativeDataPropertyAssertionAxiom owlapy.owl_axiom.OWLUnaryPropertyAxiom owlapy.owl_axiom.OWLObjectPropertyCharacteristicAxiom owlapy.owl_axiom.OWLFunctionalObjectPropertyAxiom owlapy.owl_axiom.OWLAsymmetricObjectPropertyAxiom owlapy.owl_axiom.OWLInverseFunctionalObjectPropertyAxiom owlapy.owl_axiom.OWLIrreflexiveObjectPropertyAxiom owlapy.owl_axiom.OWLReflexiveObjectPropertyAxiom owlapy.owl_axiom.OWLSymmetricObjectPropertyAxiom owlapy.owl_axiom.OWLTransitiveObjectPropertyAxiom owlapy.owl_axiom.OWLDataPropertyCharacteristicAxiom owlapy.owl_axiom.OWLFunctionalDataPropertyAxiom owlapy.owl_axiom.OWLPropertyDomainAxiom owlapy.owl_axiom.OWLPropertyRangeAxiom owlapy.owl_axiom.OWLObjectPropertyDomainAxiom owlapy.owl_axiom.OWLDataPropertyDomainAxiom owlapy.owl_axiom.OWLObjectPropertyRangeAxiom owlapy.owl_axiom.OWLDataPropertyRangeAxiom .. py:class:: OWLAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`owlapy.owl_object.OWLObject` Represents Axioms in the OWL 2 Specification. An OWL ontology contains a set of axioms. These axioms can be annotation axioms, declaration axioms, imports axioms or logical axioms. .. py:attribute:: __slots__ :value: '_annotations' .. py:method:: annotations() -> Optional[List[OWLAnnotation]] .. py:method:: is_annotated() -> bool .. py:method:: is_logical_axiom() -> bool .. py:method:: is_annotation_axiom() -> bool .. py:class:: OWLLogicalAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLAxiom` A base interface of all axioms that affect the logical meaning of an ontology. This excludes declaration axioms (including imports declarations) and annotation axioms. .. py:attribute:: __slots__ :value: () .. py:method:: is_logical_axiom() -> bool .. py:class:: OWLPropertyAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLLogicalAxiom` The base interface for property axioms. .. py:attribute:: __slots__ :value: () .. py:class:: OWLObjectPropertyAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyAxiom` The base interface for object property axioms. .. py:attribute:: __slots__ :value: () .. py:class:: OWLDataPropertyAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyAxiom` The base interface for data property axioms. .. py:attribute:: __slots__ :value: () .. py:class:: OWLIndividualAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLLogicalAxiom` The base interface for individual axioms. .. py:attribute:: __slots__ :value: () .. py:class:: OWLClassAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLLogicalAxiom` The base interface for class axioms. .. py:attribute:: __slots__ :value: () .. py:class:: OWLDeclarationAxiom(entity: owlapy.owl_object.OWLEntity, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLAxiom` Represents a Declaration axiom in the OWL 2 Specification. A declaration axiom declares an entity in an ontology. It doesn't affect the logical meaning of the ontology. .. py:attribute:: __slots__ :value: '_entity' .. py:method:: get_entity() -> owlapy.owl_object.OWLEntity .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLDatatypeDefinitionAxiom(datatype: owlapy.owl_datatype.OWLDatatype, datarange: owlapy.owl_datatype.OWLDataRange, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLLogicalAxiom` A datatype definition DatatypeDefinition( DT DR ) defines a new datatype DT as being semantically equivalent to the data range DR; the latter must be a unary data range. This axiom allows one to use the defined datatype DT as a synonym for DR — that is, in any expression in the ontology containing such an axiom, DT can be replaced with DR without affecting the meaning of the ontology. (https://www.w3.org/TR/owl2-syntax/#Datatype_Definitions) .. py:attribute:: __slots__ :value: ('_datatype', '_datarange') .. py:method:: get_datatype() -> owlapy.owl_datatype.OWLDatatype .. py:method:: get_datarange() -> owlapy.owl_datatype.OWLDataRange .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLHasKeyAxiom(class_expression: owlapy.class_expression.OWLClassExpression, property_expressions: List[owlapy.owl_property.OWLPropertyExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLLogicalAxiom`, :py:obj:`owlapy.meta_classes.HasOperands`\ [\ :py:obj:`owlapy.owl_property.OWLPropertyExpression`\ ] A key axiom HasKey( CE ( OPE1 ... OPEm ) ( DPE1 ... DPEn ) ) states that each (named) instance of the class expression CE is uniquely identified by the object property expressions OPEi and/or the data property expressions DPEj — that is, no two distinct (named) instances of CE can coincide on the values of all object property expressions OPEi and all data property expressions DPEj. In each such axiom in an OWL ontology, m or n (or both) must be larger than zero. A key axiom of the form HasKey( owl:Thing ( OPE ) () ) is similar to the axiom InverseFunctionalObjectProperty( OPE ), the main differences being that the former axiom is applicable only to individuals that are explicitly named in an ontology, while the latter axiom is also applicable to anonymous individuals and individuals whose existence is implied by existential quantification. (https://www.w3.org/TR/owl2-syntax/#Keys) .. py:attribute:: __slots__ :value: ('_class_expression', '_property_expressions') .. py:method:: get_class_expression() -> owlapy.class_expression.OWLClassExpression .. py:method:: get_property_expressions() -> List[owlapy.owl_property.OWLPropertyExpression] .. py:method:: operands() -> Iterable[owlapy.owl_property.OWLPropertyExpression] Gets the operands - e.g., the individuals in a sameAs axiom, or the classes in an equivalent classes axiom. :returns: The operands. .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLNaryAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`_C`\ ], :py:obj:`OWLAxiom` Represents an axiom that contains two or more operands that could also be represented with multiple pairwise axioms. :param _C: Class of contained objects. .. py:attribute:: __slots__ :value: () .. py:method:: as_pairwise_axioms() -> Iterable[OWLNaryAxiom[_C]] :abstractmethod: .. py:class:: OWLNaryClassAxiom(class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLClassAxiom`, :py:obj:`OWLNaryAxiom`\ [\ :py:obj:`owlapy.class_expression.OWLClassExpression`\ ] Represents an axiom that contains two or more operands that could also be represented with multiple pairwise axioms. .. py:attribute:: __slots__ :value: '_class_expressions' .. py:method:: class_expressions() -> Iterable[owlapy.class_expression.OWLClassExpression] Gets all of the top level class expressions that appear in this axiom. :returns: Sorted stream of class expressions that appear in the axiom. .. py:method:: as_pairwise_axioms() -> Iterable[OWLNaryClassAxiom] Gets this axiom as a set of pairwise axioms; if the axiom contains only two operands, the axiom itself is returned unchanged, including its annotations. :returns: This axiom as a set of pairwise axioms. .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLEquivalentClassesAxiom(class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryClassAxiom` An equivalent classes axiom EquivalentClasses( CE1 ... CEn ) states that all of the class expressions CEi, 1 ≤ i ≤ n, are semantically equivalent to each other. This axiom allows one to use each CEi as a synonym for each CEj — that is, in any expression in the ontology containing such an axiom, CEi can be replaced with CEj without affecting the meaning of the ontology. (https://www.w3.org/TR/owl2-syntax/#Equivalent_Classes) .. py:attribute:: __slots__ :value: () .. py:method:: contains_named_equivalent_class() -> bool .. py:method:: contains_owl_nothing() -> bool .. py:method:: contains_owl_thing() -> bool .. py:method:: named_classes() -> Iterable[owlapy.class_expression.OWLClass] .. py:class:: OWLDisjointClassesAxiom(class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryClassAxiom` A disjoint classes axiom DisjointClasses( CE1 ... CEn ) states that all of the class expressions CEi, 1 ≤ i ≤ n, are pairwise disjoint; that is, no individual can be at the same time an instance of both CEi and CEj for i ≠ j. (https://www.w3.org/TR/owl2-syntax/#Disjoint_Classes) .. py:attribute:: __slots__ :value: () .. py:class:: OWLNaryIndividualAxiom(individuals: List[owlapy.owl_individual.OWLIndividual], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLIndividualAxiom`, :py:obj:`OWLNaryAxiom`\ [\ :py:obj:`owlapy.owl_individual.OWLIndividual`\ ] Represents an axiom that contains two or more operands that could also be represented with multiple pairwise individual axioms. .. py:attribute:: __slots__ :value: '_individuals' .. py:method:: individuals() -> Iterable[owlapy.owl_individual.OWLIndividual] Get the individuals. :returns: Generator containing the individuals. .. py:method:: as_pairwise_axioms() -> Iterable[OWLNaryIndividualAxiom] .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLDifferentIndividualsAxiom(individuals: List[owlapy.owl_individual.OWLIndividual], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryIndividualAxiom` An individual inequality axiom DifferentIndividuals( a1 ... an ) states that all of the individuals ai, 1 ≤ i ≤ n, are different from each other; that is, no individuals ai and aj with i ≠ j can be derived to be equal. This axiom can be used to axiomatize the unique name assumption — the assumption that all different individual names denote different individuals. (https://www.w3.org/TR/owl2-syntax/#Individual_Inequality) .. py:attribute:: __slots__ :value: () .. py:class:: OWLSameIndividualAxiom(individuals: List[owlapy.owl_individual.OWLIndividual], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryIndividualAxiom` An individual equality axiom SameIndividual( a1 ... an ) states that all of the individuals ai, 1 ≤ i ≤ n, are equal to each other. This axiom allows one to use each ai as a synonym for each aj — that is, in any expression in the ontology containing such an axiom, ai can be replaced with aj without affecting the meaning of the ontology. (https://www.w3.org/TR/owl2-syntax/#Individual_Equality) .. py:attribute:: __slots__ :value: () .. py:class:: OWLNaryPropertyAxiom(properties: List[_P], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ ], :py:obj:`OWLPropertyAxiom`, :py:obj:`OWLNaryAxiom`\ [\ :py:obj:`_P`\ ] Represents an axiom that contains two or more operands that could also be represented with multiple pairwise property axioms. .. py:attribute:: __slots__ :value: '_properties' .. py:method:: properties() -> Iterable[_P] Get all the properties that appear in the axiom. :returns: Generator containing the properties. .. py:method:: as_pairwise_axioms() -> Iterable[OWLNaryPropertyAxiom] .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLEquivalentObjectPropertiesAxiom(properties: List[owlapy.owl_property.OWLObjectPropertyExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ ], :py:obj:`OWLObjectPropertyAxiom` An equivalent object properties axiom EquivalentObjectProperties( OPE1 ... OPEn ) states that all of the object property expressions OPEi, 1 ≤ i ≤ n, are semantically equivalent to each other. This axiom allows one to use each OPEi as a synonym for each OPEj — that is, in any expression in the ontology containing such an axiom, OPEi can be replaced with OPEj without affecting the meaning of the ontology. (https://www.w3.org/TR/owl2-syntax/#Equivalent_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLDisjointObjectPropertiesAxiom(properties: List[owlapy.owl_property.OWLObjectPropertyExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ ], :py:obj:`OWLObjectPropertyAxiom` A disjoint object properties axiom DisjointObjectProperties( OPE1 ... OPEn ) states that all of the object property expressions OPEi, 1 ≤ i ≤ n, are pairwise disjoint; that is, no individual x can be connected to an individual y by both OPEi and OPEj for i ≠ j. (https://www.w3.org/TR/owl2-syntax/#Disjoint_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLInverseObjectPropertiesAxiom(first: owlapy.owl_property.OWLObjectPropertyExpression, second: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ ], :py:obj:`OWLObjectPropertyAxiom` An inverse object properties axiom InverseObjectProperties( OPE1 OPE2 ) states that the object property expression OPE1 is an inverse of the object property expression OPE2. Thus, if an individual x is connected by OPE1 to an individual y, then y is also connected by OPE2 to x, and vice versa. (https://www.w3.org/TR/owl2-syntax/#Inverse_Object_Properties_2) .. py:attribute:: __slots__ :value: ('_first', '_second') .. py:method:: get_first_property() -> owlapy.owl_property.OWLObjectPropertyExpression .. py:method:: get_second_property() -> owlapy.owl_property.OWLObjectPropertyExpression .. py:method:: __repr__() Return repr(self). .. py:class:: OWLEquivalentDataPropertiesAxiom(properties: List[owlapy.owl_property.OWLDataPropertyExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ ], :py:obj:`OWLDataPropertyAxiom` An equivalent data properties axiom EquivalentDataProperties( DPE1 ... DPEn ) states that all the data property expressions DPEi, 1 ≤ i ≤ n, are semantically equivalent to each other. This axiom allows one to use each DPEi as a synonym for each DPEj — that is, in any expression in the ontology containing such an axiom, DPEi can be replaced with DPEj without affecting the meaning of the ontology. (https://www.w3.org/TR/owl2-syntax/#Equivalent_Data_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLDisjointDataPropertiesAxiom(properties: List[owlapy.owl_property.OWLDataPropertyExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLNaryPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ ], :py:obj:`OWLDataPropertyAxiom` A disjoint data properties axiom DisjointDataProperties( DPE1 ... DPEn ) states that all of the data property expressions DPEi, 1 ≤ i ≤ n, are pairwise disjoint; that is, no individual x can be connected to a literal y by both DPEi and DPEj for i ≠ j. (https://www.w3.org/TR/owl2-syntax/#Disjoint_Data_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLSubClassOfAxiom(sub_class: owlapy.class_expression.OWLClassExpression, super_class: owlapy.class_expression.OWLClassExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLClassAxiom` A subclass axiom SubClassOf( CE1 CE2 ) states that the class expression CE1 is a subclass of the class expression CE2. Roughly speaking, this states that CE1 is more specific than CE2. Subclass axioms are a fundamental type of axioms in OWL 2 and can be used to construct a class hierarchy. Other kinds of class expression axiom can be seen as syntactic shortcuts for one or more subclass axioms. (https://www.w3.org/TR/owl2-syntax/#Subclass_Axioms) .. py:attribute:: __slots__ :value: ('_sub_class', '_super_class') .. py:method:: get_sub_class() -> owlapy.class_expression.OWLClassExpression .. py:method:: get_super_class() -> owlapy.class_expression.OWLClassExpression .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLDisjointUnionAxiom(cls_: owlapy.class_expression.OWLClass, class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLClassAxiom` A disjoint union axiom DisjointUnion( C CE1 ... CEn ) states that a class C is a disjoint union of the class expressions CEi, 1 ≤ i ≤ n, all of which are pairwise disjoint. Such axioms are sometimes referred to as covering axioms, as they state that the extensions of all CEi exactly cover the extension of C. Thus, each instance of C is an instance of exactly one CEi, and each instance of CEi is an instance of C. (https://www.w3.org/TR/owl2-syntax/#Disjoint_Union_of_Class_Expressions) .. py:attribute:: __slots__ :value: ('_cls', '_class_expressions') .. py:method:: get_owl_class() -> owlapy.class_expression.OWLClass .. py:method:: get_class_expressions() -> Iterable[owlapy.class_expression.OWLClassExpression] .. py:method:: get_owl_equivalent_classes_axiom() -> OWLEquivalentClassesAxiom .. py:method:: get_owl_disjoint_classes_axiom() -> OWLDisjointClassesAxiom .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLClassAssertionAxiom(individual: owlapy.owl_individual.OWLIndividual, class_expression: owlapy.class_expression.OWLClassExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLIndividualAxiom` A class assertion ClassAssertion( CE a ) states that the individual a is an instance of the class expression CE. (https://www.w3.org/TR/owl2-syntax/#Class_Assertions) .. py:attribute:: __slots__ :value: ('_individual', '_class_expression') .. py:method:: get_individual() -> owlapy.owl_individual.OWLIndividual .. py:method:: get_class_expression() -> owlapy.class_expression.OWLClassExpression .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLAnnotationProperty(iri: Union[owlapy.iri.IRI, str]) Bases: :py:obj:`owlapy.owl_property.OWLProperty` Represents an AnnotationProperty in the OWL 2 specification. .. py:property:: iri :type: owlapy.iri.IRI Gets the IRI of this object. :returns: The IRI of this object. .. py:property:: str :type: str Gets the string representation of this object :returns: The IRI as string .. py:attribute:: __slots__ :value: '_iri' .. py:class:: OWLAnnotation(property: OWLAnnotationProperty, value: owlapy.owl_annotation.OWLAnnotationValue) Bases: :py:obj:`owlapy.owl_object.OWLObject` Annotations are used in the various types of annotation axioms, which bind annotations to their subjects (i.e. axioms or declarations). .. py:attribute:: __slots__ :value: ('_property', '_value') .. py:method:: get_property() -> OWLAnnotationProperty Gets the property that this annotation acts along. :returns: The annotation property. .. py:method:: get_value() -> owlapy.owl_annotation.OWLAnnotationValue Gets the annotation value. The type of value will depend upon the type of the annotation e.g. whether the annotation is an OWLLiteral, an IRI or an OWLAnonymousIndividual. :returns: The annotation value. .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLAnnotationAxiom(annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLAxiom` A super interface for annotation axioms. .. py:attribute:: __slots__ :value: () .. py:method:: is_annotation_axiom() -> bool .. py:class:: OWLAnnotationAssertionAxiom(subject: owlapy.owl_annotation.OWLAnnotationSubject, annotation: OWLAnnotation) Bases: :py:obj:`OWLAnnotationAxiom` An annotation assertion AnnotationAssertion( AP as av ) states that the annotation subject as — an IRI or an anonymous individual — is annotated with the annotation property AP and the annotation value av. (https://www.w3.org/TR/owl2-syntax/#Annotation_Assertion) .. py:attribute:: __slots__ :value: ('_subject', '_annotation') .. py:method:: get_subject() -> owlapy.owl_annotation.OWLAnnotationSubject Gets the subject of this object. :returns: The subject. .. py:method:: get_property() -> OWLAnnotationProperty Gets the property. :returns: The property. .. py:method:: get_value() -> owlapy.owl_annotation.OWLAnnotationValue Gets the annotation value. This is either an IRI, an OWLAnonymousIndividual or an OWLLiteral. :returns: The annotation value. .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLSubAnnotationPropertyOfAxiom(sub_property: OWLAnnotationProperty, super_property: OWLAnnotationProperty, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLAnnotationAxiom` An annotation subproperty axiom SubAnnotationPropertyOf( AP1 AP2 ) states that the annotation property AP1 is a subproperty of the annotation property AP2. (https://www.w3.org/TR/owl2-syntax/#Annotation_Subproperties) .. py:attribute:: __slots__ :value: ('_sub_property', '_super_property') .. py:method:: get_sub_property() -> OWLAnnotationProperty .. py:method:: get_super_property() -> OWLAnnotationProperty .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLAnnotationPropertyDomainAxiom(property_: OWLAnnotationProperty, domain: owlapy.iri.IRI, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLAnnotationAxiom` An annotation property domain axiom AnnotationPropertyDomain( AP U ) states that the domain of the annotation property AP is the IRI U. (https://www.w3.org/TR/owl2-syntax/#Annotation_Property_Domain) .. py:attribute:: __slots__ :value: ('_property', '_domain') .. py:method:: get_property() -> OWLAnnotationProperty .. py:method:: get_domain() -> owlapy.iri.IRI .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLAnnotationPropertyRangeAxiom(property_: OWLAnnotationProperty, range_: owlapy.iri.IRI, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLAnnotationAxiom` An annotation property range axiom AnnotationPropertyRange( AP U ) states that the range of the annotation property AP is the IRI U. (https://www.w3.org/TR/owl2-syntax/#Annotation_Property_Range) .. py:attribute:: __slots__ :value: ('_property', '_range') .. py:method:: get_property() -> OWLAnnotationProperty .. py:method:: get_range() -> owlapy.iri.IRI .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLSubPropertyAxiom(sub_property: _P, super_property: _P, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ ], :py:obj:`OWLPropertyAxiom` Base interface for object and data sub-property axioms. .. py:attribute:: __slots__ :value: ('_sub_property', '_super_property') .. py:method:: get_sub_property() -> _P .. py:method:: get_super_property() -> _P .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLSubObjectPropertyOfAxiom(sub_property: owlapy.owl_property.OWLObjectPropertyExpression, super_property: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLSubPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ ], :py:obj:`OWLObjectPropertyAxiom` Object subproperty axioms are analogous to subclass axioms, and they come in two forms. The basic form is SubObjectPropertyOf( OPE1 OPE2 ). This axiom states that the object property expression OPE1 is a subproperty of the object property expression OPE2 — that is, if an individual x is connected by OPE1 to an individual y, then x is also connected by OPE2 to y. The more complex form is SubObjectPropertyOf( ObjectPropertyChain( OPE1 ... OPEn ) OPE ) but ObjectPropertyChain is not represented in owlapy yet. (https://www.w3.org/TR/owl2-syntax/#Object_Subproperties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLSubDataPropertyOfAxiom(sub_property: owlapy.owl_property.OWLDataPropertyExpression, super_property: owlapy.owl_property.OWLDataPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLSubPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ ], :py:obj:`OWLDataPropertyAxiom` A data subproperty axiom SubDataPropertyOf( DPE1 DPE2 ) states that the data property expression DPE1 is a subproperty of the data property expression DPE2 — that is, if an individual x is connected by DPE1 to a literal y, then x is connected by DPE2 to y as well. (https://www.w3.org/TR/owl2-syntax/#Data_Subproperties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: _P, object_: _C, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ , :py:obj:`_C`\ ], :py:obj:`OWLIndividualAxiom` Base class for Property Assertion axioms. .. py:attribute:: __slots__ :value: ('_subject', '_property', '_object') .. py:method:: get_subject() -> owlapy.owl_individual.OWLIndividual .. py:method:: get_property() -> _P .. py:method:: get_object() -> _C .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLObjectPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLObjectPropertyExpression, object_: owlapy.owl_individual.OWLIndividual, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyAssertionAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ , :py:obj:`owlapy.owl_individual.OWLIndividual`\ ] A positive object property assertion ObjectPropertyAssertion( OPE a1 a2 ) states that the individual a1 is connected by the object property expression OPE to the individual a2. (https://www.w3.org/TR/owl2-syntax/#Positive_Object_Property_Assertions) .. py:attribute:: __slots__ :value: () .. py:class:: OWLNegativeObjectPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLObjectPropertyExpression, object_: owlapy.owl_individual.OWLIndividual, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyAssertionAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ , :py:obj:`owlapy.owl_individual.OWLIndividual`\ ] A negative object property assertion NegativeObjectPropertyAssertion( OPE a1 a2 ) states that the individual a1 is not connected by the object property expression OPE to the individual a2. (https://www.w3.org/TR/owl2-syntax/#Negative_Object_Property_Assertions) .. py:attribute:: __slots__ :value: () .. py:class:: OWLDataPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLDataPropertyExpression, object_: owlapy.owl_literal.OWLLiteral, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyAssertionAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ , :py:obj:`owlapy.owl_literal.OWLLiteral`\ ] A positive data property assertion DataPropertyAssertion( DPE a lt ) states that the individual a is connected by the data property expression DPE to the literal lt. (https://www.w3.org/TR/owl2-syntax/#Positive_Data_Property_Assertions) .. py:attribute:: __slots__ :value: () .. py:class:: OWLNegativeDataPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLDataPropertyExpression, object_: owlapy.owl_literal.OWLLiteral, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyAssertionAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ , :py:obj:`owlapy.owl_literal.OWLLiteral`\ ] A negative data property assertion NegativeDataPropertyAssertion( DPE a lt ) states that the individual a is not connected by the data property expression DPE to the literal lt. (https://www.w3.org/TR/owl2-syntax/#Negative_Data_Property_Assertions) .. py:attribute:: __slots__ :value: () .. py:class:: OWLUnaryPropertyAxiom(property_: _P, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ ], :py:obj:`OWLPropertyAxiom` Base class for Unary property axiom. .. py:attribute:: __slots__ :value: '_property' .. py:method:: get_property() -> _P .. py:class:: OWLObjectPropertyCharacteristicAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLUnaryPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ ], :py:obj:`OWLObjectPropertyAxiom` Base interface for functional object property axiom. .. py:attribute:: __slots__ :value: () .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLFunctionalObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLObjectPropertyCharacteristicAxiom` An object property functionality axiom FunctionalObjectProperty( OPE ) states that the object property expression OPE is functional — that is, for each individual x, there can be at most one distinct individual y such that x is connected by OPE to y. (https://www.w3.org/TR/owl2-syntax/#Functional_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLAsymmetricObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLObjectPropertyCharacteristicAxiom` An object property asymmetry axiom AsymmetricObjectProperty( OPE ) states that the object property expression OPE is asymmetric — that is, if an individual x is connected by OPE to an individual y, then y cannot be connected by OPE to x. (https://www.w3.org/TR/owl2-syntax/#Symmetric_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLInverseFunctionalObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLObjectPropertyCharacteristicAxiom` An object property inverse functionality axiom InverseFunctionalObjectProperty( OPE ) states that the object property expression OPE is inverse-functional — that is, for each individual x, there can be at most one individual y such that y is connected by OPE with x. (https://www.w3.org/TR/owl2-syntax/#Inverse-Functional_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLIrreflexiveObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLObjectPropertyCharacteristicAxiom` An object property irreflexivity axiom IrreflexiveObjectProperty( OPE ) states that the object property expression OPE is irreflexive — that is, no individual is connected by OPE to itself. (https://www.w3.org/TR/owl2-syntax/#Irreflexive_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLReflexiveObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLObjectPropertyCharacteristicAxiom` An object property reflexivity axiom ReflexiveObjectProperty( OPE ) states that the object property expression OPE is reflexive — that is, each individual is connected by OPE to itself. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( owl:Thing ObjectHasSelf( OPE ) ) (https://www.w3.org/TR/owl2-syntax/#Reflexive_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLSymmetricObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLObjectPropertyCharacteristicAxiom` An object property symmetry axiom SymmetricObjectProperty( OPE ) states that the object property expression OPE is symmetric — that is, if an individual x is connected by OPE to an individual y, then y is also connected by OPE to x. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubObjectPropertyOf( OPE ObjectInverseOf( OPE ) ) (https://www.w3.org/TR/owl2-syntax/#Symmetric_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLTransitiveObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLObjectPropertyCharacteristicAxiom` An object property transitivity axiom TransitiveObjectProperty( OPE ) states that the object property expressionOPE is transitive — that is, if an individual x is connected by OPE to an individual y that is connected by OPE to an individual z, then x is also connected by OPE to z. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubObjectPropertyOf( ObjectPropertyChain( OPE OPE ) OPE ) (https://www.w3.org/TR/owl2-syntax/#Transitive_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLDataPropertyCharacteristicAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLUnaryPropertyAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ ], :py:obj:`OWLDataPropertyAxiom` Base interface for Functional data property axiom. .. py:attribute:: __slots__ :value: () .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLFunctionalDataPropertyAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLDataPropertyCharacteristicAxiom` A data property functionality axiom FunctionalDataProperty( DPE ) states that the data property expression DPE is functional — that is, for each individual x, there can be at most one distinct literal y such that x is connected by DPE with y. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( owl:Thing DataMaxCardinality( 1 DPE ) ) (https://www.w3.org/TR/owl2-syntax/#Transitive_Object_Properties) .. py:attribute:: __slots__ :value: () .. py:class:: OWLPropertyDomainAxiom(property_: _P, domain: owlapy.class_expression.OWLClassExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ ], :py:obj:`OWLUnaryPropertyAxiom`\ [\ :py:obj:`_P`\ ] Base class for Property Domain axioms. .. py:attribute:: __slots__ :value: '_domain' .. py:method:: get_domain() -> owlapy.class_expression.OWLClassExpression .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLPropertyRangeAxiom(property_: _P, range_: _R, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`Generic`\ [\ :py:obj:`_P`\ , :py:obj:`_R`\ ], :py:obj:`OWLUnaryPropertyAxiom`\ [\ :py:obj:`_P`\ ] Base class for Property Range axioms. .. py:attribute:: __slots__ :value: '_range' .. py:method:: get_range() -> _R .. py:method:: __eq__(other) Return self==value. .. py:method:: __hash__() Return hash(self). .. py:method:: __repr__() Return repr(self). .. py:class:: OWLObjectPropertyDomainAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, domain: owlapy.class_expression.OWLClassExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyDomainAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ ] An object property domain axiom ObjectPropertyDomain( OPE CE ) states that the domain of the object property expression OPE is the class expression CE — that is, if an individual x is connected by OPE with some other individual, then x is an instance of CE. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( ObjectSomeValuesFrom( OPE owl:Thing ) CE ) (https://www.w3.org/TR/owl2-syntax/#Object_Property_Domain) .. py:attribute:: __slots__ :value: () .. py:class:: OWLDataPropertyDomainAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, domain: owlapy.class_expression.OWLClassExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyDomainAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ ] A data property domain axiom DataPropertyDomain( DPE CE ) states that the domain of the data property expression DPE is the class expression CE — that is, if an individual x is connected by DPE with some literal, then x is an instance of CE. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( DataSomeValuesFrom( DPE rdfs:Literal) CE ) (https://www.w3.org/TR/owl2-syntax/#Data_Property_Domain) .. py:attribute:: __slots__ :value: () .. py:class:: OWLObjectPropertyRangeAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, range_: owlapy.class_expression.OWLClassExpression, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyRangeAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLObjectPropertyExpression`\ , :py:obj:`owlapy.class_expression.OWLClassExpression`\ ] An object property range axiom ObjectPropertyRange( OPE CE ) states that the range of the object property expression OPE is the class expression CE — that is, if some individual is connected by OPE with an individual x, then x is an instance of CE. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( owl:Thing ObjectAllValuesFrom( OPE CE ) ) (https://www.w3.org/TR/owl2-syntax/#Object_Property_Range) .. py:attribute:: __slots__ :value: () .. py:class:: OWLDataPropertyRangeAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, range_: owlapy.owl_datatype.OWLDataRange, annotations: Optional[Iterable[OWLAnnotation]] = None) Bases: :py:obj:`OWLPropertyRangeAxiom`\ [\ :py:obj:`owlapy.owl_property.OWLDataPropertyExpression`\ , :py:obj:`owlapy.owl_datatype.OWLDataRange`\ ] A data property range axiom DataPropertyRange( DPE DR ) states that the range of the data property expression DPE is the data range DR — that is, if some individual is connected by DPE with a literal x, then x is in DR. The arity of DR must be one. Each such axiom can be seen as a syntactic shortcut for the following axiom: SubClassOf( owl:Thing DataAllValuesFrom( DPE DR ) ) (https://www.w3.org/TR/owl2-syntax/#Data_Property_Range) .. py:attribute:: __slots__ :value: ()