Object Cardinality Restrictions
-
struct CowlObjCard : public CowlClsExp
Represents ObjectMinCardinality, ObjectMaxCardinality and ObjectExactCardinality in the OWL 2 specification.
Public Functions
-
CowlObjCard *cowl_obj_card(CowlCardType type, CowlAnyObjPropExp *prop, CowlAnyClsExp *filler, ulib_uint cardinality)
Returns a retained object property cardinality restriction.
- Parameters
type – The type.
prop – The object property.
filler – [optional] Filler of the restriction.
cardinality – Cardinality of the restriction.
- Returns
Retained restriction, or NULL on error.
-
CowlClsExp *cowl_obj_card_get_filler(CowlObjCard *restr)
Gets the filler of the restriction.
- Parameters
restr – The restriction.
- Returns
The filler.
Public Static Functions
-
static inline CowlObjCard *cowl_obj_card_retain(CowlObjCard *restr)
Retains the specified object property cardinality restriction.
- Parameters
restr – The restriction.
- Returns
Retained restriction.
-
static inline void cowl_obj_card_release(CowlObjCard *restr)
Releases the specified object property cardinality restriction.
- Parameters
restr – The restriction.
-
static inline CowlCardType cowl_obj_card_get_type(CowlObjCard *restr)
Gets the type of the specified object property cardinality restriction.
- Parameters
restr – The restriction.
- Returns
The type.
-
static inline CowlObjPropExp *cowl_obj_card_get_prop(CowlObjCard *restr)
Gets the property of the restriction.
- Parameters
restr – The restriction.
- Returns
The property.
-
static inline ulib_uint cowl_obj_card_get_cardinality(CowlObjCard *restr)
Gets the cardinality of the restriction.
- Parameters
restr – The restriction.
- Returns
The cardinality.
-
static inline CowlString *cowl_obj_card_to_string(CowlObjCard *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_obj_card_equals(CowlObjCard *lhs, CowlObjCard *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_obj_card_hash(CowlObjCard *restr)
Hash function.
- Parameters
restr – The restriction.
- Returns
The hash value.
-
static inline bool cowl_obj_card_iterate_primitives(CowlObjCard *restr, CowlPrimitiveFlags flags, CowlIterator *iter)
Iterates over the primitives referenced by the specified object 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.
-
CowlObjCard *cowl_obj_card(CowlCardType type, CowlAnyObjPropExp *prop, CowlAnyClsExp *filler, ulib_uint cardinality)
-
enum CowlCardType
Represents the type of CowlObjCard and CowlDataCard.
Values:
-
enumerator COWL_CT_MIN
Minimum cardinality.
-
enumerator COWL_CT_MAX
Maximum cardinality.
-
enumerator COWL_CT_EXACT
Exact cardinality.
-
enumerator COWL_CT_COUNT
Number of enum values.
-
enumerator COWL_CT_FIRST
First enum value.
-
enumerator COWL_CT_MIN