Presentation is loading. Please wait.

Presentation is loading. Please wait.

RDFS: Resource Description Framework Schema

Similar presentations


Presentation on theme: "RDFS: Resource Description Framework Schema"— Presentation transcript:

1 RDFS: Resource Description Framework Schema
slides are borrowed from Costello

2 Axiomatic Semantics for RDF and RDFS Applications of RDF and RDFS
Lecture schedule Ontology Syntax of RDF and RDFS Basic Ideas of RDF Three representations of RDF Basic Concepts of RDF Schema Τhe Language of RDF Schema Axiomatic Semantics for RDF and RDFS Applications of RDF and RDFS Querying of RDF/RDFS Documents

3 RDF Schema is about creating Taxonomies
RDF S motivation NaturallyOccurringWaterSource Stream BodyOfWater Brook River Tributary Lake Ocean Sea Properties: length: Literal emptiesInto: BodyOfWater Rivulet

4 What inferences can be made on this RDF/XML, given the taxonomy on the last slide?
RDF S motivation <?xml version="1.0"?> <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Inferences are made by examining a taxonomy that contains River. See next slide.

5 RDF S motivation NaturallyOccurringWaterSource Stream BodyOfWater
Brook River Tributary Lake Ocean Sea Properties: length: Literal emptiesInto: BodyOfWater Rivulet Inference Engine <?xml version="1.0"?> <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Yangtze.rdf Inferences: - Yangtze is a Stream - Yangtze is an NaturallyOcurringWaterSource - is a BodyOfWater

6 How does a taxonomy facilitate searching?
NaturallyOccurringWaterSource RDF S motivation Stream BodyOfWater Brook River Tributary Lake Ocean Sea Properties: length: Literal emptiesInto: BodyOfWater Rivulet The taxonomy shows that when searching for "streams", any RDF/XML that uses the class Brook, Rivulet, River, or Tributary are relevant. See next slide.

7 NaturallyOccurringWaterSource
From Costello Stream BodyOfWater Brook River Tributary Lake Ocean Sea Properties: length: Literal emptiesInto: BodyOfWater Rivulet Search Engine "Show me all documents that contain info about Streams" <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Yangtze.rdf Results: - Yangtze is a Stream, so this document is relevant to the query.

8 You now know everything about RDF Schemas!
RDF Schemas is all about defining taxonomies (class hierarchies). a taxonomy can be used to make inferences and to facilitate searching. That's all there is to RDF Schemas! The rest is just syntax … The previous slide showed the taxonomy in a graphical form. we need to express the taxonomy in a form that is machine-processable. RDF Schemas provides an XML vocabulary to express taxonomies. RDF S motivation From Costello

9 Axiomatic Semantics for RDF and RDFS Applications of RDF and RDFS
Lecture Schedule Ontology Syntax of RDF and RDFS Basic Ideas of RDF Three representations of RDF Basic Concepts of RDF Schema Τhe Language of RDF Schema Axiomatic Semantics for RDF and RDFS Applications of RDF and RDFS Querying of RDF/RDFS Documents using RQL

10 Defining a class (e.g., River)
All classes and properties are defined within rdf:RDF 1 <?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.geodesy.org/water/naturally-occurring"> <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> <rdfs:Class rdf:ID="Stream"> <rdfs:subClassOf rdf:resource="#NaturallyOccurringWaterSource"/> ... </rdf:RDF> Assigns a namespace to the taxonomy! 2 3 Defines the River class Since the Stream class is defined in the same document we can reference it using a fragment identifier. 5 4 Defines the Stream class This is read as: "I hereby define a River Class. River is a subClassOf Stream." "I hereby define a Stream Class. Stream is a subClassOf NaturallyOccurringWaterSource." ... From Costello

11 This type is used to define a class.
rdfs:Class This type is used to define a class. The rdf:ID provides a name for the class. The contents are used to indicate the members of the class. The contents are ANDed together. Name of the class equivalent <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> <rdf:Description rdf:ID="River"> <rdf:type rdf:resource="http://www.w3.org/2000/01/rdf-schema#Class"/> <rdfs:subClassOf rdf:resource="#Stream"/> </rdf:Description>

12 rdfs:subClassOf is transitive
NaturallyOccurringWaterSource Stream BodyOfWater Brook River Tributary Lake Ocean Sea Rivulet Consider the above class hierarchy. It says, for example, that: - A Rivulet is a Brook. - A Brook is a Stream. Therefore, since subClassOf is transitive, a Rivulet is a Stream. (Note that a Rivulet is also a NaturallyOccurringWaterSource.)

13 Defining properties This is read as:
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.geodesy.org/water/naturally-occurring"> <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> ... </rdf:RDF> NaturallyOccurringWaterSource.rdfs (snippet) This is read as: "I hereby define an emptiesInto Property. The domain (class) in which emptiesInto is used is River. The range (of values) for emptiesInto are instances of BodyOfWater." That is, the emptiesInto Property relates (associates) a River to a BodyOfWater. emptiesInto River BodyOfWater domain range

14 Rdf:Property equivalent This type is used to define a property.
The rdf:ID provides a name for the property. The contents are used to indicate the usage of the property. The contents are ANDed together. Name of the property equivalent <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> ANDed <rdf:Description rdf:ID="emptiesInto"> <rdf:type rdf:resource="http://www.w3.org/1999/02/22-rdf-syntax-ns#Property"/> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Description>

15 Properties can have multiple domain and range
BodyOfWater range CoastalWater - the value of emptiesInto is a BodyOfWater and a CoastalWater. <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> <rdfs:range rdf:resource="http://www.geodesy.org/coast#CoastalWater"/> </rdf:Property>

16 Note that properties are defined separately from classes
OO: when a class is defined the properties (attributes) are simultaneously defined. E.g, "I hereby define a Rectangle class, and its attributes are length and width.” In RDF: classes and properties are defined separately. define the Rectangle class, and indicate that it is a subclass of GeometricObject. Separately, define a length property, indicate its domain (Retangle) and range. Advantage: anyone, anywhere, anytime can create a property and state that it is usable with the class!

17 The XML Representation of the taxonomy
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.geodesy.org/water/naturally-occurring"> <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> <rdfs:Class rdf:ID="Stream"> <rdfs:subClassOf rdf:resource="#NaturallyOccurringWaterSource"/> <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> <rdf:Property rdf:ID="length"> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/> ... </rdf:RDF>

18 NaturallyOccurringWaterSource Ontology!
NaturallyOccurringWaterSource.rdfs defines a set of classes and how the classes are related. a set of properties and indicates the type of values they may have and what classes they may be associated with. That is, it defines an ontology for NaturallyOccurringWaterSources! RDF Schema Classes and Properties Class and instances (RDFS and RDF) Class Hierarchies and Inheritance Property Hierarchies

19 Classes and their Instances
We must distinguish between Concrete “things” (individual objects) in the domain: Discrete Maths, David Billington etc. Sets of individuals sharing properties called classes: lecturers, students, courses etc. Individual objects that belong to a class are referred to as instances of that class The relationship between instances and classes in RDF is through rdf:type

20 “Discrete Maths is taught by Concrete Maths”
Why Classes are Useful Impose restrictions on what can be stated in an RDF document using the schema As in programming languages E.g. A+1, where A is an array Disallow nonsense from being stated “Discrete Maths is taught by Concrete Maths” We want courses to be taught by lecturers only Restriction on values of the property “is taught by” (range restriction) “Room MZH5760 is taught by David Billington” Only courses can be taught This imposes a restriction on the objects to which the property can be applied (domain restriction)

21 Class hierarchy Classes can be organised in hierarchies
A is a subclass of B if every instance of A is also an instance of B Then B is a superclass of A A subclass graph need not be a tree A class may have multiple superclasses

22 Inferring a resource's class from the properties' domain
Notice that in this RDF/XML instance the class of the resource (Yangtze) is not identified: <rdf:Description rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </rdf:Description> However, we can infer that Yangtze is a River because length and emptiesInto have a rdfs:domain of River, i.e., their domain asserts that these properties will be used in a River instance.

23 WaterResource Taxonomy
Levee Dam WaterwayObstacle Ocean Lake BodyOfWater River Stream Properties: length: Literal emptiesInto: BodyOfWater obstacle: Sea NaturallyOccurringWaterSource Tributary Brook Rivulet

24 Defining the obstacle property
<rdf:Property rdf:ID="obstacle"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.ussdam.org#Dam"/> </rdf:Property> Read this as: "I hereby define a property called obstacle. The type of value that this property will have is of type Dam (more specifically, of type This property will be used in a River Class” the River class is defined locally, so we simply use a fragment identifier.

25 What inferences can be made on this RDF/XML?
<River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> <obstacle rdf:resource="http://www.china.org/geography/river/dam#ThreeGorges"/> </River> Yangtze.rdf What inferences can be made about Yangtze, EsatChinaSea, and ThreeGorges? Inferences are made by examining the taxonomies that contains River and Dam.

26 NaturallyOcurringWaterSource
WaterwayObstacle Stream BodyOfWater Dam Levee Brook River Tributary Lake Ocean Sea Properties: length: Literal emptiesInto: BodyOfWater obstacle: Rivulet Inference Engine <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <length>6300 kilometers</length> <emptiesInto rdf:resource="http://www.geodesy.org/water#EastChinaSea"/> <obstacle rdf:resource="http://www.china.org/geography/river/dam#ThreeGorges"/> </River> Yangtze.rdf Inferences: - Yangtze is a Stream - Yangtze is an NaturallyOcurringWaterSource - is a BodyOfWater - is a Dam

27 Untyped resource Create an RDF Schema for the following RDF document:
<River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#" xmlns:uom="http://www.nist.org#"> <length> <rdf:Description> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </rdf:Description> </length> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> <obstacle rdf:resource="http://www.china.org/geography/river/dam#ThreeGorges"/> </River> Create an RDF Schema for the following RDF document: Note that the property length has a value that has no type indicated. What is the corresponding property declaration? Note that the property units is from a different namespace (a different taxonomy). untyped resource

28 Defining length with no Type Information
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.geodesy.org/water/naturally-occurring"> <rdfs:Class rdf:ID="River"> <rdfs:subClassOf rdf:resource="#Stream"/> </rdfs:Class> <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#River"/> </rdf:Property> ... </rdf:RDF> No rdfs:range specified. This means that we are providing no information on the type of value that length will have. NaturallyOccurringWaterSource.rdfs (snippet) Disadvantage: this way of defining length yields no inferencing capability about its value.

29 A resource that doesn't have a type specified may nonetheless be typed!
<length> <rdf:Description> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </rdf:Description> </length> There is no type shown for this resource. But that doesn't mean that this resource has no type. It only means that no type has been specified in this RDF/XML instance. In the RDF Schema we can specify what its type is. <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.nist.org#Distance"/> </rdf:Property> Advantage: now we can infer that the contents of length is of type Distance.

30 Best Practice Best Practice This RDF Schema:
<rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.nist.org#Distance"/> </rdf:Property> Does not mandate that the RDF/XML instance specify a type, e.g., <length> <uom:Distance> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </uom:Distance> </length> Best Practice Best Practice It is perfectly fine to keep that class information isolated to the RDF Schema, e.g., <length> <rdf:Description> <rdf:value>6300</rdf:value> <uom:units>kilometers</uom:units> </rdf:Description> </length> (However, it is better practice to expose the type information in the RDF/XML instance.)

31 Create RDF Schema for an RDF document
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <rdf:Description rdf:ID="Yangtze”> <length rdf:datatype="http://www.nist.org#kilometer">6300</length> <maxWidth rdf:datatype="http://www.nist.org#meter">175</maxWidth> <maxDepth rdf:datatype="http://www.nist.org#meter">55</maxDepth> </rdf:Description> </rdf:RDF> Yangtze.rdf <schema xmlns="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.nist.org#"> <simpleType name="kilometer"> <restriction base="integer"> </restriction> </simpleType> <simpleType name="meter"> </schema> uom.xsd The River class has three properties containing typed literals. The referenced xml schema datatypes in Yangtze.rdf

32 NaturallyOccurringWaterSource.rdfs (snippet)
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.geodesy.org/water/naturally-occurring"> <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.nist.org#kilometer"/> </rdf:Property> <rdfs:Datatype rdf:about="http://www.nist.org#kilometer"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </rdfs:Datatype> <rdf:Property rdf:ID="maxWidth"> <rdfs:range rdf:resource="http://www.nist.org#meter"/> <rdfs:Datatype rdf:about="http://www.nist.org#meter"> ... </rdf:RDF> NaturallyOccurringWaterSource.rdfs (snippet)

33 Classes inherit properties from their ancestors
Ocean Lake BodyOfWater River Stream Properties: emptiesInto: BodyOfWater obstacle: Sea NaturallyOccurringWaterSource Tributary Brook Rivulet length: Literal length has been defined to be a property of Stream. Therefore, all Stream subclasses inherit the length property. Note that the properties emptiesInto and obstacle are defined to be local to River.

34 Table showing what properties are applicable to each class
Classes Stream Brook Rivulet River Tributary length X X X X X emptiesInto X obstacle X Properties

35 Defining length and emptiesInto
<?xml version="1.0"?> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.geodesy.org/water/naturally-occurring"> <rdf:Property rdf:ID="length"> <rdfs:domain rdf:resource="#Stream"/> <rdfs:range rdf:resource="http://www.nist.org#Distance"/> </rdf:Property> <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> ... </rdf:RDF> NaturallyOccurringWaterSource.rdfs (snippet)

36 rdfs:subPropertyOf if P is a subproperty of Q, P(x,y) -> Q(x,y).
You can define a property to be a specialization of another property: Property Hierarchy: length "rdfs:subPropertyOf" "rdfs:subPropertyOf" officialLength estimatedLength Notes: 1. The subproperties inherit the rdfs:range and rdfs:domain values from the parent property. 2. If a subproperty is true, then its parent property is true, e.g., if the Yangtze River has an officialLength of 6300 kilometers then it also has a length of 6300 kilometers. if P is a subproperty of Q, P(x,y) -> Q(x,y).

37 Table showing what properties are applicable to each class
Classes Stream Brook Rivulet River Tributary length X X X X X emptiesInto X obstacle X estimatedLength X X X X X officialLength X X X X X Properties

38 Making inferences with subproperties
<?xml version="1.0"?> <River rdf:ID="Yangtze" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.geodesy.org/water/naturally-occurring#"> <estimatedLength>6300 kilometers</estimatedLength> <emptiesInto rdf:resource="http://www.china.org/geography#EastChinaSea"/> </River> Inference: Since estimatedLength is a subproperty of length, we can infer that the Yangtze has a length of 6300 kilometers. What inferences can we make on the estimatedLength property:

39 Another example of inferencing using property hierarchies
Property Hierarchy: parent "rdfs:subPropertyOf" father <?xml version="1.0"?> <Person rdf:ID="Mary" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.genealogy.org#"> <father> <Person rdf:about="#John"/> </father> </Person> "Mary has a father named John." Inference: Since father is a subproperty of parent, we can infer that Mary has a parent named John.

40 A subproperty can narrow the range and/or domain
Property Hierarchy: emptiesInto: BodyOfWater "rdfs:subPropertyOf" emptiesIntoSea: Sea This subproperty narrows the range to Sea. <rdf:Property rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> <rdf:Property rdf:ID="emptiesIntoSea"> <rdfs:subPropertyOf rdf:resource="#emptiesInto"/> <rdfs:range rdf:resource="#Sea"/> The property emptiesInto permits a range of BodyOfWater. This property, however, narrows the range to Sea.

41 rdfs:label, rdfs:comment
<rdf:Property rdf:ID="Creator"> <rdfs:label xml:lang="EN">Author/Creator</rdfs:label> <rdfs:comment xml:lang="EN">The person or organization primarily responsible for creating the intellectual content of the resource. For example, authors in the case of written documents, artists, photographers, or illustrators in the case of visual resources. </rdfs:comment> </rdf:Property> rdfs:label is used to provide a human-readable version of the property/class name. rdfs:comment is used to provide a human-readable description of the property/class.

42 Exercise Create an RDF Schema for the following RDF/XML instance:
<?xml version="1.0"?> <Catalogue rdf:ID="BookCatalogue" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns="http://www.publishing.org#" xmlns:dc="http://pur1.org/metadata/dublin-core#" xml:base="http://www.bn.com"> <item> <Book rdf:ID="_ " xml:base="http://www.publishing.org/book"> <dc:Title>Lateral Thinking</dc:Title> <dc:Creator>Edward de Bono</dc:Creator> <dc:Date>1973</dc:Date> <dc:Publisher>Harper & Row</dc:Publisher> </Book> </item> <Book rdf:ID="_ " <dc:Title>Illusions: The Adventures of a Reluctant Messiah</dc:Title> <dc:Creator>Richard Bach</dc:Creator> <dc:Date>1977</dc:Date> <dc:Publisher>Dell Publishing Co.</dc:Publisher> ... </Catalogue> Barnes_and_Noble_BookCatalogue.rdf

43 Answer: PublishingOntology.rdfs <?xml version="1.0"?>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#" xml:base="http://www.publishing.org"> <rdfs:Class rdf:ID="Catalogue"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdfs:Class> <rdfs:Class rdf:ID="Book"> <rdf:Property rdf:ID="item"> <rdfs:domain rdf:resource="#Catalogue"/> <rdfs:range rdf:resource="#Book "/> </rdf:Property> ... </rdf:RDF> PublishingOntology.rdfs

44 From Antoniou et al

45 Axiomatic Semantics for RDF and RDFS Applications of RDF and RDFS
Lecture schedule Ontology Syntax of RDF and RDFS Basic Ideas of RDF Three representations of RDF Basic Concepts of RDF Schema Τhe Language of RDF Schema Axiomatic Semantics for RDF and RDFS Applications of RDF and RDFS Querying of RDF/RDFS Documents

46 Axiomatic Semantics Example: what is the meaning (semantics) of subClass? PropVal(subClassOf,?c,?c')  (Type(?c,Class)  Type(?c',Class)  ?x (Type(?x,?c)  Type(?x,?c'))) Formalize the meaning of the modeling primitives of RDF and RDF Schema By translating into first-order logic; Make the semantics unambiguous and machine accessible; Provide a basis for reasoning support by automated reasoners manipulating logical formulas. All language primitives in RDF and RDF Schema are represented by constants: Such as Resource, Class, Property, subClassOf, etc. A few predefined predicates are used as a foundation for expressing relationships between the constants Such as PropVal, Type We use predicate logic with equality Variable names begin with ? All axioms are implicitly universally quantified

47 Basic predicates PropVal(P, R, V) Type(R, T)
A predicate with 3 arguments, which is used to represent an RDF statement with resource R, property P and value V An RDF statement (triple) (P,R,V) is represented as PropVal(P, R, V). Type(R, T) Short for PropVal(type,R,T) Specifies that the resource R has the type T Type(?r,?t)  PropVal(type,?r,?t)

48 RDF Classes Constants: Class, Resource, Property, Literal
All classes are instances of Class Type(Class,Class) Type(Resource,Class) Type(Property,Class) Type(Literal,Class) The predicate in an RDF statement must be a property PropVal(?p,?r,?v)  Type(?p,Property) Resource is the most general class: every class and every property is a resource Type(?p,Property)  Type(?p,Resource) Type(?c,Class)  Type(?c,Resource) Instance relationship Subclass relationship

49 Type property type is a property
PropVal(type,type,Property) type can be applied to resources (domain) and has a class as its value (range) Type(?r,?c)  Type(?r,Resource)  Type(?c,Class)

50 Functional property P is a functional property if, and only if,
it is a property, and there are no x, y1 and y2 with P(x,y1), P(x,y2 ) and y1y2 Type(?p, FuncProp)  (Type(?p, Property)  ?r ?v1 ?v2 (PropVal(?p,?r,?v1) PropVal(?p,?r,?v2)  ?v1 = ?v2)) Example Type(square, FuncProp)  (Type(square, Property)  (PropVal(square,?r,?v1)  PropVal(square,?r,?v2)  ?v1 = ?v2))

51 subClassOf is a property:
Type(subClassOf, Property) If a class C is a subclass of a class C', then all instances of C are also instances of C': PropVal(subClassOf,?C,?C')  (Type(?C, Class)  Type(?C', Class)  ?x (Type(?x, ?C)  Type(?x, ?C'))) C is a subset of C’ Compare the subclass in OO programming Example PropVal(subClassOf, professor, staff)  (Type(professor, Class)  Type(staff, Class)  ?x (Type(?x, professor)  Type(?x, staff)))

52 P is a subproperty of P', iff P'(x,y) is true whenever P(x,y) is true:
Type(subPropertyOf,Property) PropVal(subPropertyOf,?p,?p')  (Type(?p,Property)  Type(?p',Property)  ?r ?v (PropVal(?p,?r,?v)  PropVal(?p',?r,?v))) Example PropVal(subPropertyOf, father, parent)  (Type(father, Property)  Type(parent, Property)  ?r ?v (PropVal(father,?r,?v)  PropVal(parent,?r,?v)))

53 If the domain of P is D, then for every P(x,y), xD
Domain and range If the domain of P is D, then for every P(x,y), xD PropVal(domain, ?p, ?d)  ?x ?y (PropVal(?p,?x,?y)  Type(?x,?d)) e.g., PropVal(domain, length, River)  ?x ?y (PropVal(length, ?x, ?y)  Type(?x, River)) If the range of P is R, then for every P(x,y), yR PropVal(range,?p,?r)  ?x ?y (PropVal(?p,?x,?y)  Type(?y,?r))

54 RDF provides a foundation for representing and processing metadata
Summary of RDF RDF provides a foundation for representing and processing metadata RDF has a graph-based data model RDF has an XML-based syntax to support syntactic interoperability. XML and RDF complement each other because RDF supports semantic interoperability RDF has a decentralized philosophy and allows incremental building of knowledge, and its sharing and reuse.

55 RDF Schema provides a mechanism for describing specific domains
Summary of RDFS RDF Schema provides a mechanism for describing specific domains RDF Schema is a primitive ontology language It offers certain modelling primitives with fixed meaning Key concepts of RDF Schema class, subclass relations property, subproperty relations, and domain and range restrictions There exist query languages for RDF and RDFS Let's summarize what we have learned: Use RDF Schema to define: a class hierarchy (a taxonomy), properties associate them with a class (use rdfs:domain) indicate the range of values (use rdfs:range) Once an RDF Schema is defined then it can be used to infer additional facts about data: a class is an instance of all superclasses a property is a specialization of its superproperty

56 RDF Schema vs XML Schema
XML Schemas is all about syntax. An XML Schema tool is intended to validate that an XML instance conforms to the syntax specified by the XML Schema. RDF Schema is all about semantics. An RDF Schema tool is intended to provide additional facts to supplement the facts in RDF/XML instances. XML Schemas is prescriptive - an XML Schema prescribes what an element may contain, and the order the child elements may occur. RDF Schemas is descriptive - an RDF Schema simply describes classes and properties.

57 RDF Schema vs OO In OO, properties (attributes) are defined within classes. In RDFS, classes and properties are defined separately. They are for different purposes

58 UML diagram The following slides are from Enrico Franconi

59 ER diagram

60 Basic constructs A class is a set of instances A relations/property is a set of pairs of instances

61 A world is described by a set of instances

62 A relational representation

63 Meaning of attribute

64 Meaning of IS-A

65 Meaning of disjointness

66 The meaning of relationship

67 Meaning of cardinality

68 Meaning of the ER (OO) diagram


Download ppt "RDFS: Resource Description Framework Schema"

Similar presentations


Ads by Google