Mini-curso sobre LinkedData<br />Oscar Corcho, Asunción Gómez Pérez ({ocorcho, asun}@fi.upm.es)<br />Universidad Politécni...
Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br...
Whatisthe Web of Linked Data?<br />An extension of the current Web…<br />… where information and services are given well-d...
What is Linked Data?<br />Linked Data is a term used to describe a recommended best practice for exposing, sharing, and co...
The fourprinciples (Tim Berners Lee, 2006)<br />Use URIs as names for things <br />Use HTTP URIs so that people can look u...
Linked Open Data evolution<br /><ul><li>2007
2008
2009</li></li></ul><li>7<br />LOD Cloud May 2007<br />Facts:<br /><ul><li>Focal points:
DBPedia: RDFizedvesion of Wikipiedia; many ingoing and outgoing links
Music-related datasets
Big datasets include FOAF, US Census data
Size approx. 1 billion triples, 250k links</li></ul>Figure from [4]<br />
8<br />LOD Cloud September 2008<br />Facts:<br /><ul><li>More than 35 datasets interlinked
Commercial players joined the cloud, e.g., BBC
Companies began to publish and host dataset, e.g. OpenLink, Talis, or Garlik.
Size approx. 2 billion triples, 3 million links</li></ul>Figure from [4]<br />
9<br />LOD Cloud March 2009<br />Facts:<br /><ul><li>Big part from Linking Open Drug cloud and the BIO2RDF project (bottom)
Notable new datasets: Freebase, OpenCalais, ACM/IEEE
Size > 10 billion triples</li></ul>Figure from [4]<br />
LOD clouds<br />
WhyLinked Data?<br />Basically, tomovefrom a Web of documentsto a Web of Data<br />Let’s try anexample:<br /><ul><li>Tell ...
Informationsearch in the Web of documents<br /><ul><li>¿?</li></li></ul><li>What we were actually looking for<br />
Itwouldbebettertomake a data query…<br />(footballplayersfrom Albacete whoplayedEurocup 2008)<br />
Howshouldwepublish data?<br />Formats in which data ispublishednowadays…<br />XML<br />HTML<br />DBs<br />APIs<br />CSV<br...
Which format do we use then?<br />RDF (ResourceDescription Framework)<br />Data model<br />Basedon triples: subject, predi...
URIs (Universal-UniformResourceIdentifer)<br />Two types of identifiers can be used to identify Linked Data resources<br /...
How do wepublishLinked Data?<br />ExposingRelationalDatabasesorother similar formatsintoLinked Data<br />D2R<br />Triplify...
How do we consume Linked Data?<br />Linked Data browsers<br />To explore things and datasets and to navigate between them....
Linked Data browsers (Disco)<br />
Linked Data Mashup (LinkedGeoData)<br />© Migración de datos a la Web de los Datos - Enfoques, técnicas y herramientas<br ...
Linked Data Mashup (DBpedia Mobile)<br />http://wiki.dbpedia.org/DBpediaMobile<br />© Migración de datos a la Web de los D...
 Linked Data Search Engines (Sindice and SIG.MA)<br />Entity lookup service. Find a document that mentions a URI or a keyw...
Linked Data SearchEngines (NYT)<br />The New York Times: Alumni In The News<br />http://data.nytimes.com/schools/schools.h...
Linked Data SearchEngines (NYT)<br />The New York Times: Source code is available<br />… and is based on SPARQL queries<br />
Oneadditionalmotivation: Open Government<br />Government and state administration should be opened at all levels to effect...
 B. Obama –Transparency and Open Government
 T. Berners-Lee - Raw data now!
 J. Manuel Alonso - ¿Qué es Open Data?
Open Government Data
8 Principles of Open Government Data</li></li></ul><li>Open Government. USA and UK<br />27<br />BOTTOM-UP<br />Top-down<br />
Linked Data Mashup (data.gov)<br />Clean Air Status and Trends (CASTNET)<br />http://data-gov.tw.rpi.edu/demo/exhibit/demo...
Linked Data in the UK<br />Education<br />http://education.data.gov.uk/id/school/106661<br />Parliament<br />http://parlia...
Linked Data Mashup (data.gov.uk)<br />Research Funding Explorer<br />http://bis.clients.talis.com/<br />
Open GovernmentSpain. Euskadi<br />31<br />
Open GovernmentSpain. Abredatos<br />32<br />
Open GovernmentSpain. Zaragoza <br />33<br />
Open GovernmentSpain. Asturias<br />34<br />
Linked Data Mashup (Waterquality)<br />Water quality in Asturias’ beaches<br />http://datos.fundacionctic.org/sandbox/astu...
Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br...
Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemap...
RDF: Resource Description Framework<br />W3C recommendation<br />RDF is graphical formalism ( + XML syntax + semantics)<br...
RDF and URIs<br />RDF uses URIRefs(Unique Resource IdentifiersReferences) toidentify resources<br />A URIRef consists of a...
RDF Serialisations<br />Normative<br />RDF/XML (www.w3.org/TR/rdf-syntax-grammar/)<br />Alternative (for human consumption...
RDF Serialisations. RDF/XML<br /><?xml version="1.0"?><br /><rdf:RDF<br />    xmlns:rdf="http://www.w3.org/1999/02/22-rdf-...
RDF Serialisations. N3<br />@base  <http://www.oeg-upm.net/ontologies/people ><br />@prefix person: <http://www.ontologies...
Exercise<br /><ul><li>Objective
Getusedtothedifferentsyntaxesof RDF
Tasks
Takethetextofan RDF file andcreateitscorrespondinggraph
Takean RDF graphandcreateitscorresponding RDF/XML and N3 files </li></ul>43<br />
Exercise 1.a. Create a graph from a file<br />Open the file StickyNote_PureRDF.rdf<br />Create the corresponding graph fro...
Exercise 1.a. StickyNote_PureRDF.rdf<br />45<br />
Exercise 1.b. Create files from a graph<br />Transform the following graph into N3 syntax<br />46<br />hasMeasurement<br /...
Blank nodes: structured property values<br />Most real-world data involves structures that are more complicated than sets ...
Typed literals<br />So far, all values have been presented as strings<br />XML Schema datatypes can be used to specify val...
RDF Containers<br />There is often the need to describe groups of things<br />A book was created by several authors<br />A...
RDF Reification<br />RDF statements about other RDF statements<br />“Raúl believes that Oscar’s birthdate is on Feb 2nd, 1...
Main value of a structured value<br />Sometimes one of the values of a structured value is the main one<br />The weight of...
Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemap...
RDF inference. Graph matching techniques <br />RDF inference is based on graph matching techniques<br />Basically, the RDF...
RDF inference. Examples (I)<br />Sample RDF graph<br />Query: “Tell me who are the persons who have Asun as a colleague”<b...
RDF inference. Examples (II)<br />Query: “Tell me which are the relationships between Oscar and Asun”<br />Result: oeg:has...
RDF inference. Entailment rules<br />56<br />
Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemap...
RDFS: RDF Schema<br />W3C Recommendation<br />RDF Schema extends RDF to enable talking about classes of resources, and the...
RDF(S) Serialisations. RDF/XML syntax<br /><?xml version="1.0"?><br /><rdf:RDF<br />    xmlns:rdf="http://www.w3.org/1999/...
RDF(S) Serialisations. RDF/XML syntax<br />…<br />  <rdf:Property rdf:about="http://www.ontologies.org/ontologies/people#h...
RDF(S) Serialisations. N3<br />@base  <http://www.oeg-upm.net/ontologies/people ><br />@prefix person: <http://www.ontolog...
RDFS<br />rdfs:Literal<br />rdfs:Class<br />rdf:Type<br />rdfs:range<br />Flight<br />rdfs:domain<br />arrivalDate<br />rd...
Exercise<br /><ul><li>Objective
GetusedtothedifferentsyntaxesofRDF(S)
Tasks
TakethetextofanRDF(S) file andcreateitscorrespondinggraph
TakeanRDF(S) graphandcreateitscorresponding RDF/XML and N3 files </li></ul>63<br />
Exercise 2.a. Create a graph from a file<br />Open the files StickyNote.rdf and StickyNote.rdfs<br />Create the correspond...
Exercise 2.a. StickyNote.rdf<br />65<br />
Exercise 2.a. StickyNote.rdfs<br />66<br />
Exercise 2.b. Create files from a graph<br />Transform the following graph into N3 syntax<br />67<br />Room<br />Person<br...
Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemap...
RDF(S) inference. Entailment rules<br />69<br />
RDF(S) inference. Additional inferences <br />70<br />
RDF(S) limitations<br />RDFS too weak to describe resources in sufficient detail<br />No localised range and domain constr...
Exercise<br /><ul><li>Objective
Understand the features of RDF(S) for implementing ontologies, including its limitations
Tasks
Given a scenario description, build a simple ontology in RDF Schema</li></ul>72<br />
Exercise 3. Domain description<br />Un lugar puede ser un lugar de interés.<br />Los lugares de interés pueden ser lugares...
Exercise 3. Sample resulting ontology<br />74<br />
Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemap...
Sample RDF APIs<br />RDF libraries for different languages: <br />Java, Python, C, C++, C#, .Net, Javascript, Tcl/Tk, PHP,...
Jena<br />Java framework for building Semantic Web applications<br />Open source software from HP Labs<br />The Jena frame...
Sesame<br />A framework for storage, querying and inferencing of RDF and RDF Schema<br />A Java Library for handling RDF<b...
Jena example. Graph creation<br />http://.../JohnSmith<br />vcard:FN<br />vcard:N<br />John Smith<br />vcard:Given<br />vc...
Jena example. Read and write<br />// create an empty model<br />Model model = ModelFactory.createDefaultModel();<br />// u...
Some RDF editors<br />IsaViz<br />http://www.w3.org/2001/11/IsaViz/<br />Morla<br />http://www.morlardf.net/<br />RDFAutho...
Main References<br />Brickley D, Guha RV (2004) RDF Vocabulary Description Language 1.0: RDF Schema. W3C Recommendation<br...
Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemap...
RDF(S) query languages<br />Languages developed to allow accessing datasets expressed in RDF(S) (and in some cases OWL)<br...
Query types<br />Selection and extraction<br />“Select all the essays, together with their authors and their authors’ name...
RDF(S) query language families<br />SPARQL <br />W3C Recommendation<br /> 15 January 2008<br />Description graphs<br />Que...
SPARQL<br />SPARQL Protocol and RDF Query Language<br />Supported by: Jena, Sesame, IBM Boca, etc.<br />Features<br />Itsu...
SPARQL is also a protocol<br />SPARQL is a Query Language …Find names and websites of contributors to PlanetRDF: <br />PRE...
SPARQL Endpoints<br />SPARQL protocol services<br />Enables users (human or other) to query a knowledge base using SPARQL<...
Example: Querying dbpedia<br />People who were born in Berlin before 1900<br />90<br />
A simple SPARQL query<br />Data:<br />@prefix dc: <http://purl.org/dc/elements/1.1/> . <br />@prefix : <http://example.org...
Each way a pattern can be matched yields a solution
The sequence of solutions is filtered by: Project, distinct, order, limit/offset
One of the result forms is applied: SELECT, CONSTRUCT, DESCRIBE, ASK</li></ul>91<br />
Graph patterns<br />Basic Graph Patterns, where a set of triple patterns must match<br />Group Graph Pattern, where a set ...
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .<br />_:a  foaf:name   "Johnny Lee Outlaw" .<br />_:a  foaf:mbox   <mailto:jl...
@prefix dt:   <http://example.org/datatype#> .<br />@prefix ns:   <http://example.org/ns#> .<br />@prefix :     <http://ex...
@prefix foaf:  <http://xmlns.com/foaf/0.1/> .<br />_:a  foaf:name   "Alice" .<br />_:bfoaf:name   "Bob" .<br />PREFIX foaf...
Group graph pattern<br />PREFIX foaf:    <http://xmlns.com/foaf/0.1/><br />SELECT ?name ?mbox<br />WHERE  { { ?xfoaf:name ...
Optional graph patterns<br />@prefix foaf:       <http://xmlns.com/foaf/0.1/> .<br />@prefix rdf:        <http://www.w3.or...
Multiple optional graph patterns<br />@prefix foaf:       <http://xmlns.com/foaf/0.1/> .<br />_:a  foaf:name       "Alice"...
Alternative graph patterns<br />@prefix dc10:  <http://purl.org/dc/elements/1.0/> .<br />@prefix dc11:  <http://purl.org/d...
Patterns on named graphs<br /># Named graph: http://example.org/foaf/aliceFoaf<br />@prefix foaf:<http://.../foaf/0.1/> .<...
Patterns on named graphs II<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?src ?bobNick<br />FROM NAMED <http...
Restricting values<br />@prefix dc:   <http://purl.org/dc/elements/1.1/> .<br />@prefix :     <http://example.org/book/> ....
Value tests<br />Based on XQuery 1.0 and XPath 2.0 Function and Operators <br />XSD boolean, string, integer, decimal, flo...
Solution sequences and modifiers<br />SELECT ?name<br />WHERE { ?x foaf:name ?name ; :empId ?emp }<br />ORDER BY ?name DES...
SPARQL query forms<br />SELECT<br />Returns all, or a subset of, the variables bound in a query pattern match<br />CONSTRU...
SPARQL query forms: SELECT<br />@prefix  foaf:  <http://xmlns.com/foaf/0.1/> .<br />_:a    foaf:name   "Alice" .<br />_:a ...
@prefix  foaf:  <http://xmlns.com/foaf/0.1/> .<br />_:a    foaf:name   "Alice" .<br />_:a    foaf:mbox   <mailto:alice@exa...
SPARQL query forms: ASK<br />@prefix foaf:       <http://xmlns.com/foaf/0.1/> .<br />_:a  foaf:name       "Alice" .<br />_...
PREFIX ent:  <http://org.example.com/employees#><br />DESCRIBE ?x WHERE { ?xent:employeeId "1234" }<br />Query result:<br ...
Main References<br />Prud’hommeaux E, Seaborne A (2008) SPARQL Query Language for RDF. W3C Recommendation <br />http://www...
Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemap...
Description Logics<br />A family of logic based Knowledge Representation formalisms<br />Descendants of semantic networks ...
Structure of DL Ontologies<br />A DL ontology can be divided into two parts:<br />Tbox (Terminological KB): a set of axiom...
Mostcommonconstructors in classdefinitions<br />Intersection: C1 ...  Cn		Human  Male<br />Union: C1  ...  Cn		Doctor...
OWL (1.0 and 1.1)<br />February 2004<br />Web Ontology Language<br />Built on top of RDF(S)<br />Three layers:<br /><ul><l...
 A small subset of primitives
 Easier for frame-based tools to transition to
 OWL DL
 Description logic
 Decidable reasoning
 OWL Full
 RDF extension, allows metaclasses</li></ul>Several syntaxes:<br /><ul><li> Abstract syntax
 Manchester syntax
 RDF/XML</li></li></ul><li>OWL 2 (I). New features<br />October 2009<br />New features<br />Syntactic sugar<br />Disjoint ...
OWL 2 (II). Three new profiles<br />OWL2 EL<br />Ontologies that define very large numbers of classes and/or properties, <...
OWL: Most common constructors<br />Intersection: 	   C1 ...  CnintersectionOf		Human  Male<br />Union: 		   C1  ...  ...
OWL: Most common constructors<br />Subproperty	   P1  P2		subPropertyOf		hasDaughter  hasChild<br />Equivalence	   P1  ...
Basic Inference Tasks<br />Subsumption – check knowledge is correct (captures intuitions)<br />Does C subsume D w.r.t. ont...
MainReferences<br />    W3C OWL Working Group (2009) OWL2 Web Ontology Language Document Overview. http://www.w3.org/TR/20...
Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br...
MethodologicalguidelinesforLinked Data publication<br />Motivation<br />Related Work<br />GeoLinkedData<br />Identificatio...
GeoLinkedData<br />It is an open initiative whose aim is to enrich the Web of Data with Spanish geospatial data.<br />This...
Motivation<br />		99.171 % English<br />		0.019 % Spanish<br />The Web of Data ismainlyfor<br />Englishspeakers<br />Poorp...
Related Work<br />
Impact of Geo.linkeddata.es<br />Número de tripletas en Español (July): 1.412.248 <br />Número de tripletas en Español (En...
Processfor Publishing Linked Data onthe Web<br />Identification<br />of the data sources<br />Vocabulary<br />development<...
1. Identification and selection of the data sources<br />Identification<br />of the data sources<br />Instituto Geográfico...
1. Identification and selection of the data sources<br />Instituto Geográfico Nacional (GeographicSpanishInstitute)<br />M...
Monolingual
Numericalinformation
Particularaties</li></ul>Geo (textual level)<br />Temporal<br />130<br />Asunción Gómez Pérez<br />
1. Identification and selection of the data sources<br />IGN-E<br />
1. Identification and selection of the data sources<br />IndustryProductionIndex<br />Year<br />Province<br />
2. Vocabulary development<br />http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/#whichvocabs<br />Identificati...
2. Vocabularydevelopment<br />Features<br />Lightweight : <br />Taxonomies and a fewproperties<br />Consensuatedvocabulari...
Knowledge Resources<br />Ontological Resources<br />O. Design Patterns<br />3<br />4<br />O. Repositories and Registries<b...
Vocabularydevelopment: Specification<br />Content requirements: Identifythe set of questionsthattheontologyshouldanswer<br...
2. Lightweight Ontology Development<br />WGS84 Geo Positioning: an RDF vocabulary<br />scv:Dimension<br />scv:Item<br />sc...
Objetivos:<br />INSPIRE intenta conseguir fuentes armonizadas de Información Geográfica para dar soporte a la formulación,...
INSPIRE - Anexos<br />Luis Manuel Vilches Blázquez<br />
hydrOntology<br />Existencia de gran diversidad de problemas (múltiples fuentes, heterogeneidad de contenido y estructurac...
Fuentes<br />Tesauros y Bibliografía<br />Catálogos de fenómenos<br />Getty<br />FTT ADL<br />BCN25<br />GEMET<br />WFD<br...
Criterios de estructuración <br />Directiva Marco del Agua<br />Propuesta por Parlamento y Consejo de la UE<br />Lista de ...
 Modelización del dominio hidrográfico <br />Luis Manuel Vilches Blázquez<br />
Implementación & Formalizacón<br />+  Pellet<br />4<br />1<br />2<br />5<br />3<br />+150 conceptos (classes) , 47 tipos d...
2. Vocabularydevelopment: HydrOntology<br />145<br />Asunción Gómez Pérez<br />
3. Generation of RDF<br />From the Data sources<br />Geographic information (Databases)<br />Statistic information (.xsl)<...
3. Generation of the RDF Data<br />NOR2O<br />INE<br />ODEMapster<br />IGN<br />Geometry2RDF<br />Geospatial<br />column<b...
3. Generation of the RDF Data / instances <br />NOR2O is a software librarythatimplementsthetransformationsproposedbythePa...
Re-engineeringModelforNORs<br />Patterns for Re-engineering<br />Non-Ontological Resources <br />(PR-NOR)<br />Ontology Fo...
PR-NOR library at the ODP Portal<br />Technologicalsupport<br />http://ontologydesignpatterns.org/wiki/Submissions:Reengin...
3. Generation of the RDF Data – NOR2O<br />NOR2O<br />Year<br />Industry Production Index<br />Province<br />
hydrOntology & Bases de Datos<br />NGN<br />1:25.000<br />multilingüe<br />© Migración de datos a la Web de los Datos - En...
3. Generation of the RDF Data – R2O & ODEMapster<br />Creation of the R2O Mappings<br />
3. Generation of the RDF Data – Geometry2RDF<br />Oracle STO UTIL package <br />SELECT  TO_CHAR(SDO_UTIL.TO_GML311GEOMETRY...
3. Generation of the RDF Data – Geometry2RDF<br />
3. Generation of the RDF Data – Geometry2RDF<br />
Upcoming SlideShare
Loading in...5
×

Linked Data Tutorial (Florianópolis)

6,743

Published on

Slides from the tutorial given by Asunción Gómez-Pérez and Oscar Corcho at 3º OntoBras in Florianópolis (September 2010)

Published in: Technology
0 Comments
10 Likes
Statistics
Notes
  • Be the first to comment

No Downloads
Views
Total Views
6,743
On Slideshare
0
From Embeds
0
Number of Embeds
3
Actions
Shares
0
Downloads
271
Comments
0
Likes
10
Embeds 0
No embeds

No notes for slide
  • 727 veces el term-based record-basedthesaurus
  • Linked Data Tutorial (Florianópolis)

    1. 1. Mini-curso sobre LinkedData<br />Oscar Corcho, Asunción Gómez Pérez ({ocorcho, asun}@fi.upm.es)<br />Universidad Politécnica de Madrid<br />Florianópolis, September 1st 2010(3º OntoBras 2010)<br />Credits: Raúl García Castro, Oscar Muñoz, Jose Angel Ramos Gargantilla, María del Carmen Suárez de Figueroa, Boris Villazón, Alex de León, Víctor Saquicela, Luis Vilches, Miguel Angel García, Manuel Salvadores, Juan Sequeda, Carlos Ruiz Moreno and manyothers<br />WorkdistributedunderthelicenseCreativeCommonsAttribution-Noncommercial-Share Alike 3.0<br />
    2. 2. Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br />Linked Data publication<br />MethodologicalguidelinesforLinked Data publication<br />RDB2RDF tools<br />Technicalaspects of Linked Data publication<br />Linked Data consumption<br />2<br />
    3. 3. Whatisthe Web of Linked Data?<br />An extension of the current Web…<br />… where information and services are given well-defined and explicitly represented meaning, …<br />… so that it can be shared and used by humans and machines, ...<br />... better enabling them to work in cooperation<br />How?<br />Promoting information exchange by tagging web content with machineprocessable descriptions of its meaning. <br />And technologies and infrastructure to do this<br />And clear principles on how to publish data<br />data<br />
    4. 4. What is Linked Data?<br />Linked Data is a term used to describe a recommended best practice for exposing, sharing, and connecting pieces of data, information, and knowledge on the Semantic Web using URIs and RDF.<br />Part of the Semantic Web<br />Exposing, sharing and connecting data<br />Technologies: URIs and RDF (although others are also important)<br />
    5. 5. The fourprinciples (Tim Berners Lee, 2006)<br />Use URIs as names for things <br />Use HTTP URIs so that people can look up those names. <br />When someone looks up a URI, provide useful information, using the standards (RDF*, SPARQL) <br />Include links to other URIs, so that they can discover more things. <br />http://www.w3.org/DesignIssues/LinkedData.html<br />5<br />http://www.ted.com/talks/tim_berners_lee_on_the_next_web.html<br />
    6. 6. Linked Open Data evolution<br /><ul><li>2007
    7. 7. 2008
    8. 8. 2009</li></li></ul><li>7<br />LOD Cloud May 2007<br />Facts:<br /><ul><li>Focal points:
    9. 9. DBPedia: RDFizedvesion of Wikipiedia; many ingoing and outgoing links
    10. 10. Music-related datasets
    11. 11. Big datasets include FOAF, US Census data
    12. 12. Size approx. 1 billion triples, 250k links</li></ul>Figure from [4]<br />
    13. 13. 8<br />LOD Cloud September 2008<br />Facts:<br /><ul><li>More than 35 datasets interlinked
    14. 14. Commercial players joined the cloud, e.g., BBC
    15. 15. Companies began to publish and host dataset, e.g. OpenLink, Talis, or Garlik.
    16. 16. Size approx. 2 billion triples, 3 million links</li></ul>Figure from [4]<br />
    17. 17. 9<br />LOD Cloud March 2009<br />Facts:<br /><ul><li>Big part from Linking Open Drug cloud and the BIO2RDF project (bottom)
    18. 18. Notable new datasets: Freebase, OpenCalais, ACM/IEEE
    19. 19. Size > 10 billion triples</li></ul>Figure from [4]<br />
    20. 20. LOD clouds<br />
    21. 21. WhyLinked Data?<br />Basically, tomovefrom a Web of documentsto a Web of Data<br />Let’s try anexample:<br /><ul><li>Tell me whichfootballplayers, born in theprovince of Albacete, in Spain, havescored a goal in theWorld Cup final</li></ul>Disclaimer:<br />Sorryto use anexampleaboutfootball, butyouhavetounderstandthatforseveralyearsSpaniardswillbetalkingaboutfootball a lot ;-)<br />
    22. 22. Informationsearch in the Web of documents<br /><ul><li>¿?</li></li></ul><li>What we were actually looking for<br />
    23. 23. Itwouldbebettertomake a data query…<br />(footballplayersfrom Albacete whoplayedEurocup 2008)<br />
    24. 24. Howshouldwepublish data?<br />Formats in which data ispublishednowadays…<br />XML<br />HTML<br />DBs<br />APIs<br />CSV<br />XLS<br />…<br />However, mainlimitationsfrom a Web of Data point of view<br />Difficulttointegrate<br />Data isnotlinkedtoeachother, as ithappenswith Web documents.<br />
    25. 25. Which format do we use then?<br />RDF (ResourceDescription Framework)<br />Data model<br />Basedon triples: subject, predicate, object<br /><Oscar> <vive en> <Madrid><br /><Madrid> <es la capital de> <España><br /><España> <es campeona de> <Mundial de Fútbol><br />…<br />Serialised in differentformats<br />RDF/XML, RDFa, N3, Turtle, JSON…<br />
    26. 26. URIs (Universal-UniformResourceIdentifer)<br />Two types of identifiers can be used to identify Linked Data resources<br />URIRefs(Unique Resource IdentifiersReferences)<br />A URI and an optional FragmentIdentifier separated from the URI by the hash symbol ‘#’<br />http://www.ontology.org/people#Person<br />people:Person<br />Plain URIs can also be used, as in FOAF:<br />http://xmlns.com/foaf/0.1/Person<br />17<br />
    27. 27. How do wepublishLinked Data?<br />ExposingRelationalDatabasesorother similar formatsintoLinked Data<br />D2R<br />Triplify<br />R2O<br />NOR2O<br />Virtuoso<br />Ultrawrap<br />…<br />Usingnative RDF triplestores<br />Sesame<br />Jena<br />Owlim<br />Talisplatform<br />…<br />Incorporatingit in theform of RDFa in CMSslikeDrupal<br />18<br />
    28. 28. How do we consume Linked Data?<br />Linked Data browsers<br />To explore things and datasets and to navigate between them.<br />Tabulator Browser (MIT, USA), Marbles (FU Berlin, DE), OpenLink RDF Browser (OpenLink, UK), Zitgist RDF Browser (Zitgist, USA), Disco Hyperdata Browser (FU Berlin, DE), Fenfire (DERI, Ireland)<br />Linked Data mashups<br />Sites that mash up (thus combine Linked data)<br />Revyu.com (KMI, UK), DBtune Slashfacet (Queen Mary, UK), DBPedia Mobile (FU Berlin, DE), Semantic Web Pipes (DERI, Ireland) <br />Search engines<br />To search for Linked Data.<br />Falcons (IWS, China), Sindice (DERI, Ireland), MicroSearch (Yahoo, Spain), Watson (Open University, UK), SWSE (DERI, Ireland), Swoogle (UMBC, USA)<br />Listing on this slide by T. Heath, M. Hausenblas, C. Bizer, R. Cyganiak, O. Hartig<br />19<br />
    29. 29. Linked Data browsers (Disco)<br />
    30. 30. Linked Data Mashup (LinkedGeoData)<br />© Migración de datos a la Web de los Datos - Enfoques, técnicas y herramientas<br />Luis Manuel Vilches Blázquez<br />
    31. 31. Linked Data Mashup (DBpedia Mobile)<br />http://wiki.dbpedia.org/DBpediaMobile<br />© Migración de datos a la Web de los Datos - Enfoques, técnicas y herramientas<br />Luis Manuel Vilches Blázquez<br />
    32. 32. Linked Data Search Engines (Sindice and SIG.MA)<br />Entity lookup service. Find a document that mentions a URI or a keyword. <br />
    33. 33. Linked Data SearchEngines (NYT)<br />The New York Times: Alumni In The News<br />http://data.nytimes.com/schools/schools.html<br />
    34. 34. Linked Data SearchEngines (NYT)<br />The New York Times: Source code is available<br />… and is based on SPARQL queries<br />
    35. 35. Oneadditionalmotivation: Open Government<br />Government and state administration should be opened at all levels to effective public scrutiny and oversight<br />Objectives:<br />Transparency<br />Participation<br />Collaboration<br />Inclusion<br />Cost reduction<br />Interoperability<br />Reusability<br />Leadership<br />Market & Value<br />26<br /><ul><li>Some Links:
    36. 36. B. Obama –Transparency and Open Government
    37. 37. T. Berners-Lee - Raw data now!
    38. 38. J. Manuel Alonso - ¿Qué es Open Data?
    39. 39. Open Government Data
    40. 40. 8 Principles of Open Government Data</li></li></ul><li>Open Government. USA and UK<br />27<br />BOTTOM-UP<br />Top-down<br />
    41. 41. Linked Data Mashup (data.gov)<br />Clean Air Status and Trends (CASTNET)<br />http://data-gov.tw.rpi.edu/demo/exhibit/demo-8-castnet.php<br />
    42. 42. Linked Data in the UK<br />Education<br />http://education.data.gov.uk/id/school/106661<br />Parliament<br />http://parliament.psi.enakting.org/id/member/1227<br />Maps<br />E.g., London: http://data.ordnancesurvey.co.uk/id/7000000000041428<br />http://map.psi.enakting.org<br />Transport<br />http://www.dft.gov.uk/naptan/<br />SameAs service<br />http://www.sameas.org<br />Challenges<br />http://gov.tso.co.uk/openup/sparql/gov-transport<br />29<br />
    43. 43. Linked Data Mashup (data.gov.uk)<br />Research Funding Explorer<br />http://bis.clients.talis.com/<br />
    44. 44. Open GovernmentSpain. Euskadi<br />31<br />
    45. 45. Open GovernmentSpain. Abredatos<br />32<br />
    46. 46. Open GovernmentSpain. Zaragoza <br />33<br />
    47. 47. Open GovernmentSpain. Asturias<br />34<br />
    48. 48. Linked Data Mashup (Waterquality)<br />Water quality in Asturias’ beaches<br />http://datos.fundacionctic.org/sandbox/asturias/playas/<br />
    49. 49. Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br />Linked Data publication<br />MethodologicalguidelinesforLinked Data publication<br />RDB2RDF tools<br />Technicalaspects of Linked Data publication<br />Linked Data consumption<br />36<br />
    50. 50. Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemaprimitives<br />Reasoningwith RDFS<br />RDF(S) Management APIs<br />SPARQL<br />OWL<br />37<br />
    51. 51. RDF: Resource Description Framework<br />W3C recommendation<br />RDF is graphical formalism ( + XML syntax + semantics)<br />For representing metadata<br />For describing the semantics of information in a machine- accessible way<br />Resources are described in terms of properties andproperty values using RDF statements<br />Statements are represented as triples, consisting of asubject, predicate and object. [S, P, O]<br />“Oscar Corcho García”<br />person:hasName<br />person:hasColleague<br />oeg:Oscar<br />oeg:Asun<br />person:hasHomePage<br />person:hasColleague<br />“http://www.fi.upm.es/”<br />oeg:Raul<br />38<br />
    52. 52. RDF and URIs<br />RDF uses URIRefs(Unique Resource IdentifiersReferences) toidentify resources<br />A URIRef consists of a URI and an optional FragmentIdentifier separated from the URI by the hash symbol ‘#’<br />Examples<br />http://www.co-ode.org/people#hasColleague<br />coode:hasColleague<br />A set of URIRefs is known as a vocabulary<br />E.g., the RDF Vocabulary <br />The set of URIRefs used indescribing the RDF concepts:rdf:Property,rdf:Resource, rdf:type, etc.<br />The RDFS Vocabulary <br />The set of URIRefs used indescribing the RDF Schema language: rdfs:Class, rdfs:domain, etc.<br />The ‘Pizza Ontology’ Vocabulary <br />pz:hasTopping,pz:Pizza, pz:VegetarianPizza, etc.<br />39<br />
    53. 53. RDF Serialisations<br />Normative<br />RDF/XML (www.w3.org/TR/rdf-syntax-grammar/)<br />Alternative (for human consumption)<br />N3 (http://www.w3.org/DesignIssues/Notation3.html)<br />Turtle (http://www.dajobe.org/2004/01/turtle/)<br />TriX (http://www.w3.org/2004/03/trix/)<br />…<br />Important: the RDF serializations allow different syntactic variants. E.g., the order of RDF statements has no meaning<br />40<br />
    54. 54. RDF Serialisations. RDF/XML<br /><?xml version="1.0"?><br /><rdf:RDF<br /> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"<br /> xmlns:person="http://www.ontologies.org/ontologies/people#"<br /> xmlns="http://www.oeg-upm.net/ontologies/people#"<br /> xml:base="http://www.oeg-upm.net/ontologies/people"><br /> <rdf:Property rdf:about="http://www.ontologies.org/ontologies/people#hasHomePage"/><br /> <rdf:Property rdf:about="http://www.ontologies.org/ontologies/people#hasColleague"/><br /> <rdf:Property rdf:about="http://www.ontologies.org/ontologies/people#hasName"/><br /> <rdf:Description rdf:about="#Raul"/><br /> <rdf:Description rdf:about="#Asun"><br /> <person:hasColleague rdf:resource="#Raul"/><br /> <person:hasHomePage>http://www.fi.upm.es</person:hasHomePage><br /> </rdf:Description><br /> <rdf:Description rdf:about="#Oscar"><br /> <person:hasColleague rdf:resource="#Asun"/><br /> <person:hasName>Oscar Corcho García</person:hasName><br /> </rdf:Description><br /></rdf:RDF><br />41<br />
    55. 55. RDF Serialisations. N3<br />@base <http://www.oeg-upm.net/ontologies/people ><br />@prefix person: <http://www.ontologies.org/ontologies/people#><br />:Asun person:hasColleague :Raul ;<br /> person:hasHomePage “http://www.fi.upm.es/”.<br />:Oscar person:hasColleague :Asun ;<br /> person:hasName “Óscar Corcho García”.<br />42<br />
    56. 56. Exercise<br /><ul><li>Objective
    57. 57. Getusedtothedifferentsyntaxesof RDF
    58. 58. Tasks
    59. 59. Takethetextofan RDF file andcreateitscorrespondinggraph
    60. 60. Takean RDF graphandcreateitscorresponding RDF/XML and N3 files </li></ul>43<br />
    61. 61. Exercise 1.a. Create a graph from a file<br />Open the file StickyNote_PureRDF.rdf<br />Create the corresponding graph from it<br />Compare your graph with those of your colleagues<br />44<br />
    62. 62. Exercise 1.a. StickyNote_PureRDF.rdf<br />45<br />
    63. 63. Exercise 1.b. Create files from a graph<br />Transform the following graph into N3 syntax<br />46<br />hasMeasurement<br />Measurement8401<br />Sensor029<br />includes<br />hasTemperature<br />atTime<br />Class01<br />includes<br />2010-06-12T12:00:12<br />29<br />Computer101<br />hasOwner<br />User10A<br />hasName<br />Pedro<br />
    64. 64. Blank nodes: structured property values<br />Most real-world data involves structures that are more complicated than sets of RDF triple statements<br />In RDF/XML, it is an <rdf:Description> node with no rdf:about<br />In N3, it is a resource identifier that starts with ‘_’ <br />E.g., “_:nodeX”<br />Thisintermediate URI doesnotneedtohave a name<br />“Oscar Corcho García”<br />person:hasName<br />person:hasPostalAddress<br />oeg:Oscar<br />address:hasStreetName<br />address:city<br />Campus de Montegancedo s/n<br />city:BoadillaDelMonte<br />47<br />
    65. 65. Typed literals<br />So far, all values have been presented as strings<br />XML Schema datatypes can be used to specify values (objects in some RDF triple statements)<br />In RDF/XML, this is expressed as:<br /><rdf:Description rdf:about=”#Oscar”> <person:hasBirthDate rdf:datatype="http://www.w3.org/2001/XMLSchema#date">1976-02-02 </person:hasBirthDate></rdf:Description><br />In N3, this is expressed as:<br />oeg:Oscar person:hasBirthDate ”1976-02-02”^^xsd:date .<br />person:hasBirthDate<br />oeg:Oscar<br />1976-02-02<br />48<br />
    66. 66. RDF Containers<br />There is often the need to describe groups of things<br />A book was created by several authors<br />A lesson is taught by several persons<br />etc.<br />RDF provides a container vocabulary<br />rdf:Bag  A group of resources or literals, possibly including duplicate members, where the order of members is not significant<br />rdf:Seq  A group of resources or literals, possibly including duplicate members, where the order of members is significant<br />rdf:Alt  A group of resources or literals that are alternatives (typically for a single value of a property)<br />rdf:type<br />person:hasEmailAddress<br />oeg:Oscar<br />rdf:Seq<br />rdf:_2<br />rdf:_1<br />“oscar.corcho@upm.es”<br />“ocorcho@fi.upm.es”<br />49<br />
    67. 67. RDF Reification<br />RDF statements about other RDF statements<br />“Raúl believes that Oscar’s birthdate is on Feb 2nd, 1976 and that his e-mail address is ocorcho@fi.upm.es”<br />RDF Reification<br />Allows expressing beliefs (and other modalities)<br />Allows expressing trust models, digital signatures, etc.<br />Allows expressing metadata about metadata<br />modal:believes<br />oeg:Raúl<br />oeg:Oscar<br />person:hasBirthDate<br />person:hasEmailAddress<br />02/02/1976<br />“ocorcho@fi.upm.es”<br />50<br />
    68. 68. Main value of a structured value<br />Sometimes one of the values of a structured value is the main one<br />The weight of an item is 2.4 kilograms <br />The most important value is 2.4, which is expressed with rdf:value<br />Scarcely used<br />product:hasWeight<br />product:Item1<br />rdf:value<br />units:hasWeightUnit<br />units:kilogram<br />2.4<br />51<br />
    69. 69. Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemaprimitives<br />Reasoningwith RDFS<br />RDF(S) Management APIs<br />SPARQL<br />OWL<br />52<br />
    70. 70. RDF inference. Graph matching techniques <br />RDF inference is based on graph matching techniques<br />Basically, the RDF inference process consists of the following steps:<br />Transform an RDF query into a template graph that has to be matched against the RDF graph<br />It contains constant and variable nodes, and constant and variable edges between nodes<br />Match against the RDF graph, taking into account constant nodes and edges<br />Provide a solution for variable nodes and edges<br />53<br />
    71. 71. RDF inference. Examples (I)<br />Sample RDF graph<br />Query: “Tell me who are the persons who have Asun as a colleague”<br />Result: oeg:Oscar and oeg:Raúl<br />“Oscar Corcho García”<br />person:hasName<br />person:hasColleague<br />oeg:Oscar<br />oeg:Asun<br />person:hasHomePage<br />person:hasColleague<br />“http://www.fi.upm.es/”<br />oeg:Raúl<br />person:hasColleague<br />?<br />oeg:Asun<br />54<br />
    72. 72. RDF inference. Examples (II)<br />Query: “Tell me which are the relationships between Oscar and Asun”<br />Result: oeg:hasColleague<br />Query: “Tell me the homepage of Oscar colleagues”<br />Result: “http://www.fi.upm.es/”<br />?<br />oeg:Oscar<br />oeg:Asun<br />person:hasColleague<br />oeg:Oscar<br />person:hasHomePage<br />?<br />55<br />
    73. 73. RDF inference. Entailment rules<br />56<br />
    74. 74. Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemaprimitives<br />Reasoningwith RDFS<br />RDF(S) Management APIs<br />SPARQL<br />OWL<br />57<br />
    75. 75. RDFS: RDF Schema<br />W3C Recommendation<br />RDF Schema extends RDF to enable talking about classes of resources, and the properties to be used with them<br />Class definition: rdfs:Class, rdfs:subClassOf<br />Property definition: rdfs:subPropertyOf, rdfs:range, rdfs:domain<br />Other primitives: rdfs:comment, rdfs:label, rdfs:seeAlso, rdfs:isDefinedBy<br />RDFS vocabulary adds constraints on models, e.g.:<br />x,y,ztype(x,y) and subClassOf(y,z) type(x,z)<br />ex:Animal<br />rdfs:subClassOf<br />rdf:type<br />ex:Oscar<br />ex:Person<br />58<br />
    76. 76. RDF(S) Serialisations. RDF/XML syntax<br /><?xml version="1.0"?><br /><rdf:RDF<br /> xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"<br /> xmlns:person="http://www.ontologies.org/ontologies/people#"<br /> xmlns:rdfs="http://www.w3.org/2000/01/rdf-schema#"<br /> xmlns="http://www.oeg-upm.net/ontologies/people#"<br /> xml:base="http://www.oeg-upm.net/ontologies/people"><br /> <rdfs:Class rdf:about="http://www.ontologies.org/ontologies/people#Professor"><br /> <rdfs:subClassOf><br /> <rdfs:Class rdf:about="http://www.ontologies.org/ontologies/people#Person"/><br /> </rdfs:subClassOf><br /> </rdfs:Class><br /> <rdfs:Class rdf:about="http://www.ontologies.org/ontologies/people#Lecturer"><br /> <rdfs:subClassOf rdf:resource="http://www.ontologies.org/ontologies/people#Person"/><br /> </rdfs:Class><br /> <rdfs:Class rdf:about="http://www.ontologies.org/ontologies/people#PhD"><br /> <rdfs:subClassOf rdf:resource="http://www.ontologies.org/ontologies/people#Person"/><br /> </rdfs:Class> <br /> …<br />59<br />
    77. 77. RDF(S) Serialisations. RDF/XML syntax<br />…<br /> <rdf:Property rdf:about="http://www.ontologies.org/ontologies/people#hasHomePage"/><br /> <rdf:Property rdf:about="http://www.ontologies.org/ontologies/people#hasColleague"><br /> <rdfs:domain rdf:resource=" http://www.ontologies.org/ontologies/people#Person"/><br /> <rdfs:range rdf:resource=" http://www.ontologies.org/ontologies/people#Person"/><br /> </rdf:Property><br /> <rdf:Property rdf:about="http://www.ontologies.org/ontologies/people#hasName"><br /> <rdfs:domain rdf:resource="http://www.w3.org/2002/07/owl#Thing"/><br /> </rdf:Property><br /> <person:PhD rdf:ID="Raul"/><br /> <person:Professor rdf:ID=“Asun"><br /> <person:hasColleague rdf:resource="#Raul"/><br /> <person:hasHomePage>http://www.fi.upm.es</person:hasHomePage><br /> </person:Professor><br /> <person:Lecturer rdf:ID="Oscar"><br /> <person:hasColleague rdf:resource="#Asun"/><br /> <person:hasName>Óscar Corcho García</person:hasName><br /> </person:Lecturer><br /></rdf:RDF><br />60<br />
    78. 78. RDF(S) Serialisations. N3<br />@base <http://www.oeg-upm.net/ontologies/people ><br />@prefix person: <http://www.ontologies.org/ontologies/people#><br />person:hasColleague a rdf:Property;<br /> rdfs:domain person:Person;<br /> rdfs:range person:Person.<br />person:Professor rdfs:subClassOf person:Person.<br />person:Lecturer rdfs:subClassOf person:Person.<br />person:PhD rdfs:subClassOf person:Person.<br />:Asun a person:Professor;<br /> person:hasColleague :Raul ;<br /> person:hasHomePage “http://www.fi.upm.es/”.<br />:Oscar a person:Lecturer;<br /> person:hasColleague :Asun ;<br /> person:hasName “Óscar Corcho García”.<br />:Raul a person:PhD.<br />a is equivalent to rdf:type<br />61<br />
    79. 79. RDFS<br />rdfs:Literal<br />rdfs:Class<br />rdf:Type<br />rdfs:range<br />Flight<br />rdfs:domain<br />arrivalDate<br />rdf:Type<br />rdfs:domain<br />rdfs:domain<br />rdfs:domain<br />departureDate<br />company-name<br />singleFare<br />rdfs:range<br />rdfs:range<br />rdf:Type<br />rdfs:range<br />units:currencyQuantity<br />rdf:Type<br />time:Date<br />rdf:Type<br />rdf:Type<br />RDF<br />rdf:Property<br />rdf:Type<br />rdf:Type<br />company-name<br />rdf:Type<br />IB-4321<br />“Iberia”<br />arrivalDate<br />singleFare<br />departureDate<br />10/11/2005<br />500 euros<br />RDF(S) Example<br />62<br />
    80. 80. Exercise<br /><ul><li>Objective
    81. 81. GetusedtothedifferentsyntaxesofRDF(S)
    82. 82. Tasks
    83. 83. TakethetextofanRDF(S) file andcreateitscorrespondinggraph
    84. 84. TakeanRDF(S) graphandcreateitscorresponding RDF/XML and N3 files </li></ul>63<br />
    85. 85. Exercise 2.a. Create a graph from a file<br />Open the files StickyNote.rdf and StickyNote.rdfs<br />Create the corresponding graph from them<br />Compare your graph with those of your colleagues<br />64<br />
    86. 86. Exercise 2.a. StickyNote.rdf<br />65<br />
    87. 87. Exercise 2.a. StickyNote.rdfs<br />66<br />
    88. 88. Exercise 2.b. Create files from a graph<br />Transform the following graph into N3 syntax<br />67<br />Room<br />Person<br />Measurement<br />Object<br />hasMeasurement<br />Sensor029<br />includes<br />hasTemperature<br />atTime<br />Class01<br />includes<br />2010-06-12T12:00:12<br />29<br />Computer101<br />hasOwner<br />User10A<br />hasName<br />Pedro<br />
    89. 89. Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemaprimitives<br />Reasoningwith RDFS<br />RDF(S) Management APIs<br />SPARQL<br />OWL<br />68<br />
    90. 90. RDF(S) inference. Entailment rules<br />69<br />
    91. 91. RDF(S) inference. Additional inferences <br />70<br />
    92. 92. RDF(S) limitations<br />RDFS too weak to describe resources in sufficient detail<br />No localised range and domain constraints<br />Can’t say that the range of hasChild is person when applied to persons and elephant when applied to elephants<br />No existence/cardinality constraints<br />Can’t say that all instances of person have a mother that is also a person, or that persons have exactly 2 parents<br />No boolean operators<br />Can’t say or, not, etc.<br />No transitive, inverse or symmetrical properties<br />Can’t say that isPartOf is a transitive property, that hasPart is the inverse of isPartOf or that touches is symmetrical<br />Difficult to provide reasoning support<br />No “native” reasoners for non-standard semantics<br />May be possible to reason via FOL axiomatisation<br />71<br />
    93. 93. Exercise<br /><ul><li>Objective
    94. 94. Understand the features of RDF(S) for implementing ontologies, including its limitations
    95. 95. Tasks
    96. 96. Given a scenario description, build a simple ontology in RDF Schema</li></ul>72<br />
    97. 97. Exercise 3. Domain description<br />Un lugar puede ser un lugar de interés.<br />Los lugares de interés pueden ser lugares turísticos o establecimientos, pero no las dos cosas a la vez.<br />Los lugares turísticos pueden ser palacios, iglesias, ermitas y catedrales.<br />Los establecimientos pueden ser hoteles, hostales o albergues.<br />Un lugar está situado en una localidad, la cual a su vez puede ser una villa, un pueblo o una ciudad.<br />Un lugar de interés tiene una dirección postal que incluye su calle y su número.<br />Las localidades tienen un número de habitantes.<br />Las localidades se encuentran situadas en provincias.<br />Covarrubias es un pueblo con 634 habitantes de la provincia de Burgos.<br />El restaurante “El Galo” está situado en Covarrubias, en la calle Mayor, número 5.<br />Una de las iglesias de Covarrubias está en la calle de Santo Tomás.<br />73<br />
    98. 98. Exercise 3. Sample resulting ontology<br />74<br />
    99. 99. Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemaprimitives<br />Reasoningwith RDFS<br />RDF(S) Management APIs<br />SPARQL<br />OWL<br />75<br />
    100. 100. Sample RDF APIs<br />RDF libraries for different languages: <br />Java, Python, C, C++, C#, .Net, Javascript, Tcl/Tk, PHP, Lisp, Obj-C, Prolog, Perl, Ruby, Haskell<br />List in http://esw.w3.org/topic/SemanticWebTools<br />Usually related to a RDF repository<br />Multilanguage:<br />Redland RDF Application Framework (C, Perl, PHP, Python and Ruby): <br /> http://www.redland.opensource.ac.uk/<br />Java:<br />Jena: http://jena.sourceforge.net/<br />Sesame: http://www.openrdf.org/<br />PHP:<br />RAP - RDF API for PHP: http://www4.wiwiss.fu-berlin.de/bizer/rdfapi/<br />Python:<br />RDFLib: http://rdflib.net/<br />Pyrple: http://infomesh.net/pyrple/<br />76<br />
    101. 101. Jena<br />Java framework for building Semantic Web applications<br />Open source software from HP Labs<br />The Jena framework includes:<br />A RDF API<br />An OWL API<br />Reading and writing RDF in RDF/XML, N3 and N-Triples<br />In-memory and persistent storage<br />A rule based inference engine<br />SPARQL query engine<br />77<br />
    102. 102. Sesame<br />A framework for storage, querying and inferencing of RDF and RDF Schema<br />A Java Library for handling RDF<br />A Database Server for (remote) access to repositories of RDF data<br />Highly expressive query and transformation languages<br />SeRQL, SPARQL<br />Various backends<br />Native Store<br />RDBMS (MySQL, Oracle 10, DB2, PostgreSQL)<br />main memory<br />Reasoning support<br />RDF Schema reasoner<br />OWL DLP (OWLIM)<br />domain reasoning (custom rule engine)<br />78<br />
    103. 103. Jena example. Graph creation<br />http://.../JohnSmith<br />vcard:FN<br />vcard:N<br />John Smith<br />vcard:Given<br />vcard:Family<br />Smith<br />John<br />// some definitions <br />String personURI = "http://somewhere/JohnSmith"; <br />String givenName = "John"; <br />String familyName = "Smith"; <br />String fullName = givenName + " " + familyName; <br />// create an empty <br />Model Model model = ModelFactory.createDefaultModel(); <br />// create the resource <br />// and add the properties cascading style <br />Resource johnSmith = model.createResource(personURI) <br /> .addProperty(VCARD.FN, fullName) <br /> .addProperty(VCARD.N, model.createResource() <br /> .addProperty(VCARD.Given, givenName)<br /> .addProperty(VCARD.Family, familyName)); <br />79<br />
    104. 104. Jena example. Read and write<br />// create an empty model<br />Model model = ModelFactory.createDefaultModel();<br />// use the FileManager to find the input file<br />InputStream in = FileManager.get().open( inputFileName );<br />if (in == null) {<br /> throw new IllegalArgumentException("File not found");<br />}<br />// read the RDF/XML file<br />model.read(in, "");<br />// write it to standard out<br />model.write(System.out);<br /><rdf:RDF<br /> xmlns:rdf='http://www.w3.org/1999/02/22-rdf-syntax-ns#'<br /> xmlns:vcard='http://www.w3.org/2001/vcard-rdf/3.0#'<br /> ><br /> <rdf:Description rdf:nodeID="A0"><br /> <vcard:Family>Smith</vcard:Family><br /> <vcard:Given>John</vcard:Given><br /> </rdf:Description><br /> <rdf:Description rdf:about='http://somewhere/JohnSmith/'><br /> <vcard:FN>John Smith</vcard:FN><br /> <vcard:N rdf:nodeID="A0"/><br /> </rdf:Description><br />...<br /></rdf:RDF><br />80<br />
    105. 105. Some RDF editors<br />IsaViz<br />http://www.w3.org/2001/11/IsaViz/<br />Morla<br />http://www.morlardf.net/<br />RDFAuthor<br />http://rdfweb.org/people/damian/RDFAuthor/<br />RdfGravity<br />http://semweb.salzburgresearch.at/apps/rdf-gravity/<br />Rhodonite<br />http://rhodonite.angelite.nl/<br />81<br />
    106. 106. Main References<br />Brickley D, Guha RV (2004) RDF Vocabulary Description Language 1.0: RDF Schema. W3C Recommendation<br />http://www.w3.org/TR/PR-rdf-schema/<br />Lassila O, Swick R (1999) Resource Description Framework (RDF) Model and Syntax Specification. W3C Recommendation <br />http://www.w3.org/TR/REC-rdf-syntax/<br />RDF validator: <br />http://www.w3.org/RDF/Validator/<br />RDF resources:<br />http://planetrdf.com/guide/<br />82<br />
    107. 107. Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemaprimitives<br />Reasoningwith RDFS<br />RDF(S) Management APIs<br />SPARQL<br />OWL<br />83<br />
    108. 108. RDF(S) query languages<br />Languages developed to allow accessing datasets expressed in RDF(S) (and in some cases OWL)<br />Supported by the most important language APIs<br />Jena (HP labs)<br />Sesame (Aduna)<br />Boca (IBM)<br />...<br />There are some differences wrt. languages like SQL, such as<br />Combination of different sources<br />Trust management<br />Open World Assumption<br />84<br />Application<br />Application<br />SQL queries<br />SPARQL, RQL, etc., queries<br />RelationalDB<br />RDF(S)OWL<br />
    109. 109. Query types<br />Selection and extraction<br />“Select all the essays, together with their authors and their authors’ names”<br />“Select everything that is related to the book ‘Bellum Civille’” <br />Reduction: we specify what it should not be returned<br />“Select everything except for the ontological information and the book translators”<br />Restructuring: the original structure is changed in the final result<br />“Invert the relationship ‘author’ by ‘is author of’”<br />Aggregation<br />“Return all the essays together with the mean number of authors per essay”<br />Combination and inferences<br />“Combine the information of a book called ‘La guerra civil’ and whose author is Julius Caesar with the book whose identifier is ‘Bellum Civille’”<br />“Select all the essays, together with its authors and author names”, including also the instances of the subclasses of Essay<br />“Obtain the relationship ‘coauthor’ among persons who have written the same book”<br />85<br />
    110. 110. RDF(S) query language families<br />SPARQL <br />W3C Recommendation<br /> 15 January 2008<br />Description graphs<br />Query semantics<br />Triple database Query structure<br />SquishQLFamily<br />SquishQL<br />rdfDB Query Language<br />RDQL<br />BRQL<br />TriQL<br />XPath, XSLT, XQuery<br />XQueryfor RDF<br />XsRQL<br />TreeHuggerandRDFTwig<br />RDFT, Nexus Query Language<br />RDFPath, RpathandRXPath<br />Versa<br />RQL Family<br />RQL<br />SeRQL<br />eRQL<br />Controlled natural language<br />Metalog<br />Other<br />Algae<br />iTQL<br />N3QL<br />PerlRDF Query Language<br />RDEVICE DeductiveLanguage<br />RDFQBE<br />RDFQL<br />TRIPLE<br />WQL<br />XML repository Query syntax<br />86<br />
    111. 111. SPARQL<br />SPARQL Protocol and RDF Query Language<br />Supported by: Jena, Sesame, IBM Boca, etc.<br />Features<br />Itsupportsmostoftheaforementionedqueries<br />Itsupportsdatatypereasoning(datatypes can be requestedinsteadof actual values)<br />Thedomainvocabularyandtheknowledgerepresentationvocabularyare treateddifferently by thequeryinterpreters<br />Itallowsmakingqueriesoverpropertieswithmultiplevalues, overmultiplepropertiesof a resourceandoverreifications<br />Queries can containoptionalstatements<br />Someimplementationssupportaggregationqueries<br />Limitations<br />Neitherset operationsnorexistentialor universal quantifierscan be included in thequeries<br />Itdoesnotsupportrecursivequeries<br />87<br />
    112. 112. SPARQL is also a protocol<br />SPARQL is a Query Language …Find names and websites of contributors to PlanetRDF: <br />PREFIX foaf: <http://xmlns.com/foaf/0.1/> <br /> SELECT ?name ?website <br /> FROM <http://planetrdf.com/bloggers.rdf> <br /> WHERE { <br /> ?person foaf:weblog ?website .<br /> ?person foaf:name ?name . <br /> ?website a foaf:Document }<br />... and a Protocolhttp://.../qps?query-lang=http://www.w3.org/TR/rdf-sparql-query/ &graph-id=http://planetrdf.com/bloggers.rdf&query=PREFIXfoaf: <http://xmlns.com/foaf/0.1/...<br />Services running SPARQL queries over a set of graphs <br />A transport protocol for invoking the service <br />Based on ideas from earlier protocol work such as Joseki<br />Describing the service with Web Service technologies <br />88<br />
    113. 113. SPARQL Endpoints<br />SPARQL protocol services<br />Enables users (human or other) to query a knowledge base using SPARQL<br />Results are typically returned in one or more machine-processable formats<br />List of SPARQL Endpoints<br />http://esw.w3.org/topic/SparqlEndpoints<br />Programmatic access using libraries:<br />ARC, RAP, Jena, Sesame, Javascript SPARQL, PySPARQL, etc.<br />Examples:<br />89<br />
    114. 114. Example: Querying dbpedia<br />People who were born in Berlin before 1900<br />90<br />
    115. 115. A simple SPARQL query<br />Data:<br />@prefix dc: <http://purl.org/dc/elements/1.1/> . <br />@prefix : <http://example.org/book/> . <br />:book1 dc:title "SPARQL Tutorial" .<br />Query:<br />SELECT ?title<br />WHERE<br />{<br /> <http://example.org/book/book1> <http://purl.org/dc/elements/1.1/title> ?title .<br />}<br />Query result:<br /><ul><li>A pattern is matched against the RDF data
    116. 116. Each way a pattern can be matched yields a solution
    117. 117. The sequence of solutions is filtered by: Project, distinct, order, limit/offset
    118. 118. One of the result forms is applied: SELECT, CONSTRUCT, DESCRIBE, ASK</li></ul>91<br />
    119. 119. Graph patterns<br />Basic Graph Patterns, where a set of triple patterns must match<br />Group Graph Pattern, where a set of graph patterns must all match<br />Optional Graph patterns, where additional patterns may extend the solution<br />Alternative Graph Pattern, where two or more possible patterns are tried<br />Patterns on Named Graphs, where patterns are matched against named graphs<br />92<br />
    120. 120. @prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />_:a foaf:name "Johnny Lee Outlaw" .<br />_:a foaf:mbox <mailto:jlow@example.com> .<br />_:bfoaf:name "Peter Goodguy" .<br />_:bfoaf:mbox <mailto:peter@example.org> .<br />_:cfoaf:mbox <mailto:carol@example.org> .<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?name ?mbox<br />WHERE<br /> { ?x foaf:name ?name .<br /> ?x foaf:mbox ?mbox }<br />Multiple matches<br />93<br />
    121. 121. @prefix dt: <http://example.org/datatype#> .<br />@prefix ns: <http://example.org/ns#> .<br />@prefix : <http://example.org/ns#> .<br />@prefix xsd: <http://www.w3.org/2001/XMLSchema#> .<br />:x ns:p "cat"@en .<br />:y ns:p "42"^^xsd:integer .<br />:z ns:p "abc"^^dt:specialDatatype .<br />SELECT ?v WHERE { ?v ?p "cat" }<br />SELECT ?v WHERE { ?v ?p "cat"@en }<br />SELECT ?v WHERE { ?v ?p 42 }<br />SELECT ?v WHERE { ?v ?p "abc"^^<http://example.org/datatype#specialDatatype> }<br />Matching RDF literals<br />94<br />
    122. 122. @prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />_:a foaf:name "Alice" .<br />_:bfoaf:name "Bob" .<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?x ?name<br />WHERE { ?x foaf:name ?name }<br />=<br />Blank node labels in query results<br />95<br />
    123. 123. Group graph pattern<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?name ?mbox<br />WHERE { { ?xfoaf:name ?name . }<br /> { ?xfoaf:mbox ?mbox . }<br /> }<br />SELECT ?x<br />WHERE {}<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?name ?mbox<br />WHERE { { ?x foaf:name ?name . }<br /> { ?x foaf:mbox ?mbox . FILTER regex(?name, "Smith")}<br /> }<br />96<br />
    124. 124. Optional graph patterns<br />@prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .<br />_:a rdf:typefoaf:Person .<br />_:a foaf:name "Alice" .<br />_:a foaf:mbox <mailto:alice@example.com> .<br />_:a foaf:mbox <mailto:alice@work.example> .<br />_:brdf:typefoaf:Person .<br />_:bfoaf:name "Bob" .<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?name ?mbox<br />WHERE { ?x foaf:name ?name .<br />OPTIONAL { ?x foaf:mbox ?mbox }<br /> }<br />97<br />
    125. 125. Multiple optional graph patterns<br />@prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />_:a foaf:name "Alice" .<br />_:a foaf:homepage <http://work.example.org/alice/> .<br />_:bfoaf:name "Bob" .<br />_:bfoaf:mbox <mailto:bob@work.example> .<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?name ?mbox ?hpage<br />WHERE { ?x foaf:name ?name .<br />OPTIONAL { ?x foaf:mbox ?mbox } .<br /> OPTIONAL { ?x foaf:homepage ?hpage }<br /> }<br />98<br />
    126. 126. Alternative graph patterns<br />@prefix dc10: <http://purl.org/dc/elements/1.0/> .<br />@prefix dc11: <http://purl.org/dc/elements/1.1/> .<br />_:a dc10:title "SPARQL Query Language Tutorial" .<br />_:a dc10:creator "Alice" .<br />_:b dc11:title "SPARQL Protocol Tutorial" .<br />_:b dc11:creator "Bob" .<br />_:c dc10:title "SPARQL" .<br />_:c dc11:title "SPARQL (updated)" .<br />PREFIX dc10: <http://purl.org/dc/elements/1.0/><br />PREFIX dc11: <http://purl.org/dc/elements/1.1/><br />SELECT ?title<br />WHERE { { ?book dc10:title ?title } UNION <br /> { ?book dc11:title ?title } }<br />SELECT ?x ?y<br />WHERE { { ?book dc10:title ?x } UNION <br /> { ?book dc11:title ?y } }<br />SELECT ?title ?author<br />WHERE <br /> { { ?book dc10:title ?title . ?book dc10:creator ?author }<br />UNION<br /> { ?book dc11:title ?title . ?book dc11:creator ?author }}<br />99<br />
    127. 127. Patterns on named graphs<br /># Named graph: http://example.org/foaf/aliceFoaf<br />@prefix foaf:<http://.../foaf/0.1/> .<br />@prefix rdf:<http://.../1999/02/22-rdf-syntax-ns#> .<br />@prefix rdfs:<http://.../2000/01/rdf-schema#> .<br />_:a foaf:name "Alice" .<br />_:a foaf:mbox <mailto:alice@work.example> .<br />_:a foaf:knows _:b .<br />_:b foaf:name "Bob" .<br />_:b foaf:mbox <mailto:bob@work.example> .<br />_:b foaf:nick "Bobby" .<br />_:b rdfs:seeAlso <http://example.org/foaf/bobFoaf> .<br /><http://example.org/foaf/bobFoaf><br /> rdf:type foaf:PersonalProfileDocument .<br /># Named graph: http://example.org/foaf/bobFoaf<br />@prefix foaf:<http://.../foaf/0.1/> .<br />@prefix rdf:<http://.../1999/02/22-rdf-syntax-ns#> .<br />@prefix rdfs:<http://.../2000/01/rdf-schema#> .<br />_:z foaf:mbox <mailto:bob@work.example> .<br />_:z rdfs:seeAlso <http://example.org/foaf/bobFoaf> .<br />_:z foaf:nick "Robert" .<br /><http://example.org/foaf/bobFoaf><br /> rdf:type foaf:PersonalProfileDocument .<br />100<br />
    128. 128. Patterns on named graphs II<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?src ?bobNick<br />FROM NAMED <http://example.org/foaf/aliceFoaf><br />FROM NAMED <http://example.org/foaf/bobFoaf><br />WHERE<br /> {<br />GRAPH ?src<br /> { ?xfoaf:mbox <mailto:bob@work.example> .<br /> ?xfoaf:nick ?bobNick<br /> }<br /> }<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />PREFIX data: <http://example.org/foaf/><br />SELECT ?nick<br />FROM NAMED <http://example.org/foaf/aliceFoaf><br />FROM NAMED <http://example.org/foaf/bobFoaf><br />WHERE<br /> {<br />GRAPH data:bobFoaf {<br /> ?x foaf:mbox <mailto:bob@work.example> .<br /> ?x foaf:nick ?nick }<br /> }<br />101<br />
    129. 129. Restricting values<br />@prefix dc: <http://purl.org/dc/elements/1.1/> .<br />@prefix : <http://example.org/book/> .<br />@prefix ns: <http://example.org/ns#> .<br />:book1 dc:title "SPARQL Tutorial" .<br />:book1 ns:price 42 .<br />:book2 dc:title "The Semantic Web" .<br />:book2 ns:price 23 .<br />PREFIX dc: <http://purl.org/dc/elements/1.1/><br />SELECT ?title<br />WHERE { ?x dc:title ?title<br />FILTER regex(?title, "^SPARQL") <br /> }<br />PREFIX dc: <http://purl.org/dc/elements/1.1/><br />SELECT ?title<br />WHERE { ?x dc:title ?title<br />FILTER regex(?title, "web", "i" ) <br /> }<br />PREFIX dc: <http://purl.org/dc/elements/1.1/><br />PREFIX ns: <http://example.org/ns#><br />SELECT ?title ?price<br />WHERE { ?x ns:price ?price .<br />FILTER (?price < 30.5)<br /> ?x dc:title ?title . }<br />102<br />
    130. 130. Value tests<br />Based on XQuery 1.0 and XPath 2.0 Function and Operators <br />XSD boolean, string, integer, decimal, float, double, dateTime <br />Notation <, >, =, <=, >= and != for value comparisonApply to any type <br />BOUND, isURI, isBLANK, isLITERAL <br />REGEX, LANG, DATATYPE, STR (lexical form) <br />Function call for casting and extensions functions <br />103<br />
    131. 131. Solution sequences and modifiers<br />SELECT ?name<br />WHERE { ?x foaf:name ?name ; :empId ?emp }<br />ORDER BY ?name DESC(?emp)<br />Order modifier: put the solutions in order<br />Projection modifier: choose certain variables<br />Distinct modifier: ensure solutions in the sequence are unique<br />Reduced modifier: permit elimination of some non-unique solutions<br />Limit modifier: restrict the number of solutions<br />Offset modifier: control where the solutions start from in the overall sequence of solutions<br />SELECT ?name<br />WHERE<br /> { ?x foaf:name ?name }<br />SELECT DISTINCT ?name <br />WHERE { ?x foaf:name ?name }<br />SELECT REDUCED ?name <br />WHERE { ?x foaf:name ?name }<br />SELECT ?name<br />WHERE { ?x foaf:name ?name }<br />LIMIT 20<br />SELECT ?name WHERE { ?x foaf:name ?name }<br />ORDER BY ?name<br />LIMIT 5<br />OFFSET 10<br />104<br />
    132. 132. SPARQL query forms<br />SELECT<br />Returns all, or a subset of, the variables bound in a query pattern match<br />CONSTRUCT<br />Returns an RDF graph constructed by substituting variables in a set of triple templates<br />ASK<br />Returns a boolean indicating whether a query pattern matches or not<br />DESCRIBE<br />Returns an RDF graph that describes the resources found<br />105<br />
    133. 133. SPARQL query forms: SELECT<br />@prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />_:a foaf:name "Alice" .<br />_:a foaf:knows _:b .<br />_:a foaf:knows _:c .<br />_:bfoaf:name "Bob" .<br />_:cfoaf:name "Clare" .<br />_:cfoaf:nick "CT" .<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />SELECT ?nameX ?nameY ?nickY<br />WHERE<br /> { ?x foaf:knows ?y ;<br /> foaf:name ?nameX .<br /> ?y foaf:name ?nameY .<br /> OPTIONAL { ?y foaf:nick ?nickY }<br /> }<br />106<br />
    134. 134. @prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />_:a foaf:name "Alice" .<br />_:a foaf:mbox <mailto:alice@example.org> .<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />PREFIX vcard: <http://www.w3.org/2001/vcard-rdf/3.0#><br />CONSTRUCT { <http://example.org/person#Alice> vcard:FN ?name }<br />WHERE { ?x foaf:name ?name }<br />Query result:<br />@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0#> .<br /><http://example.org/person#Alice> vcard:FN "Alice" .<br />SPARQL query forms: CONSTRUCT<br />107<br />
    135. 135. SPARQL query forms: ASK<br />@prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />_:a foaf:name "Alice" .<br />_:a foaf:homepage <http://work.example.org/alice/> .<br />_:b foaf:name "Bob" .<br />_:b foaf:mbox <mailto:bob@work.example> .<br />PREFIX foaf: <http://xmlns.com/foaf/0.1/><br />ASK { ?xfoaf:name "Alice" }<br />Query result:<br />yes<br />108<br />
    136. 136. PREFIX ent: <http://org.example.com/employees#><br />DESCRIBE ?x WHERE { ?xent:employeeId "1234" }<br />Query result:<br />@prefix foaf: <http://xmlns.com/foaf/0.1/> .<br />@prefix vcard: <http://www.w3.org/2001/vcard-rdf/3.0> .<br />@prefix exOrg: <http://org.example.com/employees#> .<br />@prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> .<br />@prefix owl: <http://www.w3.org/2002/07/owl#><br />_:a exOrg:employeeId "1234" ;<br /> foaf:mbox_sha1sum "ABCD1234" ;<br /> vcard:N<br /> [ vcard:Family "Smith" ;<br /> vcard:Given "John" ] .<br />foaf:mbox_sha1sum rdf:type owl:InverseFunctionalProperty .<br />SPARQL query forms: DESCRIBE<br />109<br />
    137. 137. Main References<br />Prud’hommeaux E, Seaborne A (2008) SPARQL Query Language for RDF. W3C Recommendation <br />http://www.w3.org/TR/rdf-sparql-query/<br />SPARQL validator: <br />http://www.sparql.org/validator.html<br />SPARQL implementations: <br />http://esw.w3.org/topic/SparqlImplementations<br />SPARQL Endpoints <br />http://esw.w3.org/topic/SparqlEndpoints<br />SPARQL in Dbpedia<br />http://dbpedia.org/sparql<br />110<br />
    138. 138. Index<br />ResourceDescription Framework (RDF)<br />RDF primitives<br />Reasoningwith RDF<br />RDF Schema<br />RDF Schemaprimitives<br />Reasoningwith RDFS<br />RDF(S) Management APIs<br />SPARQL<br />OWL<br />111<br />
    139. 139. Description Logics<br />A family of logic based Knowledge Representation formalisms<br />Descendants of semantic networks and KL-ONE<br />Describe domain in terms of concepts (classes), roles (relationships) and individuals<br />Specificlanguagescharacterisedbytheconstructors and axiomsusedtoassertknowledgeaboutclasses, roles and individuals.<br />Example: ALC (theleastexpressivelanguage in DL thatispropositionallyclosed)<br />Constructors: boolean(and, or, not)<br />Role restrictions<br />Distinguished by:<br />Model theoretic semantics<br />Decidable fragments of FOL<br />Closely related to Propositional Modal & Dynamic Logics<br />Provision of inference services<br />Sound and complete decision procedures for key problems<br />Implemented systems (highly optimised)<br />
    140. 140. Structure of DL Ontologies<br />A DL ontology can be divided into two parts:<br />Tbox (Terminological KB): a set of axioms that describe the structure of a domain :<br />Doctor  Person<br />Person  Man  Woman<br />HappyFather  Man  hasDescendant.(Doctor  hasDescendant.Doctor)<br />Abox (Assertional KB): a set of axioms that describe a specific situation :<br />John  HappyFather <br />hasDescendant (John, Mary)<br />
    141. 141. Mostcommonconstructors in classdefinitions<br />Intersection: C1 ...  Cn Human  Male<br />Union: C1  ...  Cn Doctor  Lawyer<br />Negation: C Male<br />Nominals: {x1}  ...  {xn} {john}  ...  {mary}<br />Universal restriction: P.C hasChild.Doctor<br />Existentialrestriction: P.C hasChild.Lawyer<br />Maximumcardinality: nP.C 3hasChild.Doctor<br />Minimumcardinality: nP.C 1hasChild.Male<br />SpecificValue: P.{x} hasColleague.{Matthew}<br />Nesting of constructors can bearbitrarilycomplex<br />Person hasChild.(Doctor hasChild.Doctor)<br />Lots of redundancy<br />AB is equivalent to ( A  B)<br />P.C is equivalent to P. C<br />
    142. 142. OWL (1.0 and 1.1)<br />February 2004<br />Web Ontology Language<br />Built on top of RDF(S)<br />Three layers:<br /><ul><li> OWL Lite
    143. 143. A small subset of primitives
    144. 144. Easier for frame-based tools to transition to
    145. 145. OWL DL
    146. 146. Description logic
    147. 147. Decidable reasoning
    148. 148. OWL Full
    149. 149. RDF extension, allows metaclasses</li></ul>Several syntaxes:<br /><ul><li> Abstract syntax
    150. 150. Manchester syntax
    151. 151. RDF/XML</li></li></ul><li>OWL 2 (I). New features<br />October 2009<br />New features<br />Syntactic sugar<br />Disjoint union of classes<br />New expressivity<br />Keys<br />Property chains<br />Richer datatypes, data ranges<br />Qualified cardinality restrictions<br />Asymmetric, reflexive, and disjoint properties<br />Enhanced annotation capabilities <br />New syntax<br />OWL2 Manchester syntax <br />
    152. 152. OWL 2 (II). Three new profiles<br />OWL2 EL<br />Ontologies that define very large numbers of classes and/or properties, <br />Ontology consistency, class expression subsumption, and instance checking can be decided in polynomial time. <br />OWL2 QL<br />Sound and complete query answering is in LOGSPACE (more precisely, in AC0) with respect to the size of the data (assertions),<br />Provides many of the main features necessary to express conceptual models (UML class diagrams and ER diagrams). <br />It contains the intersection of RDFS and OWL 2 DL.<br />OWL2 RL<br />Inspired by Description Logic Programs and pD*. <br />Syntactic subset of OWL 2 which is amenable to implementation using rule-based technologies, and presenting a partial axiomatization of the OWL 2 RDF-Based Semantics in the form of first-order implications that can be used as the basis for such an implementation. <br />Scalable reasoning without sacrificing too much expressive power. <br />Designed for<br />OWL applications trading the full expressivity of the language for efficiency, <br />RDF(S) applications that need some added expressivity from OWL 2. <br />
    153. 153. OWL: Most common constructors<br />Intersection: C1 ...  CnintersectionOf Human  Male<br />Union: C1  ...  CnunionOf Doctor  Lawyer<br />Negation: C complementOf Male<br />Nominals: {x1}  ...  {xn} oneOf {john}  ...  {mary}<br />Universal restriction: P.C allValuesFrom hasChild.Doctor<br />Existentialrestriction: P.C someValuesFrom hasChild.Lawyer<br />Maximumcardinality: nP[.C] maxCardinality (qualifiedornot) 3hasChild[.Doctor]<br />Minimumcardinality: nP[.C] minCardinality (qualifiedornot) 1hasChild[.Male]<br />Exactcardinality: =nP[.C] exactCardinality (qualifiedornot) =1hasMother[.Female]<br />SpecificValue: P.{x} hasValue hasColleague.{Matthew}<br />Local reflexivity: -- hasSelfNarcisist  Person  hasSelf(loves)<br />Keys -- hasKeyhasKey(Person, passportNumber, country)<br />Subclass C1  C2 subClassOf Human  Animal  Biped<br />Equivalence C1  C2 equivalentClass Man  Human  Male<br />Disjointness C1  C2   disjointWith, AllDisjointClasses Male  Female  <br />DisjointUnion C  C1  ...  Cn and Ci Cj   foralli≠jdisjointUnionOf Person DisjointUnionOf (Man, Woman)<br />Metaclasses and annotations on axioms are also valid in OWL2, and declarations of classes have to provided.<br />Full list available in reference specs and in the Quick Reference Guide: http://www.w3.org/2007/OWL/refcard<br />
    154. 154. OWL: Most common constructors<br />Subproperty P1  P2 subPropertyOf hasDaughter  hasChild<br />Equivalence P1  P2 equivalentProperty cost  price<br />DisjointProperties P1  ...  Pn   disjointObjectProperties hasDaughter  hasSon  <br />Inverse P1  P2- inverseOf hasChild  hasParent-<br />Transitive P+  P TransitiveProperty ancestor+  ancestor<br />Functional   1P FunctionalProperty T  1hasMother<br />InverseFunctional   1P- InverseFunctionalProperty T  1hasPassportID-<br />Reflexive ReflexiveProperty<br />Irreflexive IrreflexiveProperty<br />Asymmetric AsymmetricProperty<br />Property chains P  P1 o ... o Pn propertyChainAxiom hasUncle  hasFather o hasBrother<br />Equivalence {x1}  {x2} sameIndividualAs {oeg:OscarCorcho}{img:Oscar}<br />Different {x1}  {x2} differentFrom, AllDifferent {john}  {peter}<br />NegativePropertyAssertion NegativeDataPropertyAssertion {hasAge john 35}<br />NegativeObjectPropertyAssertion {hasChild john peter}<br />Besides, top and bottom object and datatype properties exist<br />
    155. 155. Basic Inference Tasks<br />Subsumption – check knowledge is correct (captures intuitions)<br />Does C subsume D w.r.t. ontology O? (in every modelI of O, CIDI )<br />Equivalence – check knowledge is minimally redundant (no unintended synonyms)<br />Is C equivalent to D w.r.t. O? (in every modelI of O, CI = DI )<br />Consistency – check knowledge is meaningful (classes can have instances)<br />Is C satisfiable w.r.t. O? (there exists some modelI of O s.t. CI)<br />Instantiation and querying<br />Is x an instance of C w.r.t. O? (in every modelI of O, xICI )<br />Is (x,y) an instance of R w.r.t. O? (in every modelI of O, (xI,yI) RI )<br />All reducible to KB satisfiability or concept satisfiability w.r.t. a KB<br />Can be decided using highly optimised tableaux reasoners<br />
    156. 156. MainReferences<br /> W3C OWL Working Group (2009) OWL2 Web Ontology Language Document Overview. http://www.w3.org/TR/2009/REC-owl2-overview-20091027/<br /> Dean M, Schreiber G (2004) OWL Web Ontology Language Reference. W3C Recommendation. http://www.w3.org/TR/owl-ref/<br />Gómez-Pérez, A.; Fernández-López, M.; Corcho, O. Ontological Engineering. Springer Verlag. 2003<br /> Capítulo 4: Ontology languages<br />Baader F, McGuinness D, Nardi D, Patel-Schneider P (2003) The Description Logic Handbook: Theory, implementation and applications. Cambridge University Press, Cambridge, United Kingdom<br />Jena web site:http://jena.sourceforge.net/<br />Jena API: http://jena.sourceforge.net/tutorial/RDF_API/<br />Jena tutorials:http://www.ibm.com/developerworks/xml/library/j-jena/index.html<br />http://www.xml.com/pub/a/2001/05/23/jena.html<br />Pellet: http://clarkparsia.com/pellet<br /> RACER: http://www.racer-systems.com/<br />FaCT++: http://owl.man.ac.uk/factplusplus/<br />HermIT: http://hermit-reasoner.com/<br />
    157. 157. Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br />Linked Data publication<br />MethodologicalguidelinesforLinked Data publication<br />RDB2RDF tools<br />Technicalaspects of Linked Data publication<br />Linked Data consumption<br />122<br />
    158. 158. MethodologicalguidelinesforLinked Data publication<br />Motivation<br />Related Work<br />GeoLinkedData<br />Identification of the data sources<br />Vocabulary Development<br />Generation of the RDF data<br />Publication of the RDF data<br />Data cleansing<br />Linking the RDF data<br />Enable effective discovery<br />Future Work<br />
    159. 159. GeoLinkedData<br />It is an open initiative whose aim is to enrich the Web of Data with Spanish geospatial data.<br />This initiative has started off by publishing diverse information sources, such as National Geographic Institute of Spain (IGN-E) and National Statistics Institute (INE)<br />http://geo.linkeddata.es<br />
    160. 160. Motivation<br /> 99.171 % English<br /> 0.019 % Spanish<br />The Web of Data ismainlyfor<br />Englishspeakers<br />Poorpresence of Spanish<br />Source:Billion Triples dataset at http://km.aifb.kit.edu/projects/btc-2010/<br />Thanks to Aidan and Richard<br />
    161. 161. Related Work<br />
    162. 162. Impact of Geo.linkeddata.es<br />Número de tripletas en Español (July): 1.412.248 <br />Número de tripletas en Español (End august): 21.463.088<br />127<br />Asunción Gómez Pérez<br />
    163. 163. Processfor Publishing Linked Data onthe Web<br />Identification<br />of the data sources<br />Vocabulary<br />development<br />Generation<br />of the RDF Data<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />
    164. 164. 1. Identification and selection of the data sources<br />Identification<br />of the data sources<br />Instituto GeográficoNacional<br />Vocabulary<br />development<br />Generation<br />of the RDF Data<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Instituto Nacionalde Estadística<br />Enable effective <br />discovery<br />
    165. 165. 1. Identification and selection of the data sources<br />Instituto Geográfico Nacional (GeographicSpanishInstitute)<br />Multilingual (Spanish, Vasc, Gallician, Catalan)<br />Conceptualizationmistmatches<br />Granularity (scale concept)<br />Textual information<br />Particularaties<br />Longitude<br />latitude<br /><ul><li>Instituto Nacional de Estadística (StatisticSpanishInstitute)
    166. 166. Monolingual
    167. 167. Numericalinformation
    168. 168. Particularaties</li></ul>Geo (textual level)<br />Temporal<br />130<br />Asunción Gómez Pérez<br />
    169. 169. 1. Identification and selection of the data sources<br />IGN-E<br />
    170. 170. 1. Identification and selection of the data sources<br />IndustryProductionIndex<br />Year<br />Province<br />
    171. 171. 2. Vocabulary development<br />http://www4.wiwiss.fu-berlin.de/bizer/pub/LinkedDataTutorial/#whichvocabs<br />Identification<br />of the data sources<br />Vocabulary<br />development<br />Generation<br />of the RDF Data<br />Thisisnotenough<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />
    172. 172. 2. Vocabularydevelopment<br />Features<br />Lightweight : <br />Taxonomies and a fewproperties<br />Consensuatedvocabularies<br />Toavoidthemappingproblems<br />Multilingual<br />Linked data are multilingual<br />TheNeOnmethodology can helpto<br />Re-enginer Non ontologicalresourcesintoontologies<br />Pros: use domainterminologyalreadyconsensuatedbydomainexperts<br />Withdraw in heavyweightontologiesthosefeaturesthatyoudon’tneed<br />Reuseexistingvocabularies<br />134<br />Identification<br />of the data sources<br />Vocabulary<br />development<br />Generation<br />of the RDF Data<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />Asunción Gómez Pérez<br />
    173. 173. Knowledge Resources<br />Ontological Resources<br />O. Design Patterns<br />3<br />4<br />O. Repositories and Registries<br />5<br />6<br />Flogic<br />RDF(S)<br />OWL<br />OntologicalResource<br />Reuse<br /> O. Aligning<br /> O. Merging<br />5<br />6<br />2<br />Ontology Design<br />Pattern Reuse<br />Non Ontological Resource<br />Reuse<br />4<br />3<br />6<br />Non Ontological Resources<br />2<br />Ontological Resource<br />Reengineering<br />7<br />Glossaries<br />Dictionaries<br />Lexicons<br />5<br />Non Ontological Resource<br />Reengineering<br />4<br />6<br />Classification<br />Schemas<br />Thesauri<br />Taxonomies<br />Alignments<br />2<br />RDF(S)<br />1<br />Flogic<br />O. Conceptualization<br />O. Implementation<br />O. Formalization<br />O. Specification<br />Scheduling<br />OWL<br />8<br />Ontology Restructuring<br />(Pruning, Extension, <br />Specialization, Modularization)<br />9<br />O. Localization<br />1,2,3,4,5,6,7,8, 9<br />Ontology Support Activities: Knowledge Acquisition (Elicitation); Documentation; <br />Configuration Management; Evaluation (V&V); Assessment<br />135<br />
    174. 174. Vocabularydevelopment: Specification<br />Content requirements: Identifythe set of questionsthattheontologyshouldanswer<br />Whichone are theprovinces in Spain?<br />Where are thebeaches?<br />Where are thereservoirs?<br />Identifytheproductionindex in Madrid<br />Whichoneisthecitywithhigherproductionindex?<br />Give me Madrid latitude and altitude<br />….<br />Non-contentrequirements<br />Theontologymustbe in thefourofficialSpanishlanguages<br />136<br />Asunción Gómez Pérez<br />
    175. 175. 2. Lightweight Ontology Development<br />WGS84 Geo Positioning: an RDF vocabulary<br />scv:Dimension<br />scv:Item<br />scv:Dataset<br />hydrographical phenomena (rivers, lakes, etc.)<br />Vocabulary for instants, intervals, durations, etc.<br />Names and international code systems for territories and groups<br />Ontology for OGC Geography Markup Language <br />reused<br />Following the INSPIRE <br />(INfrastructure for SPatial InfoRmation in Europe) recommendation.<br />hydrOntology,SCOVO, FAO Geopolitcal, WGS84, GML, and Time<br />
    176. 176. Objetivos:<br />INSPIRE intenta conseguir fuentes armonizadas de Información Geográfica para dar soporte a la formulación, implementación y evaluación de políticas comunitarias (Medio Ambiente, etc).<br />Fuentes de Información Geográfica: Bases de datos de los Estados Miembros (UE) a nivel local, regional, nacional e internacional.<br />Contexto – Directiva INSPIRE <br />Luis Manuel Vilches Blázquez<br />
    177. 177. INSPIRE - Anexos<br />Luis Manuel Vilches Blázquez<br />
    178. 178. hydrOntology<br />Existencia de gran diversidad de problemas (múltiples fuentes, heterogeneidad de contenido y estructuración, ambigüedad del lenguaje natural, etc.) en la información geográfica.<br />Necesidad de un modelo compartido para solventar los problemas de armonización y estructuración de la información hidrográfica.<br />hydrOntology es una ontología global de dominio desarrollada conforme a un acercamiento top-down. <br />Recubrir la mayoría de los fenómenos representables cartográficamente asociados al dominio hidrográfico.<br />Servir como marco de armonización entre los diferentes productores de información geo-espacial en el entorno nacional e internacional.<br />Comenzar con los pasos necesarios para obtener una mejor organización y gestión de la información geográfica (hidrográfica).<br />Luis Manuel Vilches Blázquez<br />
    179. 179. Fuentes<br />Tesauros y Bibliografía<br />Catálogos de fenómenos<br />Getty<br />FTT ADL<br />BCN25<br />GEMET<br />WFD<br />CC.AA.<br />EGM & ERM<br />Diccionarios y<br />Monografías<br />BCN200<br />Nomenclátor Geográfico Nacional<br />Nomenclátor Conciso<br />Luis Manuel Vilches Blázquez<br />
    180. 180. Criterios de estructuración <br />Directiva Marco del Agua<br />Propuesta por Parlamento y Consejo de la UE<br />Lista de definiciones de fenómenos hidrográficos<br />Proyecto SDIGER<br />Proyecto piloto INSPIRE<br />Dos cuencas, países e idiomas<br />Criterios semánticos<br />Diccionarios geográficos<br />Diccionario de la Real Academia de la Lengua<br />WordNet<br />Wikipedia<br />Bibliografía de varias áreas de conocimiento<br />Herencia: Estructuración actual de catálogos<br />Asesoramiento expertos en toponimia del IGN<br />Luis Manuel Vilches Blázquez<br />
    181. 181. Modelización del dominio hidrográfico <br />Luis Manuel Vilches Blázquez<br />
    182. 182. Implementación & Formalizacón<br />+ Pellet<br />4<br />1<br />2<br />5<br />3<br />+150 conceptos (classes) , 47 tipos de relaciones (properties) y 64 tipos de atributos (attribute types)<br />Luis Manuel Vilches Blázquez<br />
    183. 183. 2. Vocabularydevelopment: HydrOntology<br />145<br />Asunción Gómez Pérez<br />
    184. 184. 3. Generation of RDF<br />From the Data sources<br />Geographic information (Databases)<br />Statistic information (.xsl)<br />Geospatial information <br />Different technologies for RDF generation<br />Reengineering patterns<br />R20 and ODEMapster<br />Annotation tools<br />Geometry generation<br />Identification<br />of the data sources<br />Vocabulary<br />development<br />Generation<br />of the RDF Data<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />
    185. 185. 3. Generation of the RDF Data<br />NOR2O<br />INE<br />ODEMapster<br />IGN<br />Geometry2RDF<br />Geospatial<br />column<br />IGN<br />
    186. 186. 3. Generation of the RDF Data / instances <br />NOR2O is a software librarythatimplementsthetransformationsproposedbythePatternsfor Re-engineering Non-OntologicalResources (PR-NOR). Currentlywehave 16 PR-NORs.<br />PR-NORs define a procedurethattransforms a Non-OntologicalResource (NOR) componentsintoontologyelements. http://ontologydesignpatterns.org/<br />· Classification<br />schemes<br />NOR2O<br />· Thesauri<br />· Lexicons<br />NOR2O<br />FAO Water classification<br />· Classification scheme<br />· Path enumeration data model<br />· Implemented in a database<br />
    187. 187. Re-engineeringModelforNORs<br />Patterns for Re-engineering<br />Non-Ontological Resources <br />(PR-NOR)<br />Ontology Forward <br />Engineering<br /> Con-<br />ceptual<br />Speci-<br />fication<br />NOR Reverse <br />Engineering<br />Conceptua-<br />lization<br />Transformation<br />Requirements<br />Formalization<br />Design<br />Implementation<br />Implementation<br />RDF(S)<br />Non-Ontological Resource<br />Ontology<br />
    188. 188. PR-NOR library at the ODP Portal<br />Technologicalsupport<br />http://ontologydesignpatterns.org/wiki/Submissions:ReengineeringODPs<br />
    189. 189. 3. Generation of the RDF Data – NOR2O<br />NOR2O<br />Year<br />Industry Production Index<br />Province<br />
    190. 190. hydrOntology & Bases de Datos<br />NGN<br />1:25.000<br />multilingüe<br />© Migración de datos a la Web de los Datos - Enfoques, técnicas y herramientas<br />Luis Manuel Vilches Blázquez<br />
    191. 191. 3. Generation of the RDF Data – R2O & ODEMapster<br />Creation of the R2O Mappings<br />
    192. 192. 3. Generation of the RDF Data – Geometry2RDF<br />Oracle STO UTIL package <br />SELECT TO_CHAR(SDO_UTIL.TO_GML311GEOMETRY(geometry)) <br /> AS Gml311Geometry<br />FROM "BCN200"."BCN200_0301L_RIO" c<br />WHERE c.Etiqueta='Arroyo'<br />
    193. 193. 3. Generation of the RDF Data – Geometry2RDF<br />
    194. 194. 3. Generation of the RDF Data – Geometry2RDF<br />
    195. 195. 3. Generation of the RDF data – RDF graphs<br /> IGN INE<br />So far<br /> 7 RDF Named Graphs<br /> 1.412.248 triples<br />BTN25<br />BCN200<br />IPI<br />….<br />http://geo.linkeddata.es/dataset/IGN/BTN25<br />http://geo.linkeddata.es/dataset/IGN/BCN200<br />http://geo.linkeddata.es/dataset/INE/IPI<br />
    196. 196. 4. Publication of the RDF Data<br />Identification<br />of the data sources<br />Vocabulary<br />development<br />SPARQL<br />Linked Data<br />HTML<br />Generation<br />of the RDF Data<br />IncludingProvenance<br />Support<br />Publication<br />of the RDF data <br />Pubby<br />Pubby 0.3<br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />Virtuoso 6.1.0<br />
    197. 197. 4. Publication of the RDF Data<br />
    198. 198. 4. Publication of the RDF Data - License<br />License for GeoLinkedData<br />Creative Commons Attribution-ShareAlike 3.0 <br />GNU Free Documentation License<br />Each dataset will have its own specific license, IGN, INE, etc.<br />
    199. 199. 5. Data cleansing<br />Identification<br />of the data sources<br />Lack of documentation of the IGN datasets<br />Broken links: Spain, IGN resources<br />Lack of documentation of theontology<br />Missingenglish and spanishlabels<br />Building a spanish ontology and importing some concepts of other ontology (in English):<br />Importing the English ontology. Add annotations like a Spanish label to them.<br />Importing the English ontology, creating new concepts and properties with a Spanish name and map those to the English equivalents.<br />Re-declaring the terms of the English ontology that we need (using the same URI as in the English ontology), and adding a Spanish label.<br />Creating your own class and properties that model the same things as the English ontology. <br />Vocabulary<br />development<br />Generation<br />of the RDF Data<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />
    200. 200. 5. Data cleansing<br />URIs in Spanish<br />http://geo.linkeddata.es/ontology/Río<br />RDF allows UTF-8 characters for URIs<br />But, Linked Data URIs has to be URLs as well<br />So, non ASCII-US characters have to be %code<br />http://geo.linkeddata.es/ontology/R%C3%ADo<br />
    201. 201. 6. Linking of the RDF Data<br />Identification<br />of the data sources<br />Silk - A Link Discovery Framework for the Web of Data<br />First set of links: Provinces of Spain<br />86% accuracy<br />Vocabulary<br />development<br />Geonames<br />Generation<br />of the RDF Data<br />GeoLinkedData<br />DBPedia<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />
    202. 202. 6. Linking of the RDF Data<br />http://geo.linkeddata.es/page/Provincia/Granada<br />164<br />Asunción Gómez Pérez<br />
    203. 203. 7. Enable effective discovery<br />Identification<br />of the data sources<br />Vocabulary<br />development<br />Generation<br />of the RDF Data<br />Publication<br />of the RDF data <br />Data cleansing<br />Linking <br />the RDF data<br />Enable effective <br />discovery<br />
    204. 204. DEMO<br />http://geo.linkeddata.es/<br />
    205. 205. Provinces<br />
    206. 206. IndustryProductionIndex – Capital of Province<br />
    207. 207. Rivers<br />
    208. 208. Beaches<br />
    209. 209. Future Work<br />Generate more datasets from other domains, e.g. universities in Spain.<br />Identify more links to DBPedia and Geonames.<br />Cover complex geometrical information, i.e. not only Point and LineString-like data; we will also treat information representation through polygons.<br />
    210. 210. Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br />Linked Data publication<br />MethodologicalguidelinesforLinked Data publication<br />RDB2RDF tools<br />Technicalaspects of Linked Data publication<br />Linked Data consumption<br />172<br />
    211. 211. Ontology-based Access to DBs<br />1<br />3<br />2<br />4<br />Build a new ontology from 1 DB schema and 1 DB<br />Align the ontology built with approach 1 with a legacy ontology<br />Align an existing DB with a legacy ontology<br /> a) Massive dump (semantic data warehouse)<br /> b) Query-driven<br />Align an ontology network with n DB schemas and other data sources<br /> a) Massive dump (semantic data warehouse)<br /> b) Query-driven<br />new ontology<br />existing ontology<br />
    212. 212. Ontology-based Access to Databases<br />Universidad<br />Profesor<br />Doctorando<br />Ontología<br />?<br />Organización<br />Personal<br />BDR<br />Modelo<br />Relacional<br />Pregunta: Nombre de los profesores de la universidad UPM<br />* Un profesor es una persona cuyo puesto es “docente”<br />* Una universidad es una organización de tipo “3”<br />Procesador<br />Procesado de la consulta de acuerdo a la descripción formal de correspondencia<br />Consulta: valores de la columna nombre de los registros de la tabla Personal para los que el valor de la columna puesto is “docente” que estén relacionados con al menos un registro de la tabla Organización con el valor “3” en la columna tipo y “UPM” en la columna nombre.<br />
    213. 213. Align data sourceswithlegacyontologies<br />Aeropuertos<br />Ontología O2<br />Ontología O1<br />Centro<br />Comunicaciones<br />PuntoGPS<br />Estación<br />Punto Europeo<br />Aeropuerto<br />PuntoAsiatico<br />PuntoEspañol<br />Aeropuerto<br />f (Aeropuertos)<br />=<br />PuntoEuropeo<br />f (Aeropuertos)<br />=<br />RC(O2,M1)<br />RC(O1,M1)<br />Modelo Relacional M1<br />
    214. 214. R2O<br /> is a declarative language to specify mappings between relational data sources and ontologies.<br /><xml><br />R2O Mapping<br /></xml><br />Organization<br />Persons<br />University<br />RDB<br />Professor<br />Student<br />Relational Model<br />Ontology<br />
    215. 215. Example: types of mappingsneeded<br />Attibute Mapping with transformation<br />(Regular Expression)<br />Attibute Direct Mapping<br />Relation Mapping w. Transformation<br />(Regular Expression)<br />Relation Mapping w. Transformation<br />(Keyword search)<br />
    216. 216. Population example (II)<br />Population example (II)<br />The Operation element defines a transformation based on a regular expression to be applied to the database column for extracting property values<br />
    217. 217. For concepts...<br />One or more concepts can be extracted from a single data field (not in 1NF).<br />A view maps exactly one concept in the ontology.<br />For attributes...<br />A column in a database view maps directly an attribute or a relation.<br />A subset of the columns in the view map a concept in the ontology.<br />A subset (selection) of the records of a database view map a concept in the ontology.<br />A column in a database view maps an attribute or a relation after some transformation.<br />A subset of the records of a database view map a concept in the onto. but the selection cannot be made using SQL.<br />A set of columns in a database view map an attribute or a relation.<br />R2O (Relational-to-Ontology) Language<br />
    218. 218. R2O Basic Syntax<br /><conceptmap-defname="Customer"><br /> <identified-by> Table key </identified-by><br /> <uri-as>operation</uri-as><br /> <applies-if>condition</applies-if><br /> <joins-via> expression </joins-via><br /> <documentation>description …</documentation><br /> <described-by>attributes,relations</described-by><br /></conceptmap-def><br /><attributemap-defname="http://esperonto/ff#Title"><br /> <aftertransform><br /> <operationoper-id="constant"><br /> <arg-restrictionon-param="const-val"><br /> <has-column>fsb_ajut.titol</has-column><br /> </arg-restriction><br /> </operation><br /> </aftertransform><br /></attributemap-def><br /><relationmap-defname="http://esperonto/ff#isCandidateFor"><br /> <to-concept name="http://esperonto/ff#FundOpp"><br /> <joins-via><br /> <operationoper-id=“equals"><br /> <arg-restrictionon-param="value1"><br /> <has-column>fsb_ajut.id</has-column><br /> </arg-restriction><br /> <arg-restriction on-param="value2"><br /> <has-column>fsb_candidate.forFund</has-column><br /> </arg-restriction><br /> </operation><br /> </joins-via><br /></relationmap-def><br />
    219. 219. ODEMapster<br /> generates RDF instances from relational instances based on the mapping description expressed in the R2O document <br />
    220. 220. 182<br />Mapping Design<br /><ul><li>3 Mapping Creation Steps
    221. 221. Load Ontology
    222. 222. Load Database(s)
    223. 223. Create mapping
    224. 224. 2 Usage Modes
    225. 225. Online mode (run time query execution)
    226. 226. Offline mode (materialized RDF dump)</li></li></ul><li>Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br />Linked Data publication<br />MethodologicalguidelinesforLinked Data publication<br />RDB2RDF tools<br />Technicalaspects of Linked Data publication<br />Linked Data consumption<br />183<br />
    227. 227. Using an RDF repository<br />Itallowsstoring and accessing RDF data<br />Forexample, SESAME (http://www.openrdf.org/)<br />Downloaditfromhttp://www.openrdf.org/download.jsp<br />openrdf-sesame-2.3.0-sdk.zip<br />Deploythe .war in Tomcat (JDK and Tomcatneeded)<br />Create a repository at<br />http://localhost:8080/openrdf-sesame<br />Check: <br />http://localhost:8080/openrdf-sesame/repositories/XXXX<br />http://localhost:8080/openrdf-sesame/repositories/XXX/statements<br />
    228. 228. Linked Data frontend<br />Toexpose data as Linked Data<br />Includingcontentnegotiation, etc.<br />Forexample, Pubby<br />http://www4.wiwiss.fu-berlin.de/pubby/<br />Installation<br />Use pubby-0.3.zip<br />Deploythewebapp folder (and rename)in Tomcat<br />Modify config.n3<br />Restarttomcat<br />Check: http://localhost:8080/XXX/<br />
    229. 229. REST API<br /><ul><li>Forexample, RDF2Go
    230. 230. Java abstractionover RDF repositories</li></ul>http://rdf2go.semweb4j.org/<br />
    231. 231. Add SPARQL explorer<br />Forexample, SNORQL (http://wiki.github.com/kurtjx/SNORQL/)<br />
    232. 232. ValidatingLinked Data URLs<br />http://validator.linkeddata.org/vapour<br />188<br />
    233. 233. Contents<br />IntroductiontoLinked Data<br />Linked Data Foundations: RDF, RDF Schema, SPARQL and OWL<br />Coffee break<br />Linked Data publication<br />MethodologicalguidelinesforLinked Data publication<br />RDB2RDF tools<br />Technicalaspects of Linked Data publication<br />Linked Data consumption<br />189<br />
    234. 234. RelFinder: finding relations in Linked Data<br />E.g., relations between films<br />“Pulp Fiction”, “Kill Bill” y “Reservoir Dogs”<br />
    235. 235. Exerciseon data.gov.uk<br /><ul><li>Publicschools in London thatcontaintheword “music”</li></li></ul><li>Exercise: find information in DBPedia<br />Image by http://www.flickr.com/photos/bflv/<br />http://dbpedia.org/resource/Darth_Vader)<br /><ul><li>Findficticious serial killers in DBPedia</li></ul>(etc)<br />
    236. 236. Designing URI sets forthePublic Sector (UK)<br />http://www.cabinetoffice.gov.uk/media/301253/puiblic_sector_uri.pdf<br />193<br />
    237. 237. Asociación Española de Linked Data<br />194<br />
    238. 238. Mini-curso sobre LinkedData<br />Oscar Corcho, Asunción Gómez Pérez ({ocorcho, asun}@fi.upm.es)<br />Universidad Politécnica de Madrid<br />Florianópolis, September 1st 2010(3º OntoBras 2010)<br />Credits: Raúl García Castro, Oscar Muñoz, Jose Angel Ramos Gargantilla, María del Carmen Suárez de Figueroa, Boris Villazón, Alex de León, Víctor Saquicela, Luis Vilches, Miguel Angel García, Manuel Salvadores, Juan Sequeda, Carlos Ruiz Moreno and manyothers<br />WorkdistributedunderthelicenseCreativeCommonsAttribution-Noncommercial-Share Alike 3.0<br />
    1. A particular slide catching your eye?

      Clipping is a handy way to collect important slides you want to go back to later.

    ×