Strabon

view scripts/archive/v2.2/refineTimePersistence.sparql @ 1277:92b90ac06d39

[maven-release-plugin] prepare release v3.2.9
author Babis Nikolaou <charnik@di.uoa.gr>
date Sat Oct 19 23:37:23 2013 +0300 (2013-10-19)
parents 1056efcaa186
children
line source
1 PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
2 PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
3 PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
4 PREFIX xsd: <http://www.w3.org/2001/XMLSchema#>
5 PREFIX gag: <http://teleios.di.uoa.gr/ontologies/gagKallikratis.rdf#>
7 INSERT {
8 ?newHotspot rdf:type noa:Hotspot ;
9 noa:hasConfidence ?hConfidence ;
10 noa:hasGeometry ?hGeometry1 ;
11 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
12 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
13 noa:hasConfirmation noa:unknown ;
14 noa:producedFromProcessingChain "PROCESSING_CHAIN-TimePersistence"^^xsd:string ;
15 noa:isProducedBy noa:noa ;
16 gag:hasMunicipality ?muni ;
17 noa:isDerivedFromSatellite "SAT"^^xsd:string .
18 }
19 WHERE {
20 SELECT (BNODE() AS ?newHotspot)
21 (SUM(?hConfidence1)/ACQUISITIONS_IN_HALF_AN_HOUR AS ?hConfidence)
22 ?hGeometry1 ?muni
23 WHERE {
24 ?H1 noa:hasConfidence ?hConfidence1 ;
25 noa:hasGeometry ?hGeometry1 ;
26 gag:hasMunicipality ?muni ;
27 noa:hasAcquisitionTime ?hAcquisitionTime1 ;
28 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
29 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string .
30 OPTIONAL { ?H1 noa:isDiscarded ?z } .
31 FILTER (!BOUND(?z)) .
33 FILTER( "MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hAcquisitionTime1 && ?hAcquisitionTime1 < "TIMESTAMP"^^xsd:dateTime ) .
34 OPTIONAL {
35 ?H2 noa:hasGeometry ?HGEO2 ;
36 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
37 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
38 noa:producedFromProcessingChain ?hProcessingChain2 .
39 FILTER(("PROCESSING_CHAIN"^^xsd:string = ?hProcessingChain2)||("PROCESSING_CHAIN-TimePersistence"^^xsd:string = ?hProcessingChain2)) .
40 FILTER( strdf:mbbEquals(?hGeometry1, ?HGEO2) ) .
41 }
42 FILTER( !BOUND(?H2) ) .
43 }
44 GROUP BY ?hGeometry1 ?muni
45 HAVING(SUM(?hConfidence1)>0.0)
46 }