More Related Content
Similar to Pal gov.tutorial2.session5 2.rdfs_jarrar
Similar to Pal gov.tutorial2.session5 2.rdfs_jarrar (13)
More from Mustafa Jarrar (20)
Pal gov.tutorial2.session5 2.rdfs_jarrar
- 1. أكاديمية الحكومة اإللكترونية الفلسطينية
The Palestinian eGovernment Academy
www.egovacademy.ps
Tutorial II: Data Integration and Open Information Systems
Session 5.2
RDF Schema
Prof. Mustafa Jarrar
Sina Institute, University of Birzeit
mjarrar@birzeit.edu
www.jarrar.info
Reviewed by
Prof. Marco Ronchetti, Trento University, Italy
PalGov © 2011 1
- 2. About
This tutorial is part of the PalGov project, funded by the TEMPUS IV program of the
Commission of the European Communities, grant agreement 511159-TEMPUS-1-
2010-1-PS-TEMPUS-JPHES. The project website: www.egovacademy.ps
Project Consortium:
Birzeit University, Palestine
University of Trento, Italy
(Coordinator )
Palestine Polytechnic University, Palestine Vrije Universiteit Brussel, Belgium
Palestine Technical University, Palestine
Université de Savoie, France
Ministry of Telecom and IT, Palestine
University of Namur, Belgium
Ministry of Interior, Palestine
TrueTrust, UK
Ministry of Local Government, Palestine
Coordinator:
Dr. Mustafa Jarrar
Birzeit University, P.O.Box 14- Birzeit, Palestine
Telfax:+972 2 2982935 mjarrar@birzeit.eduPalGov © 2011
2
- 3. © Copyright Notes
Everyone is encouraged to use this material, or part of it, but should
properly cite the project (logo and website), and the author of that part.
No part of this tutorial may be reproduced or modified in any form or by
any means, without prior written permission from the project, who have
the full copyrights on the material.
Attribution-NonCommercial-ShareAlike
CC-BY-NC-SA
This license lets others remix, tweak, and build upon your work non-
commercially, as long as they credit you and license their new creations
under the identical terms.
PalGov © 2011 3
- 4. Tutorial Map
Topic h
Intended Learning Objectives
Session 1: XML Basics and Namespaces 3
A: Knowledge and Understanding
Session 2: XML DTD’s 3
2a1: Describe tree and graph data models.
Session 3: XML Schemas 3
2a2: Understand the notation of XML, RDF, RDFS, and OWL.
Session 4: Lab-XML Schemas 3
2a3: Demonstrate knowledge about querying techniques for data
Session 5: RDF and RDFs 3
models as SPARQL and XPath.
2a4: Explain the concepts of identity management and Linked data. Session 6: Lab-RDF and RDFs 3
2a5: Demonstrate knowledge about Integration &fusion of Session 7: OWL (Ontology Web Language) 3
heterogeneous data. Session 8: Lab-OWL 3
B: Intellectual Skills Session 9: Lab-RDF Stores -Challenges and Solutions 3
2b1: Represent data using tree and graph data models (XML & Session 10: Lab-SPARQL 3
RDF). Session 11: Lab-Oracle Semantic Technology 3
2b2: Describe data semantics using RDFS and OWL. Session 12_1: The problem of Data Integration 1.5
2b3: Manage and query data represented in RDF, XML, OWL. Session 12_2: Architectural Solutions for the Integration Issues 1.5
2b4: Integrate and fuse heterogeneous data. Session 13_1: Data Schema Integration 1
C: Professional and Practical Skills Session 13_2: GAV and LAV Integration 1
2c1: Using Oracle Semantic Technology and/or Virtuoso to store Session 13_3: Data Integration and Fusion using RDF 1
and query RDF stores. Session 14: Lab-Data Integration and Fusion using RDF 3
D: General and Transferable Skills Session 15_1: Data Web and Linked Data 1.5
2d1: Working with team.
2d2: Presenting and defending ideas. Session 15_2: RDFa 1.5
2d3: Use of creativity and innovation in problem solving. Session 16: Lab-RDFa 3
2d4: Develop communication skills and logical reasoning abilities.
PalGov © 2011 4
- 6. RDF Schema
• RDF Schema provides the framework to describe application-
specific classes and properties.
• RDF Schema ‘semantically extends’ RDF to enable us to talk
about classes of resources, and the properties that will be used with
them.
• Classes in RDF Schema is much like classes in object oriented
programming languages. This allows resources to be defined as
instances of classes, and subclasses of classes.
• RDF schemas are Web resources (and have URIs) and can be
described using RDF
PalGov © 2011 6
- 7. Describing Classes with RDFS
• To describe classes we can use built in RDF Schema
resources:
• rdfs:Class
• rdfs:subClassOf
• These are used in conjunction with the rdf:type property.
Rdfs:subclassOf
:Man :Person Rdf:Type
Rdf:Type rdfs:Class
:Edward Said
PalGov © 2011 7
- 8. Defining a class (e.g., passport)
idea Source: Roger L. Costello,David B. Jacobs,The MITRE Corporation
All classes and
properties are
defined within <?xml version="1.0"?>
rdf:RDF <rdf:RDF xmlns:rdf="http://www.egov.pal-rdf-syntax-ns#"
Defines the <rdfs:Class rdf:ID=“passport“/>
Passport class
Defines the
Diplomatic class
<rdfs:Class rdf:ID=“passport">
<rdfs:subClassOf rdf:resource="#personal"/>
</rdfs:Class>
...
</rdf:RDF>
personal.rdfs
This is read as:
"I hereby define a passport Class. diplomatic is a subClassOf passport.”
PalGov © 2011 8
- 9. Describing Properties with RDF(S)
• RDF Schema allows us to describe properties. (Properties
are instances of the class rdf:Property!)
• We can specify a domain using rdfs:domain.
• We can specify a range using rdfs:range.
:Person rdf:Type
rdfs:domain rdfs:Calss
rdf:Property rdfs:range
Rdf:Type
:hasColleague
PalGov © 2011 9
- 10. RDF Schema
• Defines small Vocabulary for RDF:
• Class, subClassOf, type
• Property, subPropertyOf
• domain, range
• Vocabulary can be used to define other vocabularies for
your application domain.
Person
subClassOf
subClassOf
hasSuperVisor
Student Researcher
type type
Frank hasSuperVisor Jeen
PalGov © 2011 10
- 11. RDFS Example
<?xml version="1.0"?>
<rdf:RDF
xmlns:rdf= "http://www.w3.org/1999/02/22-rdf-syntax-ns#"
Observe that it is xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"
an rdf document xml:base= "http://www.animals.fake/animals">
<rdfs:Class rdf:ID="animal" />
<rdfs:Class rdf:ID="horse">
<rdfs:subClassOf rdf:resource="#animal"/>
</rdfs:Class>
<rdfs:Class rdf:ID="dog">
<rdfs:subClassOf rdf:resource="#animal"/>
</rdfs:Class>
</rdf:RDF>
PalGov © 2011 11
- 12. RDF Schema (Another Example)
…
<rdf:Description ID=“Teacher">
<rdf:type resource=“rdf:Class"/>
<rdfs:subClassOf rdf:resource=“foaf:Person"/>
</rdf:Description>
<rdf:Description ID=“Course">
<rdf:type resource=“rdf:Class"/>
</rdf:Description>
<rdf:Description ID=“Address">
<rdf:type resource=“rdf:Class"/>
</rdf:Description>
<rdf:Description ID="Truck">
<rdf:type resource="http://www.w3.org/...#Class"/>
<rdfs:subClassOf rdf:resource="#MotorVehicle"/>
</rdf:Description>
<rdf:Description ID="registeredTo">
<rdf:type resource="http://www.w3.org/...#Property"/>
PalGov © 2011 12
- 13. Main RDFS constructs
• rdfs:Class allows to declare a resource as a class for other resources.
• rdfs:subClassOf allows to declare hierarchies of classes.
• rdfs:domain of an rdf:predicate declares the class of the subject in a triple
whose second component is the predicate.
• rdfs:range of an rdf:predicate declares the class or datatype of the object in a
triple whose second component is the predicate.
• rdfs:subPropertyOf is an instance of rdf:Property that is used to state that all
resources related by one property are also related by another.
• rdfs:seeAlso is an instance of rdf:Property that is used to indicate a resource that might
provide additional information about the subject resource.
• rdfs:label is an instance of rdf:Property that may be used to provide a human-readable
version of a resource's name.
• rdfs:comment is an instance of rdf:Property that may be used to provide a human-
readable description of a resource.
• rdfs:Literal is the class of literal values such as strings and integers.property values
such as textual strings are examples of RDF literals. Literals may be plain or typed.
• rdfs:Datatype is the class of datatypes…
PalGov © 2011 13
- 14. RDFS is not enough
• In the next lecture, we shall learn bout OWL, in order to be
more expressive in representing the meaning.
PalGov © 2011 14
- 15. A Few Words on RDFa
• Bringing the "Web of Documents“ and the "Web of Data" (Semantic
Web) closer.
• Making XHTML web ages structured data. (by embedding RDF triples
inside XHML).
PalGov © 2011 15
- 16. A Few Words on Linked Data
• A community project to publish various open datasets as RDF on the
Web and by setting RDF links between data items from different data
sources.
• Data items are linked across datasets (Palestine is DBPedia is the same
Palestine in Yago)
• By May 2009 this had grown to 4.2 billion RDF triples.
PalGov © 2011 16