Last active
April 14, 2021 12:24
-
-
Save michimau/56e146e71e8b265bbf2daa6b6bfd87e3 to your computer and use it in GitHub Desktop.
ticket #120080 3
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 skos: <http://www.w3.org/2004/02/skos/core#> | |
PREFIX rod: <http://rod.eionet.europa.eu/schema.rdf#> | |
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 aq: <http://reference.eionet.europa.eu/aq/ontology/> | |
PREFIX obligations: <http://rod.eionet.europa.eu/obligations/> | |
SELECT DISTINCT | |
YEAR(?startOfPeriod) AS ?startOfPeriod | |
MAX(?timePosition) AS ?timePosition | |
?samplingPoint | |
WHERE | |
{ | |
VALUES ?countryCode { 'DK' } | |
VALUES ?startOfPeriodFilter { 2019 } | |
{ | |
SELECT DISTINCT | |
?samplingPoint_inner AS ?samplingPointOriginal | |
if(bound(?samplingPointType_inner), ?samplingPoint_inner, URI(concat('http://reference.eionet.europa.eu/aq/',?samplingPoint_inner))) AS ?samplingPoint | |
WHERE { | |
GRAPH ?file { | |
?observation_inner a aqd:OM_Observation . | |
?observation_inner aqd:parameter ?parameter_inner . | |
?parameter_inner aqd:value ?samplingPoint_inner . | |
} | |
OPTIONAL { ?samplingPoint_inner a ?samplingPointType_inner . } | |
} | |
} | |
GRAPH ?file { | |
?observation a aqd:OM_Observation . | |
?observation aqd:resultTime ?resultTime . | |
?resultTime aqd:timePosition ?timePosition . | |
?observation aqd:parameter ?parameter . | |
?parameter aqd:value ?samplingPointOriginal . | |
} | |
?file dcterms:isPartOf ?envelope . | |
?envelope rod:startOfPeriod ?startOfPeriod . | |
FILTER (YEAR(?startOfPeriod) = ?startOfPeriodFilter) | |
?samplingPoint a aq:SamplingPoint . | |
?file cr:xmlSchema ?xmlschema . | |
?samplingPoint aq:broader ?broader . | |
?broader dcterms:spatial ?spatial . | |
?spatial rod:loccode ?countryCode . | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment