SubClassOf

class SubClassOf(child: ClassExpression | URIRef | Reference | Referenced | str | IdentifierBox, parent: ClassExpression | URIRef | Reference | Referenced | str | IdentifierBox, *, annotations: list[Annotation] | None = None)[source]

Bases: ClassAxiom

A class axiom defined in 9.1.1 “Subclass Axioms”.

Example: >>> SubClassOf(“a:Baby”, “a:Child”) # Each baby is a child. >>> SubClassOf(“a:Child”, “a:Person”) # Each child is a person. >>> ClassAssertion(“a:Baby”, “a:Stewie”) # Stewie is a baby.

This axiom can be applied to more complicated expressions. For example, here’s the long form for a FunctionalDataProperty:

>>> axiom = SubClassOf("owl:Thing", DataMaxCardinality(1, "a:hasAge"))

which itself is eqivalent to:

>>> FunctionalDataProperty("a:hasAge")

Initialize a subclass axiom.

Methods Summary

to_rdflib_node(graph, converter)

Represent the subclass axiom for RDF.

Methods Documentation

to_rdflib_node(graph: Graph, converter: Converter) IdentifiedNode[source]

Represent the subclass axiom for RDF.