Presentation is loading. Please wait.

Presentation is loading. Please wait.

Setting Up Namespaces <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:xsd.

Similar presentations


Presentation on theme: "Setting Up Namespaces <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:xsd."— Presentation transcript:

1

2

3

4 Setting Up Namespaces <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:xsd ="http://www.w3.org/2000/10/XMLSchema#" xmlns:daml="http://www.daml.org/2001/03/daml+oil#" xmlns:dex ="http://www.daml.org/2001/03/daml+oil-ex#" xmlns:exd ="http://www.daml.org/2001/03/daml+oil-ex- dt#" xmlns ="http://www.daml.org/2001/03/daml+oil- ex#"

5 Housekeeping $Id: daml+oil-ex.daml,v 1.8 2001/03/27 21:24:04 horrocks Exp $ An example ontology, with data types taken from XML Schema followed by

6 Defining Classes Animal This class of animals is illustrative of a number of ontological idioms.

7 Defining Classes cont.1 It perfectly admissible for a class to have multiple superclasses: A Man is a Male Person...and a Woman is a Female Person.

8 Defining Properties

9 Defining Properties cont.1 shoesize is a DatatypeProperty whose range is xsd:decimal. shoesize is also a UniqueProperty (can only have one shoesize)

10 Defining Property Restrictions

11 Defining Property Restrictions cont.1 1

12 Defining Property Restrictions cont.2 Animals have exactly two parents, ie: If x is an animal, then it has exactly 2 parents (but it is NOT the case that anything that has 2 parents is an animal). Such an assertion "

13 Defining Properties cont.1 age is a DatatypeProperty whose range is xsd:decimal. age is also a UniqueProperty (can only have one age)

14 Defining Properties cont.2 rdf:about="http://www.daml.org/2001/03/daml+o il-ex.daml#Animal"

15 Defining Properties cont.3

16 Defining Properties cont.4

17 Notations for properties

18 Notations for properties cont.1 If x's parent is y, then y is x's child. This is defined using the inverseOf tag. The hasAncestor and descendent properties are transitive versions of the hasParent and hasChild properties. hasAncestor

19 Notations for properties cont.2 Sometimes, we like to refer to mothers using the synonym mom. The tag samePropertyAs allows us to establish this synonymy:

20 Notations for classes no car is a person

21 Notations for classes cont.1 An even more compact idiom is to state that a whole set of classes are all pairwise disjoint. Rather than stating the individual disjointness relations, this can be stated for a set of classes in a single statement:

22 Notations for classes cont.2 We can also identify a Class with the disjoint union of a set of other classes. In this case, we identify the Class Person with the disjoint union of the Classes Man and Woman. every person is a man or a woman

23 Notations for classes cont.3 We have already seen that we can construct a new class by taking the complementOf another class. In the same way, we can construct classes out of the intersection of other classes:

24 Notations for classes cont.4 Similarly, we can construct a class as the unionOf a set of classes:

25 Notations for classes cont.5 Just as for properties, a mechanism exists for declaring synonyms for classes:

26 Using User-defined Datatypes = 59 --> Then we could reference elements of this file in DAML+OIL restrictions,

27 Defining individuals We can also define individual objects in a class, e.g., Adam, a person of age 13 and shoesize 9.5: Adam Adam is a person.

28 Defining individuals cont.1 A Person has a property called hasHeight, which is a Height. (hasHeight is a Property, or relation; Height is a Class, or kind of thing.)

29 Defining individuals cont.2 Height is a Class described by an explicitly enumerated set. We can describe this set using the oneOf element. Like disjointUnionOf, oneOf uses the RDF-extending parsetype="daml:collection".

30 Defining individuals cont.3 Finally, TallThing is exactly the class of things whose hasHeight has the value tall:

31 Defining individuals cont.4 shirtsize is a DatatypeProperty whose range is clothingsize. associatedData is a DatatypeProperty without a range restriction.

32 Defining individuals cont.5 BigFoots (BigFeet?) are exactly those persons whose shosize is over12.

33 Defining individuals cont.6 Persons have at most 1 item of associatedData 1

34 Defining individuals cont.7 Now we can (try to) create several individuals. 14 37 9.5 46 15


Download ppt "Setting Up Namespaces <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:xsd."

Similar presentations


Ads by Google