In OWL, a property restriction defines an anonymous class of all of the individuals that satisfy the restriction. Property restrictions are divided into value constraints and cardinality constraints. In SADL, property restrictions are always associated with a class so that the property restriction serves as a way of further defining the class.
There are two property restrictions imposing value constraints in OWL: some values from (owl:someValuesFrom) and all values from (owl:allValuesFrom). These correspond to existential and universal quantification, respectively, in predicate logic.
In the SADL grammar, there are several forms that a some values from constraint can take. Suppose we have the following model snippet.
Parent
is a
type of
Person,
described by
child
with values
of type
Person.
We might further say
child of Parent has at least one value of type Person.
This will result in an OWL some values from property restriction. In OWL RDF/XML format, this is:
<owl:Class rdf:ID="Parent">
<rdfs:subClassOf>
<owl:Restriction>
<owl:someValuesFrom>
<owl:Class
rdf:ID="Person"/>
</owl:someValuesFrom>
<owl:onProperty>
<owl:ObjectProperty rdf:ID="child"/>
</owl:onProperty>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf rdf:resource="#Person"/>
</owl:Class>.
Note that we could have put the property restriction inside the class declaration, like this.
Parent
is a
type of
Person,
described by
child
with at
least one
value of
type Person.
In this case, the declaration defines the domain (Parent) of the property child but does not define the range. It does establish that child is an object property, but otherwise all that is know is that for instances of type Parent, child must have some value of type Person.
It is possible to create a some values from restriction to an enumerated class in a single statement as long as the range of the property is known. This statement is an example.
gender
describes
Person
with values
of type
Gender.
Gender is
a class.
gender
of Person
must be
one of
{Male, Female}.
<once JBSMP is fixed to
generate correct OWL, put in translation here>
******* fix ***************
In the SADL grammar, the all values from constraint is similar to the some values from constraint. There are two forms, the first embedding the restriction into the declaration of the class Parent and the property child. In the second form, the all values from restriction is a separate statement.
Once again, the OWL generated from these two forms is identical and EligibleAthlete is a subclass both of Student and of all things that have all values of grade coming from the PasingGrade class.
<owl:Class rdf:ID="EligibleAthlete">
<rdfs:subClassOf>
<owl:Restriction>
<owl:allValuesFrom rdf:resource="#PassingGrade"/>
<owl:onProperty>
<rdf:Property rdf:ID="grade"/>
</owl:onProperty>
</owl:Restriction>
</rdfs:subClassOf>
<rdfs:subClassOf>
<owl:Class rdf:ID="Student"/>
</rdfs:subClassOf>
</owl:Class>
Cardinality constraints have to do with how many values a property can have for a given subject, regardless of what the actual value is. The constraint can specify the exact number of values (owl:cardinality), the minimum number of values (owl:minCardinality), or the maximum number of values (owl:maxCardinality).
Like the value constraints, cardinality constraints can either be embedded in the declaration of a class or as a separate statement. One difference is that for the first form, the range cannot be included in the definition (that would make it a qualified cardinality restriction, see below) so the property in question must either be defined elsewhere, as in the first example below, or be left without any indication of the type of range making it an rdf:Property, as shown in the second example below. The rest of the examples illustrate the different kinds of cardinality using separate statements for the constraint.
wheel is a property with values of type class.
Bicycle is a class described by wheel with at least 1 value.
Note that in the second example, where the property seat is an
rdf:Property (the superclass of owl:ObjectProperty and
owl:DatatypeProperty), it has a lighter green semantic coloring.
Qualified cardinality is an additional OWL expressiveness added in OWL 2. In general SADL, constrained by the underlying Apache Jena capability, does not support OWL 2 but qualified cardinality is supported. Qualified cardinality allows one to specify the number of values of a property an instance of a class may have of a given type. This allows one to create more natural models. For example, one might define a single property component for the part-to-whole relationship instead of the multiple properties in the previous example and still express appropriate constraints. Like the other property restrictions, a qualified cardinality constraint in SADL can be in one of two forms, either embedded in the class declaration or as a separate statement. Unlike cardinality constraints, in the first form the "values of type" can be included with a specific class or data range identified. Examples of this appear in the first statement below. The rest of the examples show qualified cardinality restrictions as separate SADL statements.
When defining a class in SADL, one can include a specification of properties that have the declared class in their domain using the "described by" keywords. Alternatively, the property declaration can be in a separate statement giving the property name followed by the "describes" keyword followed by the domain class. In either case, this can be followed by "with a single value of type", a variation on the range specification "with values of type". The meaning of "a single value of type" deserves clarification, especially because previous versions of SADL gave it different meanings.
The phrase "a single value of type" in the context of a "described by" in a class declaration or in the context of a "describes" in a property declaration is translated to an OWL qualified cardinality constraint. Below are two examples, one for an owl:ObjectProperty and one for an owl:DatatypeProperty.
The result of these two statements combined is the following. Note that for the chews property restriction, the restriction has the owl:onClass property while for the age property restriction has the owl:onDataRange property, as described in the previous section.
Note that "a single value of type class" or "a single value of type data" can be used but these only identify whether the property is an owl:ObjectProperty or an owl:DatatypeProperty. As no actual type is specified an ordinary cardinality restriction is created.
One may wonder about the difference between the meaning of these two statements in SADL.
The first statement translates to an OWL some values from statement. The second translates to an OWL qualified cardinality statement. What is the difference? Logically, the answer is none. The OWL statements are logically equivalent. Thus which to use is a matter of user preference, either in the controlled English or in the OWL translation, but under OWL reasoning it does not matter. (Caution: where the user is also creating rules, queries, or tests that reference the OWL constructs rather than the OWL entailments, the difference may be consequential.)