4.4 The Web Ontology Language 81
An OWL restriction is a way of specifying a set of things that satisfy some
criterion. It is called a “restriction” because it restricts the set of all things
to those that satisfy the criterion. Mathematically, it corresponds to the “set
constructor” whereby a set is defined by a condition on its elements. For
example, {x|x>0} defines the set of positive numbers. Classes are constructed
from classes from by usingowl:intersectionOf(corresponding to the
Boolean AND operator),owl:unionOf(Boolean OR operator), andowl:
complementOf(Boolean NOT operator).
OWL has six set constructors. All of them useowl:Restrictionand
owl:onPropertyas in the ICE-Syndrome example above, together with
one of the following:
- owl:someValuesFrom.This is the constructor that was used in the ICE-
Syndrome example. It defines the set of resources for which the property
has at least one value in the class. - owl:allValuesFrom.This constructor defines the set of resources for which
the property only takes values in the class. In other words, the property
does not take values of any other kind. - owl:hasValue.This constructor defines the set of resources for which the
property takes the specified value. - owl:maxCardinality.In general, a property can have any number of val-
ues. This constructor defines the set of resources for which the property
is limited to have the specified maximum number of values. - owl:minCardinality.This is the reverse ofmaxCardinality. It defines
the set of resources for which the property is at least the specified mini-
mum number of values. - owl:cardinality. This constructor defines the set of resources for which
the property has exactly the specified number of values.
While classes can be constructed in a large variety of ways, OWL has
only one property constructor:owl:inverseOf. The inverse of a prop-
erty is the property for which the roles of subject and object have been re-
versed. For example, in figure 1.14 there are a number of relationships such
asisStoredInandisCitedBy. It may be useful to look at these relation-
ships from the other point of view. Here is how one would define the inverse
properties using OWL: