IRIs

struct CowlIRI : public CowlAnnotValue

Represents International Resource Identifiers.

Public Functions

CowlIRI *cowl_iri(CowlString *prefix, CowlString *suffix)

Returns a retained IRI whose string representation is the concatenation of the specified strings.

Parameters
  • prefix – The prefix.

  • suffix – The suffix.

Returns

Retained IRI, or NULL on error

CowlIRI *cowl_iri_from_string(UString string)

Returns a retained IRI given its string representation.

Parameters

string – String representation of the IRI.

Returns

Retained IRI, or NULL on error

void cowl_iri_release(CowlIRI *iri)

Releases the specified IRI.

Parameters

iri – The IRI.

CowlString *cowl_iri_get_ns(CowlIRI *iri)

Gets the namespace of the specified IRI.

Parameters

iri – The IRI.

Returns

The namespace.

CowlString *cowl_iri_get_rem(CowlIRI *iri)

Gets the remainder of the specified IRI.

Parameters

iri – The IRI.

Returns

The remainder.

Public Static Functions

static inline CowlIRI *cowl_iri_retain(CowlIRI *iri)

Retains the specified IRI.

Parameters

iri – The IRI.

Returns

Retained IRI.

static inline bool cowl_iri_has_rem(CowlIRI *iri)

Checks whether the IRI has a remainder.

Parameters

iri – The IRI.

Returns

True if the IRI has a remainder, false otherwise.

static inline CowlString *cowl_iri_to_string(CowlIRI *iri)

Returns the string representation of the specified IRI.

Note

The returned string is retained, so you are responsible for releasing it.

Parameters

iri – The IRI.

Returns

String representation, or NULL on error.

static inline bool cowl_iri_equals(CowlIRI *lhs, CowlIRI *rhs)

Equality function.

Parameters
  • lhs – LHS of the equality relation.

  • rhs – RHS of the equality relation.

Returns

True if the equality relation holds, false otherwise.

static inline ulib_uint cowl_iri_hash(CowlIRI *iri)

Hash function.

Parameters

iri – The IRI.

Returns

The hash value.

cowl_iri_from_static(CSTR)

Returns a retained IRI given its static string representation.

Parameters
  • CSTR – [char const[]] Static string.

Returns

[CowlIRI *] Retained IRI, or NULL on error