Strabon

diff examples/teleios/discoverFires.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 3b3e9ed00cf0
children
line diff
     1.1 --- a/examples/teleios/discoverFires.rq	Wed Dec 19 18:04:34 2012 +0200
     1.2 +++ b/examples/teleios/discoverFires.rq	Wed Mar 11 20:30:53 2015 +0200
     1.3 @@ -11,8 +11,6 @@
     1.4  #(γραμμές 1614..1630).
     1.5  #- Αυτές τις καταγραφές τις διαγράφουμε θεωρώντας τις θόρυβο
     1.6  
     1.7 -# ../../scripts/strabon -db testNOANewRefinements query  "`./instantiate.sh -s MSG2 -c StaticThresholds  -m '2012-08-24T12:00:00' -M '2012-08-24T12:40:00' -p 10 -r 3 discoverFires-start.rq | grep -v '#[[:alpha:]]' | grep -v '#[ \(-]' | sed 's/"/\\\\"/g'`" TSV
     1.8 -
     1.9  PREFIX noa: <http://teleios.di.uoa.gr/ontologies/noaOntology.owl#>
    1.10  PREFIX rdf: <http://www.w3.org/1999/02/22-rdf-syntax-ns#>
    1.11  PREFIX strdf: <http://strdf.di.uoa.gr/ontology#>
    1.12 @@ -37,15 +35,15 @@
    1.13                      noa:hasGeometry ?geo ;
    1.14  			        noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ;
    1.15  			        noa:isDerivedFromSensor "SENSOR"^^xsd:string .
    1.16 -	       # FILTER("MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hStartTime && ?hStartTime <= "MAX_ACQUISITION_TIME"^^xsd:dateTime).
    1.17 -             FILTER(strdf-ext:diffDateTime("MIN_ACQUISITION_TIME"^^xsd:dateTime,?hStartTime)<=0 && strdf-ext:diffDateTime("MAX_ACQUISITION_TIME"^^xsd:dateTime,?hStartTime)>=0).
    1.18 +            OPTIONAL {?hStart noa:isDiscarded ?hStartDisc }. FILTER (!bound(?hStartDisc)) .
    1.19 +            FILTER(strdf-ext:diffDateTime("MIN_ACQUISITION_TIME"^^xsd:dateTime,?hStartTime)<=0 && strdf-ext:diffDateTime("MAX_ACQUISITION_TIME"^^xsd:dateTime,?hStartTime)>=0).
    1.20  	        # ... narrow down results so that any previous hotspots is detected at least PERSISTENCE mins earlier
    1.21              OPTIONAL {
    1.22                  ?hPrevious	noa:hasAcquisitionTime ?hPreviousTime ;
    1.23                  			noa:hasGeometry ?geo ;
    1.24  					        noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ;
    1.25  					        noa:isDerivedFromSensor "SENSOR"^^xsd:string .
    1.26 -		    #    FILTER("MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hPreviousTime && ?hPreviousTime <= "MAX_ACQUISITION_TIME"^^xsd:dateTime).
    1.27 +                OPTIONAL {?hPrevious noa:isDiscarded ?hPreviousDisc }. FILTER (!bound(?hPreviousDisc)) .
    1.28           		FILTER(strdf-ext:diffDateTime("MIN_ACQUISITION_TIME"^^xsd:dateTime,?hPreviousTime)<=0 && strdf-ext:diffDateTime("MAX_ACQUISITION_TIME"^^xsd:dateTime,?hPreviousTime)>=0).                
    1.29  		        FILTER(strdf-ext:diffDateTime(?hStartTime, ?hPreviousTime) <= PERSISTENCE*60000 && strdf-ext:diffDateTime(?hStartTime, ?hPreviousTime) > 0).
    1.30              } 
    1.31 @@ -56,7 +54,7 @@
    1.32                  noa:hasGeometry ?geo;
    1.33  		        noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ;
    1.34  		        noa:isDerivedFromSensor "SENSOR"^^xsd:string .
    1.35 -	        # FILTER("MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hTime && ?hTime <= "MAX_ACQUISITION_TIME"^^xsd:dateTime).
    1.36 +            OPTIONAL {?h noa:isDiscarded ?hDisc }. FILTER (!bound(?hDisc)) .
    1.37          	FILTER(strdf-ext:diffDateTime("MIN_ACQUISITION_TIME"^^xsd:dateTime,?hTime)<=0 && strdf-ext:diffDateTime("MAX_ACQUISITION_TIME"^^xsd:dateTime,?hTime)>=0).   
    1.38  	 	    FILTER(strdf-ext:diffDateTime(?hTime, ?hStartTime) >= 0).
    1.39          }
    1.40 @@ -65,4 +63,5 @@
    1.41      }.
    1.42  }
    1.43  group by ?start ?geo
    1.44 -having (count(?h) >= 3)
    1.45 +having (count(?h) >= REPEAT_IN_PERS)
    1.46 +