Datatype Restrictions
-
struct CowlDatatypeRestr : public CowlDataRange
Represents a DatatypeRestriction in the OWL 2 specification.
Public Static Functions
-
static inline CowlDatatypeRestr *cowl_datatype_restr(CowlDatatype *datatype, CowlVector *restrictions)
Returns a retained datatype restriction.
- Parameters
datatype – The datatype that this data range restricts.
restrictions – Set of facet restrictions.
- Returns
Retained datatype restriction, or NULL on error.
-
static inline CowlDatatypeRestr *cowl_datatype_restr_retain(CowlDatatypeRestr *restr)
Retains the specified datatype restriction.
- Parameters
restr – The restriction.
- Returns
Retained datatype restriction.
-
static inline void cowl_datatype_restr_release(CowlDatatypeRestr *restr)
Releases the specified datatype restriction.
- Parameters
restr – The datatype restriction.
-
static inline CowlDatatype *cowl_datatype_restr_get_datatype(CowlDatatypeRestr *restr)
Gets the datatype that this data range restricts.
- Parameters
restr – The datatype restriction.
- Returns
The datatype.
-
static inline CowlVector *cowl_datatype_restr_get_restrictions(CowlDatatypeRestr *restr)
Gets the facet restrictions.
- Parameters
restr – The datatype restriction.
- Returns
The facet restrictions.
-
static inline CowlString *cowl_datatype_restr_to_string(CowlDatatypeRestr *restr)
Returns the string representation of the specified datatype restriction.
Note
The returned string is retained, so you are responsible for releasing it.
- Parameters
restr – The datatype restriction.
- Returns
String representation, or NULL on error.
-
static inline bool cowl_datatype_restr_equals(CowlDatatypeRestr *lhs, CowlDatatypeRestr *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_datatype_restr_hash(CowlDatatypeRestr *restr)
Hash function.
- Parameters
restr – The datatype restriction.
- Returns
The hash value.
-
static inline bool cowl_datatype_restr_iterate_primitives(CowlDatatypeRestr *restr, CowlPrimitiveFlags flags, CowlIterator *iter)
Iterates over the primitives referenced by the specified datatype restriction.
- Parameters
restr – The datatype restriction.
flags – Iteration flags.
iter – The iterator.
- Returns
True if the iteration was completed, false if it was stopped.
-
static inline CowlDatatypeRestr *cowl_datatype_restr(CowlDatatype *datatype, CowlVector *restrictions)
-
struct CowlFacetRestr : public CowlObject
Represents a facet restriction used to restrict a particular CowlDatatype.
Public Static Functions
-
static inline CowlFacetRestr *cowl_facet_restr(CowlIRI *facet, CowlLiteral *value)
Returns a retained facet restriction.
- Parameters
facet – The facet.
value – The restriction value.
- Returns
Retained facet restriction, or NULL on error.
-
static inline CowlFacetRestr *cowl_facet_restr_retain(CowlFacetRestr *restr)
Retains the specified facet restriction.
- Parameters
restr – The facet restriction.
- Returns
Retained facet restriction.
-
static inline void cowl_facet_restr_release(CowlFacetRestr *restr)
Releases the specified facet restriction.
- Parameters
restr – The facet restriction.
-
static inline CowlIRI *cowl_facet_restr_get_facet(CowlFacetRestr *restr)
Gets the facet.
- Parameters
restr – The facet restriction.
- Returns
The facet.
-
static inline CowlLiteral *cowl_facet_restr_get_value(CowlFacetRestr *restr)
Gets the restriction value.
- Parameters
restr – The facet restriction.
- Returns
The restriction value.
-
static inline CowlString *cowl_facet_restr_to_string(CowlFacetRestr *restr)
Returns the string representation of the specified facet restriction.
Note
The returned string is retained, so you are responsible for releasing it.
- Parameters
restr – The facet restriction.
- Returns
String representation, or NULL on error.
-
static inline bool cowl_facet_restr_equals(CowlFacetRestr *lhs, CowlFacetRestr *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_facet_restr_hash(CowlFacetRestr *restr)
Hash function.
- Parameters
restr – The facet restriction.
- Returns
The hash value.
-
static inline bool cowl_facet_restr_iterate_primitives(CowlFacetRestr *restr, CowlPrimitiveFlags flags, CowlIterator *iter)
Iterates over the primitives referenced by specified facet restriction.
- Parameters
restr – The facet restriction.
flags – Iteration flags.
iter – The iterator.
- Returns
True if the iteration was completed, false if it was stopped.
-
static inline CowlFacetRestr *cowl_facet_restr(CowlIRI *facet, CowlLiteral *value)