Skip to content
Ian Ibbotson edited this page Feb 27, 2017 · 17 revisions

SPARQL Endpoints

Live System

gokb.openlibraryfoundation.org/sparql

Test system (May not be available 24/7)

test-gokb.openlibraryfoundation.org/sparql

Resource types

Orgs, listing id and name

select ?s ?name where {
  ?s a <http://xmlns.com/foaf/0.1/Organization> .
  ?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?name
}

Run Query on test system (html)

All props for objects of type org

select ?s ?p ?o where {
  ?s a <http://xmlns.com/foaf/0.1/Organization> .
  ?s ?p ?o .
}
order by desc(?s)

Run Query (html)

All services (Platforms)

select ?s ?p ?o where {
  ?s a <http://purl.org/dc/dcmitype/Service> .
  ?s ?p ?o .
}
order by desc(?s)

Run Query on test system (html)

All packages (DC Collections)

select ?s ?p ?o where {
  ?s a <http://purl.org/dc/dcmitype/Collection> .
  ?s ?p ?o .
}
order by desc(?s)

Run Query on test system (html)

All works

select ?s ?p ?o where {
  ?s a <http://www.w3.org/2002/07/owl#Work> .
  ?s ?p ?o .
}
order by desc(?s)

Run Query on test system (html)

TIPPs

select ?s ?name where {
  ?s a <http://gokb.org/type/#tipp> .
  ?s <http://www.w3.org/2004/02/skos/core#prefLabel> ?name
}

Run Query on test system (html)

Testing remote query capability

SELECT ?p ?o
WHERE
{
 SERVICE <http://DBpedia.org/sparql>
{ SELECT ?p ?o
     WHERE { <http://dbpedia.org/resource/Saquarema> ?p ?o . }
 }
}

Run Query on test system (html)

prefLables like a string

select ?o ?v
where {
  ?o <http://www.w3.org/2004/02/skos/core#prefLabel> ?v .
  FILTER regex( ?o, ".*ourna.*", "i" ) .
}