ObjectComplementOf
- class ObjectComplementOf(class_expression: ClassExpression | URIRef | Reference | Referenced | str | IdentifierBox)[source]
Bases:
ClassExpression
A class expression defined in 8.1.3 Complement of Class Expressions.
Example 1
Consider the ontology consisting of the following axioms.
>>> DisjointClasses(["a:Man", "a:Woman"]) # Nothing can be both a man and a woman. >>> ClassAssertion("a:Woman", "a:Lois") # Lois is a woman.
The following class expression describes all things that are not instances of a:Man:
>>> ObjectComplementOf("a:Man")
Example 2
OWL 2 has open-world semantics, so negation in OWL 2 is the same as in classical (first-order) logic. To understand open-world semantics, consider the ontology consisting of the following assertion.
>>> ClassAssertion("a:Dog", "a:Brian") # Brian is a dog.
One might expect
a:Brian
to be classified as an instance of the following class expression:>>> ObjectComplementOf("a:Bird")
However, because of the OWL reasoning, this can’t be concluded
Initialize the model with a single class expression.
Methods Summary
Get the inside of the functional OWL tag representing the complement of class expression.
to_rdflib_node
(graph, converter)Represent this object complement as RDF.
Methods Documentation