pyowl2.axioms.object_property_axiom.sub_object_property_of

Defines a class representing the OWL SubObjectPropertyOf axiom to establish hierarchical relationships between object properties.

Description

The implementation models the logical assertion that a specific object property or a chain of properties is a sub-property of a more general object property. By accepting either a simple property expression or a complex property chain as the sub-property, the design accommodates both straightforward hierarchies and intricate logical rules where a sequence of relationships implies a broader connection. Optional annotations can be attached to the axiom to provide metadata, which are managed through inheritance from the base axiom class. A string representation method generates the axiom in functional syntax, ensuring consistent textual output that includes the sub-property, super-property, and any associated annotations.

Classes

OWLSubObjectPropertyOf

This class represents an axiom in the Web Ontology Language (OWL) that asserts a hierarchical relationship between two object properties, indicating that the first is a subproperty of the second. It is used to define that any relationship defined by the sub-property expression necessarily implies a relationship defined by the super-property expression. The implementation supports both simple property hierarchies and complex property chains, allowing for the expression of intricate logical rules where a sequence of properties implies a more general property. To use this entity, instantiate it with the specific sub-property expression, the general super-property expression, and an optional list of annotations for metadata.

Module Contents

UML Class Diagram for OWLSubObjectPropertyOf

UML Class Diagram for OWLSubObjectPropertyOf

class OWLSubObjectPropertyOf(
sub_property: pyowl2.axioms.object_property_axiom.object_property_chain.OWLObjectPropertyChain | pyowl2.abstracts.object_property_expression.OWLObjectPropertyExpression,
super_property: pyowl2.abstracts.object_property_expression.OWLObjectPropertyExpression,
annotations: list[pyowl2.base.annotation.OWLAnnotation] | None = None,
)[source]

Bases: pyowl2.abstracts.object_property_axiom.OWLObjectPropertyAxiom

Inheritance diagram of pyowl2.axioms.object_property_axiom.sub_object_property_of.OWLSubObjectPropertyOf

This class represents an axiom in the Web Ontology Language (OWL) that asserts a hierarchical relationship between two object properties, indicating that the first is a subproperty of the second. It is used to define that any relationship defined by the sub-property expression necessarily implies a relationship defined by the super-property expression. The implementation supports both simple property hierarchies and complex property chains, allowing for the expression of intricate logical rules where a sequence of properties implies a more general property. To use this entity, instantiate it with the specific sub-property expression, the general super-property expression, and an optional list of annotations for metadata.

Parameters:
  • sub_object_property_expression (Union[OWLObjectPropertyChain, OWLObjectPropertyExpression]) – The object property expression or property chain that serves as the subproperty in the relationship.

  • super_object_property_expression (OWLObjectPropertyExpression) – The object property expression declared to be the superproperty, serving as the more general property in the subproperty relationship.

__str__() str[source]

Returns a string representation of the sub-object property axiom formatted according to a specific functional syntax. The output string includes the axiom annotations, or an empty list if none are present, followed by the sub-property and super-property expressions. This method ensures that the annotation field is always represented, providing a consistent textual format for the axiom regardless of whether it is annotated.

Returns:

A string representation of the axiom in functional syntax format, including the sub-property, super-property, and any annotations.

Return type:

str

_sub_object_property_expression: pyowl2.axioms.object_property_axiom.object_property_chain.OWLObjectPropertyChain | pyowl2.abstracts.object_property_expression.OWLObjectPropertyExpression
_super_object_property_expression: pyowl2.abstracts.object_property_expression.OWLObjectPropertyExpression
property sub_object_property_expression: pyowl2.axioms.object_property_axiom.object_property_chain.OWLObjectPropertyChain | pyowl2.abstracts.object_property_expression.OWLObjectPropertyExpression

Sets the sub-property expression for this OWL sub-object property axiom to the provided value. The value can be either a single object property expression or a chain of object properties, accommodating both simple and complex sub-property relationships. This method updates the internal state of the axiom instance to reflect the new sub-property definition.

Parameters:

value (Union[OWLObjectPropertyChain, OWLObjectPropertyExpression]) – The object property expression or property chain to set as the sub-property.

property super_object_property_expression: pyowl2.abstracts.object_property_expression.OWLObjectPropertyExpression

Sets the super object property expression for this SubObjectPropertyOf axiom to the provided value. This operation updates the internal state of the object, effectively defining the parent property in the sub-property relationship by assigning the given OWLObjectPropertyExpression to the underlying private attribute.

Parameters:

value (OWLObjectPropertyExpression) – The object property expression to set as the super property.