Strabon

view examples/teleios/refineTimePersistence.rq @ 1499:8e6437ba6ba2

[maven-release-plugin] prepare for next development iteration
author Babis Nikolaou <charnik@di.uoa.gr>
date Wed Mar 11 20:30:53 2015 +0200 (2015-03-11)
parents 441a607b4f49
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://geo.linkedopendata.gr/greekadministrativeregion/ontology#>
7 INSERT {?newHotspot rdf:type noa:Hotspot ;
8 noa:hasConfidence ?hConfidence ;
9 noa:hasGeometry ?hGeometry1 ;
10 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
11 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
12 noa:hasConfirmation noa:unknown ;
13 noa:producedFromProcessingChain "PROCESSING_CHAIN-TimePersistence"^^xsd:string ;
14 noa:isProducedBy noa:noa ;
15 gag:hasMunicipality ?hMunicipality1 ;
16 noa:isDerivedFromSatellite "SAT"^^xsd:string ;
17 noa:refinedBy noa:temporalPersistence ;
18 noa:refinedBy ?refined .
19 }
20 WHERE {
21 SELECT (URI(CONCAT(STR(MAX(?h1)),"/virtual/", substr("TIMESTAMP", 3, 2), substr("TIMESTAMP", 6, 2), substr("TIMESTAMP", 9, 2), "_", substr("TIMESTAMP", 12, 2), substr("TIMESTAMP", 15, 2) )) AS ?newHotspot)
22 (SUM(?hConfidence1)/ACQUISITIONS_IN_HALF_AN_HOUR AS ?hConfidence)
23 ?hGeometry1 ?hMunicipality1 ?refined
24 WHERE {
25 ?h1 noa:hasConfidence ?hConfidence1 ;
26 noa:hasGeometry ?hGeometry1 ;
27 gag:hasMunicipality ?hMunicipality1 ;
28 noa:hasAcquisitionTime ?hAcquisitionTime1 ;
29 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
30 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string .
31 OPTIONAL { ?h1 noa:isDiscarded ?z } .
32 FILTER (!BOUND(?z)) .
33 OPTIONAL { ?h1 noa:refinedBy ?refined } .
34 FILTER( "MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hAcquisitionTime1 && ?hAcquisitionTime1 < "TIMESTAMP"^^xsd:dateTime ) .
35 OPTIONAL {
36 ?h2 noa:hasGeometry ?hGeometry2 ;
37 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
38 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
39 noa:producedFromProcessingChain ?hProcessingChain2 .
40 FILTER(("PROCESSING_CHAIN"^^xsd:string = ?hProcessingChain2)||("PROCESSING_CHAIN-TimePersistence"^^xsd:string = ?hProcessingChain2)).
41 FILTER( strdf:mbbEquals(?hGeometry1, ?hGeometry2) ) .
42 }
43 FILTER( !BOUND(?h2) ) .
44 }
45 GROUP BY ?hGeometry1 ?hMunicipality1 ?refined
46 HAVING(SUM(?hConfidence1)>0.0)
47 }