Upload
mustafa-jarrar
View
781
Download
0
Embed Size (px)
Citation preview
1PalGov © 2011
أكاديمية الحكومة اإللكترونية الفلسطينيةThe Palestinian eGovernment Academy
www.egovacademy.ps
Tutorial II: Data Integration and Open Information Systems
Dr. Mustafa Jarrar
University of Birzeit
www.jarrar.info
Session 15.2
RDFa
2PalGov © 2011
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
University of Trento, Italy
University of Namur, Belgium
Vrije Universiteit Brussel, Belgium
TrueTrust, UK
Birzeit University, Palestine
(Coordinator )
Palestine Polytechnic University, Palestine
Palestine Technical University, PalestineUniversité de Savoie, France
Ministry of Local Government, Palestine
Ministry of Telecom and IT, Palestine
Ministry of Interior, Palestine
Project Consortium:
Coordinator:
Dr. Mustafa Jarrar
Birzeit University, P.O.Box 14- Birzeit, Palestine
Telfax:+972 2 2982935 [email protected]
3PalGov © 2011
© 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 4
Tutorial Map
Topic h
Session 1: XML Basics and Namespaces 3
Session 2: XML DTD’s 3
Session 3: XML Schemas 3
Session 4: Lab-XML Schemas 3
Session 5: RDF and RDFs 3
Session 6: Lab-RDF and RDFs 3
Session 7: OWL (Ontology Web Language) 3
Session 8: Lab-OWL 3
Session 9: Lab-RDF Stores -Challenges and Solutions 3
Session 10: Lab-SPARQL 3
Session 11: Lab-Oracle Semantic Technology 3
Session 12_1: The problem of Data Integration 1.5
Session 12_2: Architectural Solutions for the Integration Issues 1.5
Session 13_1: Data Schema Integration 1
Session 13_2: GAV and LAV Integration 1
Session 13_3: Data Integration and Fusion using RDF 1
Session 14: Lab-Data Integration and Fusion using RDF 3
Session 15_1: Data Web and Linked Data 1.5
Session 15_2: RDFa 1.5
Session 16: Lab-RDFa 3
Intended Learning Objectives
A: Knowledge and Understanding
2a1: Describe tree and graph data models.
2a2: Understand the notation of XML, RDF, RDFS, and OWL.
2a3: Demonstrate knowledge about querying techniques for data
models as SPARQL and XPath.
2a4: Explain the concepts of identity management and Linked data.
2a5: Demonstrate knowledge about Integration &fusion of
heterogeneous data.
B: Intellectual Skills
2b1: Represent data using tree and graph data models (XML &
RDF).
2b2: Describe data semantics using RDFS and OWL.
2b3: Manage and query data represented in RDF, XML, OWL.
2b4: Integrate and fuse heterogeneous data.
C: Professional and Practical Skills
2c1: Using Oracle Semantic Technology and/or Virtuoso to store
and query RDF stores.
D: General and Transferable Skills2d1: Working with team.
2d2: Presenting and defending ideas.
2d3: Use of creativity and innovation in problem solving.
2d4: Develop communication skills and logical reasoning abilities.
5PalGov © 2011
Module ILOs
After completing this module students will be
able to:
- Demonstrate knowledge of RDFa.
6PalGov © 2011
RDFa
• Bridges the gap between the Web of Documents
and the Web of Data (Web 3.0).
• Makes XHTML web pages structured data (by
embedding RDF triples inside XHTML).
• i.e., using RDFa we build small RDF graphs and
embed them inside XHTML pages.
7PalGov © 2011
RDFa
• As stated by Google Webmasters guide, RDFa can be roughly viewed
as a way to label content to describe a specific type of information,
such as a restaurant review, an event, a person, or a product listing.
• These information types are called entities or items. Each entity has
a number of properties. For example, a Person has the properties
name, address, job title, company, and email address.
• In general, RDFa uses simple attributes in XHTML tags (often <span>
or <div>) to assign brief and descriptive names to entities and
properties.
8PalGov © 2011
Example 1
9PalGov © 2011
Example 1
10PalGov © 2011
Example 2
Consider this HTML block:
<div>
My name is George Mousa. My friends call me Geno. I live in Nablus, Palestine. I work as an engineer at Birzeit University.
</div>
Annotate the HTML block above with RDFa:
<div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Person">
My name is <span property="v:name"> George Mousa </span>.
My friends call me <span property="v:nickname"> Geno </span>.
I live in Nablus, Palestine.
I work as an engineer at <span property="v:affiliation"> Birzeit University </span>.
</div>
11PalGov © 2011
Example 2
<div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Person">
My name is <span property="v:name"> George Mousa </span>.
My friends call me <span property="v:nickname"> Geno </span>.
I live in Nablus, Palestine.
I work as an engineer at <span property="v:affiliation"> Birzeit University </span>. </div>
• The example begins with a namespace declaration using xmlns. This
indicates the namespace where the vocabulary is specified.
• Also on the first line, typeof="v:Person" indicates that the marked-up
content represents a Person.
• Each property of the person (such as the name and nickname) is
labeled using property.
• To indicate a URL, use rel instead of property. Consider adding the
following to our example inside the Person DIV My home page is: <a href="http://www.example.com" rel="v:url">www.example.com</a>.
• "rel" is used to convey the relationship between two entities—in this case, a
Person entity and a webpage entity.
12PalGov © 2011
Example 2
• In our example, we have addressing information about George Mousa.
<div> ... I live in Nablus, Palestine. I work as an engineer ... </div>
• We use nesting. Nesting is when one information type includes the other.
• In this case, we want to include George’s Address information
(typeof="v:Address") in the typeof="v:Person“ entity.
• Here, we use rel to indicate a relationship between George (the entity v:Person)
and his address (the entity v:Address).
<div xmlns:v="http://rdf.data-vocabulary.org/#" typeof="v:Person">
My name is <span property="v:name"> George Mousa </span>.
My friends call me <span property="v:nickname"> Geno </span>.
I live in
<span rel="v:Address">
<span typeof="v:Address">
<span property="v:city">Nablus</span>,
<span property="v:country">Palestine</span>
</span>
</span>.
I work as an engineer at <span property="v:affiliation"> Birzeit University </span>.
</div>
13PalGov © 2011
Let’s draw a graph of our example!
v:Person
“George Mousa”
“Geno”
v:Address
“Nablus”
“Palestine”
“George Mousa”
v:nickname
v:city
14PalGov © 2011
References
• Google Webmasters Help: www.google.com/support/webmasters/
• W3C: www.w3c.org