owlapy.class_expression ======================= .. py:module:: owlapy.class_expression .. autoapi-nested-parse:: OWL Class Expressions https://www.w3.org/TR/owl2-syntax/#Class_Expressions ClassExpression := owl_class.py: Class nary_boolean_expression.py: ObjectIntersectionOf, ObjectUnionOf class_expression.py: ObjectComplementOf restriction.py: ObjectOneOf, ObjectSomeValuesFrom, ObjectAllValuesFrom, ObjectHasValue,ObjectHasSelf, ObjectMinCardinality, ObjectMaxCardinality, ObjectExactCardinality, DataSomeValuesFrom, DataAllValuesFrom, DataHasValue, DataMinCardinality, DataMaxCardinality, DataExactCardinality Submodules ---------- .. toctree:: :maxdepth: 1 /autoapi/owlapy/class_expression/class_expression/index /autoapi/owlapy/class_expression/nary_boolean_expression/index /autoapi/owlapy/class_expression/owl_class/index /autoapi/owlapy/class_expression/restriction/index Classes ------- .. autoapisummary:: owlapy.class_expression.OWLClassExpression owlapy.class_expression.OWLAnonymousClassExpression owlapy.class_expression.OWLBooleanClassExpression owlapy.class_expression.OWLObjectComplementOf owlapy.class_expression.OWLClass owlapy.class_expression.OWLNaryBooleanClassExpression owlapy.class_expression.OWLObjectUnionOf owlapy.class_expression.OWLObjectIntersectionOf owlapy.class_expression.OWLRestriction owlapy.class_expression.OWLQuantifiedRestriction owlapy.class_expression.OWLQuantifiedObjectRestriction owlapy.class_expression.OWLObjectRestriction owlapy.class_expression.OWLHasValueRestriction owlapy.class_expression.OWLDataRestriction owlapy.class_expression.OWLCardinalityRestriction owlapy.class_expression.OWLObjectCardinalityRestriction owlapy.class_expression.OWLObjectHasSelf owlapy.class_expression.OWLDataOneOf owlapy.class_expression.OWLQuantifiedDataRestriction owlapy.class_expression.OWLDataCardinalityRestriction owlapy.class_expression.OWLObjectSomeValuesFrom owlapy.class_expression.OWLObjectAllValuesFrom owlapy.class_expression.OWLObjectHasValue owlapy.class_expression.OWLDatatypeRestriction owlapy.class_expression.OWLFacet owlapy.class_expression.OWLFacetRestriction owlapy.class_expression.OWLObjectMinCardinality owlapy.class_expression.OWLObjectMaxCardinality owlapy.class_expression.OWLObjectExactCardinality owlapy.class_expression.OWLDataSomeValuesFrom owlapy.class_expression.OWLDataAllValuesFrom owlapy.class_expression.OWLDataHasValue owlapy.class_expression.OWLDataMinCardinality owlapy.class_expression.OWLDataMaxCardinality owlapy.class_expression.OWLDataExactCardinality owlapy.class_expression.OWLObjectOneOf Package Contents ---------------- .. py:class:: OWLClassExpression Bases: :py:obj:`owlapy.owl_data_ranges.OWLPropertyRange` OWL Class expressions represent sets of individuals by formally specifying conditions on the individuals' properties; individuals satisfying these conditions are said to be instances of the respective class expressions. In the structural specification of OWL 2, class expressions are represented by ClassExpression. (https://www.w3.org/TR/owl2-syntax/#Class_Expressions) .. py:attribute:: __slots__ :value: () .. py:method:: is_owl_thing() -> bool :abstractmethod: Determines if this expression is the built in class owl:Thing. This method does not determine if the class is equivalent to owl:Thing. :returns: Thing. :rtype: True if this expression is owl .. py:method:: is_owl_nothing() -> bool :abstractmethod: Determines if this expression is the built in class owl:Nothing. This method does not determine if the class is equivalent to owl:Nothing. .. py:method:: get_object_complement_of() -> OWLObjectComplementOf :abstractmethod: Gets the object complement of this class expression. :returns: A class expression that is the complement of this class expression. .. py:method:: get_nnf() -> OWLClassExpression :abstractmethod: Gets the negation normal form of the complement of this expression. :returns: A expression that represents the NNF of the complement of this expression. .. py:class:: OWLAnonymousClassExpression Bases: :py:obj:`OWLClassExpression` A Class Expression which is not a named Class. .. py:method:: is_owl_nothing() -> bool Determines if this expression is the built in class owl:Nothing. This method does not determine if the class is equivalent to owl:Nothing. .. py:method:: is_owl_thing() -> bool Determines if this expression is the built in class owl:Thing. This method does not determine if the class is equivalent to owl:Thing. :returns: Thing. :rtype: True if this expression is owl .. py:method:: get_object_complement_of() -> OWLObjectComplementOf Gets the object complement of this class expression. :returns: A class expression that is the complement of this class expression. .. py:method:: get_nnf() -> OWLClassExpression Gets the negation normal form of the complement of this expression. :returns: A expression that represents the NNF of the complement of this expression. .. py:class:: OWLBooleanClassExpression Bases: :py:obj:`OWLAnonymousClassExpression` Represent an anonymous boolean class expression. .. py:attribute:: __slots__ :value: () .. py:class:: OWLObjectComplementOf(op: OWLClassExpression) Bases: :py:obj:`OWLBooleanClassExpression`, :py:obj:`owlapy.meta_classes.HasOperands`\ [\ :py:obj:`OWLClassExpression`\ ] Represents an ObjectComplementOf class expression in the OWL 2 Specification. .. py:attribute:: __slots__ :value: '_operand' .. py:attribute:: type_index :type: Final :value: 3003 .. py:method:: get_operand() -> OWLClassExpression :returns: The wrapped expression. .. py:method:: operands() -> Iterable[OWLClassExpression] Gets the operands - e.g., the individuals in a sameAs axiom, or the classes in an equivalent classes axiom. :returns: The operands. .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:class:: OWLClass(iri: Union[owlapy.iri.IRI, str]) Bases: :py:obj:`owlapy.class_expression.class_expression.OWLClassExpression`, :py:obj:`owlapy.owl_object.OWLEntity` An OWL 2 named Class. Classes can be understood as sets of individuals. (https://www.w3.org/TR/owl2-syntax/#Classes) .. py:attribute:: __slots__ :value: ('_iri', '_is_nothing', '_is_thing') .. py:attribute:: type_index :type: Final :value: 1001 .. py:property:: iri :type: owlapy.iri.IRI Gets the IRI of this object. :returns: The IRI of this object. .. py:property:: str Gets the string representation of this object :returns: The IRI as string .. py:property:: reminder :type: str The reminder of the IRI .. py:method:: is_owl_thing() -> bool Determines if this expression is the built in class owl:Thing. This method does not determine if the class is equivalent to owl:Thing. :returns: Thing. :rtype: True if this expression is owl .. py:method:: is_owl_nothing() -> bool Determines if this expression is the built in class owl:Nothing. This method does not determine if the class is equivalent to owl:Nothing. .. py:method:: get_object_complement_of() -> owlapy.class_expression.class_expression.OWLObjectComplementOf Gets the object complement of this class expression. :returns: A class expression that is the complement of this class expression. .. py:method:: get_nnf() -> OWLClass Gets the negation normal form of the complement of this expression. :returns: A expression that represents the NNF of the complement of this expression. .. py:class:: OWLNaryBooleanClassExpression(operands: Iterable[owlapy.class_expression.class_expression.OWLClassExpression]) Bases: :py:obj:`owlapy.class_expression.class_expression.OWLBooleanClassExpression`, :py:obj:`owlapy.meta_classes.HasOperands`\ [\ :py:obj:`owlapy.class_expression.class_expression.OWLClassExpression`\ ] OWLNaryBooleanClassExpression. .. py:attribute:: __slots__ :value: () .. py:method:: operands() -> Iterable[owlapy.class_expression.class_expression.OWLClassExpression] Gets the operands - e.g., the individuals in a sameAs axiom, or the classes in an equivalent classes axiom. :returns: The operands. .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:class:: OWLObjectUnionOf(operands: Iterable[owlapy.class_expression.class_expression.OWLClassExpression]) Bases: :py:obj:`OWLNaryBooleanClassExpression` A union class expression ObjectUnionOf( CE1 ... CEn ) contains all individuals that are instances of at least one class expression CEi for 1 ≤ i ≤ n. (https://www.w3.org/TR/owl2-syntax/#Union_of_Class_Expressions) .. py:attribute:: __slots__ :value: '_operands' .. py:attribute:: type_index :type: Final :value: 3002 .. py:class:: OWLObjectIntersectionOf(operands: Iterable[owlapy.class_expression.class_expression.OWLClassExpression]) Bases: :py:obj:`OWLNaryBooleanClassExpression` An intersection class expression ObjectIntersectionOf( CE1 ... CEn ) contains all individuals that are instances of all class expressions CEi for 1 ≤ i ≤ n. (https://www.w3.org/TR/owl2-syntax/#Intersection_of_Class_Expressions) .. py:attribute:: __slots__ :value: '_operands' .. py:attribute:: type_index :type: Final :value: 3001 .. py:class:: OWLRestriction Bases: :py:obj:`owlapy.class_expression.class_expression.OWLAnonymousClassExpression` Represents an Object Property Restriction or Data Property Restriction in the OWL 2 specification. .. py:attribute:: __slots__ :value: () .. py:method:: get_property() -> owlapy.owl_property.OWLPropertyExpression :abstractmethod: :returns: Property being restricted. .. py:method:: is_data_restriction() -> bool Determines if this is a data restriction. :returns: True if this is a data restriction. .. py:method:: is_object_restriction() -> bool Determines if this is an object restriction. :returns: True if this is an object restriction. .. py:class:: OWLQuantifiedRestriction Bases: :py:obj:`Generic`\ [\ :py:obj:`_T`\ ], :py:obj:`OWLRestriction`, :py:obj:`owlapy.meta_classes.HasFiller`\ [\ :py:obj:`_T`\ ] Represents a quantified restriction. :param _T: value type .. py:attribute:: __slots__ :value: () .. py:class:: OWLQuantifiedObjectRestriction(filler: owlapy.class_expression.class_expression.OWLClassExpression) Bases: :py:obj:`OWLQuantifiedRestriction`\ [\ :py:obj:`owlapy.class_expression.class_expression.OWLClassExpression`\ ], :py:obj:`OWLObjectRestriction` Represents a quantified object restriction. .. py:attribute:: __slots__ :value: () .. py:method:: get_filler() -> owlapy.class_expression.class_expression.OWLClassExpression Gets the filler for this restriction. In the case of an object restriction this will be an individual, in the case of a data restriction this will be a constant (data value). For quantified restriction this will be a class expression or a data range. :returns: the value .. py:class:: OWLObjectRestriction Bases: :py:obj:`OWLRestriction` Represents an Object Property Restriction in the OWL 2 specification. .. py:attribute:: __slots__ :value: () .. py:method:: is_object_restriction() -> bool Determines if this is an object restriction. :returns: True if this is an object restriction. .. py:method:: get_property() -> owlapy.owl_property.OWLObjectPropertyExpression :abstractmethod: :returns: Property being restricted. .. py:class:: OWLHasValueRestriction(value: _T) Bases: :py:obj:`Generic`\ [\ :py:obj:`_T`\ ], :py:obj:`OWLRestriction`, :py:obj:`owlapy.meta_classes.HasFiller`\ [\ :py:obj:`_T`\ ] Represent a HasValue restriction in the OWL 2 :param value: The value type _T. .. py:attribute:: __slots__ :value: () .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: get_filler() -> _T Gets the filler for this restriction. In the case of an object restriction this will be an individual, in the case of a data restriction this will be a constant (data value). For quantified restriction this will be a class expression or a data range. :returns: the value .. py:class:: OWLDataRestriction Bases: :py:obj:`OWLRestriction` Represents a Data Property Restriction. .. py:attribute:: __slots__ :value: () .. py:method:: is_data_restriction() -> bool Determines if this is a data restriction. :returns: True if this is a data restriction. .. py:class:: OWLCardinalityRestriction(cardinality: int, filler: _F) Bases: :py:obj:`Generic`\ [\ :py:obj:`_F`\ ], :py:obj:`OWLQuantifiedRestriction`\ [\ :py:obj:`_F`\ ], :py:obj:`owlapy.meta_classes.HasCardinality` Base interface for owl min and max cardinality restriction. :param _F: Type of filler. .. py:attribute:: __slots__ :value: () .. py:method:: get_cardinality() -> int Gets the cardinality of a restriction. :returns: The cardinality. A non-negative integer. .. py:method:: get_filler() -> _F Gets the filler for this restriction. In the case of an object restriction this will be an individual, in the case of a data restriction this will be a constant (data value). For quantified restriction this will be a class expression or a data range. :returns: the value .. py:class:: OWLObjectCardinalityRestriction(cardinality: int, property: owlapy.owl_property.OWLObjectPropertyExpression, filler: owlapy.class_expression.class_expression.OWLClassExpression) Bases: :py:obj:`OWLCardinalityRestriction`\ [\ :py:obj:`owlapy.class_expression.class_expression.OWLClassExpression`\ ], :py:obj:`OWLQuantifiedObjectRestriction` Represents Object Property Cardinality Restrictions in the OWL 2 specification. .. py:attribute:: __slots__ :value: () .. py:method:: get_property() -> owlapy.owl_property.OWLObjectPropertyExpression :returns: Property being restricted. .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:class:: OWLObjectHasSelf(property: owlapy.owl_property.OWLObjectPropertyExpression) Bases: :py:obj:`OWLObjectRestriction` A self-restriction ObjectHasSelf( OPE ) consists of an object property expression OPE, and it contains all those individuals that are connected by OPE to themselves. (https://www.w3.org/TR/owl2-syntax/#Self-Restriction) .. py:attribute:: __slots__ :value: '_property' .. py:attribute:: type_index :type: Final :value: 3011 .. py:method:: get_property() -> owlapy.owl_property.OWLObjectPropertyExpression :returns: Property being restricted. .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: __repr__() .. py:class:: OWLDataOneOf(values: Union[owlapy.owl_literal.OWLLiteral, Iterable[owlapy.owl_literal.OWLLiteral]]) Bases: :py:obj:`owlapy.owl_data_ranges.OWLDataRange`, :py:obj:`owlapy.meta_classes.HasOperands`\ [\ :py:obj:`owlapy.owl_literal.OWLLiteral`\ ] An enumeration of literals DataOneOf( lt1 ... ltn ) contains exactly the explicitly specified literals lti with 1 ≤ i ≤ n. The resulting data range has arity one. (https://www.w3.org/TR/owl2-syntax/#Enumeration_of_Literals) .. py:attribute:: type_index :type: Final :value: 4003 .. py:method:: __repr__() .. py:method:: __hash__() .. py:method:: __eq__(other) .. py:method:: values() -> Iterable[owlapy.owl_literal.OWLLiteral] Gets the values that are in the oneOf. :returns: The values of this {@code DataOneOf} class expression. .. py:method:: operands() -> Iterable[owlapy.owl_literal.OWLLiteral] Gets the operands - e.g., the individuals in a sameAs axiom, or the classes in an equivalent classes axiom. :returns: The operands. .. py:class:: OWLQuantifiedDataRestriction(filler: owlapy.owl_data_ranges.OWLDataRange) Bases: :py:obj:`OWLQuantifiedRestriction`\ [\ :py:obj:`owlapy.owl_data_ranges.OWLDataRange`\ ], :py:obj:`OWLDataRestriction` Represents a quantified data restriction. .. py:attribute:: __slots__ :value: () .. py:method:: get_filler() -> owlapy.owl_data_ranges.OWLDataRange Gets the filler for this restriction. In the case of an object restriction this will be an individual, in the case of a data restriction this will be a constant (data value). For quantified restriction this will be a class expression or a data range. :returns: the value .. py:class:: OWLDataCardinalityRestriction(cardinality: int, property: owlapy.owl_property.OWLDataPropertyExpression, filler: owlapy.owl_data_ranges.OWLDataRange) Bases: :py:obj:`OWLCardinalityRestriction`\ [\ :py:obj:`owlapy.owl_data_ranges.OWLDataRange`\ ], :py:obj:`OWLQuantifiedDataRestriction`, :py:obj:`OWLDataRestriction` Represents Data Property Cardinality Restrictions. .. py:attribute:: __slots__ :value: () .. py:method:: __hash__() .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: get_property() -> owlapy.owl_property.OWLDataPropertyExpression :returns: Property being restricted. .. py:class:: OWLObjectSomeValuesFrom(property: owlapy.owl_property.OWLObjectPropertyExpression, filler: owlapy.class_expression.class_expression.OWLClassExpression) Bases: :py:obj:`OWLQuantifiedObjectRestriction` An existential class expression ObjectSomeValuesFrom( OPE CE ) consists of an object property expression OPE and a class expression CE, and it contains all those individuals that are connected by OPE to an individual that is an instance of CE. .. py:attribute:: __slots__ :value: ('_property', '_filler') .. py:attribute:: type_index :type: Final :value: 3005 .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: get_property() -> owlapy.owl_property.OWLObjectPropertyExpression :returns: Property being restricted. .. py:class:: OWLObjectAllValuesFrom(property: owlapy.owl_property.OWLObjectPropertyExpression, filler: owlapy.class_expression.class_expression.OWLClassExpression) Bases: :py:obj:`OWLQuantifiedObjectRestriction` A universal class expression ObjectAllValuesFrom( OPE CE ) consists of an object property expression OPE and a class expression CE, and it contains all those individuals that are connected by OPE only to individuals that are instances of CE. (https://www.w3.org/TR/owl2-syntax/#Universal_Quantification) .. py:attribute:: __slots__ :value: ('_property', '_filler') .. py:attribute:: type_index :type: Final :value: 3006 .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: get_property() -> owlapy.owl_property.OWLObjectPropertyExpression :returns: Property being restricted. .. py:class:: OWLObjectHasValue(property: owlapy.owl_property.OWLObjectPropertyExpression, individual: owlapy.owl_individual.OWLIndividual) Bases: :py:obj:`OWLHasValueRestriction`\ [\ :py:obj:`owlapy.owl_individual.OWLIndividual`\ ], :py:obj:`OWLObjectRestriction` A has-value class expression ObjectHasValue( OPE a ) consists of an object property expression OPE and an individual a, and it contains all those individuals that are connected by OPE to a. Each such class expression can be seen as a syntactic shortcut for the class expression ObjectSomeValuesFrom( OPE ObjectOneOf( a ) ). (https://www.w3.org/TR/owl2-syntax/#Individual_Value_Restriction) .. py:attribute:: __slots__ :value: ('_property', '_v') .. py:attribute:: type_index :type: Final :value: 3007 .. py:method:: get_property() -> owlapy.owl_property.OWLObjectPropertyExpression :returns: Property being restricted. .. py:method:: as_some_values_from() -> owlapy.class_expression.class_expression.OWLClassExpression A convenience method that obtains this restriction as an existential restriction with a nominal filler. :returns: The existential equivalent of this value restriction. simp(HasValue(p a)) = some(p {a}). .. py:method:: __repr__() .. py:class:: OWLDatatypeRestriction(type_: owlapy.owl_datatype.OWLDatatype, facet_restrictions: Union[OWLFacetRestriction, Iterable[OWLFacetRestriction]]) Bases: :py:obj:`owlapy.owl_data_ranges.OWLDataRange` A datatype restriction DatatypeRestriction( DT F1 lt1 ... Fn ltn ) consists of a unary datatype DT and n pairs ( Fi , lti ). The resulting data range is unary and is obtained by restricting the value space of DT according to the semantics of all ( Fi , vi ) (multiple pairs are interpreted conjunctively), where vi are the data values of the literals lti. (https://www.w3.org/TR/owl2-syntax/#Datatype_Restrictions) .. py:attribute:: __slots__ :value: ('_type', '_facet_restrictions') .. py:attribute:: type_index :type: Final :value: 4006 .. py:method:: get_datatype() -> owlapy.owl_datatype.OWLDatatype .. py:method:: get_facet_restrictions() -> Sequence[OWLFacetRestriction] .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: __repr__() .. py:class:: OWLFacet(remainder: str, symbolic_form: str, operator: Callable[[_X, _X], bool]) Bases: :py:obj:`_Vocabulary`, :py:obj:`enum.Enum` Enumerations for OWL facets. .. py:property:: symbolic_form .. py:property:: operator .. py:method:: from_str(name: str) -> OWLFacet :staticmethod: .. py:attribute:: MIN_INCLUSIVE :type: Final .. py:attribute:: MIN_EXCLUSIVE :type: Final .. py:attribute:: MAX_INCLUSIVE :type: Final .. py:attribute:: MAX_EXCLUSIVE :type: Final .. py:attribute:: LENGTH :type: Final .. py:attribute:: MIN_LENGTH :type: Final .. py:attribute:: MAX_LENGTH :type: Final .. py:attribute:: PATTERN :type: Final .. py:attribute:: TOTAL_DIGITS :type: Final .. py:attribute:: FRACTION_DIGITS :type: Final .. py:class:: OWLFacetRestriction(facet: owlapy.vocab.OWLFacet, literal: Literals) Bases: :py:obj:`owlapy.owl_object.OWLObject` A facet restriction is used to restrict a particular datatype. .. py:attribute:: __slots__ :value: ('_facet', '_literal') .. py:attribute:: type_index :type: Final :value: 4007 .. py:method:: get_facet() -> owlapy.vocab.OWLFacet .. py:method:: get_facet_value() -> owlapy.owl_literal.OWLLiteral .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: __repr__() .. py:class:: OWLObjectMinCardinality(cardinality: int, property: owlapy.owl_property.OWLObjectPropertyExpression, filler: owlapy.class_expression.class_expression.OWLClassExpression) Bases: :py:obj:`OWLObjectCardinalityRestriction` A minimum cardinality expression ObjectMinCardinality( n OPE CE ) consists of a nonnegative integer n, an object property expression OPE, and a class expression CE, and it contains all those individuals that are connected by OPE to at least n different individuals that are instances of CE. (https://www.w3.org/TR/owl2-syntax/#Minimum_Cardinality) .. py:attribute:: __slots__ :value: ('_cardinality', '_filler', '_property') .. py:attribute:: type_index :type: Final :value: 3008 .. py:class:: OWLObjectMaxCardinality(cardinality: int, property: owlapy.owl_property.OWLObjectPropertyExpression, filler: owlapy.class_expression.class_expression.OWLClassExpression) Bases: :py:obj:`OWLObjectCardinalityRestriction` A maximum cardinality expression ObjectMaxCardinality( n OPE CE ) consists of a nonnegative integer n, an object property expression OPE, and a class expression CE, and it contains all those individuals that are connected by OPE to at most n different individuals that are instances of CE. (https://www.w3.org/TR/owl2-syntax/#Maximum_Cardinality) .. py:attribute:: __slots__ :value: ('_cardinality', '_filler', '_property') .. py:attribute:: type_index :type: Final :value: 3010 .. py:class:: OWLObjectExactCardinality(cardinality: int, property: owlapy.owl_property.OWLObjectPropertyExpression, filler: owlapy.class_expression.class_expression.OWLClassExpression) Bases: :py:obj:`OWLObjectCardinalityRestriction` An exact cardinality expression ObjectExactCardinality( n OPE CE ) consists of a nonnegative integer n, an object property expression OPE, and a class expression CE, and it contains all those individuals that are connected by to exactly n different individuals that are instances of CE. (https://www.w3.org/TR/owl2-syntax/#Exact_Cardinality) .. py:attribute:: __slots__ :value: ('_cardinality', '_filler', '_property') .. py:attribute:: type_index :type: Final :value: 3009 .. py:method:: as_intersection_of_min_max() -> owlapy.class_expression.nary_boolean_expression.OWLObjectIntersectionOf Obtains an equivalent form that is a conjunction of a min cardinality and max cardinality restriction. :returns: The semantically equivalent but structurally simpler form (= 1 R C) = >= 1 R C and <= 1 R C. .. py:class:: OWLDataSomeValuesFrom(property: owlapy.owl_property.OWLDataPropertyExpression, filler: owlapy.owl_data_ranges.OWLDataRange) Bases: :py:obj:`OWLQuantifiedDataRestriction` An existential class expression DataSomeValuesFrom( DPE1 ... DPEn DR ) consists of n data property expressions DPEi, 1 ≤ i ≤ n, and a data range DR whose arity must be n. Such a class expression contains all those individuals that are connected by DPEi to literals lti, 1 ≤ i ≤ n, such that the tuple ( lt1 , ..., ltn ) is in DR. A class expression of the form DataSomeValuesFrom( DPE DR ) can be seen as a syntactic shortcut for the class expression DataMinCardinality( 1 DPE DR ). (https://www.w3.org/TR/owl2-syntax/#Existential_Quantification_2) .. py:attribute:: __slots__ :value: '_property' .. py:attribute:: type_index :type: Final :value: 3012 .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: get_property() -> owlapy.owl_property.OWLDataPropertyExpression :returns: Property being restricted. .. py:class:: OWLDataAllValuesFrom(property: owlapy.owl_property.OWLDataPropertyExpression, filler: owlapy.owl_data_ranges.OWLDataRange) Bases: :py:obj:`OWLQuantifiedDataRestriction` A universal class expression DataAllValuesFrom( DPE1 ... DPEn DR ) consists of n data property expressions DPEi, 1 ≤ i ≤ n, and a data range DR whose arity must be n. Such a class expression contains all those individuals that are connected by DPEi only to literals lti, 1 ≤ i ≤ n, such that each tuple ( lt1 , ..., ltn ) is in DR. A class expression of the form DataAllValuesFrom( DPE DR ) can be seen as a syntactic shortcut for the class expression DataMaxCardinality( 0 DPE DataComplementOf( DR ) ). (https://www.w3.org/TR/owl2-syntax/#Universal_Quantification_2) .. py:attribute:: __slots__ :value: '_property' .. py:attribute:: type_index :type: Final :value: 3013 .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: get_property() -> owlapy.owl_property.OWLDataPropertyExpression :returns: Property being restricted. .. py:class:: OWLDataHasValue(property: owlapy.owl_property.OWLDataPropertyExpression, value: owlapy.owl_literal.OWLLiteral) Bases: :py:obj:`OWLHasValueRestriction`\ [\ :py:obj:`owlapy.owl_literal.OWLLiteral`\ ], :py:obj:`OWLDataRestriction` A has-value class expression DataHasValue( DPE lt ) consists of a data property expression DPE and a literal lt, and it contains all those individuals that are connected by DPE to lt. Each such class expression can be seen as a syntactic shortcut for the class expression DataSomeValuesFrom( DPE DataOneOf( lt ) ). (https://www.w3.org/TR/owl2-syntax/#Literal_Value_Restriction) .. py:attribute:: __slots__ :value: '_property' .. py:attribute:: type_index :type: Final :value: 3014 .. py:method:: __repr__() .. py:method:: __eq__(other) .. py:method:: __hash__() .. py:method:: as_some_values_from() -> owlapy.class_expression.class_expression.OWLClassExpression A convenience method that obtains this restriction as an existential restriction with a nominal filler. :returns: The existential equivalent of this value restriction. simp(HasValue(p a)) = some(p {a}). .. py:method:: get_property() -> owlapy.owl_property.OWLDataPropertyExpression :returns: Property being restricted. .. py:class:: OWLDataMinCardinality(cardinality: int, property: owlapy.owl_property.OWLDataPropertyExpression, filler: owlapy.owl_data_ranges.OWLDataRange) Bases: :py:obj:`OWLDataCardinalityRestriction` A minimum cardinality expression DataMinCardinality( n DPE DR ) consists of a nonnegative integer n, a data property expression DPE, and a unary data range DR, and it contains all those individuals that are connected by DPE to at least n different literals in DR. (https://www.w3.org/TR/owl2-syntax/#Minimum_Cardinality) .. py:attribute:: __slots__ :value: ('_cardinality', '_filler', '_property') .. py:attribute:: type_index :type: Final :value: 3015 .. py:class:: OWLDataMaxCardinality(cardinality: int, property: owlapy.owl_property.OWLDataPropertyExpression, filler: owlapy.owl_data_ranges.OWLDataRange) Bases: :py:obj:`OWLDataCardinalityRestriction` A maximum cardinality expression ObjectMaxCardinality( n OPE CE ) consists of a nonnegative integer n, an object property expression OPE, and a class expression CE, and it contains all those individuals that are connected by OPE to at most n different individuals that are instances of CE. (https://www.w3.org/TR/owl2-syntax/#Maximum_Cardinality) .. py:attribute:: __slots__ :value: ('_cardinality', '_filler', '_property') .. py:attribute:: type_index :type: Final :value: 3017 .. py:class:: OWLDataExactCardinality(cardinality: int, property: owlapy.owl_property.OWLDataPropertyExpression, filler: owlapy.owl_data_ranges.OWLDataRange) Bases: :py:obj:`OWLDataCardinalityRestriction` An exact cardinality expression ObjectExactCardinality( n OPE CE ) consists of a nonnegative integer n, an object property expression OPE, and a class expression CE, and it contains all those individuals that are connected by OPE to exactly n different individuals that are instances of CE (https://www.w3.org/TR/owl2-syntax/#Exact_Cardinality) .. py:attribute:: __slots__ :value: ('_cardinality', '_filler', '_property') .. py:attribute:: type_index :type: Final :value: 3016 .. py:method:: as_intersection_of_min_max() -> owlapy.class_expression.nary_boolean_expression.OWLObjectIntersectionOf Obtains an equivalent form that is a conjunction of a min cardinality and max cardinality restriction. :returns: The semantically equivalent but structurally simpler form (= 1 R D) = >= 1 R D and <= 1 R D. .. py:class:: OWLObjectOneOf(values: owlapy.owl_individual.OWLIndividual | Iterable[owlapy.owl_individual.OWLIndividual]) Bases: :py:obj:`owlapy.class_expression.class_expression.OWLAnonymousClassExpression`, :py:obj:`owlapy.meta_classes.HasOperands`\ [\ :py:obj:`owlapy.owl_individual.OWLIndividual`\ ] An enumeration of individuals ObjectOneOf( a1 ... an ) contains exactly the individuals ai with 1 ≤ i ≤ n. (https://www.w3.org/TR/owl2-syntax/#Enumeration_of_Individuals) .. py:attribute:: __slots__ :value: '_values' .. py:attribute:: type_index :type: Final :value: 3004 .. py:method:: individuals() -> Iterable[owlapy.owl_individual.OWLIndividual] Gets the individuals that are in the oneOf. These individuals represent the exact instances (extension) of this class expression. :returns: The individuals that are the values of this {@code ObjectOneOf} class expression. .. py:method:: operands() -> Iterable[owlapy.owl_individual.OWLIndividual] Gets the operands - e.g., the individuals in a sameAs axiom, or the classes in an equivalent classes axiom. :returns: The operands. .. py:method:: as_object_union_of() -> owlapy.class_expression.class_expression.OWLClassExpression Simplifies this enumeration to a union of singleton nominals. :returns: This enumeration in a more standard DL form. simp({a}) = {a} simp({a0, ... , {an}) = unionOf({a0}, ... , {an}) .. py:method:: __hash__() .. py:method:: __eq__(other) .. py:method:: __repr__()