Strabon

changeset 948:c7e4d63ef1ab temporals

merge with default
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Thu Mar 28 17:01:27 2013 +0200 (2013-03-28)
parents bca2c7b71212 802e52d68629
children b4da61de4970
files postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java
line diff
     1.1 --- a/examples/teleios/runChain.sh	Thu Mar 28 16:57:09 2013 +0200
     1.2 +++ b/examples/teleios/runChain.sh	Thu Mar 28 17:01:27 2013 +0200
     1.3 @@ -16,7 +16,7 @@
     1.4  
     1.5  # If tomcat is standalone then environment variable TOMCATPATH should be set
     1.6  
     1.7 -# Example run command: examples/teleios/runChain.sh -b http://dev.strabon.di.uoa.gr/rdf/data-dump-postgres-9.tgz  -l /home/ggarbis/runChain.log -e http://pathway.di.uoa.gr:8080/endpoint
     1.8 +# Example run command: examples/teleios/runChain.sh -b http://dev.strabon.di.uoa.gr/rdf/data-dump-postgres-9.tgz  -l ${HOME}/runChain.log -e http://pathway.di.uoa.gr:8080/endpoint
     1.9  
    1.10  # Command name
    1.11  cmd="$(basename ${0})" 
    1.12 @@ -190,7 +190,7 @@
    1.13  #		rm /tmp/bgFile$$.tar.gz
    1.14  		rm /tmp/bgFiles$$.sql
    1.15  	else
    1.16 -		echo "Backgound file not foung"
    1.17 +		echo "Backgound file not found"
    1.18  		exit -1
    1.19  	fi
    1.20  	handlePostgresDatabase vacuum ${db} analyze
    1.21 @@ -257,7 +257,7 @@
    1.22  hotspotsURL="http://jose.di.uoa.gr/rdf/hotspots/MSG1"
    1.23  #                                 ./examples/teleios/data/data-dump-9.sql
    1.24  bgFile="http://dev.strabon.di.uoa.gr/rdf/data-dump-9.sql"
    1.25 -logFile="/home/ggarbis/runChain.log"
    1.26 +logFile="${HOME}/runChain.log"
    1.27  
    1.28  chain="DynamicThresholds"
    1.29  persistence=10
    1.30 @@ -325,11 +325,9 @@
    1.31  echo "logFile: ${logFile}"
    1.32  
    1.33  echo > ${logFile}
    1.34 -echo 2222
    1.35  instantiate=${loc}/instantiate.sh
    1.36  
    1.37  #Initialize (stop tomcat, restart postgres, drop/create database, start tomcat)
    1.38 -echo 111
    1.39  handleTomcatService stop
    1.40  handlePostgresService restart
    1.41  
    1.42 @@ -346,8 +344,8 @@
    1.43  #${loc}/../../scripts/endpoint query ${endpoint} size 
    1.44  #exit -1
    1.45  echo "Timestamp Store Municipalities DeleteInSea InvalidForFires RefineInCoast TimePersistence DiscoverHotspots" > ${logFile}
    1.46 -echo > /home/ggarbis/discoverFires.log
    1.47 -echo > /home/ggarbis/discover.log
    1.48 +echo > ${HOME}/discoverFires.log
    1.49 +echo > ${HOME}/discover.log
    1.50  
    1.51  years="2012" #"2007 2008 2010 2011"
    1.52  for y in ${years}; do
    1.53 @@ -413,7 +411,7 @@
    1.54  		minTime=`date --date="${year}-${month}-${day} ${time2}:00 EEST -30 minutes" +%Y-%m-%dT%H:%M:00`
    1.55  		update="`${instantiate} -t ${timestamp} -c ${chain} -s ${sensor} -m ${minTime} ${loc}/refineTimePersistence.rq`"
    1.56  #       echo "Refine Time Persistence: ${update}" ; read t
    1.57 -		handleStrabonEndpoint ${endpoint} update "${update}" #2>&1 | tee /home/ggarbis/timePersistence.log
    1.58 +		handleStrabonEndpoint ${endpoint} update "${update}" #2>&1 | tee ${HOME}/timePersistence.log
    1.59  
    1.60  		#psql -U postgres -d ${DB} -c 'VACUUM ANALYZE;';
    1.61          
    1.62 @@ -422,14 +420,14 @@
    1.63  		maxTime=`date --date="${year}-${month}-${day} 23:59 EEST" +%Y-%m-%dT%H:%M:00`
    1.64          query="`${instantiate} -c ${chain} -s ${sensor} -m ${minTime} -M ${maxTime} ${loc}/discover.rq`"
    1.65  #        echo "Discover: ${query}" ; #read t
    1.66 -		handleStrabonEndpoint ${endpoint} query "${query}" &>> /home/ggarbis/discover.log
    1.67 +		handleStrabonEndpoint ${endpoint} query "${query}" &>> ${HOME}/discover.log
    1.68  #    
    1.69  #		# Discover Fires
    1.70  #		minTime=`date --date="${year}-${month}-${day} 00:00 EEST" +%Y-%m-%dT%H:%M:00`
    1.71  #		maxTime=`date --date="${year}-${month}-${day} 23:59 EEST" +%Y-%m-%dT%H:%M:00`
    1.72  #        query="`${instantiate} -c ${chain} -s ${sensor} -m ${minTime} -M ${maxTime} -p 10 -r 3 ${loc}/discoverFires.rq`"
    1.73  ##        echo "Discover Fires: ${query}" ; #read t
    1.74 -#		handleStrabonEndpoint ${endpoint} query "${query}" &>> /home/ggarbis/discoverFires.log
    1.75 +#		handleStrabonEndpoint ${endpoint} query "${query}" &>> ${HOME}/discoverFires.log
    1.76  
    1.77  		# Add a new line
    1.78          echo >> ${logFile}    
     2.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Thu Mar 28 16:57:09 2013 +0200
     2.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Thu Mar 28 17:01:27 2013 +0200
     2.3 @@ -550,7 +550,9 @@
     2.4  	protected void append(GeneralDBSqlSF_Crosses expr, GeneralDBSqlExprBuilder filter)
     2.5  			throws UnsupportedRdbmsOperatorException
     2.6  			{
     2.7 -		appendgeoSPARQLSpatialRelation(expr, filter,SpatialFunctionsPostGIS.SF_Crosses);
     2.8 +		//follow the same approach as stSPARQL, because the implementation used in
     2.9 +		//appendgeoSPARQLSpatialRelation (which is based on ST_Relate) is not correct for this case
    2.10 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Crosses);
    2.11  			}
    2.12  
    2.13  	@Override
    2.14 @@ -578,7 +580,9 @@
    2.15  	protected void append(GeneralDBSqlSF_Overlaps expr, GeneralDBSqlExprBuilder filter)
    2.16  			throws UnsupportedRdbmsOperatorException
    2.17  			{
    2.18 -		appendgeoSPARQLSpatialRelation(expr, filter,SpatialFunctionsPostGIS.SF_Overlaps);
    2.19 +		//follow the same approach as stSPARQL, because the implementation used in
    2.20 +		//appendgeoSPARQLSpatialRelation (which is based on ST_Relate) is not correct for this case
    2.21 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Overlaps);
    2.22  			}
    2.23  
    2.24  	@Override
    2.25 @@ -649,7 +653,9 @@
    2.26  	protected void append(GeneralDBSqlEgenhofer_Overlap expr, GeneralDBSqlExprBuilder filter)
    2.27  			throws UnsupportedRdbmsOperatorException
    2.28  			{
    2.29 -		appendgeoSPARQLSpatialRelation(expr, filter,SpatialFunctionsPostGIS.EH_Overlap);
    2.30 +		//follow the same approach as stSPARQL, because the implementation used in
    2.31 +		//appendgeoSPARQLSpatialRelation (which is based on ST_Relate) is not correct for this case
    2.32 +		appendGeneralDBSpatialFunctionBinary(expr, filter, SpatialFunctionsPostGIS.ST_Overlaps);
    2.33  			}
    2.34  
    2.35  	//RCC8
    2.36 @@ -1618,7 +1624,7 @@
    2.37  	}	
    2.38  	/***/
    2.39  
    2.40 -	//Used in all the generaldb stsparql boolean spatial functions of the form ST_Function(?GEO1,?GEO2) 
    2.41 +	//Used in all the generaldb stsparql (and geosparql) boolean spatial functions of the form ST_Function(?GEO1,?GEO2) 
    2.42  	//EXCEPT ST_Transform!!!
    2.43  	protected void appendGeneralDBTemporalFunctionBinary(BinaryGeneralDBOperator expr, GeneralDBSqlExprBuilder filter, String func)
    2.44  			throws UnsupportedRdbmsOperatorException