|
|
|
|
Thing |
|
Nothing |
|
Disjoint |
|
Restriction |
|
NonNegativeInteger |
|
TransitiveProperty |
|
UniqueProperty |
|
UnambiguousProperty |
|
List |
|
Ontology |
|
(10 classes) |
|
|
|
|
equivalentTo |
|
sameClassAs |
|
samePropertyAs |
|
disjointWith |
|
unionOf |
|
disjointUnionOf |
|
intersectionOf |
|
complementOf |
|
oneOf |
|
|
|
|
|
Namespace declarations |
|
<rdf:RDF xmlns:rdf =
"http://www.w3.org/1999/02/22-rdf-syntax-ns#" |
|
xmlns:rdfs = "http://www.w3.org/2000/01/rdf-schema#" |
|
xmlns:daml = "http://www.daml.org/2000/12/daml+oil#" |
|
xmlns = “http://www.daml.org/2000/12/daml+oil-ex#” > |
|
Ontology declaration |
|
<daml:Ontology rdf:about = ""> |
|
<daml:versionInfo> $Id:
daml+oil-walkthru.html,v 1 …
</daml:versionInfo> |
|
<rdfs:comment> An example ontology </rdfs:comment> |
|
<daml:imports rdf:resource =
“http://www.daml.org/2000/12/daml+oil” /> |
|
</daml:Ontology> |
|
|
|
|
|
|
Definition of a class |
|
<Class ID = "Animal"> |
|
<label> Animal </label> |
|
<comment> |
|
This class of animals is illustrative of a
number of ontological idioms. |
|
</comment> |
|
</Class> |
|
Definition of an individual |
|
<Animal ID = “Clyde”> |
|
<label> Clyde </label> |
|
<comment> Clyde is an animal.
</comment> |
|
</Animal> |
|
|
|
|
|
Declaring a subclass relationship |
|
<Class ID = "Male"> |
|
<subClassOf resource = "#Animal”
/> |
|
</Class> |
|
|
|
|
|
|
|
Declaring a property to be a subproperty with
cardinality 1 |
|
<Property ID = "father"> |
|
<subProperty resource = "#parent”
/> |
|
<range resource = "#Man” /> |
|
<cardinality> 1 </cardinality> |
|
</Property> |
|
|
|
|
|
Declaring an inverse of a property |
|
<Property ID = "child"> |
|
<inverseOf resource = "#parent”
/> |
|
</Property> |
|
|
|
|
|
|
Declaring a class as a subclass of the
complement of another class |
|
<Class ID = "Car"> |
|
<comment> no car is a person
</comment> |
|
<subClassOf> |
|
<Class> <complementOf resource
= "#Person” /> </Class> |
|
</subClassOf> |
|
</Class> |
|
|
|
|
|
Declaring a class to be a disjoint union of
multiple classes |
|
<Class about = "#Person"> |
|
<comment> every person is a man or a
woman </comment> |
|
<disjointUnionOf parseType =
"daml:collection"> |
|
<Class about = "#Man” /> |
|
<Class about = "#Woman” /> |
|
</disjointUnionOf> |
|
</Class> |
|
|
|
|
|
Declaring a class to be an intersection of
classes |
|
<Class ID = "Tall-Man"> |
|
<intersectionOf parseType =
"daml:collection"> |
|
<Class about = "#Tall-Thing”
/> |
|
<Class about = "#Man” /> |
|
</intersectionOf> |
|
</Class> |
|