owlapy.owl_property

OWL Properties

Classes

OWLPropertyExpression

Represents a property or possibly the inverse of a property.

OWLObjectPropertyExpression

A high level interface to describe different types of object properties.

OWLDataPropertyExpression

A high level interface to describe different types of data properties.

OWLProperty

A base class for properties that aren't expression i.e. named properties. By definition, properties

OWLObjectProperty

Represents an Object Property in the OWL 2 Specification. Object properties connect pairs of individuals.

OWLObjectInverseOf

Represents the inverse of a property expression (ObjectInverseOf). An inverse object property expression

OWLDataProperty

Represents a Data Property in the OWL 2 Specification. Data properties connect individuals with literals.

Module Contents

class owlapy.owl_property.OWLPropertyExpression[source]

Bases: owlapy.owl_object.OWLObject

Represents a property or possibly the inverse of a property.

__slots__ = ()
is_data_property_expression() bool[source]
Returns:

True if this is a data property.

is_object_property_expression() bool[source]
Returns:

True if this is an object property.

is_owl_top_object_property() bool[source]

Determines if this is the owl:topObjectProperty.

Returns:

topObjectProperty.

Return type:

True if this property is the owl

is_owl_top_data_property() bool[source]

Determines if this is the owl:topDataProperty.

Returns:

topDataProperty.

Return type:

True if this property is the owl

class owlapy.owl_property.OWLObjectPropertyExpression[source]

Bases: OWLPropertyExpression

A high level interface to describe different types of object properties.

__slots__ = ()
abstract get_inverse_property() OWLObjectPropertyExpression[source]

Obtains the property that corresponds to the inverse of this property.

Returns:

The inverse of this property. Note that this property will not necessarily be in the simplest form.

abstract get_named_property() OWLObjectProperty[source]

Get the named object property used in this property expression.

Returns:

P if this expression is either inv(P) or P.

is_object_property_expression() bool[source]
Returns:

True if this is an object property.

class owlapy.owl_property.OWLDataPropertyExpression[source]

Bases: OWLPropertyExpression

A high level interface to describe different types of data properties.

__slots__ = ()
is_data_property_expression()[source]
Returns:

True if this is a data property.

class owlapy.owl_property.OWLProperty(iri: owlapy.iri.IRI | str)[source]

Bases: OWLPropertyExpression, owlapy.owl_object.OWLEntity

A base class for properties that aren’t expression i.e. named properties. By definition, properties are either data properties or object properties.

__slots__ = '_iri'
property str: str

Gets the string representation of this object

Returns:

The IRI as string

property iri: owlapy.iri.IRI

Gets the IRI of this object.

Returns:

The IRI of this object.

class owlapy.owl_property.OWLObjectProperty(iri: owlapy.iri.IRI | str)[source]

Bases: OWLObjectPropertyExpression, OWLProperty

Represents an Object Property in the OWL 2 Specification. Object properties connect pairs of individuals.

(https://www.w3.org/TR/owl2-syntax/#Object_Properties)

__slots__ = '_iri'
type_index: Final = 1002
property reminder
get_named_property() OWLObjectProperty[source]

Get the named object property used in this property expression.

Returns:

P if this expression is either inv(P) or P.

get_inverse_property() OWLObjectInverseOf[source]

Obtains the property that corresponds to the inverse of this property.

Returns:

The inverse of this property. Note that this property will not necessarily be in the simplest form.

is_owl_top_object_property() bool[source]

Determines if this is the owl:topObjectProperty.

Returns:

topObjectProperty.

Return type:

True if this property is the owl

class owlapy.owl_property.OWLObjectInverseOf(property: OWLObjectProperty)[source]

Bases: OWLObjectPropertyExpression

Represents the inverse of a property expression (ObjectInverseOf). An inverse object property expression ObjectInverseOf( P ) connects an individual I1 with I2 if and only if the object property P connects I2 with I1. This can be used to refer to the inverse of a property, without actually naming the property. For example, consider the property hasPart, the inverse property of hasPart (isPartOf) can be referred to using this interface inverseOf(hasPart), which can be used in restrictions e.g. inverseOf(hasPart) some Car refers to the set of things that are part of at least one car.

(https://www.w3.org/TR/owl2-syntax/#Inverse_Object_Properties)

__slots__ = '_inverse_property'
type_index: Final = 1003
get_inverse() OWLObjectProperty[source]

Gets the property expression that this is the inverse of.

Returns:

The object property expression such that this object property expression is an inverse of it.

get_inverse_property() OWLObjectProperty[source]

Obtains the property that corresponds to the inverse of this property.

Returns:

The inverse of this property. Note that this property will not necessarily be in the simplest form.

get_named_property() OWLObjectProperty[source]

Get the named object property used in this property expression.

Returns:

P if this expression is either inv(P) or P.

__repr__()[source]
__eq__(other)[source]
__hash__()[source]
class owlapy.owl_property.OWLDataProperty(iri: owlapy.iri.IRI | str)[source]

Bases: OWLDataPropertyExpression, OWLProperty

Represents a Data Property in the OWL 2 Specification. Data properties connect individuals with literals. In some knowledge representation systems, functional data properties are called attributes.

(https://www.w3.org/TR/owl2-syntax/#Data_Properties)

__slots__ = '_iri'
type_index: Final = 1004
is_owl_top_data_property() bool[source]

Determines if this is the owl:topDataProperty.

Returns:

topDataProperty.

Return type:

True if this property is the owl