SlideShare una empresa de Scribd logo
1 de 18
Descargar para leer sin conexión
The
 Semantic Web Client Library
Consuming Linked Data in Your Applications




    http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/
Overview


   Introduction
   How does the library work?
   Using the command line tool
   Using the library in applications




                                    Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Example
   What's the interests of the people Tom knows?
       PREFIX foaf: <http://xmlns.com/foaf/0.1/>
       SELECT DISTINCT ?i WHERE {
          <http://kmi.open.ac.uk/people/tom/> foaf:knows ?p .
          ?p foaf:interest ?i
       }

   Answer:
     ● quot;travelquot;
     ● <http://tyne.shef.ac.uk/t-rex/>
     ● <http://www.3worlds.org/>
     ...
     ● <http://www.dcs.shef.ac.uk/%7Efabio/X-Media/>
     ● quot;new thingsquot;
     ● quot;climbingquot;

   29 RDF documents retrieved
                                   Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Main Features


   Enables to query the whole Web
     ● SPARQL queries
     ● find(SPO) queries

   Retrieves relevant RDF documents from the Web dynamically
     ● dereferences HTTP URIs
     ● follows rdfs:seeAlso links
     ● follows alternate or meta links in HTML headers
     ● queries Sindice

   Stores retrieved RDF documents as Named Graphs
   Supports GRDDL



                                 Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Query Processing


   Splitting SPARQL queries into triple patterns
       PREFIX foaf: <http://xmlns.com/foaf/0.1/>
       SELECT DISTINCT ?i WHERE {                    1
          <http://kmi.open.ac.uk/people/tom/> foaf:knows ?p .
          ?p foaf:interest ?i
       }    2
   Executing a directed-browsing algorithm for each triple pattern
     ● retrieves relevant RDF graphs iteratively
     ● finds matching triples (i.e. solutions) in retrieved graphs




                                    Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Directed-Browsing Algorithm
                   <http://kmi.op
                             en.ac.uk/peop                       1
                                            le/tom/> foaf:
 Step 1: Look up URIs in the triple pattern               knows ?p
   ● Look up of Tom's URI

       → GET http://kmi.open.ac.uk/people/tom/
                Accept: application/rdf+xml;q=1, text/html;q=0.5
       ← Response: 303 See Other (http://kmi.open.ac.uk/people/tom/html)
       → GET http://kmi.open.ac.uk/people/tom/html
       ← Response: HTML document with
          <link rel=quot;metaquot; type=quot;application/rdf+xmlquot;
                title=quot;FOAFquot; href=quot;/people/tom/rdfquot;/>
       → GET http://kmi.open.ac.uk/people/tom/rdf
       ← Response: RDF document
   ●   Look up of http://xmlns.com/foaf/0.1/knows
       - similar procedure
       - RDF document from http://xmlns.com/foaf/spec/
                                       Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Directed-Browsing Algorithm
                 <http://kmi.op
                               en.ac.uk/peop                     1
                                            le/tom/> foaf:
 Step 2: Follow rdfs:seeAlso links                        knows ?p

        FOR EACH triple ( a, rdfs:seeAlso, b ) in the local graph set
                   where a is a URI in the current triple pattern DO
          Look up b

   ●   For 1 we have:
           ( <http://kmi.open.ac.uk/people/tom/> , rdfs:seeAlso , ?t )
       and
           ( foaf:knows , rdfs:seeAlso , ?k )
   ●   Look up each URI that matches ?t or ?k




                                      Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Directed-Browsing Algorithm
                <http://kmi.op
                               en.ac.uk/peop                      1
                                             le/tom/> foaf:
 Step 3: Match the triple pattern                          knows ?p
          against all graphs in the local graph set
   ● For 1 we get:
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff0 )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/enrico-motta/> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://danbri.org/foaf.rdf#danbri> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://www.dcs.shef.ac.uk/~sam/foaf.rdf#samchapman> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff4 )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://semanticweb.org/id/Richard_Cyganiak> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://semanticweb.org/id/Chris_Bizer> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff8 )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/michele-pasin/> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://www.semantic-web.at/people/blumauer/card#me> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/jianhan-zhu/> )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff1 )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7fee )
( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/marian-petre/> )
 ...
                                                           Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Directed-Browsing Algorithm
                           <http://kmi.op
                                                en.ac.uk/peop                                        1
                                                                      le/tom/> foaf:
 Step 4: For each matching triple:                                                        knows ?p
  e.g. ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://semanticweb.org/id/Richard_Cyganiak> )
  1. Look up all new URIs in the triple
   ● For <http://semanticweb.org/id/Richard_Cyganiak>
      we retrieve a new RDF document from:
             http://semanticweb.org/index.php?title=Special:ExportRD ►
             F/Richard_Cyganiak&xmlmime=rdf
  2. Follow rdfs:seeAlso links for all new URIs in the triple
   ● For <http://semanticweb.org/id/Richard_Cyganiak> we find

                                                              Tom's FOAF document
          ...
          <http://semanticweb.org/id/Richard_Cyganiak>
                            rdfs:seeAlso <http://richard.cyganiak.de/foaf.rdf> .
          ...
      ●   New document http://richard.cyganiak.de/foaf.rdf
                                                       Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Directed-Browsing Algorithm
                   <http://kmi.op
                              en.ac.uk/peop                      1
                                            le/tom/> foaf:
 Step 4: For each matching triple ...                     knows ?p
   ● overall 21 new graphs in local graph set

   Step 5: Match the triple pattern against all newly
            retrieved graphs
     ● nothing new for 1

   Step 6: Repeat steps 4 and 5 alternately until
     ● no new matching triples in step 5,
     ● maximum number of retrieval steps reached, or
     ● timeout reached

   Another query:
     ● triple pattern: ?p1 foaf:knows ?p2
     ● seeded with Tom's FOAF document
     ● after 1min: 9812 matching triples, 372 graphs

                                     Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Sindice Support


   Sindice
     ● index of documents with structured data
     ● provides an API to find documents
     ● URI-based search: finds documents that mention the given URI

   URI look up triggers a query to the Sindice service
   More complete results:
     ● triple pattern: ?prop rdfs:range foaf:Person
     ● 1 matching triple without Sindice look up
     ● 19 matching triples with Sindice look up

   Beware: number of discovered graphs may grow significantly
     ● 2 graphs vs. 134 graphs




                                    Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Implementation


   Implemented in Java
   Based on the Jena framework
   BSD license
   Part of the NG4J (Named Graphs API for Jena)
     ● extends Jena with methods the parse, manipulate, query, and
       serialize sets of Named Graphs
   Multi-threaded for faster retrieval




                                    Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Command Line Tool
   Execute SPARQL or find(SPO) queries
./bin/semwebquery -retrieveduris -sindice
    -find quot;ANY rdfs:range <http://xmlns.com/foaf/0.1/Person>quot;
   Parameters (selection):
     -find <Filename> – executes a find(SPO) query (use ANY as
                          wildcard)
     -sparql <Query> – executes the given SPARQL query
     -sparqlfile <Filename> – executes the SPARQL query in the
                                 specified file
     -load <URI> – loads graph from the given URI into local cache
                    before execution
     -sindice – enables Sindice-based URI search during execution
     -maxsteps <Integer> – sets maximum number of retrieval steps
     -timeout <Integer> – sets timeout of the query in seconds

                                   Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Using the Library


   Main interface: SemanticWebClient class
     ● implements the NamedGraphSet interface defined by NG4J
     ● methods (selection):

     read(url,lang) – reads a Named Graph into the local graph set
     addRemoteGraph(uri) – issues a URI look up
     find(pattern) – executes find(SPO) query and returns iterator
                       over all matching triples
     asJenaModel(nameOfDfltGraph) – returns a jena model view
                                          on the local graph set




                                   Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Using the Library
import com.hp.hpl.jena.query.*;
import de.fuberlin.wiwiss.ng4j.semwebclient.SemanticWebClient;

SemanticWebClient semweb = new SemanticWebClient();

String queryString = ...   // Specify the query

// Execute the query and obtain the results
Query query = QueryFactory.create( queryString );
QueryExecution qe = QueryExecutionFactory.create( query,
                                     semweb.asJenaModel(quot;defaultquot;) );
ResultSet results = qe.execSelect();

// Consume the results
while ( results.hasNext() )
{
  QuerySolution s = results.nextSolution();
  ...
}
                                     Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Using the Library

   Methods of SemanticWebClient for custom control:
     reloadRemoteGraph(uri) – refresh local copy
     clear() – clears the local graph set
     requestDereferencing(uri,step,listener) – initiates
                                                 URI look up
     requestDereferencingWithSearch(uri,step,
                                    derefListener,
                                    searchListener)
     setConfig(option,value) – sets configuration option
     ●   CONFIG_MAXSTEPS
     ●   CONFIG_TIMEOUT
     ●   CONFIG_DEREF_CONNECT_TIMEOUT
     ●   CONFIG_DEREF_READ_TIMEOUT
     ●   CONFIG_ENABLE_SINDICE
     ●   ...
                                   Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Provenance Information

   SemWebTriple class
     ● provided by find(pattern) method of SemanticWebClient
     ● method getSource() returns URI of the containing graph

   Provenance graph
     ● always in the local graph set
     ● contains statements about the source URL and retrieval time for
       each retrieved graph
   Dereferenced URIs
     ● lists of successfully and unsuccessfully retrieved URIs

           successfullyDereferencedURIs()
           unsuccessfullyDereferencedURIs()
     ●   information about redirected URIs
           redirectedURIs()
           getRedirectURI(uri)

                                      Olaf Hartig: The Semantic Web Client Library (10/27/2008)
Conclusion


   The Semantic Web Client Library
     ● enables queries over the whole Web
     ● dynamically retrieves RDF data during query execution
     ● is available from:
                http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/

   Future work:
     ● smart caching and replacement of retrieved graphs




                                      Olaf Hartig: The Semantic Web Client Library (10/27/2008)

Más contenido relacionado

La actualidad más candente

Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And VisualizationIvan Ermilov
 
Getting Started With The Talis Platform
Getting Started With The Talis PlatformGetting Started With The Talis Platform
Getting Started With The Talis PlatformLeigh Dodds
 
Profiling Web Archives
Profiling Web ArchivesProfiling Web Archives
Profiling Web ArchivesMichael Nelson
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsDr. Neil Brittliff
 
18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italiani
18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italiani18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italiani
18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italianiDiego Valerio Camarda
 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelabCAMELIA BOBAN
 
Learning Multilingual Semantics from Big Data on the Web
Learning Multilingual Semantics from Big Data on the WebLearning Multilingual Semantics from Big Data on the Web
Learning Multilingual Semantics from Big Data on the WebGerard de Melo
 

La actualidad más candente (14)

Data Integration And Visualization
Data Integration And VisualizationData Integration And Visualization
Data Integration And Visualization
 
tit
tittit
tit
 
Getting Started With The Talis Platform
Getting Started With The Talis PlatformGetting Started With The Talis Platform
Getting Started With The Talis Platform
 
Defcon 18: FOCA 2
Defcon 18: FOCA 2Defcon 18: FOCA 2
Defcon 18: FOCA 2
 
Profiling Web Archives
Profiling Web ArchivesProfiling Web Archives
Profiling Web Archives
 
Keynote session - LOD2014 W3C event
Keynote session - LOD2014 W3C eventKeynote session - LOD2014 W3C event
Keynote session - LOD2014 W3C event
 
La nueva FOCA 2.7
La nueva FOCA 2.7La nueva FOCA 2.7
La nueva FOCA 2.7
 
A Little SPARQL in your Analytics
A Little SPARQL in your AnalyticsA Little SPARQL in your Analytics
A Little SPARQL in your Analytics
 
18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italiani
18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italiani18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italiani
18 ° Nexa Lunch Seminar - Lo stato dell'arte dei Linked Open Data italiani
 
RDF Transformations
RDF TransformationsRDF Transformations
RDF Transformations
 
GDG Meets U event - Big data & Wikidata - no lies codelab
GDG Meets U event - Big data & Wikidata -  no lies codelabGDG Meets U event - Big data & Wikidata -  no lies codelab
GDG Meets U event - Big data & Wikidata - no lies codelab
 
RDF, linked data and semantic web
RDF, linked data and semantic webRDF, linked data and semantic web
RDF, linked data and semantic web
 
Bio2RDF@BH2010
Bio2RDF@BH2010Bio2RDF@BH2010
Bio2RDF@BH2010
 
Learning Multilingual Semantics from Big Data on the Web
Learning Multilingual Semantics from Big Data on the WebLearning Multilingual Semantics from Big Data on the Web
Learning Multilingual Semantics from Big Data on the Web
 

Similar a The Semantic Web Client Library - Consuming Linked Data in Your Applications

Database Researchers Map
Database Researchers MapDatabase Researchers Map
Database Researchers MapOlaf Hartig
 
Semantic Web
Semantic WebSemantic Web
Semantic Webhardchiu
 
Web data from R
Web data from RWeb data from R
Web data from Rschamber
 
Culture Geeks Feb talk: Adventures in Linked Data Land
Culture Geeks Feb talk: Adventures in Linked Data LandCulture Geeks Feb talk: Adventures in Linked Data Land
Culture Geeks Feb talk: Adventures in Linked Data Landval.cartei
 
Linked opendata parisemantique.fr - 24062011
Linked opendata   parisemantique.fr - 24062011Linked opendata   parisemantique.fr - 24062011
Linked opendata parisemantique.fr - 24062011Loïc Dias Da Silva
 
Mashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 UnconferenceMashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 UnconferenceElad Elrom
 
Geekup Sheffield Semantic Web Primer
Geekup Sheffield Semantic Web PrimerGeekup Sheffield Semantic Web Primer
Geekup Sheffield Semantic Web Primerianibbo
 
Experiments in Data Portability 2
Experiments in Data Portability 2Experiments in Data Portability 2
Experiments in Data Portability 2Glenn Jones
 
Exploiter le Web Semantic, le comprendre et y contribuer
Exploiter le Web Semantic, le comprendre et y contribuerExploiter le Web Semantic, le comprendre et y contribuer
Exploiter le Web Semantic, le comprendre et y contribuerMathieu d'Aquin
 
EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)
EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)
EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)Driek Heesakkers
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Storesandyseaborne
 
How I built the demo's
How I built the demo'sHow I built the demo's
How I built the demo'sGlenn Jones
 
(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web PagesMichael Nelson
 
How to connect social media with open standards
How to connect social media with open standardsHow to connect social media with open standards
How to connect social media with open standardsGlenn Jones
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...ruyalarcon
 
Ks2008 Semanticweb In Action
Ks2008 Semanticweb In ActionKs2008 Semanticweb In Action
Ks2008 Semanticweb In ActionRinke Hoekstra
 
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuffBuildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuffPatrick Shuff
 

Similar a The Semantic Web Client Library - Consuming Linked Data in Your Applications (20)

Database Researchers Map
Database Researchers MapDatabase Researchers Map
Database Researchers Map
 
Semantic Web
Semantic WebSemantic Web
Semantic Web
 
Web data from R
Web data from RWeb data from R
Web data from R
 
Culture Geeks Feb talk: Adventures in Linked Data Land
Culture Geeks Feb talk: Adventures in Linked Data LandCulture Geeks Feb talk: Adventures in Linked Data Land
Culture Geeks Feb talk: Adventures in Linked Data Land
 
Linked opendata parisemantique.fr - 24062011
Linked opendata   parisemantique.fr - 24062011Linked opendata   parisemantique.fr - 24062011
Linked opendata parisemantique.fr - 24062011
 
Mashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 UnconferenceMashups MAX 360|MAX 2008 Unconference
Mashups MAX 360|MAX 2008 Unconference
 
Geekup Sheffield Semantic Web Primer
Geekup Sheffield Semantic Web PrimerGeekup Sheffield Semantic Web Primer
Geekup Sheffield Semantic Web Primer
 
Experiments in Data Portability 2
Experiments in Data Portability 2Experiments in Data Portability 2
Experiments in Data Portability 2
 
Exploiter le Web Semantic, le comprendre et y contribuer
Exploiter le Web Semantic, le comprendre et y contribuerExploiter le Web Semantic, le comprendre et y contribuer
Exploiter le Web Semantic, le comprendre et y contribuer
 
EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)
EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)
EJME: Enhanced Journals Made Easy (2011-11-14, KX Bonn)
 
NoSQL and Triple Stores
NoSQL and Triple StoresNoSQL and Triple Stores
NoSQL and Triple Stores
 
SearchMonkey
SearchMonkeySearchMonkey
SearchMonkey
 
How I built the demo's
How I built the demo'sHow I built the demo's
How I built the demo's
 
Sitemap4rdf(v2 boris)
Sitemap4rdf(v2 boris)Sitemap4rdf(v2 boris)
Sitemap4rdf(v2 boris)
 
(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages(Re-) Discovering Lost Web Pages
(Re-) Discovering Lost Web Pages
 
How to connect social media with open standards
How to connect social media with open standardsHow to connect social media with open standards
How to connect social media with open standards
 
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
Fulfilling the Hypermedia Constraint via HTTP OPTIONS, The HTTP Vocabulary In...
 
Ks2008 Semanticweb In Action
Ks2008 Semanticweb In ActionKs2008 Semanticweb In Action
Ks2008 Semanticweb In Action
 
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuffBuildinga billionuserloadbalancer may2015-sre-con15europe-shuff
Buildinga billionuserloadbalancer may2015-sre-con15europe-shuff
 
Web of data
Web of dataWeb of data
Web of data
 

Más de Olaf Hartig

LDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked DataLDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked DataOlaf Hartig
 
A Context-Based Semantics for SPARQL Property Paths over the Web
A Context-Based Semantics for SPARQL Property Paths over the WebA Context-Based Semantics for SPARQL Property Paths over the Web
A Context-Based Semantics for SPARQL Property Paths over the WebOlaf Hartig
 
Rethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result VisualizationRethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result VisualizationOlaf Hartig
 
Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...
Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...
Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...Olaf Hartig
 
Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...
Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...
Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...Olaf Hartig
 
Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...
Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...
Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...Olaf Hartig
 
Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...
Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...
Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...Olaf Hartig
 
Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)
Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)
Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)Olaf Hartig
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Olaf Hartig
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...Olaf Hartig
 
An Overview on PROV-AQ: Provenance Access and Query
An Overview on PROV-AQ: Provenance Access and QueryAn Overview on PROV-AQ: Provenance Access and Query
An Overview on PROV-AQ: Provenance Access and QueryOlaf Hartig
 
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)Olaf Hartig
 
Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...
Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...
Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...Olaf Hartig
 
The Impact of Data Caching of on Query Execution for Linked Data
The Impact of Data Caching of on Query Execution for Linked DataThe Impact of Data Caching of on Query Execution for Linked Data
The Impact of Data Caching of on Query Execution for Linked DataOlaf Hartig
 
How Caching Improves Efficiency and Result Completeness for Querying Linked Data
How Caching Improves Efficiency and Result Completeness for Querying Linked DataHow Caching Improves Efficiency and Result Completeness for Querying Linked Data
How Caching Improves Efficiency and Result Completeness for Querying Linked DataOlaf Hartig
 
A Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked DataA Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked DataOlaf Hartig
 
Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...
Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...
Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...Olaf Hartig
 
Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)
Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)
Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)Olaf Hartig
 
Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Olaf Hartig
 
Answers to usual issues in getting started with consuming Linked Data (2010)
Answers to usual issues in getting started with consuming Linked Data (2010)Answers to usual issues in getting started with consuming Linked Data (2010)
Answers to usual issues in getting started with consuming Linked Data (2010)Olaf Hartig
 

Más de Olaf Hartig (20)

LDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked DataLDQL: A Query Language for the Web of Linked Data
LDQL: A Query Language for the Web of Linked Data
 
A Context-Based Semantics for SPARQL Property Paths over the Web
A Context-Based Semantics for SPARQL Property Paths over the WebA Context-Based Semantics for SPARQL Property Paths over the Web
A Context-Based Semantics for SPARQL Property Paths over the Web
 
Rethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result VisualizationRethinking Online SPARQL Querying to Support Incremental Result Visualization
Rethinking Online SPARQL Querying to Support Incremental Result Visualization
 
Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...
Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...
Tutorial "Linked Data Query Processing" Part 5 "Query Planning and Optimizati...
 
Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...
Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...
Tutorial "Linked Data Query Processing" Part 4 "Execution Process" (WWW 2013 ...
 
Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...
Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...
Tutorial "Linked Data Query Processing" Part 3 "Source Selection Strategies" ...
 
Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...
Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...
Tutorial "Linked Data Query Processing" Part 2 "Theoretical Foundations" (WWW...
 
Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)
Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)
Tutorial "Linked Data Query Processing" Part 1 "Introduction" (WWW 2013 Ed.)
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 2 (...
 
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
Tutorial "An Introduction to SPARQL and Queries over Linked Data" Chapter 1 (...
 
An Overview on PROV-AQ: Provenance Access and Query
An Overview on PROV-AQ: Provenance Access and QueryAn Overview on PROV-AQ: Provenance Access and Query
An Overview on PROV-AQ: Provenance Access and Query
 
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
(An Overview on) Linked Data Management and SPARQL Querying (ISSLOD2011)
 
Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...
Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...
Zero-Knowledge Query Planning for an Iterator Implementation of Link Traversa...
 
The Impact of Data Caching of on Query Execution for Linked Data
The Impact of Data Caching of on Query Execution for Linked DataThe Impact of Data Caching of on Query Execution for Linked Data
The Impact of Data Caching of on Query Execution for Linked Data
 
How Caching Improves Efficiency and Result Completeness for Querying Linked Data
How Caching Improves Efficiency and Result Completeness for Querying Linked DataHow Caching Improves Efficiency and Result Completeness for Querying Linked Data
How Caching Improves Efficiency and Result Completeness for Querying Linked Data
 
A Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked DataA Main Memory Index Structure to Query Linked Data
A Main Memory Index Structure to Query Linked Data
 
Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...
Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...
Towards a Data-Centric Notion of Trust in the Semantic Web (A Position Statem...
 
Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)
Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)
Brief Introduction to the Provenance Vocabulary (for W3C prov-xg)
 
Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)Querying Linked Data with SPARQL (2010)
Querying Linked Data with SPARQL (2010)
 
Answers to usual issues in getting started with consuming Linked Data (2010)
Answers to usual issues in getting started with consuming Linked Data (2010)Answers to usual issues in getting started with consuming Linked Data (2010)
Answers to usual issues in getting started with consuming Linked Data (2010)
 

Último

Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptxraviapr7
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesMohammad Hassany
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphNetziValdelomar1
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...raviapr7
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17Celine George
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxAditiChauhan701637
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...Nguyen Thanh Tu Collection
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICESayali Powar
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfTechSoup
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.EnglishCEIPdeSigeiro
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfYu Kanazawa / Osaka University
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxMYDA ANGELICA SUAN
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice documentXsasf Sfdfasd
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptxmary850239
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxDr. Santhosh Kumar. N
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17Celine George
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.raviapr7
 

Último (20)

Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptxClinical Pharmacy  Introduction to Clinical Pharmacy, Concept of clinical pptx
Clinical Pharmacy Introduction to Clinical Pharmacy, Concept of clinical pptx
 
Human-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming ClassesHuman-AI Co-Creation of Worked Examples for Programming Classes
Human-AI Co-Creation of Worked Examples for Programming Classes
 
Presentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a ParagraphPresentation on the Basics of Writing. Writing a Paragraph
Presentation on the Basics of Writing. Writing a Paragraph
 
Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...Patient Counselling. Definition of patient counseling; steps involved in pati...
Patient Counselling. Definition of patient counseling; steps involved in pati...
 
How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17How to Add Existing Field in One2Many Tree View in Odoo 17
How to Add Existing Field in One2Many Tree View in Odoo 17
 
In - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptxIn - Vivo and In - Vitro Correlation.pptx
In - Vivo and In - Vitro Correlation.pptx
 
UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024UKCGE Parental Leave Discussion March 2024
UKCGE Parental Leave Discussion March 2024
 
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
CHUYÊN ĐỀ DẠY THÊM TIẾNG ANH LỚP 11 - GLOBAL SUCCESS - NĂM HỌC 2023-2024 - HK...
 
Quality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICEQuality Assurance_GOOD LABORATORY PRACTICE
Quality Assurance_GOOD LABORATORY PRACTICE
 
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdfMaximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
Maximizing Impact_ Nonprofit Website Planning, Budgeting, and Design.pdf
 
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdfPersonal Resilience in Project Management 2 - TV Edit 1a.pdf
Personal Resilience in Project Management 2 - TV Edit 1a.pdf
 
Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.Easter in the USA presentation by Chloe.
Easter in the USA presentation by Chloe.
 
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdfP4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
P4C x ELT = P4ELT: Its Theoretical Background (Kanazawa, 2024 March).pdf
 
Patterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptxPatterns of Written Texts Across Disciplines.pptx
Patterns of Written Texts Across Disciplines.pptx
 
The Singapore Teaching Practice document
The Singapore Teaching Practice documentThe Singapore Teaching Practice document
The Singapore Teaching Practice document
 
3.21.24 The Origins of Black Power.pptx
3.21.24  The Origins of Black Power.pptx3.21.24  The Origins of Black Power.pptx
3.21.24 The Origins of Black Power.pptx
 
M-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptxM-2- General Reactions of amino acids.pptx
M-2- General Reactions of amino acids.pptx
 
How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17How to Add a New Field in Existing Kanban View in Odoo 17
How to Add a New Field in Existing Kanban View in Odoo 17
 
Prelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quizPrelims of Kant get Marx 2.0: a general politics quiz
Prelims of Kant get Marx 2.0: a general politics quiz
 
Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.Drug Information Services- DIC and Sources.
Drug Information Services- DIC and Sources.
 

The Semantic Web Client Library - Consuming Linked Data in Your Applications

  • 1. The Semantic Web Client Library Consuming Linked Data in Your Applications http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/
  • 2. Overview  Introduction  How does the library work?  Using the command line tool  Using the library in applications Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 3. Example  What's the interests of the people Tom knows? PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT DISTINCT ?i WHERE { <http://kmi.open.ac.uk/people/tom/> foaf:knows ?p . ?p foaf:interest ?i }  Answer: ● quot;travelquot; ● <http://tyne.shef.ac.uk/t-rex/> ● <http://www.3worlds.org/> ... ● <http://www.dcs.shef.ac.uk/%7Efabio/X-Media/> ● quot;new thingsquot; ● quot;climbingquot;  29 RDF documents retrieved Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 4. Main Features  Enables to query the whole Web ● SPARQL queries ● find(SPO) queries  Retrieves relevant RDF documents from the Web dynamically ● dereferences HTTP URIs ● follows rdfs:seeAlso links ● follows alternate or meta links in HTML headers ● queries Sindice  Stores retrieved RDF documents as Named Graphs  Supports GRDDL Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 5. Query Processing  Splitting SPARQL queries into triple patterns PREFIX foaf: <http://xmlns.com/foaf/0.1/> SELECT DISTINCT ?i WHERE { 1 <http://kmi.open.ac.uk/people/tom/> foaf:knows ?p . ?p foaf:interest ?i } 2  Executing a directed-browsing algorithm for each triple pattern ● retrieves relevant RDF graphs iteratively ● finds matching triples (i.e. solutions) in retrieved graphs Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 6. Directed-Browsing Algorithm <http://kmi.op en.ac.uk/peop 1 le/tom/> foaf:  Step 1: Look up URIs in the triple pattern knows ?p ● Look up of Tom's URI → GET http://kmi.open.ac.uk/people/tom/ Accept: application/rdf+xml;q=1, text/html;q=0.5 ← Response: 303 See Other (http://kmi.open.ac.uk/people/tom/html) → GET http://kmi.open.ac.uk/people/tom/html ← Response: HTML document with <link rel=quot;metaquot; type=quot;application/rdf+xmlquot; title=quot;FOAFquot; href=quot;/people/tom/rdfquot;/> → GET http://kmi.open.ac.uk/people/tom/rdf ← Response: RDF document ● Look up of http://xmlns.com/foaf/0.1/knows - similar procedure - RDF document from http://xmlns.com/foaf/spec/ Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 7. Directed-Browsing Algorithm <http://kmi.op en.ac.uk/peop 1 le/tom/> foaf:  Step 2: Follow rdfs:seeAlso links knows ?p FOR EACH triple ( a, rdfs:seeAlso, b ) in the local graph set where a is a URI in the current triple pattern DO Look up b ● For 1 we have: ( <http://kmi.open.ac.uk/people/tom/> , rdfs:seeAlso , ?t ) and ( foaf:knows , rdfs:seeAlso , ?k ) ● Look up each URI that matches ?t or ?k Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 8. Directed-Browsing Algorithm <http://kmi.op en.ac.uk/peop 1 le/tom/> foaf:  Step 3: Match the triple pattern knows ?p against all graphs in the local graph set ● For 1 we get: ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff0 ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/enrico-motta/> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://danbri.org/foaf.rdf#danbri> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://www.dcs.shef.ac.uk/~sam/foaf.rdf#samchapman> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff4 ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://semanticweb.org/id/Richard_Cyganiak> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://semanticweb.org/id/Chris_Bizer> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff8 ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/michele-pasin/> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://www.semantic-web.at/people/blumauer/card#me> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/jianhan-zhu/> ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7ff1 ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , -11454bb1:11d1409ca3c:-7fee ) ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://identifiers.kmi.open.ac.uk/people/marian-petre/> ) ... Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 9. Directed-Browsing Algorithm <http://kmi.op en.ac.uk/peop 1 le/tom/> foaf:  Step 4: For each matching triple: knows ?p e.g. ( <http://kmi.open.ac.uk/people/tom/> , foaf:knows , <http://semanticweb.org/id/Richard_Cyganiak> ) 1. Look up all new URIs in the triple ● For <http://semanticweb.org/id/Richard_Cyganiak> we retrieve a new RDF document from: http://semanticweb.org/index.php?title=Special:ExportRD ► F/Richard_Cyganiak&xmlmime=rdf 2. Follow rdfs:seeAlso links for all new URIs in the triple ● For <http://semanticweb.org/id/Richard_Cyganiak> we find Tom's FOAF document ... <http://semanticweb.org/id/Richard_Cyganiak> rdfs:seeAlso <http://richard.cyganiak.de/foaf.rdf> . ... ● New document http://richard.cyganiak.de/foaf.rdf Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 10. Directed-Browsing Algorithm <http://kmi.op en.ac.uk/peop 1 le/tom/> foaf:  Step 4: For each matching triple ... knows ?p ● overall 21 new graphs in local graph set  Step 5: Match the triple pattern against all newly retrieved graphs ● nothing new for 1  Step 6: Repeat steps 4 and 5 alternately until ● no new matching triples in step 5, ● maximum number of retrieval steps reached, or ● timeout reached  Another query: ● triple pattern: ?p1 foaf:knows ?p2 ● seeded with Tom's FOAF document ● after 1min: 9812 matching triples, 372 graphs Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 11. Sindice Support  Sindice ● index of documents with structured data ● provides an API to find documents ● URI-based search: finds documents that mention the given URI  URI look up triggers a query to the Sindice service  More complete results: ● triple pattern: ?prop rdfs:range foaf:Person ● 1 matching triple without Sindice look up ● 19 matching triples with Sindice look up  Beware: number of discovered graphs may grow significantly ● 2 graphs vs. 134 graphs Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 12. Implementation  Implemented in Java  Based on the Jena framework  BSD license  Part of the NG4J (Named Graphs API for Jena) ● extends Jena with methods the parse, manipulate, query, and serialize sets of Named Graphs  Multi-threaded for faster retrieval Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 13. Command Line Tool  Execute SPARQL or find(SPO) queries ./bin/semwebquery -retrieveduris -sindice -find quot;ANY rdfs:range <http://xmlns.com/foaf/0.1/Person>quot;  Parameters (selection): -find <Filename> – executes a find(SPO) query (use ANY as wildcard) -sparql <Query> – executes the given SPARQL query -sparqlfile <Filename> – executes the SPARQL query in the specified file -load <URI> – loads graph from the given URI into local cache before execution -sindice – enables Sindice-based URI search during execution -maxsteps <Integer> – sets maximum number of retrieval steps -timeout <Integer> – sets timeout of the query in seconds Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 14. Using the Library  Main interface: SemanticWebClient class ● implements the NamedGraphSet interface defined by NG4J ● methods (selection): read(url,lang) – reads a Named Graph into the local graph set addRemoteGraph(uri) – issues a URI look up find(pattern) – executes find(SPO) query and returns iterator over all matching triples asJenaModel(nameOfDfltGraph) – returns a jena model view on the local graph set Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 15. Using the Library import com.hp.hpl.jena.query.*; import de.fuberlin.wiwiss.ng4j.semwebclient.SemanticWebClient; SemanticWebClient semweb = new SemanticWebClient(); String queryString = ... // Specify the query // Execute the query and obtain the results Query query = QueryFactory.create( queryString ); QueryExecution qe = QueryExecutionFactory.create( query, semweb.asJenaModel(quot;defaultquot;) ); ResultSet results = qe.execSelect(); // Consume the results while ( results.hasNext() ) { QuerySolution s = results.nextSolution(); ... } Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 16. Using the Library  Methods of SemanticWebClient for custom control: reloadRemoteGraph(uri) – refresh local copy clear() – clears the local graph set requestDereferencing(uri,step,listener) – initiates URI look up requestDereferencingWithSearch(uri,step, derefListener, searchListener) setConfig(option,value) – sets configuration option ● CONFIG_MAXSTEPS ● CONFIG_TIMEOUT ● CONFIG_DEREF_CONNECT_TIMEOUT ● CONFIG_DEREF_READ_TIMEOUT ● CONFIG_ENABLE_SINDICE ● ... Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 17. Provenance Information  SemWebTriple class ● provided by find(pattern) method of SemanticWebClient ● method getSource() returns URI of the containing graph  Provenance graph ● always in the local graph set ● contains statements about the source URL and retrieval time for each retrieved graph  Dereferenced URIs ● lists of successfully and unsuccessfully retrieved URIs successfullyDereferencedURIs() unsuccessfullyDereferencedURIs() ● information about redirected URIs redirectedURIs() getRedirectURI(uri) Olaf Hartig: The Semantic Web Client Library (10/27/2008)
  • 18. Conclusion  The Semantic Web Client Library ● enables queries over the whole Web ● dynamically retrieves RDF data during query execution ● is available from: http://www4.wiwiss.fu-berlin.de/bizer/ng4j/semwebclient/  Future work: ● smart caching and replacement of retrieved graphs Olaf Hartig: The Semantic Web Client Library (10/27/2008)