Entities and primitives

Entities represent the named terms of OWL ontologies, such as classes, datatypes, and properties, and are modeled by CowlEntity. The term primitive has no correspondence in the OWL 2 specification. It is used as a collective term for entities, anonymous individuals, and IRIs, which are modeled by CowlPrimitive. You can always safely cast CowlEntity to CowlPrimitive, while the opposite can only be done after checking that the primitive is an OWL entity (see cowl_is_entity()).

struct CowlEntity

Represents an Entity in the OWL 2 specification.

Pseudo-extends: CowlPrimitive

enum CowlEntityType

Represents the type of CowlEntity .

Values:

enumerator COWL_ET_CLASS

CowlClass - class.

enumerator COWL_ET_OBJ_PROP

CowlObjProp - object property.

enumerator COWL_ET_DATA_PROP

CowlDataProp - data property.

enumerator COWL_ET_ANNOT_PROP

CowlAnnotProp - annotation property.

enumerator COWL_ET_NAMED_IND

CowlNamedInd - named individual.

enumerator COWL_ET_DATATYPE

CowlDatatype - datatype.

enumerator COWL_ET_COUNT

Number of enum values.

enumerator COWL_ET_FIRST

First enum value.

CowlEntityType cowl_entity_get_type(CowlAnyEntity *entity)

Gets the type of the entity.

Parameters:
  • entity – The entity.

Returns:

The type.

CowlIRI *cowl_entity_get_iri(CowlAnyEntity *entity)

Gets the IRI of the entity.

Parameters:
  • entity – The entity.

Returns:

The IRI.

bool cowl_entity_is_reserved(CowlAnyEntity *entity)

Checks whether the entity is reserved, i.e.

if its IRI is in the reserved vocabulary.

Parameters:
  • entity – The entity.

Returns:

True if the entity is reserved, false otherwise.

struct CowlPrimitive

Represents a primitive, a collective term for entities, anonymous individuals, and IRIs.

Pseudo-extends: CowlObject

enum CowlPrimitiveType

Represents the type of CowlPrimitive .

Values:

enumerator COWL_PT_CLASS

CowlClass - class.

enumerator COWL_PT_OBJ_PROP

CowlObjProp - object property.

enumerator COWL_PT_DATA_PROP

CowlDataProp - data property.

enumerator COWL_PT_ANNOT_PROP

CowlAnnotProp - annotation property.

enumerator COWL_PT_NAMED_IND

CowlNamedInd - named individual.

enumerator COWL_PT_ANON_IND

CowlAnonInd - anonymous individual.

enumerator COWL_PT_DATATYPE

CowlDatatype - datatype.

enumerator COWL_PT_IRI

CowlIRI - IRI.

enumerator COWL_PT_COUNT

Number of enum values.

enumerator COWL_PT_FIRST

First enum value.

CowlPrimitiveType cowl_primitive_get_type(CowlAnyPrimitive *primitive)

Gets the type of the primitive.

Parameters:
  • primitive – The primitive.

Returns:

The type.

bool cowl_primitive_is_entity(CowlAnyPrimitive *primitive)

Checks whether the primitive is an entity.

Parameters:
  • primitive – The primitive.

Returns:

True if the primitive is an entity,