owlapy.owl_object

OWL Base classes

Module Contents

Classes

OWLObject

Base interface for OWL objects

OWLObjectRenderer

Abstract class with a render method to render an OWL Object into a string.

OWLObjectParser

Abstract class with a parse method to parse a string to an OWL Object.

OWLNamedObject

Represents a named object for example, class, property, ontology etc. - i.e. anything that has an

OWLEntity

Represents Entities in the OWL 2 Specification.

class owlapy.owl_object.OWLObject[source]

Base interface for OWL objects

__slots__ = ()
abstract __eq__(other)[source]

Return self==value.

abstract __hash__()[source]

Return hash(self).

abstract __repr__()[source]

Return repr(self).

is_anonymous() bool[source]
class owlapy.owl_object.OWLObjectRenderer[source]

Abstract class with a render method to render an OWL Object into a string.

abstract set_short_form_provider(short_form_provider) None[source]

Configure a short form provider that shortens the OWL objects during rendering.

Parameters:

short_form_provider – Short form provider.

abstract render(o: OWLObject) str[source]

Render OWL Object to string.

Parameters:

o – OWL Object.

Returns:

String rendition of OWL object.

class owlapy.owl_object.OWLObjectParser[source]

Abstract class with a parse method to parse a string to an OWL Object.

abstract parse_expression(expression_str: str) OWLObject[source]

Parse a string to an OWL Object.

Parameters:

expression_str (str) – Expression string.

Returns:

The OWL Object which is represented by the string.

class owlapy.owl_object.OWLNamedObject[source]

Bases: OWLObject, owlapy.meta_classes.HasIRI

Represents a named object for example, class, property, ontology etc. - i.e. anything that has an IRI as its name.

__slots__ = ()
__eq__(other)[source]

Return self==value.

__lt__(other)[source]

Return self<value.

__hash__()[source]

Return hash(self).

__repr__()[source]

Return repr(self).

class owlapy.owl_object.OWLEntity[source]

Bases: OWLNamedObject

Represents Entities in the OWL 2 Specification.

__slots__ = ()
to_string_id() str[source]
is_anonymous() bool[source]