Data Cardinality Restrictions

struct CowlDataCard : public CowlClsExp

Represents DataMinCardinality, DataMaxCardinality and DataExactCardinality in the OWL 2 specification.

Public Functions

CowlDataCard *cowl_data_card(CowlCardType type, CowlAnyDataPropExp *prop, CowlAnyDataRange *range, ulib_uint cardinality)

Returns a retained data property cardinality restriction.

Parameters
  • type – The type.

  • prop – The data property.

  • range – [optional] Range of the restriction.

  • cardinality – Cardinality of the restriction.

Returns

Retained restriction, or NULL on error.

CowlDataRange *cowl_data_card_get_range(CowlDataCard *restr)

Gets the range of the restriction.

Parameters

restr – The restriction.

Returns

The range.

Public Static Functions

static inline CowlDataCard *cowl_data_card_retain(CowlDataCard *restr)

Retains the specified data property cardinality restriction.

Parameters

restr – The restriction.

Returns

Retained restriction.

static inline void cowl_data_card_release(CowlDataCard *restr)

Releases the specified data property cardinality restriction.

Parameters

restr – The restriction.

static inline CowlCardType cowl_data_card_get_type(CowlDataCard *restr)

Gets the type of the specified data property cardinality restriction.

Parameters

restr – The restriction.

Returns

The type.

static inline CowlDataPropExp *cowl_data_card_get_prop(CowlDataCard *restr)

Gets the property of the restriction.

Parameters

restr – The restriction.

Returns

The property.

static inline ulib_uint cowl_data_card_get_cardinality(CowlDataCard *restr)

Gets the cardinality of the restriction.

Parameters

restr – The restriction.

Returns

The cardinality.

static inline CowlString *cowl_data_card_to_string(CowlDataCard *restr)

Returns the string representation of the specified restriction.

Note

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

Parameters

restr – The restriction.

Returns

String representation, or NULL on error.

static inline bool cowl_data_card_equals(CowlDataCard *lhs, CowlDataCard *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_data_card_hash(CowlDataCard *restr)

Hash function.

Parameters

restr – The restriction.

Returns

The hash value.

static inline bool cowl_data_card_iterate_primitives(CowlDataCard *restr, CowlPrimitiveFlags flags, CowlIterator *iter)

Iterates over the primitives referenced by the specified data property cardinality restriction.

Parameters
  • restr – The restriction.

  • flags – Iteration flags.

  • iter – The iterator.

Returns

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