SlideShare uma empresa Scribd logo
1 de 18
Baixar para ler offline
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)

Mais conteúdo relacionado

Mais procurados

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
 

Mais procurados (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
 

Semelhante 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
 

Semelhante 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
 

Mais 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
 

Mais 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

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfciinovamais
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingTeacherCyreneCayanan
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Celine George
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13Steve Thomason
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajanpragatimahajan3
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introductionMaksud Ahmed
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfAdmir Softic
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAssociation for Project Management
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfchloefrazer622
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsTechSoup
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxiammrhaywood
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfsanyamsingh5019
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Disha Kariya
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...EduSkills OECD
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpinRaunakKeshri1
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdfQucHHunhnh
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformChameera Dedduwage
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3JemimahLaneBuaron
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdfQucHHunhnh
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfJayanti Pande
 

Último (20)

Activity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdfActivity 01 - Artificial Culture (1).pdf
Activity 01 - Artificial Culture (1).pdf
 
fourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writingfourth grading exam for kindergarten in writing
fourth grading exam for kindergarten in writing
 
Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17Advanced Views - Calendar View in Odoo 17
Advanced Views - Calendar View in Odoo 17
 
The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13The Most Excellent Way | 1 Corinthians 13
The Most Excellent Way | 1 Corinthians 13
 
social pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajansocial pharmacy d-pharm 1st year by Pragati K. Mahajan
social pharmacy d-pharm 1st year by Pragati K. Mahajan
 
microwave assisted reaction. General introduction
microwave assisted reaction. General introductionmicrowave assisted reaction. General introduction
microwave assisted reaction. General introduction
 
Key note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdfKey note speaker Neum_Admir Softic_ENG.pdf
Key note speaker Neum_Admir Softic_ENG.pdf
 
APM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across SectorsAPM Welcome, APM North West Network Conference, Synergies Across Sectors
APM Welcome, APM North West Network Conference, Synergies Across Sectors
 
Arihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdfArihant handbook biology for class 11 .pdf
Arihant handbook biology for class 11 .pdf
 
Introduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The BasicsIntroduction to Nonprofit Accounting: The Basics
Introduction to Nonprofit Accounting: The Basics
 
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptxSOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
SOCIAL AND HISTORICAL CONTEXT - LFTVD.pptx
 
Sanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdfSanyam Choudhary Chemistry practical.pdf
Sanyam Choudhary Chemistry practical.pdf
 
Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..Sports & Fitness Value Added Course FY..
Sports & Fitness Value Added Course FY..
 
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
Presentation by Andreas Schleicher Tackling the School Absenteeism Crisis 30 ...
 
Student login on Anyboli platform.helpin
Student login on Anyboli platform.helpinStudent login on Anyboli platform.helpin
Student login on Anyboli platform.helpin
 
1029-Danh muc Sach Giao Khoa khoi 6.pdf
1029-Danh muc Sach Giao Khoa khoi  6.pdf1029-Danh muc Sach Giao Khoa khoi  6.pdf
1029-Danh muc Sach Giao Khoa khoi 6.pdf
 
A Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy ReformA Critique of the Proposed National Education Policy Reform
A Critique of the Proposed National Education Policy Reform
 
Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3Q4-W6-Restating Informational Text Grade 3
Q4-W6-Restating Informational Text Grade 3
 
1029 - Danh muc Sach Giao Khoa 10 . pdf
1029 -  Danh muc Sach Giao Khoa 10 . pdf1029 -  Danh muc Sach Giao Khoa 10 . pdf
1029 - Danh muc Sach Giao Khoa 10 . pdf
 
Web & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdfWeb & Social Media Analytics Previous Year Question Paper.pdf
Web & Social Media Analytics Previous Year Question Paper.pdf
 

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)