Strabon

changeset 1469:ea73ab0bcc3d temporals

small bug in strdf:period function
author Stella Giannakopoulou <sgian@di.uoa.gr>
date Mon Jan 26 17:02:19 2015 +0200 (2015-01-26)
parents 31466cac9cec
children beac3abdaed1
files postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java
line diff
     1.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Fri Jan 23 18:40:23 2015 +0200
     1.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Mon Jan 26 17:02:19 2015 +0200
     1.3 @@ -1776,14 +1776,7 @@
     1.4  			/////
     1.5  			filter.appendFunction(func); //postgres temporal operators get deprecated. I will use the function names instead- constant
     1.6  			filter.openBracket();
     1.7 -			if(expr instanceof GeneralDBSqlPeriod)
     1.8 -			{
     1.9 -				filter.append("first");
    1.10 -				filter.openBracket();
    1.11 -				appendPeriod((GeneralDBLabelColumn)(tmp),filter);
    1.12 -				filter.closeBracket();
    1.13 -				
    1.14 -			}
    1.15 +			
    1.16  			if (expr.getLeftArg() instanceof GeneralDBSqlTemporalConstructBinary)
    1.17  			{
    1.18  				appendConstructFunction(expr.getLeftArg(), filter);
    1.19 @@ -1792,18 +1785,18 @@
    1.20  			{
    1.21  				appendPeriodConstant(expr.getLeftArg(), filter);
    1.22  			}
    1.23 +			else if(expr instanceof GeneralDBSqlPeriod)
    1.24 +			{
    1.25 +				filter.append("first");
    1.26 +				filter.openBracket();
    1.27 +				appendPeriod((GeneralDBLabelColumn)(tmp),filter);
    1.28 +				filter.closeBracket();
    1.29 +				
    1.30 +			}
    1.31  			else
    1.32  			{	
    1.33 -				if(expr.getParentNode() instanceof GeneralDBSqlPeriod)
    1.34 -				{
    1.35 -					filter.openBracket();
    1.36 -					appendPeriod((GeneralDBLabelColumn)(expr.getLeftArg()),filter);	
    1.37 -					filter.closeBracket();
    1.38 -				}
    1.39 -				else
    1.40 -				{
    1.41 -					appendPeriod((GeneralDBLabelColumn)(expr.getLeftArg()),filter);
    1.42 -				}
    1.43 +				appendPeriod((GeneralDBLabelColumn)(expr.getLeftArg()),filter);
    1.44 +				
    1.45  			}
    1.46  		
    1.47  			if(func.equals("=")|| func.equals("!=")|| func.equals("-")|| func.equals("+")|| func.equals("~")||