Skip to content

Instantly share code, notes, and snippets.

@baskaufs
Created September 13, 2023 16:13
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save baskaufs/a1ec00c88246877aecb135588e32586b to your computer and use it in GitHub Desktop.
Save baskaufs/a1ec00c88246877aecb135588e32586b to your computer and use it in GitHub Desktop.
Query to use Service Description vocabulary to find metadata on named graphs
PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX skos: <http://www.w3.org/2004/02/skos/core#>
PREFIX skosxl: <http://www.w3.org/2008/05/skos-xl#>
PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
PREFIX dc: <http://purl.org/dc/elements/1.1/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX wd: <http://www.wikidata.org/entity/>
PREFIX wdt: <http://www.wikidata.org/prop/direct/>
PREFIX aat: <http://vocab.getty.edu/aat/>
PREFIX gvp: <http://vocab.getty.edu/ontology#>
PREFIX sd: <http://www.w3.org/ns/sparql-service-description#>
SELECT DISTINCT ?NamedGraph ?modified ?issued ?publisher ?status
FROM <https://sparql.vanderbilt.edu/graphs>
WHERE {
?Service sd:endpoint <https://sparql.vanderbilt.edu/sparql>.
?Service sd:availableGraphs ?GraphCollection.
?GraphCollection sd:namedGraph ?NamedGraph.
?NamedGraph dcterms:modified ?modified.
optional {?NamedGraph dcterms:issued ?issued.}
optional {?NamedGraph dc:publisher ?publisher.}
optional {?NamedGraph <http://rs.tdwg.org/dwc/terms/attributes/status> ?status.}
}
order by desc(?issued)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment