Component¶
- class pyhornedowl.model.Component¶
Bases:
objectAn ontology component: OWL axiom, metadata or SWRL rule
This enum has variants representing the various kinds of Component that can be found in an OWL Ontology. An OWL axiom maps to three different entities in Horned-OWL. First is a struct (for example,
SubClassOf) which contains the data which defines the axiom (i.e. super and sub class forSubClassOf). Second, is a variant of theComponentKind, which is used to identify all instances of a particular kind of axiom (i.e. anySubClassOfaxiom will return an instance of ComponentKind::SubClassOf). Finally, we have a variant of this enum, which contains one of the structs (i.e. Component::SubClassOf(SubClassOf)), which is used as a union type for all structs. The struct and enum variants all share identical names.In OWL2 an ontology is a set of Axioms. In Horned-OWL, it is a set of components which also includes SWRL rules and ontology metadata.
- serialize(serialization: Literal2['ofn', 'omn'] | None = None, prefix_mapping: PrefixMapping | None = None) str¶
Renders this element on its own, in OWL functional (
"ofn", the default) or OWL 2 Manchester ("omn") syntax. The per-element counterpart toOntology.save_to_string.