SetClassPropertyCardinalityRestriction

This function sets the minCard and maxCard of a certain property in the context of a class. The cardinality of a property in an instance has to be between minCard and maxCard (as well as within the cardinality restrictions as given by the property in context of any of its (indirect) parent classes).
If undefined minCard and/or maxCard will be of value -1, this means for minCard that it is 0 and for maxCard it means infinity.

Syntax

//
//   Strong typing definition
//
void            SetClassPropertyCardinalityRestriction(
                        OwlClass                owlClass,
                        RdfProperty             rdfProperty,
                        int64_t                 minCard,
                        int64_t                 maxCard
                    );


//
//   Weak typing definition
//
void    __declspec(dllexport) __stdcall SetClassPropertyCardinalityRestriction(
                                                int64_t                 owlClass,
                                                int64_t                 rdfProperty,
                                                int64_t                 minCard,
                                                int64_t                 maxCard
                                            );
    

Property owlClass

Size: 64 bit / 8 byte (value)
This attribute represents a handle to the class. The term owl is comming from W3C, the classes follow the expression power of Semantic Web concepts, therefore classes support multiple inheritance. Technically classes can also be distributed over different resources, however for this the parametric library is required as an extension on the basic Geometry Kernel API.

Property rdfProperty

Size: 64 bit / 8 byte (value)
This attribute represents a handle to the property, this can be either a datatype property (attribute), an object property (relation) or non-defined property. The handle will be static during the life-time of the model, when the model (or part of it) is saved and opened again, the handle will most probably be different.

Property minCard

Size: 64 bit / 8 byte (value)
The minimum cardinality (i.e. number of elements) of this property.

Property maxCard

Size: 64 bit / 8 byte (value)
The maximum cardinality (i.e. number of elements) of this property.