Annotation Values

struct CowlAnnotValue : public CowlObject

Represents annotation values, which can be either anonymous individuals, IRIs, or literals.

See also

CowlAnnotation

Subclassed by CowlAnonInd, CowlIRI, CowlLiteral

Public Functions

CowlAnnotValueType cowl_annot_value_get_type(CowlAnyAnnotValue *value)

Gets the type of the specified annotation value.

Parameters

value – The annotation value.

Returns

The type.

Public Static Functions

static inline CowlAnyAnnotValue *cowl_annot_value_retain(CowlAnyAnnotValue *value)

Retains the annotation value.

Parameters

value – The annotation value.

Returns

Retained annotation value.

static inline void cowl_annot_value_release(CowlAnyAnnotValue *value)

Releases the annotation value.

Parameters

value – The annotation value.

static inline CowlString *cowl_annot_value_to_string(CowlAnyAnnotValue *value)

Returns the string representation of the specified annotation value.

Note

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

Parameters

value – The annotation value.

Returns

String representation, or NULL on error.

static inline bool cowl_annot_value_equals(CowlAnyAnnotValue *lhs, CowlAnyAnnotValue *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_annot_value_hash(CowlAnyAnnotValue *value)

Hash function.

Parameters

value – The annotation value.

Returns

The hash value.

static inline bool cowl_annot_value_iterate_primitives(CowlAnyAnnotValue *value, CowlPrimitiveFlags flags, CowlIterator *iter)

Iterates over the primitives referenced by the specified annotation value.

Parameters
  • value – The annotation value.

  • flags – Iteration flags.

  • iter – The iterator.

Returns

True if the iteration was completed, false if it was stopped.

enum CowlAnnotValueType

Represents the type of CowlAnnotValue.

Values:

enumerator COWL_AVT_IRI

IRI.

enumerator COWL_AVT_LITERAL

Literal.

enumerator COWL_AVT_ANON_IND

Anonymous individual.

enumerator COWL_AVT_COUNT

Number of enum values.

enumerator COWL_AVT_FIRST

First enum value.