/
RDFS: Resource Description Framework Schema RDFS: Resource Description Framework Schema

RDFS: Resource Description Framework Schema - PowerPoint Presentation

faustina-dinatale
faustina-dinatale . @faustina-dinatale
Follow
411 views
Uploaded On 2016-07-05

RDFS: Resource Description Framework Schema - PPT Presentation

slides are borrowed from Costello 2 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 ID: 391837

rdfs rdf http property rdf rdfs property http www org resource class type river length schema xml xmlns emptiesinto

Share:

Link:

Embed:

Download Presentation from below link

Download Presentation The PPT/PDF document "RDFS: Resource Description Framework Sch..." is the property of its rightful owner. Permission is granted to download and print the materials on this web site for personal, non-commercial use only, and to display it on your personal computer provided you do not modify the materials and that you retain all copyright notices contained in the materials. By downloading content from our website, you accept the terms of this agreement.


Presentation Transcript

Slide1

RDFS: Resource Description Framework Schema

slides are borrowed from Costello Slide2

2

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 Slide3

3

RDF Schema is about creating Taxonomies

Ocean

Lake

BodyOfWater

River

Stream

Properties:

length

:

Literal

emptiesInto: BodyOfWater

Sea

NaturallyOccurringWaterSource

Tributary

Brook

Rivulet

RDF S motivationSlide4

4

What inferences can be made on this RDF/XML, given the taxonomy on the last slide?

<?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.

RDF S motivationSlide5

5

Ocean

Lake

BodyOfWater

River

Stream

Properties:

length:

Literal

emptiesInto

:

BodyOfWater

Sea

NaturallyOccurringWaterSource

Tributary

Brook

Inference

Engine

Inferences:

- Yangtze is a Stream

- Yangtze is an NaturallyOcurringWaterSource

- http://www.china.org/geography#EastChinaSea is a BodyOfWater

Yangtze.rdf

Rivulet

<?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>

RDF S motivationSlide6

6

How does a taxonomy facilitate searching?

Ocean

Lake

BodyOfWater

River

Stream

Properties:

length:

Literal

emptiesInto:

BodyOfWater

Sea

NaturallyOccurringWaterSource

Tributary

Brook

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.

Rivulet

RDF S motivationSlide7

7

Ocean

Lake

BodyOfWater

River

Stream

Properties:

length:

Literal

emptiesInto:

BodyOfWater

Sea

NaturallyOccurringWaterSource

Tributary

Brook

<

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>

Search

Engine

Results:

- Yangtze is a Stream, so this document is relevant to the query.

"Show me all documents that contain info about Streams"

Yangtze.rdf

Rivulet

From Costello

Slide8

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.

From Costello

RDF S motivationSlide9

9

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 RDFSApplications of RDF and RDFSQuerying of RDF/RDFS Documents using RQLSlide10

10

Defining a class (e.g., River)

<?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"/> </rdfs:Class> ...</rdf:RDF>

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."

...

All classes and

properties aredefined withinrdf:RDF

Defines the

River class

Defines the

Stream class

Since the

Stream class is defined in the same document

we can reference it using a fragment identifier.

1

2

Assigns a

namespace to the

taxonomy!

3

4

5

From Costello

Slide11

11

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.

<

rdfs:Class

rdf:ID="River">

<rdfs:subClassOf rdf:resource="

#Stream"/></rdfs:Class>

Name of the 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>

equivalentSlide12

12

rdfs:subClassOf is transitive

Ocean

Lake

BodyOfWater

River

Stream

Sea

NaturallyOccurringWaterSource

Tributary

Brook

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.)Slide13

13

Defining properties

<?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>

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.NaturallyOccurringWaterSource.rdfs

(snippet)

River

BodyOfWater

emptiesInto

domain

rangeSlide14

14

Rdf:Property

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.

<

rdf:Property

rdf:ID="emptiesInto">

<rdfs:domain rdf:resource="

#River"/>

<rdfs:range rdf:resource="#BodyOfWater"/></rdf:Property>

Name of the 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>

equivalentSlide15

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>Slide16

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!Slide17

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"/> </rdfs:Class> <rdf:Property

rdf:ID="emptiesInto"> <rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="#BodyOfWater"/> </rdf:Property> <rdf:Property rdf:ID="length">

<rdfs:domain rdf:resource="#River"/> <rdfs:range rdf:resource="http://www.w3.org/2000/01/rdf-schema#Literal"/>

</rdf:Property> ...</rdf:RDF>Slide18

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 SchemaClasses and Properties

Class and instances (RDFS and RDF)Class Hierarchies and InheritanceProperty HierarchiesSlide19

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 classThe relationship between instances and classes in RDF is through rdf:typeSlide20

20

Why Classes are Useful

I

mpose 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 taughtThis imposes a restriction on the objects to which the property can be applied (domain restriction

)Slide21

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 Slide22

22

Inferring a resource's class from the properties' domain

<

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>

Notice that in this RDF/XML instance the class of the resource (Yangtze) is not identified:However, we can infer that Yangtze is a River because length and emptiesIntohave a rdfs:domain of River, i.e., their domain asserts that these properties willbe used in a River instance.Slide23

23

WaterResource Taxonomy

Levee

Dam

WaterwayObstacle

Ocean

Lake

BodyOfWater

River

Stream

Properties:

length:

Literal

emptiesInto:

BodyOfWater

obstacle:

http://www.ussdam.org#Dam

Sea

NaturallyOccurringWaterSource

Tributary

Brook

RivuletSlide24

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

http://www.ussdam.org#Dam). This property will be used in a River

Class”the River class is defined locally, so we simply use a fragment identifier.Slide25

25

What inferences can be made on this RDF/XML?

Y

angtze.rdf

<

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>

What inferences can be made about Yangtze, EsatChinaSea, and ThreeGorges

?Inferences are made by examining the taxonomies that contains River and Dam.Slide26

26

Ocean

Lake

BodyOfWater

River

Stream

Properties:

length:

Literal

emptiesInto:

BodyOfWater

obstacle:

http://www.ussdams.org#Dam

Sea

NaturallyOcurringWaterSource

Tributary

Brook

<

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>

Inference

Engine

Inferences:

- Yangtze is a Stream

- Yangtze is an NaturallyOcurringWaterSource

- http://www.geodesy.org/water#EastChinaSea is a BodyOfWater

-

http://www.china.org/geography/river/dam#ThreeGorges is a Dam

Yangtze.rdf

Rivulet

Levee

Dam

WaterwayObstacleSlide27

27

Untyped resource

<

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

resourceSlide28

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 informationon the type of value thatlength will have.

NaturallyOccurringWaterSource.rdfs

(snippet)

Disadvantage: this way of defining length yields no inferencing capability about its value. Slide29

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 beenspecified 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.Slide30

30

<rdf:Property rdf:ID="length">

<rdfs:domain rdf:resource="#River"/>

<rdfs:range rdf:resource="http://www.nist.org#Distance"/>

</rdf:Property>

This RDF Schema:

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>

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 informationin the RDF/XML instance.)

Best Practice

Best PracticeSlide31

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

The River class has three properties containing typed literals.

<schema

xmlns="http://www.w3.org/2001/XMLSchema"

targetNamespace="http://www.nist.org#"> <

simpleType name="kilometer"> <restriction base="integer"> </restriction> </

simpleType> <simpleType name="meter"> <restriction base="integer">

</restriction> </simpleType>

</schema>

u

om.xsd

The referenced xml schema datatypes in Yangtze.rdfSlide32

32

<?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:domain rdf:resource="#River"/> <rdfs:range

rdf:resource="http://www.nist.org#meter"/> </

rdf:Property> <rdfs:Datatype

rdf:about="http://www.nist.org#meter"> <rdfs:subClassOf

rdf:resource="http://www.w3.org/2001/XMLSchema#integer"/> </

rdfs:Datatype> ...</rdf:RDF>

NaturallyOccurringWaterSource.rdfs (snippet)Slide33

33

Classes inherit properties from their ancestors

Ocean

Lake

BodyOfWater

River

Stream

Properties:

emptiesInto:

BodyOfWater

obstacle:

http://www.ussdam.org#Dam

Sea

NaturallyOccurringWaterSource

Tributary

Brook

Rivulet

Properties:

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.Slide34

34

Table showing what properties are applicable to each class

Stream

Brook

Rivulet

length

emptiesInto

obstacle

X

X

X

X

X

Properties

Classes

River

Tributary

X

XSlide35

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:Property>

...</rdf:RDF>NaturallyOccurringWaterSource.rdfs (snippet)Slide36

36

rdfs:subPropertyOf

length

officialLength

"rdfs:subPropertyOf"

estimatedLength

Property Hierarchy:

You can define a property to be a

specialization

of another property:

"rdfs:subPropertyOf"

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).Slide37

37

Table showing what properties are applicable to each class

Stream

Brook

Rivulet

length

emptiesInto

obstacle

X

X

X

X

X

Properties

Classes

River

Tributary

X

X

estimatedLength

officialLength

X

X

X

X

X

X

X

X

X

XSlide38

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:Slide39

39

Another example of inferencing using property hierarchies

parent

father

Property Hierarchy:

"rdfs:subPropertyOf"

<?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>

Inference: Since father is a subproperty of parent, we can infer that Mary has a parent named John.

"Mary has a father named John."Slide40

40

A subproperty can narrow the range and/or domain

emptiesInto:

BodyOfWater

emptiesIntoSea:

Sea

Property Hierarchy:

"rdfs:subPropertyOf"

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"/></rdf:Property>

The property

emptiesInto

permitsa range of BodyOfWater

. Thisproperty, however, narrows therange to Sea.Slide41

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.Slide42

42

Exercise

<?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="_0-06-099325-2" 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 &amp; Row</dc:Publisher> </Book>

</item> <item> <Book rdf:ID="_0-440-34319-4" xml:base="http://www.publishing.org/book"> <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> </Book> </item> ...</Catalogue>

Barnes_and_Noble_BookCatalogue.rdf

Create an RDF Schema for the following RDF/XML instance:Slide43

43

Answer:

<?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"> <rdfs:subClassOf rdf:resource="http://www.w3.org/2000/01/rdf-schema#Resource"/> </rdfs:Class> <rdf:Property rdf:ID="item

"> <rdfs:domain rdf:resource="#Catalogue"/> <rdfs:range rdf:resource="#Book "/> </rdf:Property>

...</rdf:RDF>PublishingOntology.rdfsSlide44

44

From Antoniou et alSlide45

45

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 RDFSApplications of RDF and RDFSQuerying of RDF/RDFS DocumentsSlide46

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, TypeWe use predicate logic with equalityVariable names begin with ?All axioms are implicitly universally quantifiedSlide47

47

Basic predicates

PropVal(P

, R, V)

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 TType(?r,?t)  PropVal(type,?r,?t)Slide48

48

RDF Classes

Constants:

Class

,

Resource

,

Property

, Literal

All classes are instances of ClassType(Class,Class

)Type(Resource,Class)Type(Property,Class

)Type(Literal,Class)

The predicate in an RDF statement must be a propertyPropVal(?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)

Subclass relationship

Instance relationshipSlide49

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)Slide50

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y2Type(?p, FuncProp)

 (Type(?p, Property) 

?r ?v1 ?v2

(PropVal(?p,?r,?v1) PropVal(?p,?r,?v2)  ?v1 = ?v2))ExampleType(square, FuncProp) 

(Type(square, Property)  

?r ?v1 ?v2 (PropVal(square,?r,?v1) 

PropVal(square,?r,?v2)  ?v1 = ?v2))Slide51

51

Subclass

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 ExamplePropVal(subClassOf, professor, staff) 

(Type(professor, Class)  Type(staff, Class) 

?x (Type(?x, professor)  Type(?x, staff)))Slide52

52

subProperty

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)))ExamplePropVal(subPropertyOf, father, parent)

 (Type(father, Property)  Type(parent, Property) 

?r ?v (PropVal(father,?r,?v)  PropVal(parent,?r,?v)))Slide53

53

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RPropVal(range,?p,?r)

 ?x ?y (PropVal(?p,?x,?y)  Type(?y,?r))Slide54

54

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

.Slide55

55

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 relationsproperty, subproperty

relations, and domain and range restrictionsThere exist query languages for RDF and RDFSSlide56

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.Slide57

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 purposesSlide58

58

UML diagram

The following slides are from

Enrico FranconiSlide59

59

ER diagramSlide60

60

Basic constructs

A class is a set of instances

A relations/property is a set of pairs of instancesSlide61

61

A world is described by a set of instancesSlide62

62

A relational representationSlide63

63

Meaning of attributeSlide64

64

Meaning of IS-ASlide65

65

Meaning of disjointnessSlide66

66

The meaning of relationshipSlide67

67

Meaning of cardinalitySlide68

68

Meaning of the ER (OO) diagram