The cardinality constraint owl:maxCardinality is a built-in OWL property that links a restriction class to a data value belonging to the value space of the XML Schema datatype nonNegativeInteger.

A restriction containing an owl:maxCardinality constraint describes a class of all individuals that have at most N semantically distinct values (individuals or data values) for the property concerned, where N is the value of the cardinality constraint.

Syntactically, the cardinality constraint is represented as an RDF property element with the corresponding rdf:datatype attribute.


    <rdf:Property rdf:ID="maxCardinality">


        <rdfs:domain rdf:resource="#Restriction"/>

        <rdfs:range rdf:resource="&xsd;nonNegativeInteger"/>


Example listing




The following example describes a class of individuals that have at most two parents:


        <owl:onProperty rdf:resource="#hasParent" />

        <owl:maxCardinality rdf:datatype="&xsd;nonNegativeInteger">2</owl:maxCardinality>


Other information

In OWL, like in RDF, it is assumed that any instance of a class may have an arbitrary number (zero or more) of values for a particular property. To make a property required (at least one), to allow only a specific number of values for that property, or to insist that a property must not occur, cardinality constraints can be used. OWL provides three constructs for restricting the cardinality of properties locally within a class context.

NOTE: OWL Lite includes the use of all three types of cardinality constraints, but only when used with the values "0" or "1".

Use in ISO 15926