Last active
May 17, 2017 09:33
-
-
Save jvsoest/b66afe91f4035c57efd315b4263b56f7 to your computer and use it in GitHub Desktop.
bio2rdf_location.sparql
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
prefix dcterm: <http://purl.org/dc/terms/> | |
prefix rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#> | |
prefix ctvoc: <http://bio2rdf.org/clinicaltrials_vocabulary:> | |
prefix ctres: <http://bio2rdf.org/clinicaltrials_resource:> | |
prefix ct: <http://bio2rdf.org/clinicaltrials:> | |
select ?trial ?location ?cityName ?countryName | |
where { | |
BIND(ct:NCT00005636 AS ?trial). | |
?trial ctvoc:location ?locationRes. | |
?locationRes dcterm:title ?location. | |
?locationRes ctvoc:address ?addressRes. | |
?addressRes ctvoc:city ?city. | |
?addressRes ctvoc:country ?country. | |
?addressRes ctvoc:zip ?zip. | |
BIND (IRI(CONCAT("http://bio2rdf.org/", ?city)) AS ?cityRes). | |
?cityRes dcterm:title ?cityName. | |
BIND (IRI(CONCAT("http://bio2rdf.org/", ?country)) AS ?countryRes). | |
?countryRes dcterm:title ?countryName. | |
BIND (IRI(CONCAT("http://bio2rdf.org/", ?zip)) AS ?zipRes). | |
OPTIONAL {?zipRes dcterm:title ?zipCode.} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment