Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save michimau/b0fe0b2ab6eb92f0e3c9bd45f68ce637 to your computer and use it in GitHub Desktop.
Save michimau/b0fe0b2ab6eb92f0e3c9bd45f68ce637 to your computer and use it in GitHub Desktop.
query:getSamplingPoint($cdrUrl as xs:string)
#https://svn.eionet.europa.eu/repositories/Reportnet/AirQuality/trunk/xqueries/aqd-query.xquery
from:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cr: <http://cr.eionet.europa.eu/ontologies/contreg.rdf#>
PREFIX aqd: <http://rdfdata.eionet.europa.eu/airquality/ontology/>
SELECT ?localId ?inspireLabel
WHERE {
?samplingPoint a aqd:AQD_SamplingPoint;
aqd:inspireId ?inspireId .
?inspireId rdfs:label ?inspireLabel .
?inspireId aqd:localId ?localId .
?inspireId aqd:namespace ?namespace .
FILTER(CONTAINS(str(?samplingPoint), 'http://cdr.eionet.europa.eu/de/eu/aqd/d/colxqbmxw/envxqbmcg'))
}
to:
PREFIX rdfs: <http://www.w3.org/2000/01/rdf-schema#>
PREFIX cr: <http://cr.eionet.europa.eu/ontologies/contreg.rdf#>
PREFIX aqd: <http://rdfdata.eionet.europa.eu/airquality/ontology/>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREfIX contreg: <http://cr.eionet.europa.eu/ontologies/contreg.rdf#>
SELECT DISTINCT ?localId ?inspireLabel
WHERE {
values ?envelope { <http://cdr.eionet.europa.eu/de/eu/aqd/d/colxqbmxw/envxqbmcg> }
?graph dcterms:isPartOf ?envelope .
?graph contreg:xmlSchema ?xmlSchema .
GRAPH ?graph {
?samplingPoint a aqd:AQD_SamplingPoint .
?samplingPoint aqd:inspireId ?inspireId .
}
?inspireId rdfs:label ?inspireLabel .
?inspireId aqd:localId ?localId .
?inspireId aqd:namespace ?namespace .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment