Literals

struct CowlLiteral

Represents a Literal in the OWL 2 specification.

Pseudo-extends: CowlAnnotValue

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

Returns a literal.

Note

You must release the returned object via cowl_release().

Parameters:
  • dtoptional The datatype.

  • value – The value.

  • langoptional The language tag.

Returns:

Literal, or NULL on error.

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

Returns a literal given the string representations of its components.

Note

You must release the returned object via cowl_release().

Parameters:
  • dtoptional The datatype.

  • value – The value.

  • langoptional The language tag.

Returns:

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 literal given the string literals representing its components.

Note

You must release the returned object via cowl_release().

Parameters:
  • dtchar const[], optional The datatype.

  • valuechar const [] The value.

  • langchar const[], optional The language tag.

Returns:

CowlLiteral * Literal, or NULL on error.