RDFS: Resource Description Framework Schema

of 68 /68
RDFS: Resource Description Framework Schema slides are borrowed from Costello

Embed Size (px)


RDFS: Resource Description Framework Schema. slides are borrowed from Costello . 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 - PowerPoint PPT Presentation

Transcript of RDFS: Resource Description Framework Schema

PowerPoint Presentation

RDFS: Resource Description Framework Schema slides are borrowed from Costello 12Lecture scheduleOntologySyntax of RDF and RDFSBasic Ideas of RDF Three representations of RDFBasic Concepts of RDF Schemahe Language of RDF SchemaAxiomatic Semantics for RDF and RDFSApplications of RDF and RDFSQuerying of RDF/RDFS Documents 23RDF Schema is about creating TaxonomiesOceanLakeBodyOfWaterRiverStreamProperties: length: Literal emptiesInto: BodyOfWaterSeaNaturallyOccurringWaterSourceTributaryBrookRivuletRDF S motivation34What inferences can be made on this RDF/XML, given the taxonomy on the last slide?

6300 kilometers

Inferences are made by examining a taxonomy that contains River.See next slide.RDF S motivation45OceanLakeBodyOfWaterRiverStreamProperties: length: Literal emptiesInto: BodyOfWaterSeaNaturallyOccurringWaterSourceTributaryBrookInferenceEngineInferences: - Yangtze is a Stream - Yangtze is an NaturallyOcurringWaterSource - http://www.china.org/geography#EastChinaSea is a BodyOfWaterYangtze.rdfRivulet

6300 kilometers

RDF S motivation56How does a taxonomy facilitate searching?OceanLakeBodyOfWaterRiverStreamProperties: length: Literal emptiesInto: BodyOfWaterSeaNaturallyOccurringWaterSourceTributaryBrookThe taxonomy shows that when searching for "streams", any RDF/XML thatuses the class Brook, Rivulet, River, or Tributary are relevant. See next slide.RivuletRDF S motivation67OceanLakeBodyOfWaterRiverStreamProperties: length: Literal emptiesInto: BodyOfWaterSeaNaturallyOccurringWaterSourceTributaryBrook

6300 kilometers

SearchEngineResults: - Yangtze is a Stream, so this document is relevant to the query."Show me all documents that contain info about Streams"Yangtze.rdfRivuletFrom Costello 78You 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 motivation89Lecture ScheduleOntologySyntax of RDF and RDFSBasic Ideas of RDF Three representations of RDFBasic Concepts of RDF Schemahe Language of RDF SchemaAxiomatic Semantics for RDF and RDFSApplications of RDF and RDFSQuerying of RDF/RDFS Documents using RQL

910Defining a class (e.g., River)


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 andproperties aredefined withinrdf:RDFDefines theRiver classDefines theStream class Since the Stream class is defined in the same document we can reference it using a fragment identifier.12 Assigns a namespace to thetaxonomy!345From Costello 1011rdfs:ClassThis 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

equivalent1112rdfs:subClassOf is transitiveOceanLakeBodyOfWaterRiverStreamSeaNaturallyOccurringWaterSourceTributaryBrookRivuletConsider 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.)1213Defining properties


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)RiverBodyOfWateremptiesIntodomainrange1314Rdf:PropertyThis 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 propertyANDed

equivalent1415Properties can have multiple domain and rangeBodyOfWaterrangeCoastalWater - the value of emptiesInto is a BodyOfWater and a CoastalWater.

1516Note that properties are defined separately from classesOO: 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!

1617The XML Representation of the taxonomy


1718NaturallyOccurringWaterSource 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 PropertiesClass and instances (RDFS and RDF)Class Hierarchies and InheritanceProperty Hierarchies

1819Classes and their InstancesWe must distinguish betweenConcrete 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:type

1920Why Classes are UsefulImpose restrictions on what can be stated in an RDF document using the schema As in programming languagesE.g. A+1, where A is an arrayDisallow nonsense from being statedDiscrete Maths is taught by Concrete MathsWe 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 BillingtonOnly courses can be taughtThis imposes a restriction on the objects to which the property can be applied (domain restriction)

2021Class hierarchyClasses can be organised in hierarchiesA 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

2122Inferring a resource's class from the properties' domain

6300 kilometers

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.2223WaterResource TaxonomyLeveeDamWaterwayObstacleOceanLakeBodyOfWaterRiverStreamProperties: length: Literal emptiesInto: BodyOfWater obstacle: http://www.ussdam.org#DamSeaNaturallyOccurringWaterSourceTributaryBrookRivulet2324Defining the obstacle 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 typehttp://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.2425What inferences can be made on this RDF/XML?Yangtze.rdf

6300 kilometers

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

Inferences are made by examining the taxonomies that contains River and Dam.2526OceanLakeBodyOfWaterRiverStreamProperties: length: Literal emptiesInto: BodyOfWater obstacle: http://www.ussdams.org#DamSeaNaturallyOcurringWaterSourceTributaryBrook

6300 kilometers

InferenceEngineInferences: - 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 DamYangtze.rdfRivuletLeveeDamWaterwayObstacle2627Untyped resource

6300 kilometers

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).untypedresource2728Defining length with no Type Information


No rdfs:range specified.This means that we areproviding 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. 2829A resource that doesn't have a type specified may nonetheless be typed!

6300 kilometers

There is no type shown for thisresource. But that doesn't meanthat this resource has no type. Itonly means that no type has beenspecified in this RDF/XML instance.In the RDF Schema we can specifywhat its type is.

Advantage: now we can infer that the contents of length is of type Distance.2930

This RDF Schema:Does not mandate that the RDF/XML instance specify a type, e.g.,

6300 kilometers

It is perfectly fine to keep that class information isolated to the RDF Schema, e.g.,

6300 kilometers

(However, it is better practiceto expose the type informationin the RDF/XML instance.)Best PracticeBest Practice3031Create RDF Schema for an RDF document