In order to construct useful ontologies, one must be able to express more than existence of classes, properties, and individuals. In this section we will explore some of the additional expressiveness of OWL DL.
When should one use the "owl:imports" directive? Whenever one wishes to use the classes and properties defined in one ontology in another. For example, to use the "time-entry:TemporalThing" class defined in time-entry.owl, one can import this ontology in the "owl:Ontology" tag.
<owl:Ontology rdf:about=""> <owl:imports rdf:resource="http://www.isi.edu/~pan/damltime/time-entry.owl"/> </owl:Ontology>
One may then use the imported classes and properties as if they were defined in the current ontology file. This facilitates modularity and reuse of ontologies.
Note: Use of the owl:imports directive will cause the current version of Racer (1.7.7) to be unable to check an ontologies consistency or to do classification from the Protege OWL plugin.
Next to the taxonomical relationship "is-a-type-of", perhaps the most common relationship of interest is the part-whole relationship. Both the natural world and the world of artifacts seems to have the property that there are many levels of aggregation of parts to form wholes, which in turn are part of something more grandiose.
In OWL, the part-whole hierarchy can be represented as a transitive property with existential (someValuesFrom) restrictions. Consider, for example, the "isSpatiallyContainedBy" property on the owl:Class Location.
Ordered sets, including sequences, can be represented in OWL using the rdf:List class, although doing so makes an ontology OWL Full. The class representing ordered sets is created as a subclass of rdf:List and a range restriction may be placed on the rdf:first Property to specify what class of thing can be in the list. For example, Sowa's History for a discrete process is sequence of States and Events. To represent this in OWL, we define the class HistoryElement to be the union of States and Events and then create History as an rdf:List with restricted Property rdf:first. The rdf:rest property can be restricted to History as well, as it is below.
<owl:Class rdf:ID="HistoryElement"> <owl:equivalentClass> <owl:Class> <owl:unionOf rdf:parseType="Collection"> <owl:Class rdf:ID="State"/> <owl:Class rdf:ID="Event"/> </owl:unionOf> </owl:Class> </owl:equivalentClass> </owl:Class> <owl:Class rdf:ID="History"> <rdfs:subClassOf rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#List"/> <rdfs:subClassOf> <owl:Restriction> <owl:allValuesFrom rdf:resource="#HistoryElement"/> <owl:onProperty rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#first"/> </owl:Restriction> </rdfs:subClassOf> <rdfs:subClassOf> <owl:Restriction> <owl:allValuesFrom rdf:resource="#History"/> <owl:onProperty rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#rest"/> </owl:Restriction> </rdfs:subClassOf> </owl:Class>
OWL does not currently handle qualified cardinality restrictions. A discussion of this issue and possible approaches may be found at http://lists.w3.org/Archives/Public/public-swbp-wg/2004May/0127.html. (A discussion thread in the OWL-Protege archives may be found at http://article.gmane.org/gmane.comp.misc.ontology.protege.owl/4607.)