owlapy.owl_ontology

OWL Ontology

Attributes

logger

OWLREADY2_FACET_KEYS

Classes

OWLOntologyID

An object that identifies an ontology. Since OWL 2, ontologies do not have to have an ontology IRI, or if they

Ontology

Represents an OWL 2 Ontology in the OWL 2 specification.

SyncOntology

Represents an OWL 2 Ontology in the OWL 2 specification.

RDFLibOntology

Represents an OWL 2 Ontology in the OWL 2 specification.

ToOwlready2

FromOwlready2

Map owlready2 classes to owlapy model classes.

NeuralOntology

Represents an OWL 2 Ontology in the OWL 2 specification.

Functions

is_valid_entity(text_input)

Module Contents

owlapy.owl_ontology.logger
class owlapy.owl_ontology.OWLOntologyID(ontology_iri: owlapy.iri.IRI | None = None, version_iri: owlapy.iri.IRI | None = None)[source]

An object that identifies an ontology. Since OWL 2, ontologies do not have to have an ontology IRI, or if they have an ontology IRI then they can optionally also have a version IRI. Instances of this OWLOntologyID class bundle identifying information of an ontology together. If an ontology doesn’t have an ontology IRI then we say that it is “anonymous”.

__slots__ = ('_ontology_iri', '_version_iri')
get_ontology_iri() owlapy.iri.IRI | None[source]

Gets the ontology IRI.

Returns:

Ontology IRI. If the ontology is anonymous, it will return None.

get_version_iri() owlapy.iri.IRI | None[source]

Gets the version IRI.

Returns:

Version IRI or None.

get_default_document_iri() owlapy.iri.IRI | None[source]

Gets the IRI which is used as a default for the document that contain a representation of an ontology with this ID. This will be the version IRI if there is an ontology IRI and version IRI, else it will be the ontology IRI if there is an ontology IRI but no version IRI, else it will be None if there is no ontology IRI. See Ontology Documents in the OWL 2 Structural Specification.

Returns:

the IRI that can be used as a default for an ontology document, or None.

is_anonymous() bool[source]
__repr__()[source]
__eq__(other)[source]
class owlapy.owl_ontology.Ontology(ontology_iri: owlapy.iri.IRI | str, load: bool = True, world_store=None)[source]

Bases: owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology

Represents an OWL 2 Ontology in the OWL 2 specification.

An OWLOntology consists of a possibly empty set of OWLAxioms and a possibly empty set of OWLAnnotations. An ontology can have an ontology IRI which can be used to identify the ontology. If it has an ontology IRI then it may also have an ontology version IRI. Since OWL 2, an ontology need not have an ontology IRI. (See the OWL 2 Structural Specification).

__slots__ = ('_iri', '_world', '_onto', 'is_modified')
is_modified: bool
__len__() int[source]
classes_in_signature() Iterable[owlapy.class_expression.OWLClass][source]

Gets the classes in the signature of this object.

Returns:

Classes in the signature of this object.

data_properties_in_signature() Iterable[owlapy.owl_property.OWLDataProperty][source]

Get the data properties that are in the signature of this object.

Returns:

Data properties that are in the signature of this object.

object_properties_in_signature() Iterable[owlapy.owl_property.OWLObjectProperty][source]

A convenience method that obtains the object properties that are in the signature of this object.

Returns:

Object properties that are in the signature of this object.

properties_in_signature() Iterable[owlapy.owl_property.OWLProperty][source]
individuals_in_signature() Iterable[owlapy.owl_individual.OWLNamedIndividual][source]

A convenience method that obtains the individuals that are in the signature of this object.

Returns:

Individuals that are in the signature of this object.

abstractmethod get_abox_axioms() Iterable[source]
abstractmethod get_tbox_axioms() Iterable[source]
abstractmethod get_abox_axioms_between_individuals() Iterable[source]
abstractmethod get_abox_axioms_between_individuals_and_classes() Iterable[source]
equivalent_classes_axioms(c: owlapy.class_expression.OWLClass) Iterable[owlapy.owl_axiom.OWLEquivalentClassesAxiom][source]

Gets all of the equivalent axioms in this ontology that contain the specified class as an operand.

Parameters:

c – The class for which the EquivalentClasses axioms should be retrieved.

Returns:

EquivalentClasses axioms contained in this ontology.

general_class_axioms() Iterable[owlapy.owl_axiom.OWLClassAxiom][source]
Get the general class axioms of this ontology. This includes SubClass axioms with a complex class expression

as the sub class and EquivalentClass axioms and DisjointClass axioms with only complex class expressions.

Returns:

General class axioms contained in this ontology.

get_ontology_id() OWLOntologyID[source]

Gets the OWLOntologyID belonging to this object.

Returns:

The OWLOntologyID.

data_property_domain_axioms(pe: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyDomainAxiom][source]

Gets the OWLDataPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

data_property_range_axioms(pe: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyRangeAxiom][source]

Gets the OWLDataPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

object_property_domain_axioms(pe: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyDomainAxiom][source]

Gets the OWLObjectPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

object_property_range_axioms(pe: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyRangeAxiom][source]

Gets the OWLObjectPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

add_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Add the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

remove_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Removes the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

save(path: str | owlapy.iri.IRI = None, inplace: bool = False, document_format: str | None = None)[source]

Save the ontology to a file, optionally in a different serialisation format.

owlready2 natively supports "rdfxml" and "ntriples". Any other format is handled by loading the RDF/XML output into rdflib and re-serialising there.

owlready2-native formats:

rdflib-backed formats – saved as RDF/XML first, then converted:

Format string(s)

Serialisation

"turtle" / "ttl"

Turtle

"json-ld" / "jsonld"

JSON-LD

"nt11"

N-Triples 1.1

"n3"

Notation3

"trig"

TriG

"trix"

TriX

"nquads" / "nq"

N-Quads

Parameters:
  • path – File path where the ontology will be saved.

  • inplace – If True, overwrite the file the ontology was loaded from.

  • document_format – Desired serialisation format (see tables above). Defaults to "rdfxml" when not specified.

Raises:

ValueError – If an unsupported format string is provided.

get_original_iri()[source]

Get the IRI argument that was used to create this ontology.

__eq__(other)[source]
__hash__()[source]
__repr__()[source]
class owlapy.owl_ontology.SyncOntology(path: owlapy.iri.IRI | str, load: bool = True)[source]

Bases: owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology

Represents an OWL 2 Ontology in the OWL 2 specification.

An OWLOntology consists of a possibly empty set of OWLAxioms and a possibly empty set of OWLAnnotations. An ontology can have an ontology IRI which can be used to identify the ontology. If it has an ontology IRI then it may also have an ontology version IRI. Since OWL 2, an ontology need not have an ontology IRI. (See the OWL 2 Structural Specification).

owlapi_manager
path
load = True
mapper
__eq__(other)[source]
__hash__()[source]
__repr__()[source]
__len__()[source]
classes_in_signature() Iterable[owlapy.class_expression.OWLClass][source]

Gets the classes in the signature of this object.

Returns:

Classes in the signature of this object.

data_properties_in_signature() Iterable[owlapy.owl_property.OWLDataProperty][source]

Get the data properties that are in the signature of this object.

Returns:

Data properties that are in the signature of this object.

object_properties_in_signature() Iterable[owlapy.owl_property.OWLObjectProperty][source]

A convenience method that obtains the object properties that are in the signature of this object.

Returns:

Object properties that are in the signature of this object.

individuals_in_signature() Iterable[owlapy.owl_individual.OWLNamedIndividual][source]

A convenience method that obtains the individuals that are in the signature of this object.

Returns:

Individuals that are in the signature of this object.

equivalent_classes_axioms(c: owlapy.class_expression.OWLClass) Iterable[owlapy.owl_axiom.OWLEquivalentClassesAxiom][source]

Gets all of the equivalent axioms in this ontology that contain the specified class as an operand.

Parameters:

c – The class for which the EquivalentClasses axioms should be retrieved.

Returns:

EquivalentClasses axioms contained in this ontology.

general_class_axioms() Iterable[owlapy.owl_axiom.OWLClassAxiom][source]
Get the general class axioms of this ontology. This includes SubClass axioms with a complex class expression

as the sub class and EquivalentClass axioms and DisjointClass axioms with only complex class expressions.

Returns:

General class axioms contained in this ontology.

data_property_domain_axioms(property: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyDomainAxiom][source]

Gets the OWLDataPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

data_property_range_axioms(property: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyRangeAxiom][source]

Gets the OWLDataPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

object_property_domain_axioms(property: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyDomainAxiom][source]

Gets the OWLObjectPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

object_property_range_axioms(property: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyRangeAxiom][source]

Gets the OWLObjectPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

get_signature(include_imports_closure: bool = True)[source]

Gets the entities that are in the signature of this ontology.

Parameters:

include_imports_closure – Whether to include/exclude imports from searches.

Returns:

Entities in signature.

get_abox_axioms(include_imports_closure: bool = True) Iterable[owlapy.owl_axiom.OWLAxiom][source]

Get all ABox axioms.

Parameters:

include_imports_closure – Whether to include/exclude imports from searches.

Returns:

ABox axioms.

get_rbox_axioms(include_imports_closure: bool = True) Iterable[owlapy.owl_axiom.OWLAxiom][source]

Get all RBox axioms. :param include_imports_closure: Whether to include/exclude imports from searches.

Returns:

RBox axioms.

get_tbox_axioms(include_imports_closure: bool = True) Iterable[owlapy.owl_axiom.OWLAxiom][source]

Get all TBox axioms.

Parameters:

include_imports_closure – Whether to include/exclude imports from searches.

Returns:

TBox axioms.

get_owlapi_ontology()[source]
get_ontology_id() OWLOntologyID[source]

Gets the OWLOntologyID belonging to this object.

Returns:

The OWLOntologyID.

add_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Add the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

remove_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Removes the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

save(path: str = None, document_iri: owlapy.iri.IRI | None = None, document_format: str | None = None)[source]

Save the ontology to a file, optionally specifying the output format.

OWL API–backed formats (case-insensitive):

rdflib-backed formats – the ontology is first saved as RDF/XML by OWL API to a temporary file, loaded by rdflib, re-serialised in the requested format, then the temporary file is deleted:

Format string(s)

Serialisation

"turtle2"

Turtle (rdflib)

"json-ld" / "jsonld"

JSON-LD

"ntriples" / "nt"

N-Triples

"nt11"

N-Triples 1.1

"n3"

Notation3

"trig"

TriG

"trix"

TriX

"nquads" / "nq"

N-Quads

If document_format is None the ontology’s current format is kept.

Parameters:
  • path – File path where the ontology will be saved.

  • document_iri – Reserved for future use; must be None.

  • document_format – Desired serialisation format (see tables above).

Raises:

ValueError – If an unsupported format string is provided.

class owlapy.owl_ontology.RDFLibOntology(path: str, load: bool = True)[source]

Bases: owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology

Represents an OWL 2 Ontology in the OWL 2 specification.

An OWLOntology consists of a possibly empty set of OWLAxioms and a possibly empty set of OWLAnnotations. An ontology can have an ontology IRI which can be used to identify the ontology. If it has an ontology IRI then it may also have an ontology version IRI. Since OWL 2, an ontology need not have an ontology IRI. (See the OWL 2 Structural Specification).

__len__() int[source]
get_tbox_axioms() Iterable[owlapy.owl_axiom.OWLSubClassOfAxiom | owlapy.owl_axiom.OWLEquivalentClassesAxiom][source]
get_abox_axioms() Iterable[source]
abstractmethod classes_in_signature() Iterable[owlapy.class_expression.OWLClass][source]

Gets the classes in the signature of this object.

Returns:

Classes in the signature of this object.

abstractmethod data_properties_in_signature() Iterable[owlapy.owl_property.OWLDataProperty][source]

Get the data properties that are in the signature of this object.

Returns:

Data properties that are in the signature of this object.

abstractmethod object_properties_in_signature() Iterable[owlapy.owl_property.OWLObjectProperty][source]

A convenience method that obtains the object properties that are in the signature of this object.

Returns:

Object properties that are in the signature of this object.

abstractmethod properties_in_signature() Iterable[owlapy.owl_property.OWLProperty][source]
abstractmethod individuals_in_signature() Iterable[owlapy.owl_individual.OWLNamedIndividual][source]

A convenience method that obtains the individuals that are in the signature of this object.

Returns:

Individuals that are in the signature of this object.

abstractmethod get_abox_axioms_between_individuals() Iterable[source]
abstractmethod get_abox_axioms_between_individuals_and_classes() Iterable[source]
abstractmethod equivalent_classes_axioms(c: owlapy.class_expression.OWLClass) Iterable[owlapy.owl_axiom.OWLEquivalentClassesAxiom][source]

Gets all of the equivalent axioms in this ontology that contain the specified class as an operand.

Parameters:

c – The class for which the EquivalentClasses axioms should be retrieved.

Returns:

EquivalentClasses axioms contained in this ontology.

abstractmethod general_class_axioms() Iterable[owlapy.owl_axiom.OWLClassAxiom][source]
Get the general class axioms of this ontology. This includes SubClass axioms with a complex class expression

as the sub class and EquivalentClass axioms and DisjointClass axioms with only complex class expressions.

Returns:

General class axioms contained in this ontology.

abstractmethod data_property_domain_axioms(pe: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyDomainAxiom][source]

Gets the OWLDataPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

abstractmethod data_property_range_axioms(pe: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyRangeAxiom][source]

Gets the OWLDataPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

abstractmethod object_property_domain_axioms(pe: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyDomainAxiom][source]

Gets the OWLObjectPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

abstractmethod object_property_range_axioms(pe: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyRangeAxiom][source]

Gets the OWLObjectPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

abstractmethod add_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Add the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

abstractmethod remove_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Removes the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

abstractmethod save(path: str | owlapy.iri.IRI = None, inplace: bool = False, rdf_format='rdfxml')[source]

Saves this ontology, using its IRI to determine where/how the ontology should be saved.

Parameters:

document_iri – Whether you want to save in a different location.

abstractmethod get_ontology_id()[source]

Gets the OWLOntologyID belonging to this object.

Returns:

The OWLOntologyID.

abstractmethod __eq__(other)[source]
abstractmethod __hash__()[source]
abstractmethod __repr__()[source]
owlapy.owl_ontology.OWLREADY2_FACET_KEYS
class owlapy.owl_ontology.ToOwlready2(world: owlready2.World)[source]
__slots__ = '_world'
abstractmethod map_object(o: owlapy.owl_object.OWLObject)[source]

Map owlapy object classes.

abstractmethod map_concept(o: owlapy.class_expression.OWLClassExpression) owlready2.ClassConstruct | owlready2.ThingClass[source]

Map owlapy concept classes.

abstractmethod map_datarange(p: owlapy.owl_data_ranges.OWLDataRange) owlready2.ClassConstruct | type[source]

Map owlapy data range classes.

class owlapy.owl_ontology.FromOwlready2[source]

Map owlready2 classes to owlapy model classes.

__slots__ = ()
abstractmethod map_concept(c: owlready2.ClassConstruct | owlready2.ThingClass) owlapy.class_expression.OWLClassExpression[source]

Map concept classes.

abstractmethod map_datarange(p: owlready2.ClassConstruct) owlapy.owl_data_ranges.OWLDataRange[source]

Map data range classes.

owlapy.owl_ontology.is_valid_entity(text_input: str)[source]
class owlapy.owl_ontology.NeuralOntology(path_neural_embedding: str, train_if_not_exists: bool = False, training_params: Dict[str, Any] | str | None = None, batch_size: int = 1024, device: str = 'gpu', gamma: float = 0.5)[source]

Bases: owlapy.abstracts.abstract_owl_ontology.AbstractOWLOntology

Represents an OWL 2 Ontology in the OWL 2 specification.

An OWLOntology consists of a possibly empty set of OWLAxioms and a possibly empty set of OWLAnnotations. An ontology can have an ontology IRI which can be used to identify the ontology. If it has an ontology IRI then it may also have an ontology version IRI. Since OWL 2, an ontology need not have an ontology IRI. (See the OWL 2 Structural Specification).

STR_IRI_TYPE = 'http://www.w3.org/1999/02/22-rdf-syntax-ns#type'
STR_IRI_OWL_CLASS = 'http://www.w3.org/2002/07/owl#Class'
STR_IRI_OBJECT_PROPERTY = 'http://www.w3.org/2002/07/owl#ObjectProperty'
STR_IRI_DATA_PROPERTY = 'http://www.w3.org/2002/07/owl#DatatypeProperty'
gamma = 0.5
batch_size = 1024
predict(h: List[str] = None, r: List[str] = None, t: List[str] = None) List[Tuple[str, float]][source]
classes_in_signature() List[owlapy.class_expression.OWLClass][source]

Gets the classes in the signature of this object.

Returns:

Classes in the signature of this object.

individuals_in_signature() List[owlapy.owl_individual.OWLNamedIndividual][source]

A convenience method that obtains the individuals that are in the signature of this object.

Returns:

Individuals that are in the signature of this object.

data_properties_in_signature() List[owlapy.owl_property.OWLDataProperty][source]

Get the data properties that are in the signature of this object.

Returns:

Data properties that are in the signature of this object.

object_properties_in_signature() List[owlapy.owl_property.OWLObjectProperty][source]

A convenience method that obtains the object properties that are in the signature of this object.

Returns:

Object properties that are in the signature of this object.

abstractmethod equivalent_classes_axioms(c: owlapy.class_expression.OWLClass) Iterable[owlapy.owl_axiom.OWLEquivalentClassesAxiom][source]

Gets all of the equivalent axioms in this ontology that contain the specified class as an operand.

Parameters:

c – The class for which the EquivalentClasses axioms should be retrieved.

Returns:

EquivalentClasses axioms contained in this ontology.

abstractmethod general_class_axioms() Iterable[owlapy.owl_axiom.OWLClassAxiom][source]
Get the general class axioms of this ontology. This includes SubClass axioms with a complex class expression

as the sub class and EquivalentClass axioms and DisjointClass axioms with only complex class expressions.

Returns:

General class axioms contained in this ontology.

abstractmethod data_property_domain_axioms(property: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyDomainAxiom][source]

Gets the OWLDataPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

abstractmethod data_property_range_axioms(property: owlapy.owl_property.OWLDataProperty) Iterable[owlapy.owl_axiom.OWLDataPropertyRangeAxiom][source]

Gets the OWLDataPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

abstractmethod object_property_domain_axioms(property: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyDomainAxiom][source]

Gets the OWLObjectPropertyDomainAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.

abstractmethod get_ontology_id() owlapy.abstracts.abstract_owl_ontology._OI[source]

Gets the OWLOntologyID belonging to this object.

Returns:

The OWLOntologyID.

abstractmethod add_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Add the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

abstractmethod remove_axiom(axiom: owlapy.owl_axiom.OWLAxiom | Iterable[owlapy.owl_axiom.OWLAxiom])[source]

Removes the specified axiom/axioms to the ontology.

Parameters:

axiom – Can be a single axiom or a collection of axioms.

Returns:

Nothing.

abstractmethod save(document_iri: owlapy.iri.IRI | None = None)[source]

Saves this ontology, using its IRI to determine where/how the ontology should be saved.

Parameters:

document_iri – Whether you want to save in a different location.

__eq__(other)[source]
__hash__()[source]
__repr__()[source]
abstractmethod object_property_range_axioms(property: owlapy.owl_property.OWLObjectProperty) Iterable[owlapy.owl_axiom.OWLObjectPropertyRangeAxiom][source]

Gets the OWLObjectPropertyRangeAxiom objects where the property is equal to the specified property.

Parameters:

property – The property which is equal to the property of the retrieved axioms.

Returns:

The axioms matching the search.