Skip to content

Instantly share code, notes, and snippets.

@michimau
Created May 20, 2022 08:12
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save michimau/254fd7e056575590329399c46c128c01 to your computer and use it in GitHub Desktop.
Save michimau/254fd7e056575590329399c46c128c01 to your computer and use it in GitHub Desktop.
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 aq: <http://reference.eionet.europa.eu/aq/ontology/>
PREFIX AirQualityReporting: <http://dd.eionet.europa.eu/schemas/id2011850eu-1.0/AirQualityReporting.xsd>
PREFIX dcterms: <http://purl.org/dc/terms/>
PREFIX rod: <http://rod.eionet.europa.eu/schema.rdf#>
PREFIX obligations: <http://rod.eionet.europa.eu/obligations/>
SELECT DISTINCT ?inspireLabel ?pollutant ?objectiveType ?reportingMetric ?protectionTarget
WHERE {
GRAPH ?envelopeGraph {
?envelope rod:hasFile ?dataFile .
?envelope rod:locality ?locality .
?envelope rod:obligation obligations:671 .
?envelope rod:startOfPeriod ?startOfPeriod .
FILTER (year(?startOfPeriod) = 2020)
}
?locality rod:loccode 'DE' .
?envelope rod:hasFile ?dataFile .
?dataFile cr:xmlSchema AirQualityReporting:
FILTER NOT EXISTS { ?dataFile dcterms:isReplacedBy ?isReplacedBy }
GRAPH ?dataFile {
?regime a aqd:AQD_AssessmentRegime .
?regime aqd:assessmentThreshold ?assessmentThreshold .
?regime aqd:pollutant ?pollutant .
GRAPH ?tmp {
?regime aqd:inspireId ?inspireId .
}
?regime aqd:declarationFor ?declaration .
}
?inspireId rdfs:label ?inspireLabel .
?inspireId aqd:localId ?localId .
?declaration aq:reportingBegin ?reportingYear .
?assessmentThreshold aq:objectiveType ?objectiveType .
?assessmentThreshold aq:reportingMetric ?reportingMetric .
?assessmentThreshold aq:protectionTarget ?protectionTarget .
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment