owlapy.owl_axiom

OWL Axioms

Module Contents

Classes

OWLAxiom

Represents Axioms in the OWL 2 Specification.

OWLLogicalAxiom

A base interface of all axioms that affect the logical meaning of an ontology. This excludes declaration

OWLPropertyAxiom

The base interface for property axioms.

OWLObjectPropertyAxiom

The base interface for object property axioms.

OWLDataPropertyAxiom

The base interface for data property axioms.

OWLIndividualAxiom

The base interface for individual axioms.

OWLClassAxiom

The base interface for class axioms.

OWLDeclarationAxiom

Represents a Declaration axiom in the OWL 2 Specification. A declaration axiom declares an entity in an ontology.

OWLDatatypeDefinitionAxiom

A datatype definition DatatypeDefinition( DT DR ) defines a new datatype DT as being semantically

OWLHasKeyAxiom

A key axiom HasKey( CE ( OPE1 ... OPEm ) ( DPE1 ... DPEn ) ) states that each

OWLNaryAxiom

Represents an axiom that contains two or more operands that could also be represented with multiple pairwise

OWLNaryClassAxiom

Represents an axiom that contains two or more operands that could also be represented with

OWLEquivalentClassesAxiom

An equivalent classes axiom EquivalentClasses( CE1 ... CEn ) states that all of the class expressions CEi,

OWLDisjointClassesAxiom

A disjoint classes axiom DisjointClasses( CE1 ... CEn ) states that all of the class expressions CEi, 1 ≤ i ≤ n,

OWLNaryIndividualAxiom

Represents an axiom that contains two or more operands that could also be represented with

OWLDifferentIndividualsAxiom

An individual inequality axiom DifferentIndividuals( a1 ... an ) states that all of the individuals ai,

OWLSameIndividualAxiom

An individual equality axiom SameIndividual( a1 ... an ) states that all of the individuals ai, 1 ≤ i ≤ n,

OWLNaryPropertyAxiom

Represents an axiom that contains two or more operands that could also be represented with

OWLEquivalentObjectPropertiesAxiom

An equivalent object properties axiom EquivalentObjectProperties( OPE1 ... OPEn ) states that all of the object

OWLDisjointObjectPropertiesAxiom

A disjoint object properties axiom DisjointObjectProperties( OPE1 ... OPEn ) states that all of the object

OWLInverseObjectPropertiesAxiom

An inverse object properties axiom InverseObjectProperties( OPE1 OPE2 ) states that the object property

OWLEquivalentDataPropertiesAxiom

An equivalent data properties axiom EquivalentDataProperties( DPE1 ... DPEn ) states that all the data property

OWLDisjointDataPropertiesAxiom

A disjoint data properties axiom DisjointDataProperties( DPE1 ... DPEn ) states that all of the data property

OWLSubClassOfAxiom

A subclass axiom SubClassOf( CE1 CE2 ) states that the class expression CE1 is a subclass of the class

OWLDisjointUnionAxiom

A disjoint union axiom DisjointUnion( C CE1 ... CEn ) states that a class C is a disjoint union of the class

OWLClassAssertionAxiom

A class assertion ClassAssertion( CE a ) states that the individual a is an instance of the class expression CE.

OWLAnnotationProperty

Represents an AnnotationProperty in the OWL 2 specification.

OWLAnnotation

Annotations are used in the various types of annotation axioms, which bind annotations to their subjects

OWLAnnotationAxiom

A super interface for annotation axioms.

OWLAnnotationAssertionAxiom

An annotation assertion AnnotationAssertion( AP as av ) states that the annotation subject as — an IRI or an

OWLSubAnnotationPropertyOfAxiom

An annotation subproperty axiom SubAnnotationPropertyOf( AP1 AP2 ) states that the annotation property AP1 is

OWLAnnotationPropertyDomainAxiom

An annotation property domain axiom AnnotationPropertyDomain( AP U ) states that the domain of the annotation

OWLAnnotationPropertyRangeAxiom

An annotation property range axiom AnnotationPropertyRange( AP U )

OWLSubPropertyAxiom

Base interface for object and data sub-property axioms.

OWLSubObjectPropertyOfAxiom

Object subproperty axioms are analogous to subclass axioms, and they come in two forms.

OWLSubDataPropertyOfAxiom

A data subproperty axiom SubDataPropertyOf( DPE1 DPE2 ) states that the data property expression DPE1 is a

OWLPropertyAssertionAxiom

Base class for Property Assertion axioms.

OWLObjectPropertyAssertionAxiom

A positive object property assertion ObjectPropertyAssertion( OPE a1 a2 ) states that the individual a1 is

OWLNegativeObjectPropertyAssertionAxiom

A negative object property assertion NegativeObjectPropertyAssertion( OPE a1 a2 ) states that the individual a1

OWLDataPropertyAssertionAxiom

A positive data property assertion DataPropertyAssertion( DPE a lt ) states that the individual a is connected

OWLNegativeDataPropertyAssertionAxiom

A negative data property assertion NegativeDataPropertyAssertion( DPE a lt ) states that the individual a is not

OWLUnaryPropertyAxiom

Base class for Unary property axiom.

OWLObjectPropertyCharacteristicAxiom

Base interface for functional object property axiom.

OWLFunctionalObjectPropertyAxiom

An object property functionality axiom FunctionalObjectProperty( OPE ) states that

OWLAsymmetricObjectPropertyAxiom

An object property asymmetry axiom AsymmetricObjectProperty( OPE ) states that

OWLInverseFunctionalObjectPropertyAxiom

An object property inverse functionality axiom InverseFunctionalObjectProperty( OPE )

OWLIrreflexiveObjectPropertyAxiom

An object property irreflexivity axiom IrreflexiveObjectProperty( OPE ) states that the

OWLReflexiveObjectPropertyAxiom

An object property reflexivity axiom ReflexiveObjectProperty( OPE ) states that the

OWLSymmetricObjectPropertyAxiom

An object property symmetry axiom SymmetricObjectProperty( OPE ) states that

OWLTransitiveObjectPropertyAxiom

An object property transitivity axiom TransitiveObjectProperty( OPE ) states that the

OWLDataPropertyCharacteristicAxiom

Base interface for Functional data property axiom.

OWLFunctionalDataPropertyAxiom

A data property functionality axiom FunctionalDataProperty( DPE ) states that

OWLPropertyDomainAxiom

Base class for Property Domain axioms.

OWLPropertyRangeAxiom

Base class for Property Range axioms.

OWLObjectPropertyDomainAxiom

An object property domain axiom ObjectPropertyDomain( OPE CE ) states that the domain of the

OWLDataPropertyDomainAxiom

A data property domain axiom DataPropertyDomain( DPE CE ) states that the domain of the

OWLObjectPropertyRangeAxiom

An object property range axiom ObjectPropertyRange( OPE CE ) states that the range of the object property

OWLDataPropertyRangeAxiom

A data property range axiom DataPropertyRange( DPE DR ) states that the range of the data property

class owlapy.owl_axiom.OWLAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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.

__slots__ = '_annotations'
annotations() List[OWLAnnotation] | None[source]
is_annotated() bool[source]
is_logical_axiom() bool[source]
is_annotation_axiom() bool[source]
class owlapy.owl_axiom.OWLLogicalAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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.

__slots__ = ()
is_logical_axiom() bool[source]
class owlapy.owl_axiom.OWLPropertyAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLLogicalAxiom

The base interface for property axioms.

__slots__ = ()
class owlapy.owl_axiom.OWLObjectPropertyAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyAxiom

The base interface for object property axioms.

__slots__ = ()
class owlapy.owl_axiom.OWLDataPropertyAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyAxiom

The base interface for data property axioms.

__slots__ = ()
class owlapy.owl_axiom.OWLIndividualAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLLogicalAxiom

The base interface for individual axioms.

__slots__ = ()
class owlapy.owl_axiom.OWLClassAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLLogicalAxiom

The base interface for class axioms.

__slots__ = ()
class owlapy.owl_axiom.OWLDeclarationAxiom(entity: owlapy.owl_object.OWLEntity, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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.

__slots__ = '_entity'
get_entity() owlapy.owl_object.OWLEntity[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLDatatypeDefinitionAxiom(datatype: owlapy.owl_datatype.OWLDatatype, datarange: owlapy.owl_datatype.OWLDataRange, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ('_datatype', '_datarange')
get_datatype() owlapy.owl_datatype.OWLDatatype[source]
get_datarange() owlapy.owl_datatype.OWLDataRange[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLHasKeyAxiom(class_expression: owlapy.class_expression.OWLClassExpression, property_expressions: List[owlapy.owl_property.OWLPropertyExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLLogicalAxiom, owlapy.meta_classes.HasOperands[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)

__slots__ = ('_class_expression', '_property_expressions')
get_class_expression() owlapy.class_expression.OWLClassExpression[source]
get_property_expressions() List[owlapy.owl_property.OWLPropertyExpression][source]
operands() Iterable[owlapy.owl_property.OWLPropertyExpression][source]

Gets the operands - e.g., the individuals in a sameAs axiom, or the classes in an equivalent classes axiom.

Returns:

The operands.

__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLNaryAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: Generic[_C], OWLAxiom

Represents an axiom that contains two or more operands that could also be represented with multiple pairwise axioms.

Parameters:

_C – Class of contained objects.

__slots__ = ()
abstract as_pairwise_axioms() Iterable[OWLNaryAxiom[_C]][source]
class owlapy.owl_axiom.OWLNaryClassAxiom(class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLClassAxiom, OWLNaryAxiom[owlapy.class_expression.OWLClassExpression]

Represents an axiom that contains two or more operands that could also be represented with multiple pairwise axioms.

__slots__ = '_class_expressions'
class_expressions() Iterable[owlapy.class_expression.OWLClassExpression][source]

Gets all of the top level class expressions that appear in this axiom.

Returns:

Sorted stream of class expressions that appear in the axiom.

as_pairwise_axioms() Iterable[OWLNaryClassAxiom][source]

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.

__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLEquivalentClassesAxiom(class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
contains_named_equivalent_class() bool[source]
contains_owl_nothing() bool[source]
contains_owl_thing() bool[source]
named_classes() Iterable[owlapy.class_expression.OWLClass][source]
class owlapy.owl_axiom.OWLDisjointClassesAxiom(class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLNaryIndividualAxiom(individuals: List[owlapy.owl_individual.OWLIndividual], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLIndividualAxiom, OWLNaryAxiom[owlapy.owl_individual.OWLIndividual]

Represents an axiom that contains two or more operands that could also be represented with multiple pairwise individual axioms.

__slots__ = '_individuals'
individuals() Iterable[owlapy.owl_individual.OWLIndividual][source]

Get the individuals.

Returns:

Generator containing the individuals.

as_pairwise_axioms() Iterable[OWLNaryIndividualAxiom][source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLDifferentIndividualsAxiom(individuals: List[owlapy.owl_individual.OWLIndividual], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLSameIndividualAxiom(individuals: List[owlapy.owl_individual.OWLIndividual], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLNaryPropertyAxiom(properties: List[_P], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: Generic[_P], OWLPropertyAxiom, OWLNaryAxiom[_P]

Represents an axiom that contains two or more operands that could also be represented with multiple pairwise property axioms.

__slots__ = '_properties'
properties() Iterable[_P][source]

Get all the properties that appear in the axiom.

Returns:

Generator containing the properties.

as_pairwise_axioms() Iterable[OWLNaryPropertyAxiom][source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLEquivalentObjectPropertiesAxiom(properties: List[owlapy.owl_property.OWLObjectPropertyExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLNaryPropertyAxiom[owlapy.owl_property.OWLObjectPropertyExpression], 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)

__slots__ = ()
class owlapy.owl_axiom.OWLDisjointObjectPropertiesAxiom(properties: List[owlapy.owl_property.OWLObjectPropertyExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLNaryPropertyAxiom[owlapy.owl_property.OWLObjectPropertyExpression], 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)

__slots__ = ()
class owlapy.owl_axiom.OWLInverseObjectPropertiesAxiom(first: owlapy.owl_property.OWLObjectPropertyExpression, second: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLNaryPropertyAxiom[owlapy.owl_property.OWLObjectPropertyExpression], 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)

__slots__ = ('_first', '_second')
get_first_property() owlapy.owl_property.OWLObjectPropertyExpression[source]
get_second_property() owlapy.owl_property.OWLObjectPropertyExpression[source]
__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLEquivalentDataPropertiesAxiom(properties: List[owlapy.owl_property.OWLDataPropertyExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLNaryPropertyAxiom[owlapy.owl_property.OWLDataPropertyExpression], 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)

__slots__ = ()
class owlapy.owl_axiom.OWLDisjointDataPropertiesAxiom(properties: List[owlapy.owl_property.OWLDataPropertyExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLNaryPropertyAxiom[owlapy.owl_property.OWLDataPropertyExpression], 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

__slots__ = ()
class owlapy.owl_axiom.OWLSubClassOfAxiom(sub_class: owlapy.class_expression.OWLClassExpression, super_class: owlapy.class_expression.OWLClassExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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.

__slots__ = ('_sub_class', '_super_class')
get_sub_class() owlapy.class_expression.OWLClassExpression[source]
get_super_class() owlapy.class_expression.OWLClassExpression[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLDisjointUnionAxiom(cls_: owlapy.class_expression.OWLClass, class_expressions: List[owlapy.class_expression.OWLClassExpression], annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ('_cls', '_class_expressions')
get_owl_class() owlapy.class_expression.OWLClass[source]
get_class_expressions() Iterable[owlapy.class_expression.OWLClassExpression][source]
get_owl_equivalent_classes_axiom() OWLEquivalentClassesAxiom[source]
get_owl_disjoint_classes_axiom() OWLDisjointClassesAxiom[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLClassAssertionAxiom(individual: owlapy.owl_individual.OWLIndividual, class_expression: owlapy.class_expression.OWLClassExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ('_individual', '_class_expression')
get_individual() owlapy.owl_individual.OWLIndividual[source]
get_class_expression() owlapy.class_expression.OWLClassExpression[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLAnnotationProperty(iri: owlapy.iri.IRI | str)[source]

Bases: owlapy.owl_property.OWLProperty

Represents an AnnotationProperty in the OWL 2 specification.

property iri: owlapy.iri.IRI

Gets the IRI of this object.

Returns:

The IRI of this object.

property str: str

Gets the string representation of this object

Returns:

The IRI as string

__slots__ = '_iri'
class owlapy.owl_axiom.OWLAnnotation(property: OWLAnnotationProperty, value: owlapy.owl_annotation.OWLAnnotationValue)[source]

Bases: 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).

__slots__ = ('_property', '_value')
get_property() OWLAnnotationProperty[source]

Gets the property that this annotation acts along.

Returns:

The annotation property.

get_value() owlapy.owl_annotation.OWLAnnotationValue[source]

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.

__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLAnnotationAxiom(annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLAxiom

A super interface for annotation axioms.

__slots__ = ()
is_annotation_axiom() bool[source]
class owlapy.owl_axiom.OWLAnnotationAssertionAxiom(subject: owlapy.owl_annotation.OWLAnnotationSubject, annotation: OWLAnnotation)[source]

Bases: 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)

__slots__ = ('_subject', '_annotation')
get_subject() owlapy.owl_annotation.OWLAnnotationSubject[source]

Gets the subject of this object.

Returns:

The subject.

get_property() OWLAnnotationProperty[source]

Gets the property.

Returns:

The property.

get_value() owlapy.owl_annotation.OWLAnnotationValue[source]

Gets the annotation value. This is either an IRI, an OWLAnonymousIndividual or an OWLLiteral.

Returns:

The annotation value.

__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLSubAnnotationPropertyOfAxiom(sub_property: OWLAnnotationProperty, super_property: OWLAnnotationProperty, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ('_sub_property', '_super_property')
get_sub_property() OWLAnnotationProperty[source]
get_super_property() OWLAnnotationProperty[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLAnnotationPropertyDomainAxiom(property_: OWLAnnotationProperty, domain: owlapy.iri.IRI, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLAnnotationAxiom

An annotation property domain axiom AnnotationPropertyDomain( AP U ) states that the domain of the annotation property AP is the IRI U.

__slots__ = ('_property', '_domain')
get_property() OWLAnnotationProperty[source]
get_domain() owlapy.iri.IRI[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLAnnotationPropertyRangeAxiom(property_: OWLAnnotationProperty, range_: owlapy.iri.IRI, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ('_property', '_range')
get_property() OWLAnnotationProperty[source]
get_range() owlapy.iri.IRI[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLSubPropertyAxiom(sub_property: _P, super_property: _P, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: Generic[_P], OWLPropertyAxiom

Base interface for object and data sub-property axioms.

__slots__ = ('_sub_property', '_super_property')
get_sub_property() _P[source]
get_super_property() _P[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLSubObjectPropertyOfAxiom(sub_property: owlapy.owl_property.OWLObjectPropertyExpression, super_property: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLSubPropertyAxiom[owlapy.owl_property.OWLObjectPropertyExpression], 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)

__slots__ = ()
class owlapy.owl_axiom.OWLSubDataPropertyOfAxiom(sub_property: owlapy.owl_property.OWLDataPropertyExpression, super_property: owlapy.owl_property.OWLDataPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLSubPropertyAxiom[owlapy.owl_property.OWLDataPropertyExpression], 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)

__slots__ = ()
class owlapy.owl_axiom.OWLPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: _P, object_: _C, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: Generic[_P, _C], OWLIndividualAxiom

Base class for Property Assertion axioms.

__slots__ = ('_subject', '_property', '_object')
get_subject() owlapy.owl_individual.OWLIndividual[source]
get_property() _P[source]
get_object() _C[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLObjectPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLObjectPropertyExpression, object_: owlapy.owl_individual.OWLIndividual, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyAssertionAxiom[owlapy.owl_property.OWLObjectPropertyExpression, 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)

__slots__ = ()
class owlapy.owl_axiom.OWLNegativeObjectPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLObjectPropertyExpression, object_: owlapy.owl_individual.OWLIndividual, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyAssertionAxiom[owlapy.owl_property.OWLObjectPropertyExpression, 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)

__slots__ = ()
class owlapy.owl_axiom.OWLDataPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLDataPropertyExpression, object_: owlapy.owl_literal.OWLLiteral, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyAssertionAxiom[owlapy.owl_property.OWLDataPropertyExpression, 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)

__slots__ = ()
class owlapy.owl_axiom.OWLNegativeDataPropertyAssertionAxiom(subject: owlapy.owl_individual.OWLIndividual, property_: owlapy.owl_property.OWLDataPropertyExpression, object_: owlapy.owl_literal.OWLLiteral, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyAssertionAxiom[owlapy.owl_property.OWLDataPropertyExpression, 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)

__slots__ = ()
class owlapy.owl_axiom.OWLUnaryPropertyAxiom(property_: _P, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: Generic[_P], OWLPropertyAxiom

Base class for Unary property axiom.

__slots__ = '_property'
get_property() _P[source]
class owlapy.owl_axiom.OWLObjectPropertyCharacteristicAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLUnaryPropertyAxiom[owlapy.owl_property.OWLObjectPropertyExpression], OWLObjectPropertyAxiom

Base interface for functional object property axiom.

__slots__ = ()
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLFunctionalObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLAsymmetricObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLInverseFunctionalObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLIrreflexiveObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLReflexiveObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLSymmetricObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLTransitiveObjectPropertyAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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 )

__slots__ = ()
class owlapy.owl_axiom.OWLDataPropertyCharacteristicAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLUnaryPropertyAxiom[owlapy.owl_property.OWLDataPropertyExpression], OWLDataPropertyAxiom

Base interface for Functional data property axiom.

__slots__ = ()
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLFunctionalDataPropertyAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: 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)

__slots__ = ()
class owlapy.owl_axiom.OWLPropertyDomainAxiom(property_: _P, domain: owlapy.class_expression.OWLClassExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: Generic[_P], OWLUnaryPropertyAxiom[_P]

Base class for Property Domain axioms.

__slots__ = '_domain'
get_domain() owlapy.class_expression.OWLClassExpression[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLPropertyRangeAxiom(property_: _P, range_: _R, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: Generic[_P, _R], OWLUnaryPropertyAxiom[_P]

Base class for Property Range axioms.

__slots__ = '_range'
get_range() _R[source]
__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_axiom.OWLObjectPropertyDomainAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, domain: owlapy.class_expression.OWLClassExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyDomainAxiom[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)

__slots__ = ()
class owlapy.owl_axiom.OWLDataPropertyDomainAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, domain: owlapy.class_expression.OWLClassExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyDomainAxiom[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)

__slots__ = ()
class owlapy.owl_axiom.OWLObjectPropertyRangeAxiom(property_: owlapy.owl_property.OWLObjectPropertyExpression, range_: owlapy.class_expression.OWLClassExpression, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyRangeAxiom[owlapy.owl_property.OWLObjectPropertyExpression, 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)

__slots__ = ()
class owlapy.owl_axiom.OWLDataPropertyRangeAxiom(property_: owlapy.owl_property.OWLDataPropertyExpression, range_: owlapy.owl_datatype.OWLDataRange, annotations: Iterable[OWLAnnotation] | None = None)[source]

Bases: OWLPropertyRangeAxiom[owlapy.owl_property.OWLDataPropertyExpression, 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)

__slots__ = ()