owlapy.iri

OWL IRI

Module Contents

Classes

IRI

An IRI, consisting of a namespace and a remainder.

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.

property str: str

Returns: The string that specifies the IRI.

property reminder: str

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

__slots__ = ('_namespace', '_remainder', '__weakref__')
type_index: Final = 0
static create(namespace: owlapy.namespaces.Namespaces, remainder: str) IRI[source]
static create(namespace: str, remainder: str) IRI
static create(string: str) IRI
__repr__()[source]

Return repr(self).

__eq__(other)[source]

Return self==value.

__hash__()[source]

Return hash(self).

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 Mone otherwise.

as_str() str[source]

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

get_short_form() str[source]

Gets the short form.

Returns:

A string that represents the short form.

get_namespace() str[source]
Returns:

The namespace as string.

get_remainder() str[source]
Returns:

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