IRIs
-
struct CowlIRI
Represents International Resource Identifiers.
Pseudo-extends:
CowlAnnotValue
-
CowlIRI *cowl_iri(CowlString *prefix, CowlString *suffix)
Returns an IRI whose string representation is the concatenation of the specified strings.
Note
You must release the returned object via
cowl_release()
.- Parameters:
prefix – The prefix.
suffix – The suffix.
- Returns:
IRI, or NULL on error
-
CowlIRI *cowl_iri_from_string(UString string)
Returns an IRI given its string representation.
Note
You must release the returned object via
cowl_release()
.- Parameters:
string – String representation of the IRI.
- Returns:
IRI, or NULL on error
-
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.
-
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.
-
bool cowl_iri_is_reserved(CowlIRI *iri)
Checks whether the IRI is in the reserved vocabulary.
- Parameters:
iri – The IRI.
- Returns:
True if the IRI is reserved, false otherwise.
-
CowlString *cowl_iri_to_string(CowlIRI *iri)
Returns the string representation of the specified IRI.
Note
The IRI is represented as the concatenation of the namespace and the remainder, without any additional markup (e.g. angle brackets).
Note
You must release the returned object via
cowl_release()
.- Parameters:
iri – The IRI.
- Returns:
String representation, or NULL on error.
-
UString cowl_iri_to_ustring(CowlIRI *iri)
Returns the string representation of the specified IRI.
Note
The returned object must be destroyed by calling
ustring_deinit
.Note
The IRI is represented as the concatenation of the namespace and the remainder, without any additional markup (e.g. angle brackets).
- Parameters:
iri – The IRI.
- Returns:
String representation, or
ustring_null
on error.
-
cowl_iri_from_static(str)
Returns an IRI given its literal string representation.
Note
You must release the returned object via
cowl_release()
.- Parameters:
str –
char const []
String literal.
- Returns:
CowlIRI *
IRI, or NULL on error