owlapy.iri

OWL IRI

Classes

IRI

An IRI, consisting of a namespace and a remainder.

Module Contents

class owlapy.iri.IRI(namespace: str | owlapy.namespaces.Namespaces, remainder: str = '')[source]

Bases: owlapy.owl_annotation.OWLAnnotationSubject, owlapy.owl_annotation.OWLAnnotationValue

An IRI, consisting of a namespace and a remainder.

__slots__ = ('_namespace', '_remainder', '__weakref__')
type_index: Final = 0
static create(iri: str | owlapy.namespaces.Namespaces, remainder: str = None) IRI[source]
__repr__()[source]
__eq__(other)[source]
__hash__()[source]
is_nothing()[source]

Determines if this IRI is equal to the IRI that owl:Nothing is named with.

Returns:

True if this IRI is equal to <http://www.w3.org/2002/07/owl#Nothing> and otherwise False.

is_thing()[source]

Determines if this IRI is equal to the IRI that owl:Thing is named with.

Returns:

True if this IRI is equal to <http://www.w3.org/2002/07/owl#Thing> and otherwise False.

is_reserved_vocabulary() bool[source]

Determines if this IRI is in the reserved vocabulary. An IRI is in the reserved vocabulary if it starts with <http://www.w3.org/1999/02/22-rdf-syntax-ns#> or <http://www.w3.org/2000/01/rdf-schema#> or <http://www.w3.org/2001/XMLSchema#> or <http://www.w3.org/2002/07/owl#>.

Returns:

True if the IRI is in the reserved vocabulary, otherwise False.

as_iri() IRI[source]
Returns:

if the value is an IRI, return it. Return None otherwise.

as_str() str[source]

CD: Should be deprecated. :returns: The string that specifies the IRI.

property str: str

Returns: The string that specifies the IRI.

property reminder: str

Returns: The string corresponding to the reminder of the IRI.

get_namespace() str[source]
Returns:

The namespace as string.

get_remainder() str[source]
Returns:

The remainder (coincident with NCName usually) for this IRI.