Using Sparql with the Silkworm Directory

This form lets you run Sparql queries against the Directory

Sparql is a query language for semantic web data (find out more) and can be used to explore the data held in the directory. Some sample queries are listed at the end of this page which you should be able to copy and paste into the search box.




Useful namespaces

PREFIX sv: <http://schemas.talis.com/2005/service/schema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/> 
PREFIX dct: <http://purl.org/dc/terms/> 
PREFIX dctype: <http://purl.org/dc/dcmitype/> 
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#> 
PREFIX ad: <http://schemas.talis.com/2005/address/schema#> 
PREFIX lib: <http://schemas.talis.com/2005/library/schema#> 
PREFIX dir: <http://schemas.talis.com/2005/dir/schema#> 
PREFIX user: <http://schemas.talis.com/2005/user/schema#> 
PREFIX foaf: <http://xmlns.com/foaf/0.1/> 
PREFIX geo: <http://www.w3.org/2003/01/geo/wgs84_pos#>

Interesting queries

National Libraries of the World


PREFIX lib: <http://schemas.talis.com/2005/library/schema#> 
PREFIX dir: <http://schemas.talis.com/2005/dir/schema#>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> 
DESCRIBE ?loc
WHERE {
 <http://directory.talis.com/res/g20060313-natlib> 
   dir:member ?member.
 ?member dir:isAccessedVia ?loc .
 ?loc rdf:type lib:Library .

}

Full Service Description

This query returns a detailed RDF description of the web service used to access a collection. Replace ad9.sw with the collection identifier.

PREFIX dctype: <http://purl.org/dc/dcmitype/> 
PREFIX rdf:  <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX sv: <http://schemas.talis.com/2005/service/schema#>
PREFIX dir: <http://schemas.talis.com/2005/dir/schema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/> 

DESCRIBE  ?service ?set ?int ?oparam ?rparam ?resType ?repType 
WHERE {
      ?coll dir:isAccessedVia ?service .
      ?coll dc:identifier 'ad9.sw' .
      ?service rdf:type dctype:Service .
 
   OPTIONAL {
    ?service sv:interactionSet ?set .
    OPTIONAL {
      ?set sv:interaction ?int .
      OPTIONAL {
        ?int sv:requiredParameter ?rparam .
      }
      OPTIONAL {
        ?int sv:optionalParameter ?oparam .
      }
      OPTIONAL {
        ?int sv:resourceType ?resType .
      }
      OPTIONAL {
        ?int sv:representationType ?repType .
      }
 
 
    }
   }
 
 }