Beispiel für DESCRIBE in SPARQL

Mit dem SPARQL-Befehl DESCRIBE kann man aus einem SPARQL-Endpoint Informationen über Ressourcen anfordern. Aus der W3C-Recommendation zu SPARQL:

The DESCRIBE form returns a single result RDF graph containing RDF data about resources. This data is not prescribed by a SPARQL query, where the query client would need to know the structure of the RDF in the data source, but, instead, is determined by the SPARQL query processor. The query pattern is used to create a result set. The DESCRIBE form takes each of the resources identified in a solution, together with any resources directly named by IRI, and assembles a single RDF graph by taking a “description” which can come from any information available including the target RDF Dataset. The description is determined by the query service. The syntax DESCRIBE * is an abbreviation that describes all of the variables in a query.

Aktueller Fall, einfaches Beispiel: Ich möchte wissen, welche Informationen zu der Ressource http://dewey.info/class/020/ bereitstehen.

1
2
3
4
5
6
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
 
DESCRIBE ?p ?o WHERE {
<http://dewey.info/class/020/> ?p ?o
}
LIMIT 10

Und so sieht dann das Ergebnis aus. Als Ausgabeformat habe ich hier Turtle gewählt.

Ein Gedanke zu „Beispiel für DESCRIBE in SPARQL“

  1. Das hat doch nichts mehr mit Bibliothekswesen – so wie wir es kennen und behalten wollen – zu tun! Das prangere ich an!

Kommentare sind geschlossen.