Inferring and Discovering Relationships using RDF Schemas - PowerPoint PPT Presentation

Loading...

PPT – Inferring and Discovering Relationships using RDF Schemas PowerPoint presentation | free to download - id: 1c2741-ZDc1Z



Loading


The Adobe Flash plugin is needed to view this content

Get the plugin now

View by Category
About This Presentation
Title:

Inferring and Discovering Relationships using RDF Schemas

Description:

We are very grateful to the Defense Agency Research Projects Agency (DARPA) for ... Special thanks to Stephen Dyer for creating the labs. ... – PowerPoint PPT presentation

Number of Views:52
Avg rating:3.0/5.0
Slides: 82
Provided by: roger241
Learn more at: http://lsdis.cs.uga.edu
Category:

less

Write a Comment
User Comments (0)
Transcript and Presenter's Notes

Title: Inferring and Discovering Relationships using RDF Schemas


1
Inferring and Discovering Relationships using
RDF Schemas
  • Roger L. Costello
  • David B. Jacobs
  • The MITRE Corporation
  • (The creation of this tutorial was sponsored by
    DARPA)

2
Acknowledgments
  • We are very grateful to the Defense Agency
    Research Projects Agency (DARPA) for funding the
    creation of this tutorial. We are especially
    grateful to Murray Burke (DARPA) and John Flynn
    (BBN) for making it all happen.
  • Special thanks to Stephen Dyer for creating the
    labs.
  • Special thanks to Jon Hanna and Frank Manola for
    answering our many questions.

3
Purpose of RDF Schema
  • The purpose of RDF Schema is to provide an XML
    vocabulary to
  • express classes and their (subclass)
    relationships.
  • define properties and associate them with
    classes.
  • The benefit of an RDF Schema is that it
    facilitates inferencing on your data, and
    enhanced searching.

4
RDF Schema is about creating Taxonomies!
NaturallyOccurringWaterSource
BodyOfWater
Stream
Ocean
River
Tributary
Brook
Lake
Sea
Properties length Literal emptiesInto
BodyOfWater
Rivulet
5
What inferences can be made on this RDF/XML,
given the taxonomy on the last slide?
What inferences can be made with this data?
lt?xml version"1.0"?gt ltRiver rdfID"Yangtze"
xmlnsrdf"http//www.w3.org/1999/02/22-rd
f-syntax-ns" xmlns"http//www.geodes
y.org/water/naturally-occurring"gt
ltlengthgt6300 kilometerslt/lengthgt
ltemptiesInto rdfresource"http//www.china.org/ge
ographyEastChinaSea"/gt lt/Rivergt
Yangtze.rdf
Inferences are made by examining a taxonomy that
contains River. See next slide.
6
NaturallyOccurringWaterSource
BodyOfWater
Stream
Ocean
River
Tributary
Brook
Lake
Sea
Properties length Literal emptiesInto
BodyOfWater
Inference Engine
Rivulet
lt?xml version"1.0"?gt ltRiver rdfID"Yangtze"
xmlnsrdf"http//www.w3.org/1999/02/22-rd
f-syntax-ns" xmlns"http//www.geodes
y.org/water/naturally-occurring"gt
ltlengthgt6300 kilometerslt/lengthgt
ltemptiesInto rdfresource"http//www.china.org/ge
ographyEastChinaSea"/gt lt/Rivergt
Yangtze.rdf
Inferences - Yangtze is a Stream - Yangtze
is an NaturallyOcurringWaterSource -
http//www.china.org/geographyEastChinaSea is a
BodyOfWater
7
How does a taxonomy facilitate searching?
NaturallyOccurringWaterSource
BodyOfWater
Stream
Ocean
River
Tributary
Brook
Lake
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.
8
NaturallyOccurringWaterSource
BodyOfWater
Stream
Ocean
River
Tributary
Brook
Lake
Sea
Properties length Literal emptiesInto
BodyOfWater
Search Engine
Rivulet
"Show me all documents that contain info about
Streams"
lt?xml version"1.0"?gt ltRiver rdfID"Yangtze"
xmlnsrdf"http//www.w3.org/1999/02/22-rd
f-syntax-ns" xmlns"http//www.geodes
y.org/water/naturally-occurring"gt
ltlengthgt6300 kilometerslt/lengthgt
ltemptiesInto rdfresource"http//www.china.org/ge
ographyEastChinaSea"/gt lt/Rivergt
Yangtze.rdf
Results - Yangtze is a Stream, so this
document is relevant to the query.
9
You now know everything about RDF Schemas!
  • RDF Schemas is all about defining taxonomies
    (class hierarchies).
  • As we've seen, 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. Obviously, we need to express
    the taxonomy in a form that is machine-processable
    . RDF Schemas provides an XML vocabulary to
    express taxonomies.

10
RDF Schema provides an XML vocabulary to express
taxonomies
NaturallyOccurringWaterSource
BodyOfWater
Stream
Ocean
River
Tributary
Brook
Lake
Sea
Properties length Literal emptiesInto
BodyOfWater
Rivulet
"express as"
XML
NaturallyOccurringWaterSource.rdfs
11
Classes/properties are defined using RDF/XML!
  • RDF Schema uses the RDF/XML design pattern to
    define classes and properties. Recall the
    RDF/XML design pattern

lt?xml version"1.0"?gt ltClass rdfID"resource"
xmlnsrdf"http//www.w3.org/1999/02/22-r
df-syntax-ns" xmlns"uri"gt
ltproperty rdfresource""/gt
ltpropertygtvaluelt/propertygt ... lt/Classgt
Use this syntax if the value of the property is
a resource
Use this syntax if the value of the property is
a literal
12
Defining a class (e.g., River)
All classes and properties are defined
within rdfRDF
1
lt?xml version"1.0"?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-sch
ema" xmlbase"http//www.geode
sy.org/water/naturally-occurring"gt
ltrdfsClass rdfID"River"gt
ltrdfssubClassOf rdfresource"Stream"/gt
lt/rdfsClassgt ltrdfsClass rdfID"Stream"gt
ltrdfssubClassOf rdfresource"NaturallyOcc
urringWaterSource"/gt lt/rdfsClassgt
... lt/rdfRDFgt
Assigns a namespace to the taxonomy!
2
Defines the River class
3
Since the Stream class is defined in the
same document we can reference it using a
fragment identifier.
5
Defines the Stream class
4
NaturallyOccurringWaterSource.rdfs (snippet)
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." ...
13
rdfsClass
  • This type is used to define a class.
  • The rdfID provides a name for the class.
  • The contents are used to indicate the members of
    the class.
  • The contents are ANDed together.

14
Equivalent!
ltrdfsClass rdfID"River"gt
ltrdfssubClassOf rdfresource"Stream"/gt lt/rdfsC
lassgt
ltrdfDescription rdfID"River"gt
ltrdftype rdfresource"http//www.w3.org/2000/01/
rdf-schemaClass"/gt ltrdfssubClassOf
rdfresource"Stream"/gt lt/rdfDescriptiongt
15
rdfssubClassOf
Stream
River
This represents the set of Streams, i.e., the set
of instances of type Stream.
This represents the set of Rivers, i.e., the set
of instances of type River.
16
rdfssubClassOf
  • Use this property to indicate a subclass
    relationship between one class and another class.
  • You may specify zero, one, or multiple
    rdfssubClassOf properties.
  • Zero if you define a class without specifying
    rdfssubClassOf then you are implicitly stating
    that the class is a subClassOf rdfsResource (the
    root of all classes).
  • One if you define a class by specifying one
    rdfssubClassOf then you are indicating that the
    class is a subclass of that class.
  • Multiple if you define a class by specifying
    multiple rdfssubClassOf properties then you are
    indicating that the class is a subclass of each
    of the other classes.
  • Example consider the River class suppose that
    it has two rdfssubClassOf properties - one that
    specifies Stream and a second that specifies
    SedimentContainer. Thus, the two rdfssubClassOf
    properties indicate that a River is a Stream and
    a SedimentContainer. That is, each instance of
    River is both a Stream and a SedimentContainer.

17
Example of multiple rdfssubClassOf properties
ltrdfsClass rdfID"River"gt
ltrdfssubClassOf rdfresource"Stream"/gt
ltrdfssubClassOf rdfresource"http//www.containe
rs.orgSedimentContainer"/gt lt/rdfsClassgt
Stream
SedimentContainer
River
- a River is both a Stream and a
SedimentContainer.
The conjunction (AND) of two subClassOf
statements is a subset of the intersection of the
classes.
18
rdfssubClassOf is transitive
NaturallyOccurringWaterSource
BodyOfWater
Stream
Ocean
River
Tributary
Brook
Lake
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.)
19
Defining a property (e.g., emptiesInto)
lt?xml version"1.0"?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-schem
a" xmlbase"http//www.geodesy.o
rg/water/naturally-occurring"gt ltrdfProperty
rdfID"emptiesInto"gt ltrdfsdomain
rdfresource"River"/gt ltrdfsrange
rdfresource"BodyOfWater"/gt
lt/rdfPropertygt ... lt/rdfRDFgt
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
20
rdfProperty
21
Equivalent!
ltrdfProperty rdfID"emptiesInto"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"BodyOfWater"/gt lt/rdfPr
opertygt
ltrdfDescription rdfID"emptiesInto"gt
ltrdftype rdfresource"http//www.w3.org/1999/02/
22-rdf-syntax-nsProperty"/gt ltrdfsdomain
rdfresource"River"/gt ltrdfsrange
rdfresource"BodyOfWater"/gt lt/rdfDescriptiongt
22
Careful Class and Property are in different
namespaces
  • Class is in the rdfs namespace.
  • Property is in the rdf namespace.

23
rdfsrange
  • Use this property to indicate the type of values
    that a property will contain.
  • You may specify zero, one, or multiple rdfsrange
    properties.
  • Zero if you define a property without specifying
    rdfsrange then you are providing no information
    about the type of value that the property will
    contain.
  • One if you define a property by specifying one
    rdfsrange then you are indicating that the
    property will contain a value whose type is that
    specified by rdfsrange.
  • Multiple if you define a property by specifying
    multiple rdfsrange properties then you are
    indicating that the property will contain a value
    which belongs to every class defined by the
    rdfsrange properties.
  • Example consider the property emptiesInto
    suppose that it has two rdfsrange properties -
    one that specifies BodyOfWater and a second that
    specifies CoastalWater. Thus, the two rdfsrange
    properties indicate that emptiesInto will contain
    a value that is a BodyOfWater and a CoastalWater.

24
Example of multiple rdfsrange properties
25
rdfsdomain
  • Use this property to indicate the classes that a
    property will be used with.
  • You may specify zero, one, or multiple
    rdfsdomain properties.
  • Zero if you define a property without specifying
    rdfsdomain then you are providing no information
    about the class that the property will be used
    with, i.e., the property can be used with any
    class.
  • One if you define a property by specifying one
    rdfsdomain then you are indicating that the
    property will be used with the class specified by
    rdfsdomain.
  • Multiple if you define a property by specifying
    multiple rdfsdomain properties then you are
    indicating that the property will be used with a
    class which belongs to every class defined by the
    rdfsdomain properties.
  • Example consider the property emptiesInto
    suppose that it has two rdfsdomain properties -
    one that specifies River and a second that
    specifies Vessel. Thus, the two rdfsdomain
    properties indicate that emptiesInto will be used
    with a class that is a River and a Vessel.

26
Example of multiple rdfsdomain properties
27
Note that properties are defined separately from
classes
  • With most Object-Oriented languages when a class
    is defined the properties (attributes) are
    simultaneously defined.
  • For example, "I hereby define a Rectangle class,
    and its attributes are length and width."
  • With RDF Schema things are different. You define
    a class (and indicate its relationships to other
    classes). Separately, you define properties and
    then associate them with a class!
  • For the above example you would define the
    Rectangle class (and indicate that it is a
    subclass of GeometricObject). Separately, you
    then define a length property, indicate its range
    of value, and then indicate that length may be
    used with the Rectangle class. (Thus, if you
    have an untyped Resource with a length property
    you can infer the Resource is a Rectangle.)
    Likewise for the width property.

28
Advantage of separately defining classes and
properties
  • As we have seen, the RDF Schema approach is to
    define a class, and then separately define
    properties and state that they are to be used
    with the class.
  • The advantage of this approach is that anyone,
    anywhere, anytime can create a property and state
    that it is usable with the class!

29
The XML Representation of the taxonomy
lt?xml version"1.0"?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-schem
a" xmlbase"http//www.geodesy.o
rg/water/naturally-occurring"gt ltrdfsClass
rdfID"River"gt ltrdfssubClassOf
rdfresource"Stream"/gt lt/rdfsClassgt
ltrdfsClass rdfID"Stream"gt
ltrdfssubClassOf rdfresource"NaturallyOccurring
WaterSource"/gt lt/rdfsClassgt
ltrdfProperty rdfID"emptiesInto"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"BodyOfWater"/gt
lt/rdfPropertygt ltrdfProperty
rdfID"length"gt ltrdfsdomain
rdfresource"River"/gt ltrdfsrange
rdfresource"http//www.w3.org/2000/01/rdf-schema
Literal"/gt lt/rdfPropertygt
... lt/rdfRDFgt
NaturallyOccurringWaterSource.rdfs (snippet)
30
Literal value
ltrdfProperty rdfID"length"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"http//www.w3.org/2000/0
1/rdf-schemaLiteral"/gt lt/rdfPropertygt
A literal type is a simple, untyped string.
31
NaturallyOccurringWaterSource Ontology!
  • NaturallyOccurringWaterSource.rdfs defines a set
    of classes and how the classes are related. It
    defines 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!

32
Inferring a resource's class from the
properties' domain
33
Design to facilitate inferencing!
With this design
lt?xml version"1.0"?gt ltRiver rdfID"Yangtze"
xmlnsrdf"http//www.w3.org/1999/02/22-rd
f-syntax-ns" xmlns"http//www.geodes
y.org/water/naturally-occurring"gt
ltlengthgt6300 kilometerslt/lengthgt
ltemptiesInto rdfresource"http//www.china.org/ge
ographyEastChinaSea"/gt lt/Rivergt
Yangtze.rdf
We are able to infer (using the ontology) that
the value of emptiesInto is a BodyOfWater.
Suppose instead we had designed it as such
lt?xml version"1.0"?gt ltRiver rdfID"Yangtze"
xmlnsrdf"http//www.w3.org/1999/02/22-rd
f-syntax-ns" xmlns"http//www.geodes
y.org/water/naturally-occurring"gt
ltlengthgt6300 kilometerslt/lengthgt
ltemptiesIntogtEast China Sealt/emptiesIntogt lt/Rivergt
Now we can make no inferences about emptiesInto,
since it just contains a literal.
Lesson Learned to maximize the utility of your
data, design to facilitate inferencing!
34
Example 2 WaterwayObstacle Taxonomy
35
NaturallyOccurringWaterSource Taxonomy (Updated)
36
What inferences can be made on this RDF/XML,
given the taxonomies on the last two slides?
37
NaturallyOcurringWaterSource
WaterwayObstacle
BodyOfWater
Stream
Levee
Dam
Ocean
River
Tributary
Brook
Lake
Sea
Properties length Literal emptiesInto
BodyOfWater obstacle http//www.ussdams.orgD
am
Inference Engine
Rivulet
lt?xml version"1.0"?gt ltRiver rdfID"Yangtze"
xmlnsrdf"http//www.w3.org/1999/02/22-rd
f-syntax-ns" xmlns"http//www.geodes
y.org/water/naturally-occurring"gt
ltlengthgt6300 kilometerslt/lengthgt
ltemptiesInto rdfresource"http//www.geodesy.org/
waterEastChinaSea"/gt ltobstacle
rdfresource"http//www.china.org/geography/river
/damThreeGorges"/gt lt/Rivergt
Yangtze.rdf
Inferences - Yangtze is a Stream - Yangtze
is an NaturallyOcurringWaterSource -
http//www.geodesy.org/waterEastChinaSea is a
BodyOfWater - http//www.china.org/geography/ri
ver/damThreeGorges is a Dam
38
Defining the obstacle property
39
Example 3
40
Defining length with no Type Information
41
A resource that doesn't have a type specified may
nonetheless be typed!
ltlengthgt ltrdfDescriptiongt
ltrdfvaluegt6300lt/rdfvaluegt
ltuomunitsgtkilometerslt/uomunitsgt
lt/rdfDescriptiongt lt/lengthgt
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.
ltrdfProperty rdfID"length"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"http//www.nist.orgDist
ance"/gt lt/rdfPropertygt
Advantage now we can infer that the contents of
length is of type Distance.
42
Lesson Learned
This RDF Schema
ltrdfProperty rdfID"length"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"http//www.nist.orgDist
ance"/gt lt/rdfPropertygt
Does not mandate that the RDF/XML instance
specify a type, e.g.,
ltlengthgt ltuomDistancegt
ltrdfvaluegt6300lt/rdfvaluegt
ltuomunitsgtkilometerslt/uomunitsgt
lt/uomDistancegt lt/lengthgt
Best Practice
Best Practice
It is perfectly fine to keep that class
information isolated to the RDF Schema, e.g.,
ltlengthgt ltrdfDescriptiongt
ltrdfvaluegt6300lt/rdfvaluegt
ltuomunitsgtkilometerslt/uomunitsgt
lt/rdfDescriptiongt lt/lengthgt
(However, it is better practice to expose the
type information in the RDF/XML instance.)
43
Example 4
44
Here are the two XML Schema datatypes being
referenced in the RDF
45
Defining properties with typed literals
46
Indicating that rdfresource is identifying a
"datatype"
ltrdfProperty rdfID"length"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"http//www.nist.orgkilo
meter"/gt lt/rdfPropertygt ltrdfsDatatype
rdfabout"http//www.nist.orgkilometer"gt
ltrdfssubClassOf rdfresource"http//www.w3.org/
2001/XMLSchemainteger"/gt lt/rdfsDatatypegt
To indicate that this is referencing a datatype,
we use this
Thus, we are clearly identifying that the length
property associates River with a datatype. (In
all of the other properties we have seen they
associated a Resource with another Resource.
Here we have the case of a property associating
a Resource with a datatype.)
Here's how to read this I hereby declare that
this http//www.nist.orgkilometer repr
esents a "datatype". And this datatype is a
subclass of http//www.w3.org/2001/XMLSc
hemainteger
47
If the RDF Schema indicates a datatype then the
RDF/XML instance must use rdfdatatype
ltrdfProperty rdfID"length"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"http//www.nist.orgkilo
meter"/gt lt/rdfPropertygt
This means that the property's value must be a
typed literal.
ltlength rdfdatatype"http//www.nist.orgkilomete
r"gt6300lt/lengthgt
ltrdfProperty rdfID"length"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"http//www.w3.org/2000/0
1/rdf-schemaLiteral"/gt lt/rdfPropertygt
This means that the property's value is
an untyped string
ltlengthgt6300lt/lengthgt
48
Example 5 TerraFirmaSensorReading Taxonomy
49
What inferences can be made on this RDF/XML,
given the taxonomy on the last slide?
50
(No Transcript)
51
(No Transcript)
52
Classes inherit properties from their ancestors
53
Table showing what properties are applicable to
each class
54
Defining length and emptiesInto
lt?xml version"1.0"?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-schem
a" xmlbase"http//www.geodesy.o
rg/water/naturally-occurring"gt ltrdfProperty
rdfID"length"gt ltrdfsdomain
rdfresource"Stream"/gt ltrdfsrange
rdfresource"http//www.nist.orgDistance"/gt
lt/rdfPropertygt ltrdfProperty
rdfID"emptiesInto"gt ltrdfsdomain
rdfresource"River"/gt ltrdfsrange
rdfresource"BodyOfWater"/gt
lt/rdfPropertygt ... lt/rdfRDFgt
NaturallyOccurringWaterSource.rdfs (snippet)
55
Properties from all superclasses are inherited
ltrdfsClass rdfID"River"gt
ltrdfssubClassOf rdfresource"Stream"/gt
ltrdfssubClassOf rdfresource"http//www.containe
rs.orgSedimentContainer"/gt lt/rdfsClassgt
Stream
SedimentContainer
Properties length
Properties SedimentType
River
- inherits both length and SedimentType.
56
Defining a property to be applicable to multiple
classes
ltrdfProperty rdfID"emptiesInto"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsdomain rdfresource"http//www.containers.o
rgVessel"/gt ltrdfsrange
rdfresource"BodyOfWater"/gt lt/rdfPropertygt
River
Vessel
domain
- emptiesInto is to be used in instances that
are of type River and Vessel. How do we
define emptiesInto so that it may be used with
a River class OR a Vessel class?
57
Answer associate emptiesInto with a superclass
VesselOrRiver
Properties emptiesInto BodyOfWater
Vessel
River
Both Vessel and River inherit the property
emptiesInto. Thus, emptiesInto may be used with
the Vessel class or the River class.
58
rdfssubPropertyOf
You can define a property to be a specialization
of another property
Property Hierarchy
length
"rdfssubPropertyOf"
"rdfssubPropertyOf"
estimatedLength
officialLength
Notes 1. The subproperties inherit the
rdfsrange and rdfsdomain 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.
59
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
60
Making inferences with subproperties
61
Another example of inferencing using property
hierarchies
Property Hierarchy
parent
"rdfssubPropertyOf"
father
lt?xml version"1.0"?gt ltPerson rdfID"Mary"
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-
syntax-ns" xmlns"http//www.genealog
y.org"gt ltfathergt ltPerson
rdfabout"John"/gt lt/fathergt lt/Persongt
"Mary has a father named John."
Inference Since father is a subproperty of
parent, we can infer that Mary has a parent named
John.
62
rdfssubPropertyOf
  • Use this property to create a property that
    specializes another property.
  • You may specify zero, one, or multiple
    rdfssubPropertyOf properties.
  • Zero if you define a property without specifying
    rdfssubPropertyOf then you are providing no
    relationship information to another property.
  • One if you define a property by specifying one
    rdfssubPropertyOf then you are indicating that
    the property is a subproperty of the other
    property.
  • Multiple if you define a property by specifying
    multiple rdfssubPropertyOf properties then you
    are indicating that the property is a subproperty
    of each of the other properties.
  • Example consider the length property suppose
    that it has two rdfssubPropertyOf properties -
    one that specifies Distance and a second that
    specifies Measurement. Thus, the two
    rdfssubPropertyOf properties indicate that a
    length is a Distance and a Measurement.

63
A subproperty can narrow the range and/or domain
Property Hierarchy
emptiesInto BodyOfWater
"rdfssubPropertyOf"
emptiesIntoSea Sea
This subproperty narrows the range to Sea.
ltrdfProperty rdfID"emptiesInto"gt
ltrdfsdomain rdfresource"River"/gt
ltrdfsrange rdfresource"BodyOfWater"/gt lt/rdfPr
opertygt ltrdfProperty rdfID"emptiesIntoSea"gt
ltrdfssubPropertyOf rdfresource"emptiesIn
to"/gt ltrdfsrange rdfresource"Sea"/gt lt/
rdfPropertygt
The property emptiesInto permits a range of
BodyOfWater. This property, however, narrows
the range to Sea.
64
rdfslabel, rdfscomment
ltrdfProperty rdfID"Creator"gt ltrdfslabel
xmllang"EN"gtAuthor/Creatorlt/rdfslabelgt
ltrdfscomment xmllang"EN"gtThe 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. lt/rdfscommentgt lt/rdfProper
tygt
rdfslabel is used to provide a human-readable
version of the property/class name. rdfscomment
is used to provide a human-readable description
of the property/class.
65
Example 6
66
A snippet of the Publishing Ontology
lt?xml version"1.0"?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-schem
a" xmlbase"http//www.publishin
g.org"gt ltrdfsClass rdfID"Article"gt
ltrdfssubClassOf rdfresource"http//www.w3.org/
2000/01/rdf-schemaResource"/gt
lt/rdfsClassgt ltrdfProperty
rdfID"paragraph"gt ltrdfsdomain
rdfresource"Article"/gt ltrdfsrange
rdfresource"http//www.w3.org/1999/02/22-rdf-syn
tax-nsXMLLiteral"/gt lt/rdfPropertygt
lt/rdfRDFgt
The paragraph property is to be used within an
Article class. The contents will be any
well-formed XML.
PublishingOntology.rdfs (snippet)
67
Distinguish between rdfsLiteral and
rdfsXMLLiteral
  • rdfsLiteral denotes a simple, untyped string.
  • rdfsXMLLiteral denotes any well-formed XML
    string.

68
Example 7
Create an RDF Schema for the following RDF/XML
instance
lt?xml version"1.0"?gt ltCatalogue
rdfID"BookCatalogue"
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-syntax
-ns" xmlns"http//www.publis
hing.org" xmlnsdc"http//pu
r1.org/metadata/dublin-core"
xmlbase"http//www.bn.com"gt ltitemgt
ltBook rdfID"_0-06-099325-2"
xmlbase"http//www.publishing.org/book"gt
ltdcTitlegtLateral Thinkinglt/dcTitlegt
ltdcCreatorgtEdward de
Bonolt/dcCreatorgt
ltdcDategt1973lt/dcDategt
ltdcPublishergtHarper amp Rowlt/dcPublishergt
lt/Bookgt lt/itemgt ltitemgt
ltBook rdfID"_0-440-34319-4"
xmlbase"http//www.publishing.org/book"gt
ltdcTitlegtIllusions The Adventures of
a Reluctant Messiahlt/dcTitlegt
ltdcCreatorgtRichard Bachlt/dcCreatorgt
ltdcDategt1977lt/dcDategt
ltdcPublishergtDell Publishing Co.lt/dcPublishergt
lt/Bookgt lt/itemgt
... lt/Cataloguegt
Barnes_and_Noble_BookCatalogue.rdf
69
Another snippet of the Publishing Ontology
lt?xml version"1.0"?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-schem
a" xmlbase"http//www.publishin
g.org"gt ltrdfsClass rdfID"Catalogue"gt
ltrdfssubClassOf rdfresource"http//www.w3.or
g/2000/01/rdf-schemaResource"/gt
lt/rdfsClassgt ltrdfsClass rdfID"Book"gt
ltrdfssubClassOf rdfresource"http//www.w3.o
rg/2000/01/rdf-schemaResource"/gt
lt/rdfsClassgt ltrdfProperty rdfID"item"gt
ltrdfsdomain rdfresource"Catalogue"/gt
ltrdfsrange rdfresource"Book "/gt
lt/rdfPropertygt ... lt/rdfRDFgt
PublishingOntology.rdfs
The Dublin Core properties - Title, Creator,
Date, Publisher - are defined in the Dublin Core
RDF Schema (see next slide).
70
lt?xml version'1.0'?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/TR/1999/PR-rdf-sc
hema-19990303"
xmlbase"http//pur1.org/metadata/dublin-core"gt
ltrdfDescription rdfID"Title"gt ltrdftype
rdfresource"http//www.w3.org/1999/02/22-rdf-syn
tax-nsProperty"/gt ltrdfslabelgtTitlelt/rdfslab
elgt ltrdfscommentgtThe name given to the
resource, usually by the Creator or
Publisher.lt/rdfscommentgt lt/rdfDescriptiongt
ltrdfDescription rdfID"Creator"gt ltrdftype
rdfresource"http//www.w3.org/1999/02/22-rdf-syn
tax-nsProperty"/gt ltrdfslabelgtAuthor/Creatorlt
/rdfslabelgt ltrdfscommentgtThe 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.lt/rdfscommentgt lt/rdfDescriptiongt
ltrdfDescription ID"Date"gt ltrdftype
rdfresource"http//www.w3.org/1999/02/22-rdf-syn
tax-nsProperty"/gt ltrdfslabelgtDatelt/rdfslabe
lgt ltrdfscommentgtA date associated with the
creation or availability of the resource. Such a
date is not to be confused with one belonging
in the Coverage element, which would be
associated with the resource only insofar as the
intellectual content is somehow about that
date. Recommended best practice is defined in a
profile of ISO 8601 Date and Time Formats (based
on ISO8601), W3C Technical Note,
http//www.w3.org/TR/NOTE-datetime that includes
(among others) dates of the forms YYYY and
YYYY-MM-DD. In this scheme, for example, the
date 1994-11-05 corresponds to November 5,
1994.lt/rdfscommentgt lt/rdfDescriptiongt
ltrdfDescription ID"Publisher"gt ltrdftype
rdfresource"http//www.w3.org/1999/02/22-rdf-syn
tax-nsProperty"/gt ltrdfslabelgtPublisherlt/rdfs
labelgt ltrdfscommentgtThe entity responsible
for making the resource available in its present
form, such as a publishing house, a
university department, or a corporate
entity.lt/rdfscommentgt lt/rdfDescriptiongt
... lt/rdfRDFgt
Dublin Core RDF Schema
71
Equivalent!
ltrdfDescription rdfID"Title"gt ltrdftype
rdfresource"http//www.w3.org/1999/02/22-rdf-syn
tax-nsProperty"/gt ltrdfslabelgtTitlelt/rdfslab
elgt ltrdfscommentgtThe name given to the
resource, usually by the Creator or
Publisher.lt/rdfscommentgt lt/rdfDescriptiongt
ltrdfProperty rdfID"Title"gt
ltrdfslabelgtTitlelt/rdfslabelgt
ltrdfscommentgtThe name given to the resource,
usually by the Creator or Publisher.lt/rdfscomment
gt lt/rdfPropertygt
72
Metaclasses
  • A metaclass is a class of classes. Example
  • The instances of an Aircraft class are
  • F16, B1, F117, etc.
  • The properties of Aircraft are
  • wingspan, range, weight, etc.
  • Each of the instances of Aircraft are themselves
    classes!
  • The instances of a F16 class are specific F16
    planes.
  • The properties of F16 are
  • tailNum, deployedAt, etc.
  • The Aircraft class is a metaclass!

73
Aircraft is a Metaclass
Aircraft
F16
XEJ-10
F16
Tango-1
B1
F117
74
Defining Aircraft and its Instances
lt?xml version"1.0"?gt ltrdfRDF xmlnsrdf"http//w
ww.w3.org/1999/02/22-rdf-syntax-ns"
xmlnsrdfs"http//www.w3.org/2000/01/rdf-sch
ema" xmlbase"http//www.nato.
org/aircraft"gt ltrdfsClass
rdfID"Aircraft"/gt ltrdfsClass
rdfID"F16"/gt ... ltrdfProperty
rdfID"wingspan"gt ltrdfsdomain
rdfresource"Aircraft"/gt ltrdfsrange
rdfresource"http//www.w3.org/2000/01/rdf-schema
Literal"/gt lt/rdfPropertygt ...
ltrdfProperty rdfID"deployedAt"gt
ltrdfsdomain rdfresource"F16"/gt
ltrdfsrange rdfresource"http//www.w3.org/2000/0
1/rdf-schemaLiteral"/gt lt/rdfPropertygt
... lt/rdfRDFgt
Classes
Properties of Aircraft
Properties of F16
Aircraft.rdfs
75
Sample Instances
lt?xml version"1.0"?gt ltAircraft
rdfabout"http//www.nato.org/aircraftF16"
xmlnsrdf"http//www.w3.org/1999/02/2
2-rdf-syntax-ns"
xmlns"http//www.nato.org/aircraft"gt
ltwingspangt10 meterslt/wingspangt
... lt/Aircraftgt
F16 is being used as an instance!
F16.rdf
lt?xml version"1.0"?gt ltF16 rdfID"XEJ-10"
xmlnsrdf"http//www.w3.org/1999/02/22-rdf-synt
ax-ns" xmlns"http//www.nato.org/aircra
ft"gt ltdeployedAtgtPersian Gulflt/deployedAtgt
... lt/F16gt
F16 is being used as a class!
XEJ-10.rdf
76
Equivalent!
lt?xml version"1.0"?gt ltAircraft
rdfabout"http//www.nato.org/aircraftF16"
xmlnsrdf"http//www.w3.org/1999/02/2
2-rdf-syntax-ns"
xmlns"http//www.nato.org/aircraft"gt
ltwingspangt10 meterslt/wingspangt
... lt/Aircraftgt
lt?xml version"1.0"?gt ltrdfDescription
rdfabout"http//www.nato.org/aircraftF16"
xmlnsrdf"http//www.w3.o
rg/1999/02/22-rdf-syntax-ns"
xmlns"http//www.nato.org/aircraft"gt
ltrdftype rdfresource"http//www.nato.org/air
craftAircraft"/gt ltwingspangt10
meterslt/wingspangt ... lt/rdfDescriptiongt
77
Merge Descriptions
lt?xml version"1.0"?gt ltrdfDescription
rdfabout"http//www.nato.org/aircraftF16"
xmlnsrdf"http//www.w3.o
rg/1999/02/22-rdf-syntax-ns"
xmlns"http//www.nato.org/aircraft"gt
ltrdftype rdfresource"http//www.nato.org/air
craftAircraft"/gt ltwingspangt10
meterslt/wingspangt ... lt/rdfDescriptiongt
ltrdfsClass rdfID"F16"/gt
lt?xml version"1.0"?gt ltrdfsClass rdfID"F16"
xmlnsrdf"http//www.w3.org/1999
/02/22-rdf-syntax-ns"
xmlns"http//www.nato.org/aircraft"gt
ltrdftype rdfresource"http//www.nato.org/aircra
ftAircraft"/gt ltwingspangt10
meterslt/wingspangt ... lt/rdfsClassgt
"The F16 is an Aircraft, with a wingspan of 10
meters, "
This clearly shows F16 being used as both a class
and as an instance!
78
RDF Schemas simple, yet powerful
  • Let's summarize what we have learned
  • Use RDF Schema to define
  • a class hierarchy (a taxonomy),
  • properties
  • associate them with a class (use rdfsdomain)
  • indicate the range of values (use rdfsrange)
  • 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

79
Desire more expressiveness
  • Although you can express a lot with RDF Schemas
    it is lacking in some desirable expressiveness
  • Two classes, same concept - people use different
    words to represent the same thing. It would be
    very useful to be able to state "this class is
    equivalent to this second class".
  • One person may create an ontology with a class
    called "Airplane". Another person may create an
    ontology with a class called "Plane". It would
    be useful to be able to indicate that the two
    classes are equivalent.
  • Cardinality constraints - oftentimes it is useful
    to indicate the allowable number of occurrences
    of a property
  • Example. We would like to be able to express that
    a River has only "one" officialLength property.
  • Example. We would like to be able to express that
    an Ocean has one maxDepth.

80
RDF Schemas Building Block to More Expressive
Ontology Languages
OWL
OWL Web Ontology Language - see the OWL
Tutorial at http//www.xfront.com/owl/
RDF Schema
RDF Schema was designed to be extended. The
ontology languages all use RDF Schema's basic
notions of Class, Property, domain, and range.
81
RDF Schema vs XML Schema
  • XML Schemas is all about syntax.
  • RDF Schema is all about semantics.
  • An XML Schema tool is intended to validate that
    an XML instance conforms to the syntax specified
    by the XML Schema.
  • 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.
About PowerShow.com