Strabon

changeset 1301:86466b691f5a temporals

fixed bug in the query rewriting module that occured when a quadruple was included in a non-where statement. In that case, a bracket was omitted causing syntax error.
author constant <Konstantina.Bereta@di.uoa.gr>
date Tue Dec 03 14:41:34 2013 +0200 (2013-12-03)
parents ee3e1f2fd710
children b3766e94a88d
files runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java
line diff
     1.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Mon Nov 18 15:38:18 2013 +0200
     1.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Tue Dec 03 14:41:34 2013 +0200
     1.3 @@ -421,7 +421,7 @@
     1.4  		try {
     1.5  			
     1.6  			String reWrittenUpdate = utils.queryRewriting(updateString);
     1.7 -			System.out.println("REWRITTEN UPDATE= "+ reWrittenUpdate);
     1.8 +			logger.info("REWRITTEN UPDATE= "+ reWrittenUpdate);
     1.9  			
    1.10  			update = con.prepareUpdate(QueryLanguage.SPARQL, reWrittenUpdate);
    1.11  			
     2.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java	Mon Nov 18 15:38:18 2013 +0200
     2.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java	Tue Dec 03 14:41:34 2013 +0200
     2.3 @@ -116,7 +116,7 @@
     2.4  				{
     2.5  					String tgraph =  "<"+parser.createValidTimeURI(token[3]).toString()+">";
     2.6  					newQueryString+="\n GRAPH "+tgraph+" { " +token[0]+" "+token[1]+" "+token[2]+" .}\n";
     2.7 -					newQueryString+= tgraph+ TemporalConstants.VALID_TIME_PROPERTY;
     2.8 +					newQueryString+= tgraph+" "+ TemporalConstants.VALID_TIME_PROPERTY;
     2.9  					i=3;
    2.10  	
    2.11  				}
    2.12 @@ -137,15 +137,15 @@
    2.13  					
    2.14  					if(inWhere == false)
    2.15  					{
    2.16 -						newQueryString+="\n GRAPH "+tgraph+ "{ " +token[0]+" "+token[1]+" "+token[2]+" .}\n";
    2.17 -						i=5;
    2.18 +						newQueryString+="\n GRAPH "+tgraph+ " { " +token[0]+" "+token[1]+" "+token[2]+" .}\n";
    2.19 +						i=4;
    2.20  				
    2.21  					}
    2.22  					else
    2.23  					{
    2.24  				
    2.25  						newQueryString+="\n GRAPH "+tgraph+" { " +token[0]+" "+token[1]+" "+token[2]+" .}\n";
    2.26 -						newQueryString+=tgraph+ TemporalConstants.VALID_TIME_PROPERTY;
    2.27 +						newQueryString+=tgraph+" "+ TemporalConstants.VALID_TIME_PROPERTY;
    2.28  						i=3;
    2.29  					
    2.30  					}