Datatype restrictions

struct CowlDatatypeRestr

Represents a DatatypeRestriction in the OWL 2 specification.

Pseudo-extends: CowlDataRange

CowlDatatypeRestr *cowl_datatype_restr(CowlDatatype *datatype, CowlVector *restrictions)

Returns a datatype restriction.

Note

You must release the returned object via cowl_release().

Parameters:
  • datatype – The datatype that this data range restricts.

  • restrictions – Set of facet restrictions.

Returns:

Datatype restriction, or NULL on error.

CowlDatatype *cowl_datatype_restr_get_datatype(CowlDatatypeRestr *restr)

Gets the datatype that this data range restricts.

Parameters:
  • restr – The datatype restriction.

Returns:

The datatype.

CowlVector *cowl_datatype_restr_get_restrictions(CowlDatatypeRestr *restr)

Gets the facet restrictions.

Parameters:
  • restr – The datatype restriction.

Returns:

The facet restrictions.

struct CowlFacetRestr

Represents a facet restriction used to restrict a particular CowlDatatype .

Pseudo-extends: CowlObject

CowlFacetRestr *cowl_facet_restr(CowlIRI *facet, CowlLiteral *value)

Returns a facet restriction.

Note

You must release the returned object via cowl_release().

Parameters:
  • facet – The facet.

  • value – The restriction value.

Returns:

Facet restriction, or NULL on error.

CowlIRI *cowl_facet_restr_get_facet(CowlFacetRestr *restr)

Gets the facet.

Parameters:
  • restr – The facet restriction.

Returns:

The facet.

CowlLiteral *cowl_facet_restr_get_value(CowlFacetRestr *restr)

Gets the restriction value.

Parameters:
  • restr – The facet restriction.

Returns:

The restriction value.