Strabon

view scripts/v2.2/refineTimePersistence.sparql @ 453:1caabaa1a742

polishing names
author Kostis Kyzirakos <kkyzir@di.uoa.gr>
date Wed Jul 18 18:49:53 2012 +0300 (2012-07-18)
parents scripts/v2.2/TimePersistence.sparql@6010ffe5f67d
children cf5227b6f3af
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#>
8 INSERT {
9 ?newHotspot rdf:type noa:Hotspot ;
10 noa:hasConfidence ?hConfidence ;
11 noa:hasGeometry ?hGeometry1 ;
12 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ;
13 noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
14 noa:hasConfirmation noa:unknown ;
15 noa:producedFromProcessingChain "PROCESSING_CHAIN-TimePersistence"^^xsd:string ;
16 noa:isProducedBy noa:noa ;
17 gag:hasMunicipality ?muni ;
18 noa:isDerivedFromSatellite "SAT"^^xsd:string .
20 }
21 WHERE {
22 SELECT (BNODE() AS ?newHotspot)
23 (SUM(?hConfidence1)/ACQUISITIONS_IN_HALF_AN_HOUR AS ?hConfidence)
24 ?hGeometry1 ?muni
25 WHERE {
26 ?H1 noa:hasConfidence ?hConfidence1 .
27 ?H1 noa:hasGeometry ?hGeometry1 .
28 ?H1 gag:hasMunicipality ?muni .
29 ?H1 noa:hasAcquisitionTime ?hAcquisitionTime1 .
30 ?H1 noa:isDerivedFromSensor "SENSOR"^^xsd:string .
31 ?H1 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string .
32 OPTIONAL { ?H1 noa:isDiscarded ?z } .
33 FILTER (!BOUND(?z)) .
34 FILTER( "MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hAcquisitionTime1 && ?hAcquisitionTime1 < "TIMESTAMP"^^xsd:dateTime ) .
35 OPTIONAL {
36 ?H2 noa:hasGeometry ?HGEO2 .
37 ?H2 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime .
38 ?H2 noa:isDerivedFromSensor "SENSOR"^^xsd:string .
39 ?H2 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string .
40 FILTER(("PROCESSING_CHAIN"^^xsd:string = ?hProcessingChain2)||("PROCESSING_CHAIN-TimePersistence"^^xsd:string = ?hProcessingChain2)).
41 FILTER( strdf:mbbEquals(?hGeometry1, ?HGEO2) ) .
42 }
43 FILTER( !BOUND(?H2) ) .
44 }
45 GROUP BY ?hGeometry1 ?muni
46 HAVING(SUM(?hConfidence1)>0.0)
47 }