Skip to content

Instantly share code, notes, and snippets.

@mommi84
Last active July 10, 2020 23:57
Show Gist options
  • Save mommi84/31a1974f0400acb78c143378a5e4bbe7 to your computer and use it in GitHub Desktop.
Save mommi84/31a1974f0400acb78c143378a5e4bbe7 to your computer and use it in GitHub Desktop.
Get DBpedia file URLs by version and language.
#
# Endpoint: https://databus.dbpedia.org/repo/sparql
# Credits: @JJ-Author, @mommi84
#
PREFIX dataid: <http://dataid.dbpedia.org/ns/core#>
PREFIX dc: <http://purl.org/dc/terms/>
PREFIX dcat: <http://www.w3.org/ns/dcat#>
PREFIX dcv: <http://dataid.dbpedia.org/ns/cv#>
SELECT DISTINCT ?url WHERE {
?s dc:hasVersion ?version ;
dcat:distribution ?artifact .
?artifact dc:hasVersion ?version ;
dataid:formatExtension "ttl"^^<http://www.w3.org/2001/XMLSchema#string> ;
dcv:lang ?lang ;
dcat:downloadURL ?url .
VALUES (?version ?lang) {(
"2020.06.01"^^<http://www.w3.org/2001/XMLSchema#string>
"en"^^<http://www.w3.org/2001/XMLSchema#string>
)}
}
ORDER BY ?url
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment