Literals

struct CowlLiteral : public CowlAnnotValue

Represents a Literal in the OWL 2 specification.

Public Functions

CowlLiteral *cowl_literal(CowlDatatype *dt, CowlString *value, CowlString *lang)

Returns a retained literal.

Parameters
  • dt – [optional] The datatype.

  • value – The value.

  • lang – [optional] The language tag.

Returns

Retained literal, or NULL on error.

CowlLiteral *cowl_literal_from_string(UString dt, UString value, UString lang)

Returns a retained literal given the string representations of its components.

Parameters
  • dt – [optional] The datatype.

  • value – The value.

  • lang – [optional] The language tag.

Returns

Retained literal, or NULL on error.

CowlDatatype *cowl_literal_get_datatype(CowlLiteral *literal)

Gets the datatype.

Parameters

literal – The literal.

Returns

The datatype.

CowlString *cowl_literal_get_value(CowlLiteral *literal)

Gets the value.

Parameters

literal – The literal.

Returns

The value.

CowlString *cowl_literal_get_lang(CowlLiteral *literal)

Gets the language tag.

Parameters

literal – The literal.

Returns

The language tag.

cowl_literal_from_static(DT, VALUE, LANG)

Returns a retained literal given the static string representations of its components.

Parameters
  • DT – [char const[], optional] The datatype.

  • VALUE – [char const[]] The value.

  • LANG – [char const[], optional] The language tag.

Returns

[CowlLiteral *] Retained literal, or NULL on error.