SubClassOf

class SubClassOf(child, parent, *, annotations=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

Parameters:
to_rdflib_node(graph, converter)[source]

Represent the subclass axiom for RDF.

Parameters:
  • graph (Graph)

  • converter (Converter)

Return type:

BNode