untitled

(ff) #1

12.7 Designing the Properties 309


In RDF, the domain and range of a property are specified using domain
and range statements. For example, the height of a person would be declared
as follows:


<rdf:Property rdf:ID="personHeight">
<rdfs:domain rdf:resource="#Person"/>
<rdfs:range rdf:resource="xsd:decimal"/>
</rdf:Property>

Similarly, only persons can have or be supervisors, so the supervisor prop-
erty would be declared as follows:


<rdf:Property rdf:ID="supervisor">
<rdfs:domain rdf:resource="#Person"/>
<rdfs:range rdf:resource="#Person"/>
</rdf:Property>

In OWL, one can define domains and ranges in the same way as in RDF.
For example, in the medical chart ontology, each event may be authorized
by a member of the staff. This is specified in OWL as follows:


<owl:ObjectProperty rdf:ID="authorizedBy">
<rdfs:domain rdf:resource="#Event"/>
<rdfs:range rdf:resource="#Staff"/>
</owl:ObjectProperty>

In addition, OWL has the ability to specifylocal rangesrelative to a domain
by means ofowl:someValuesFrom. For example, suppose that admissions may
only be authorized by a doctor. In other words, when an event is in the
Admissionsubclass ofEvent, then the range ofauthorizedByis the sub-
classDoctorofStaff. This is specified in OWL as follows:


<owl:Class rdf:about="#Admission">
<rdfs:subClassOf>
<owl:Restriction>
<owl:onProperty rdf:resource="#authorizedBy"/>
<owl:allValuesFrom rdf:resource="#Doctor"/>
</owl:Restriction>
<rdfs:subClassOf>
</owl:Class>
Free download pdf