ClassExpression

class pyhornedowl.model.ClassExpression

Bases: object

A class expression

As well as a named class, it is possible to define classes of individuals based on these class constructors.

__and__(other: object, /) → ObjectIntersectionOf

Return self&value.

__invert__() → ObjectComplementOf

~self

__or__(other: object, /) → ObjectUnionOf

Return self|value.

__rand__(other: object, /) → ObjectIntersectionOf

Return value&self.

__ror__(other: object, /) → ObjectUnionOf

Return value|self.

flatten() → ClassExpression

Returns an equivalent, flatter class expression

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 to Ontology.save_to_string.