ObjectPropertyRange

class ObjectPropertyRange(left: ObjectPropertyExpression | URIRef | Reference | Referenced | str | IdentifierBox, right: ClassExpression | URIRef | Reference | Referenced | str | IdentifierBox, *, annotations: list[Annotation] | None = None)[source]

Bases: _ObjectPropertyTyping

An object property axiom defined in 9.2.5 “Object Property Range”.

Consider the ontology consisting of the following axioms.

>>> # The range of the a:hasDog property is the class a:Dog.
>>> ObjectPropertyRange("a:hasDog", "a:Dog")
>>> ObjectPropertyAssertion("a:hasDog", "a:Peter", "a:Brian")  # Brian is a dog of Peter.

By the first axiom, each individual that has an incoming a:hasDog connection must be an instance of a:Dog. Therefore, a:Brian can be classified as an instance of a:Dog; that is, this ontology entails the following assertion:

>>> ClassAssertion("a:Dog", "a:Brian")

Initialize a object property domain or range.

Attributes Summary

property_type

Attributes Documentation

property_type: ClassVar[URIRef] = rdflib.term.URIRef('http://www.w3.org/2000/01/rdf-schema#range')