140 likes | 306 Views
DAML+OIL. DC. PICS. XHTML. SMIL. RDF(S). HTML. XML. DAML+OIL. DAML+OIL Language. A DAML+OIL ontology consist of Headers Class elements Property elements Instances. Header. Version, String - e.g. RCS/CVS information Comments Imports, fetches resource, transitive.
E N D
DAML+OIL DC PICS XHTML SMIL RDF(S) HTML XML DAML+OIL
DAML+OIL Language • A DAML+OIL ontology consist of • Headers • Class elements • Property elements • Instances
Header • Version, String - e.g. RCS/CVS information • Comments • Imports, fetches resource, transitive <Ontology rdf:about=“something”> <versionInfo>$Id: foo.html,v 1.6 2001</versionInfo> <rdfs:comment>An example ontology</rdfs:comment> <imports rdf:resource=“http://www.w3.org/2001/10/daml+oil”/> </Ontology>
Objects and Datatypes • Universe divided disjointly • Datatype domain, e.g. classes • Object domain, e.g. instances • Objects • Instances of classes that are subclasses of rdfs:Class • Datatypes • Elements of daml:Datatype (XMLS)
Class Elements • Defines a class named with URI • daml:class element contains • rdfs:subClassOfclass expr • daml:disjointWithclass expr • daml:disjointUnionOfclass expr • daml:sameClassAsclass expr (def. i.t.o subClassOf) • daml:equivalentToclass expr • Boolean combinations • Enumerations
Example Class Elements <daml:Class rdf:ID=“Man”> <rdfs:subClassOf rdf:resource=“#Person”/> <rdfs:subClassOf rdf:resource=“#Male”/> </daml:Class> <daml:Class rdf:ID=“MarriedPerson”> <daml:intersectionOf rdf:parseType=“daml:collection”> <daml:Class rdf:about=“#Person”/> <daml:Restriction daml:cardinality=“1”> <daml:onProperty rdf:resource=“#hasSpouse”/> </daml:Restriction> </daml:intersectionOf> </daml:Class>
Class Expressions • Class name (URI) • Enumeration <daml:Class> <daml:oneof parseType=“daml:collection”> <daml:Thing rdf:about=“#Eurasia”/> <daml:Thing rdf:about=“#Africa”/> … </oneOf> </daml:Class> • Property restriction (Datatype or Object) • Boolean combination of class expressions
Pre Defined Classes • daml:Thing • All classes are subclasses to and • all objects are member of • daml:Nothing • Nothing is a subclass of and • No object belongs to
Property restriction • Defines anonymous class • All objects that satisfy restriction • Daml:Restriction contains daml:onProperty which has property name + • daml:toClass element (Universal Quantifier, for-all) • daml:hasValue element • daml:hasClass element (Existential Quantifier, there-exist) • daml:cardinality element • daml:maxCardinality element • daml:cardinalityQ element • daml:maxCardinalityQ element • daml:minCardinalityQ element N distinct values AND is an instance of expr given by daml:hasClassQ
Example Property restriction <daml:Class rdf:about=“#Person”> <rdfs:subClassOf> <daml:Restriction daml:maxCardinality=“1”> <daml:onProperty rdf:resource=“#hasSpouse”/> </daml:Restriction> </rdfs:subClassOf> </daml:Class>
Boolean combinations on Class Expressions • daml:intersectionOf • Class that consist of all common objects from the list of class expressions • daml:unionOf • Class that consist of all objects that belongs to at least one of the classes in the list of class expressions • daml:complementOf • Class that consist of all objects that do not belong to the single class expression
Property Elements • Name (URI) • rdfs:domain • rdfs:range • daml:samePropertyAs (def. i.t.o subPropertyOf) • equivalentTo • daml:inverseOf • daml:TransitiveProperty (a->b,b->c => a->c) • daml:UniqueProperty (x->y1,x->y2 not allowed) • daml:UnambigousProperty (x1->y, x2->y not allowed ) Use with care! Global!
Instances • Instance of • Classes <Person rdf:ID=“Adam”> <rdfs:label>Adam</rdfs:label> <rdfs:comment>Adam is a person </rdfs:comment> <age><xsd:integer rdf:value=“13”/></age> </Person> • Properties <rdf:Description rdf:ID=“India”> <is_part_of rdf:resource=“#Asia”/> </rdf:Description>
Tools • Protégé (RDFS) (~pelab/pub/pkg/protege/) • OilEd (DAML+OIL) • Reasoner included • http://oiled.man.ac.uk/