Seems I don't grok SPARQL DESCRIBE queries. I need to retrieve the full graphs of resources matching a condition. On one SPARQL endpoint I have tried (Norwegian Rådata Nå, http://data.bibsys.no/data/query_authority.html) this works just fine:
PREFIX foaf: <http://xmlns.com/foaf/0.1/>
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX owl: <http://www.w3.org/2002/07/owl#>
DESCRIBE ?person WHERE {
?person rdf:type foaf:Person .
FILTER EXISTS { ?person owl:sameAs ?sameAs }
}
LIMIT 100
I get a result with Person resources that have an owl:sameAs
triple.
On other SPARQL endpoints, Onki Light (http://sparql.onki.fi/sparql.tpl) and DBPedia (http://dbpedia.org/sparql) a similar query
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
DESCRIBE ?x WHERE {
?x rdf:type skos:Concept .
FILTER EXISTS { ?x skos:prefLabel ?prefLabel }
}
LIMIT 100
returns lots of resources which have neither rdf:Type = skos:Concept
nor a skos:prefLabel
, so I am obviously not doing the query correctly. How should this kind of query be stated to produce the result I need?