Strabon

changeset 409:15f4a9ea800a

queries dutikwn proasteiwn
author Konstantina Mpereta <grad1110@di.uoa.gr>
date Mon Jul 09 19:47:48 2012 +0300 (2012-07-09)
parents 088dc9156bb8
children 854d64bc2b60
files scripts/V2.1/DeleteInSea.sparql scripts/V2.1/DeleteInSea.sparql~ scripts/V2.1/Refine.sparql scripts/V2.1/Refine.sparql~ scripts/V2.1/TimePersistence.sparql scripts/V2.1/TimePersistence.sparql~ scripts/V2.1/discover.sparql scripts/V2.1/discover.sparql~ scripts/V2.1/runNoaRefinementChain.sh scripts/V2.1/runNoaRefinementChain.sh~
line diff
     1.1 --- a/scripts/V2.1/DeleteInSea.sparql	Mon Jul 09 19:00:28 2012 +0300
     1.2 +++ b/scripts/V2.1/DeleteInSea.sparql	Mon Jul 09 19:47:48 2012 +0300
     1.3 @@ -5,8 +5,7 @@
     1.4  
     1.5  INSERT {?h noa:isDiscarded "1"^^xsd:int} 
     1.6  WHERE {
     1.7 -  ?h rdf:type noa:Hotspot; 
     1.8 -     noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
     1.9 +?h   noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
    1.10       noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string; 
    1.11       noa:isDerivedFromSensor "SENSOR"^^xsd:string;
    1.12       noa:hasGeometry ?hGeo.
     2.1 --- a/scripts/V2.1/DeleteInSea.sparql~	Mon Jul 09 19:00:28 2012 +0300
     2.2 +++ b/scripts/V2.1/DeleteInSea.sparql~	Mon Jul 09 19:47:48 2012 +0300
     2.3 @@ -5,12 +5,10 @@
     2.4  
     2.5  INSERT {?h noa:isDiscarded "1"^^xsd:int} 
     2.6  WHERE {
     2.7 -  ?h rdf:type noa:Hotspot; 
     2.8 -     noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
     2.9 +?h   noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
    2.10       noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string; 
    2.11       noa:isDerivedFromSensor "SENSOR"^^xsd:string;
    2.12 -     noa:hasGeometry ?hGeo;
    2.13 -     ?property ?object . 
    2.14 +     noa:hasGeometry ?hGeo.
    2.15    OPTIONAL {
    2.16      ?c rdf:type noa:Coastline;
    2.17         noa:hasGeometry ?cGeo . 
     3.1 --- a/scripts/V2.1/Refine.sparql	Mon Jul 09 19:00:28 2012 +0300
     3.2 +++ b/scripts/V2.1/Refine.sparql	Mon Jul 09 19:47:48 2012 +0300
     3.3 @@ -18,14 +18,12 @@
     3.4  WHERE { 
     3.5    SELECT ?h  (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (BNODE() AS ?valid) ?conf 
     3.6    WHERE { 
     3.7 -    ?h rdf:type noa:Hotspot ; 
     3.8 -       noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
     3.9 +?h     noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
    3.10         noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    3.11         noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    3.12         noa:hasGeometry ?hGeo ;
    3.13 -       noa:hasConfidence ?conf ;
    3.14 -       noa:isDerivedFromSatellite "SAT"^^xsd:string .
    3.15 -    ?c rdf:type noa:Coastline ;
    3.16 +       noa:hasConfidence ?conf .
    3.17 +?c     rdf:type noa:Coastline ;
    3.18         noa:hasGeometry ?cGeo .
    3.19      FILTER(strdf:anyInteract(?hGeo, ?cGeo)) . 
    3.20    }
     4.1 --- a/scripts/V2.1/Refine.sparql~	Mon Jul 09 19:00:28 2012 +0300
     4.2 +++ b/scripts/V2.1/Refine.sparql~	Mon Jul 09 19:47:48 2012 +0300
     4.3 @@ -16,16 +16,14 @@
     4.4  		noa:isDerivedFromSatellite "SAT"^^xsd:string .
     4.5  }
     4.6  WHERE { 
     4.7 -  SELECT DISTINCT ?h  (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (BNODE() AS ?valid) ?conf 
     4.8 +  SELECT ?h  (strdf:intersection(?hGeo, strdf:union(?cGeo)) AS ?dif) (BNODE() AS ?valid) ?conf 
     4.9    WHERE { 
    4.10 -    ?h rdf:type noa:Hotspot ; 
    4.11 -       noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
    4.12 +?h     noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime; 
    4.13         noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    4.14         noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    4.15         noa:hasGeometry ?hGeo ;
    4.16         noa:hasConfidence ?conf ;
    4.17 -       noa:isDerivedFromSatellite "SAT"^^xsd:string .
    4.18 -    ?c rdf:type noa:Coastline ;
    4.19 +?c     rdf:type noa:Coastline ;
    4.20         noa:hasGeometry ?cGeo .
    4.21      FILTER(strdf:anyInteract(?hGeo, ?cGeo)) . 
    4.22    }
     5.1 --- a/scripts/V2.1/TimePersistence.sparql	Mon Jul 09 19:00:28 2012 +0300
     5.2 +++ b/scripts/V2.1/TimePersistence.sparql	Mon Jul 09 19:47:48 2012 +0300
     5.3 @@ -20,18 +20,15 @@
     5.4    (SUM(?hConfidence1)/ACQUISITIONS_IN_HALF_AN_HOUR AS ?hConfidence)
     5.5    ?hGeometry1
     5.6    WHERE {
     5.7 -    ?H1 rdf:type noa:Hotspot .
     5.8      ?H1 noa:hasConfidence ?hConfidence1 .
     5.9      ?H1 noa:hasGeometry ?hGeometry1 .
    5.10      ?H1 noa:hasAcquisitionTime ?hAcquisitionTime1 .
    5.11      ?H1 noa:isDerivedFromSensor "SENSOR"^^xsd:string .
    5.12 -    ?H1 noa:hasConfirmation noa:unknown .
    5.13      ?H1 noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string .
    5.14      OPTIONAL { ?H1 noa:isDiscarded ?z } .
    5.15      FILTER (!BOUND(?z)) .
    5.16      FILTER( "MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hAcquisitionTime1 && ?hAcquisitionTime1 < "TIMESTAMP"^^xsd:dateTime ) .
    5.17      OPTIONAL {
    5.18 -      ?H2 rdf:type noa:Hotspot .
    5.19        ?H2 noa:hasGeometry ?HGEO2 .
    5.20        ?H2 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime .
    5.21        ?H2 noa:isDerivedFromSensor "SENSOR"^^xsd:string .
     6.1 --- a/scripts/V2.1/TimePersistence.sparql~	Mon Jul 09 19:00:28 2012 +0300
     6.2 +++ b/scripts/V2.1/TimePersistence.sparql~	Mon Jul 09 19:47:48 2012 +0300
     6.3 @@ -4,7 +4,6 @@
     6.4  PREFIX xsd: <http://www.w3.org/2001/XMLSchema#> 
     6.5  
     6.6  INSERT {
     6.7 -
     6.8   ?newHotspot rdf:type noa:Hotspot ;
     6.9  		noa:hasConfidence ?hConfidence ;
    6.10  	        noa:hasGeometry ?hGeometry1 ;
    6.11 @@ -21,7 +20,6 @@
    6.12    (SUM(?hConfidence1)/ACQUISITIONS_IN_HALF_AN_HOUR AS ?hConfidence)
    6.13    ?hGeometry1
    6.14    WHERE {
    6.15 -    ?H1 rdf:type noa:Hotspot .
    6.16      ?H1 noa:hasConfidence ?hConfidence1 .
    6.17      ?H1 noa:hasGeometry ?hGeometry1 .
    6.18      ?H1 noa:hasAcquisitionTime ?hAcquisitionTime1 .
    6.19 @@ -32,7 +30,6 @@
    6.20      FILTER (!BOUND(?z)) .
    6.21      FILTER( "MIN_ACQUISITION_TIME"^^xsd:dateTime <= ?hAcquisitionTime1 && ?hAcquisitionTime1 < "TIMESTAMP"^^xsd:dateTime ) .
    6.22      OPTIONAL {
    6.23 -      ?H2 rdf:type noa:Hotspot .
    6.24        ?H2 noa:hasGeometry ?HGEO2 .
    6.25        ?H2 noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime .
    6.26        ?H2 noa:isDerivedFromSensor "SENSOR"^^xsd:string .
     7.1 --- a/scripts/V2.1/discover.sparql	Mon Jul 09 19:00:28 2012 +0300
     7.2 +++ b/scripts/V2.1/discover.sparql	Mon Jul 09 19:47:48 2012 +0300
     7.3 @@ -11,13 +11,12 @@
     7.4  
     7.5  SELECT ?h ?geo ?conf (GROUP_CONCAT(?dLabel ; SEPARATOR=', ') AS ?dimoi )
     7.6  WHERE { 
     7.7 -  ?h rdf:type noa:Hotspot ; 
     7.8 -     noa:hasGeometry ?hGeo ;
     7.9 +?h   noa:hasGeometry ?hGeo ;
    7.10       noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 
    7.11       noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    7.12       noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    7.13       noa:hasConfidence ?conf .
    7.14 -  ?d rdf:type gag:Dhmos;
    7.15 +?d   rdf:type gag:Dhmos;
    7.16       strdf:hasGeometry ?dGeo;
    7.17       rdfs:label ?dLabel.
    7.18    FILTER(strdf:anyInteract(?dGeo, ?hGeo)).
     8.1 --- a/scripts/V2.1/discover.sparql~	Mon Jul 09 19:00:28 2012 +0300
     8.2 +++ b/scripts/V2.1/discover.sparql~	Mon Jul 09 19:47:48 2012 +0300
     8.3 @@ -11,13 +11,12 @@
     8.4  
     8.5  SELECT ?h ?geo ?conf (GROUP_CONCAT(?dLabel ; SEPARATOR=', ') AS ?dimoi )
     8.6  WHERE { 
     8.7 -  ?h rdf:type noa:Hotspot ; 
     8.8 -     noa:hasGeometry ?hGeo ;
     8.9 +?h   noa:hasGeometry ?hGeo ;
    8.10       noa:hasAcquisitionTime "TIMESTAMP"^^xsd:dateTime ; 
    8.11       noa:producedFromProcessingChain "PROCESSING_CHAIN"^^xsd:string ; 
    8.12       noa:isDerivedFromSensor "SENSOR"^^xsd:string ;
    8.13       noa:hasConfidence ?conf .
    8.14 -  ?d rdf:type gag:Dhmos;
    8.15 +?d rdf:type gag:Dhmos;
    8.16       strdf:hasGeometry ?dGeo;
    8.17       rdfs:label ?dLabel.
    8.18    FILTER(strdf:anyInteract(?dGeo, ?hGeo)).
     9.1 --- a/scripts/V2.1/runNoaRefinementChain.sh	Mon Jul 09 19:00:28 2012 +0300
     9.2 +++ b/scripts/V2.1/runNoaRefinementChain.sh	Mon Jul 09 19:47:48 2012 +0300
     9.3 @@ -58,9 +58,9 @@
     9.4  echo "initializing database"
     9.5  echo "S D R TP" >>stderr.txt
     9.6  
     9.7 - ../endpoint store ${ENDPOINT} N-Triples -u ${GRIDURL}
     9.8 +# ../endpoint store ${ENDPOINT} N-Triples -u ${GRIDURL}
     9.9  
    9.10 -
    9.11 +sudo -u postgres -c "curl -s  http://dev.strabon.di.uoa.gr/rdf/Kallikratis-Coastline-dump.tgz  | tar xz -O |   psql -d ${DB}"   
    9.12  #./scripts/endpoint query ${ENDPOINT} "SELECT (COUNT(*) AS ?C) WHERE {?s ?p ?o}" 
    9.13  #sudo -u postgres psql -d endpoint -c 'CREATE INDEX datetime_values_idx_value ON datetime_values USING btree(value)';
    9.14  #sudo -u postgres psql -d endpoint -c 'VACUUM ANALYZE;';
    10.1 --- a/scripts/V2.1/runNoaRefinementChain.sh~	Mon Jul 09 19:00:28 2012 +0300
    10.2 +++ b/scripts/V2.1/runNoaRefinementChain.sh~	Mon Jul 09 19:47:48 2012 +0300
    10.3 @@ -2,7 +2,7 @@
    10.4  LOC="$(cd "$(dirname "${BASH_SOURCE[0]}")" && pwd)"
    10.5  
    10.6  ENDPOINT="http://localhost:8080/endpoint"
    10.7 -DB="strabon27"
    10.8 +DB="v21"
    10.9  GRIDURL="http://kk.di.uoa.gr/grid_4.nt"
   10.10  CHECKDIR="/home/konstantina/allhot/"
   10.11  
   10.12 @@ -58,9 +58,9 @@
   10.13  echo "initializing database"
   10.14  echo "S D R TP" >>stderr.txt
   10.15  
   10.16 - ../endpoint store ${ENDPOINT} N-Triples -u ${GRIDURL}
   10.17 +# ../endpoint store ${ENDPOINT} N-Triples -u ${GRIDURL}
   10.18  
   10.19 -
   10.20 +sudo -u postgres -c "curl  http://dev.strabon.di.uoa.gr/rdf/Kallikratis-Coastline.tgz | tar xz |   psql -d ${DB}"   
   10.21  #./scripts/endpoint query ${ENDPOINT} "SELECT (COUNT(*) AS ?C) WHERE {?s ?p ?o}" 
   10.22  #sudo -u postgres psql -d endpoint -c 'CREATE INDEX datetime_values_idx_value ON datetime_values USING btree(value)';
   10.23  #sudo -u postgres psql -d endpoint -c 'VACUUM ANALYZE;';