-
Notifications
You must be signed in to change notification settings - Fork 7
Use Case: Ranking lodcloud lifesciences SPARQL endpoints
timrdf edited this page Mar 11, 2012
·
4 revisions
Lena is doing cool stuff.
multiple datasets talk about molecules, such as:
- http://thedatahub.org/dataset/chebi
- http://thedatahub.org/dataset/drugbank
- http://thedatahub.org/dataset?q=kegg
http://srvgal78.deri.ie:8080/sparql.jsp hits http://srvgal78.deri.ie:8080/granatum/query with:
prefix void: <http://rdfs.org/ns/void#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
select * where {
service <http://hcls.deri.org:8080/openrdf-sesame/repositories/memory> {
?sparqlEndpoint void:class ?class .
?class rdfs:label ?classLabel .
}
filter regex(?classLabel, "compound|molecule|drug", "i")
}
To get an RDF file listing the "datasets" (though, it'd be nice to tie this back to the original URIs of the datasets):
prefix void: <http://rdfs.org/ns/void#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dcat: <http://www.w3.org/ns/dcat#>
construct {
?sparqlEndpoint a void:Dataset ; a dcat:Dataset ; void:sparqlEndpoint ?sparqlEndpoint .
}
where {
service <http://hcls.deri.org:8080/openrdf-sesame/repositories/memory> {
?sparqlEndpoint void:class ?class .
?class rdfs:label ?classLabel .
}
filter regex(?classLabel, "compound|molecule|drug", "i")
}
prefix void: <http://rdfs.org/ns/void#>
prefix rdfs: <http://www.w3.org/2000/01/rdf-schema#>
prefix dcat: <http://www.w3.org/ns/dcat#>
construct {
?databugSp a void:Dataset ; a dcat:Dataset ; void:sparqlEndpoint ?sparqlEndpoint .
}
where {
service <http://hcls.deri.org:8080/openrdf-sesame/repositories/memory> {
?sparqlEndpoint void:class ?class .
?class rdfs:label ?classLabel .
}
filter regex(?classLabel, "compound|molecule|drug", "i")
service <http://semantic.ckan.net/sparql> {
?dataset void:sparqlEndpoint ?sparqlEndpoint .
}
}
Select just one (by identity): https://raw.github.com/timrdf/DataFAQs/master/services/sadi/faqt/access/lena-example-materials/sample-inputs/chebi-endpoint.ttl
Select everything in lifesciences (by tag): https://raw.github.com/timrdf/DataFAQs/master/services/sadi/core/select-datasets/by-ckan-tag-materials/sample-inputs/ckan-lifesciences.ttl