Strabon

changeset 824:6c14a06b32be temporals

Added four more temporal relation functions:
*adjacent
*meets
*starts
*finishes

Postgres Temporal does not implement by default the three last functions. Therefore, it has been extended to support them.
ATTENTION: the temporally enabled database should include these functions too so that their implementation is supported by Strabon
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Fri Dec 21 14:16:24 2012 +0200 (2012-12-21)
parents a2d313dff1dd
children b3748ac1ad80
files evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlTemporal.java generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java
line diff
     1.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Thu Dec 20 14:04:49 2012 +0200
     1.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Fri Dec 21 14:16:24 2012 +0200
     1.3 @@ -43,6 +43,8 @@
     1.4  	public static final String overright=stRDF+ "overright";
     1.5  
     1.6  	public static final String meets=stRDF+ "meets";
     1.7 +	public static final String starts= stRDF+ "starts";
     1.8 +	public static final String finishes= stRDF +"finishes";
     1.9  	
    1.10  	//Temporal Constructs
    1.11  	public static final String periodIntersection=stRDF+ "periodIntersection";
     2.1 --- a/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Thu Dec 20 14:04:49 2012 +0200
     2.2 +++ b/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Fri Dec 21 14:16:24 2012 +0200
     2.3 @@ -90,4 +90,7 @@
     2.4  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.OverrightPeriodFunc
     2.5  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodContainedByFunc
     2.6  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodContainsFunc
     2.7 -org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.periodOverlapsFunc
     2.8 \ No newline at end of file
     2.9 +org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.periodOverlapsFunc
    2.10 +org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.MeetsFunc
    2.11 +org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.startsFunc
    2.12 +org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.finishesFunc
     3.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Thu Dec 20 14:04:49 2012 +0200
     3.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Fri Dec 21 14:16:24 2012 +0200
     3.3 @@ -90,15 +90,19 @@
     3.4  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Overlaps;
     3.5  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Touches;
     3.6  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Within;
     3.7 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlAdjacentPeriod;
     3.8  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlAfterPeriod;
     3.9  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlBeforePeriod;
    3.10  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlEqualsPeriod;
    3.11 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlFinishes;
    3.12 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlMeets;
    3.13  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlNequalsPeriod;
    3.14  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlOverleftPeriod;
    3.15  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlOverrightPeriod;
    3.16  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodContainedBy;
    3.17  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodContains;
    3.18  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodOverlaps;
    3.19 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlStarts;
    3.20  import org.openrdf.sail.rdbms.exceptions.UnsupportedRdbmsOperatorException;
    3.21  /**
    3.22   * Support method to create SQL expressions.
    3.23 @@ -390,6 +394,18 @@
    3.24  	public static GeneralDBSqlExpr periodOverlaps(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    3.25  		return new GeneralDBSqlPeriodOverlaps(left, right);
    3.26  	}
    3.27 +	public static GeneralDBSqlExpr meets(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    3.28 +		return new GeneralDBSqlMeets(left, right);
    3.29 +	}
    3.30 +	public static GeneralDBSqlExpr starts(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    3.31 +		return new GeneralDBSqlStarts(left, right);
    3.32 +	}
    3.33 +	public static GeneralDBSqlExpr finishes(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    3.34 +		return new GeneralDBSqlFinishes(left, right);
    3.35 +	}
    3.36 +	public static GeneralDBSqlExpr adjacent(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    3.37 +		return new GeneralDBSqlAdjacentPeriod(left, right);
    3.38 +	}
    3.39  	//XXX Spatial Construct Functions
    3.40  	public static GeneralDBSqlExpr geoUnion(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    3.41  
     4.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Thu Dec 20 14:04:49 2012 +0200
     4.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Fri Dec 21 14:16:24 2012 +0200
     4.3 @@ -46,9 +46,11 @@
     4.4  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.construct.UnionFunc;
     4.5  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.metric.AreaFunc;
     4.6  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.relation.RelateFunc;
     4.7 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.AdjacentPeriodFunc;
     4.8  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.AfterPeriodFunc;
     4.9  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.BeforePeriodFunc;
    4.10  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.EqualsPeriodFunc;
    4.11 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.MeetsFunc;
    4.12  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.NequalsPeriodFunc;
    4.13  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.OverleftPeriodFunc;
    4.14  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.OverrightPeriodFunc;
    4.15 @@ -56,7 +58,9 @@
    4.16  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodContainsFunc;
    4.17  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalConstants;
    4.18  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalRelationFunc;
    4.19 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.finishesFunc;
    4.20  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.periodOverlapsFunc;
    4.21 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.startsFunc;
    4.22  import org.openrdf.query.algebra.helpers.QueryModelVisitorBase;
    4.23  import org.openrdf.sail.generaldb.algebra.GeneralDBFalseValue;
    4.24  import org.openrdf.sail.generaldb.algebra.GeneralDBRefIdColumn;
    4.25 @@ -975,6 +979,22 @@
    4.26  		{
    4.27  			return periodOverlaps(leftArg, rightArg);
    4.28  		}
    4.29 +		else if(function instanceof MeetsFunc)
    4.30 +		{
    4.31 +			return meets(leftArg, rightArg);
    4.32 +		}
    4.33 +		else if(function instanceof startsFunc)
    4.34 +		{
    4.35 +			return starts(leftArg, rightArg);
    4.36 +		}
    4.37 +		else if(function instanceof finishesFunc)
    4.38 +		{
    4.39 +			return finishes(leftArg, rightArg);
    4.40 +		}
    4.41 +		else if(function instanceof AdjacentPeriodFunc)
    4.42 +		{
    4.43 +			return adjacent(leftArg, rightArg);
    4.44 +		}
    4.45  		else 
    4.46  		{
    4.47  			return null;
    4.48 @@ -1082,6 +1102,22 @@
    4.49  		{
    4.50  			return periodOverlaps(leftArg,rightArg);
    4.51  		}
    4.52 +		else if(function.getURI().equals(TemporalConstants.adjacent))
    4.53 +		{
    4.54 +			return adjacent(leftArg,rightArg);
    4.55 +		}
    4.56 +		else if(function.getURI().equals(TemporalConstants.meets))
    4.57 +		{
    4.58 +			return meets(leftArg,rightArg);
    4.59 +		}
    4.60 +		else if(function.getURI().equals(TemporalConstants.starts))
    4.61 +		{
    4.62 +			return starts(leftArg,rightArg);
    4.63 +		}
    4.64 +		else if(function.getURI().equals(TemporalConstants.finishes))
    4.65 +		{
    4.66 +			return finishes(leftArg,rightArg);
    4.67 +		}
    4.68  		//XXX GeoSPARQL
    4.69  		//Simple Features
    4.70  		else if(function.getURI().equals(GeoConstants.sfContains))
     5.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlTemporal.java	Thu Dec 20 14:04:49 2012 +0200
     5.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlTemporal.java	Fri Dec 21 14:16:24 2012 +0200
     5.3 @@ -25,6 +25,7 @@
     5.4  	 * of stSPARQL queries to spatiotemporally extended SQL queries
     5.5  	 * */
     5.6  	public abstract  String getOperator();
     5.7 +	
     5.8  	//This method returns the respective function of the Postgres Temporal extension
     5.9  	public abstract  String getPostgresFunction();
    5.10  
     6.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Thu Dec 20 14:04:49 2012 +0200
     6.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Fri Dec 21 14:16:24 2012 +0200
     6.3 @@ -254,10 +254,7 @@
     6.4  
     6.5  		// get the function corresponding to the function call
     6.6  		Function function = FunctionRegistry.getInstance().get(fc.getURI());
     6.7 -		if(fc.getURI().equalsIgnoreCase("http://strdf.di.uoa.gr/ontology#afterPeriod"))
     6.8 -		{
     6.9 -			function = FunctionRegistry.getInstance().get("http://strdf.di.uoa.gr/ontology#afterPeriod");
    6.10 -		}
    6.11 +		
    6.12  		
    6.13  		// get the first argument of the function call
    6.14  		ValueExpr left = fc.getArgs().get(0);
     7.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java	Thu Dec 20 14:04:49 2012 +0200
     7.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java	Fri Dec 21 14:16:24 2012 +0200
     7.3 @@ -113,9 +113,12 @@
     7.4  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Overlaps;
     7.5  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Touches;
     7.6  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Within;
     7.7 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlAdjacentPeriod;
     7.8  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlAfterPeriod;
     7.9  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlBeforePeriod;
    7.10  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlEqualsPeriod;
    7.11 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlFinishes;
    7.12 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlMeets;
    7.13  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlNequalsPeriod;
    7.14  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlOverleftPeriod;
    7.15  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlOverrightPeriod;
    7.16 @@ -125,6 +128,7 @@
    7.17  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodMinus;
    7.18  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodOverlaps;
    7.19  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodUnion;
    7.20 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlStarts;
    7.21  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlTemporal;
    7.22  import org.openrdf.sail.rdbms.exceptions.RdbmsException;
    7.23  import org.openrdf.sail.rdbms.exceptions.UnsupportedRdbmsOperatorException;
    7.24 @@ -628,6 +632,23 @@
    7.25  		else if(expr instanceof GeneralDBSqlPeriodOverlaps){
    7.26  			append((GeneralDBSqlPeriodOverlaps)expr, filter);
    7.27  		}
    7.28 +		else if(expr instanceof GeneralDBSqlPeriodOverlaps){
    7.29 +			append((GeneralDBSqlPeriodOverlaps)expr, filter);
    7.30 +		}
    7.31 +		else if(expr instanceof GeneralDBSqlMeets){
    7.32 +			append((GeneralDBSqlMeets)expr, filter);
    7.33 +		}
    7.34 +		else if(expr instanceof GeneralDBSqlStarts){
    7.35 +			append((GeneralDBSqlStarts)expr, filter);
    7.36 +		}
    7.37 +		
    7.38 +		else if(expr instanceof GeneralDBSqlFinishes){
    7.39 +			append((GeneralDBSqlFinishes)expr, filter);
    7.40 +		}
    7.41 +		else if(expr instanceof GeneralDBSqlAdjacentPeriod){
    7.42 +			append((GeneralDBSqlAdjacentPeriod)expr, filter);
    7.43 +		}
    7.44 +		
    7.45  		//GeoSPARQL
    7.46  		//Simple Features
    7.47  		else if (expr instanceof GeneralDBSqlSF_Contains) {
    7.48 @@ -1338,6 +1359,18 @@
    7.49  protected abstract void append(GeneralDBSqlBeforePeriod expr,
    7.50  		GeneralDBSqlExprBuilder filter)
    7.51  		throws UnsupportedRdbmsOperatorException;
    7.52 +protected abstract void append(GeneralDBSqlMeets expr,
    7.53 +		GeneralDBSqlExprBuilder filter)
    7.54 +		throws UnsupportedRdbmsOperatorException;
    7.55 +protected abstract void append(GeneralDBSqlStarts expr,
    7.56 +		GeneralDBSqlExprBuilder filter)
    7.57 +		throws UnsupportedRdbmsOperatorException;
    7.58 +protected abstract void append(GeneralDBSqlFinishes expr,
    7.59 +		GeneralDBSqlExprBuilder filter)
    7.60 +		throws UnsupportedRdbmsOperatorException;
    7.61 +protected abstract void append(GeneralDBSqlAdjacentPeriod expr,
    7.62 +		GeneralDBSqlExprBuilder filter)
    7.63 +		throws UnsupportedRdbmsOperatorException;
    7.64  
    7.65  
    7.66  }
     8.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Thu Dec 20 14:04:49 2012 +0200
     8.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Fri Dec 21 14:16:24 2012 +0200
     8.3 @@ -95,9 +95,12 @@
     8.4  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Overlaps;
     8.5  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Touches;
     8.6  import org.openrdf.sail.generaldb.algebra.sf.GeneralDBSqlSF_Within;
     8.7 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlAdjacentPeriod;
     8.8  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlAfterPeriod;
     8.9  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlBeforePeriod;
    8.10  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlEqualsPeriod;
    8.11 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlFinishes;
    8.12 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlMeets;
    8.13  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlNequalsPeriod;
    8.14  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlOverleftPeriod;
    8.15  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlOverrightPeriod;
    8.16 @@ -107,6 +110,7 @@
    8.17  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodMinus;
    8.18  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodOverlaps;
    8.19  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodUnion;
    8.20 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlStarts;
    8.21  import org.openrdf.sail.generaldb.evaluation.GeneralDBQueryBuilder;
    8.22  import org.openrdf.sail.generaldb.evaluation.GeneralDBSqlBracketBuilder;
    8.23  import org.openrdf.sail.generaldb.evaluation.GeneralDBSqlExprBuilder;
    8.24 @@ -2200,4 +2204,35 @@
    8.25  		
    8.26  	}
    8.27  
    8.28 +	@Override
    8.29 +	protected void append(GeneralDBSqlMeets expr, GeneralDBSqlExprBuilder filter)
    8.30 +			throws UnsupportedRdbmsOperatorException {
    8.31 +		// TODO Auto-generated method stub
    8.32 +		
    8.33 +	}
    8.34 +
    8.35 +	@Override
    8.36 +	protected void append(GeneralDBSqlStarts expr,
    8.37 +			GeneralDBSqlExprBuilder filter)
    8.38 +			throws UnsupportedRdbmsOperatorException {
    8.39 +		// TODO Auto-generated method stub
    8.40 +		
    8.41 +	}
    8.42 +
    8.43 +	@Override
    8.44 +	protected void append(GeneralDBSqlFinishes expr,
    8.45 +			GeneralDBSqlExprBuilder filter)
    8.46 +			throws UnsupportedRdbmsOperatorException {
    8.47 +		// TODO Auto-generated method stub
    8.48 +		
    8.49 +	}
    8.50 +
    8.51 +	@Override
    8.52 +	protected void append(GeneralDBSqlAdjacentPeriod expr,
    8.53 +			GeneralDBSqlExprBuilder filter)
    8.54 +			throws UnsupportedRdbmsOperatorException {
    8.55 +		// TODO Auto-generated method stub
    8.56 +		
    8.57 +	}
    8.58 +
    8.59  }
    8.60 \ No newline at end of file
     9.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Thu Dec 20 14:04:49 2012 +0200
     9.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Fri Dec 21 14:16:24 2012 +0200
     9.3 @@ -1015,67 +1015,98 @@
     9.4  	protected void append(GeneralDBSqlPeriodContainedBy expr, GeneralDBSqlExprBuilder filter)
     9.5  			throws UnsupportedRdbmsOperatorException
     9.6  			{
     9.7 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
     9.8 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
     9.9  			}
    9.10  	
    9.11  	@Override
    9.12  	protected void append(GeneralDBSqlPeriodContains expr, GeneralDBSqlExprBuilder filter)
    9.13  			throws UnsupportedRdbmsOperatorException
    9.14  			{
    9.15 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.16 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.17  			}
    9.18  
    9.19  	@Override
    9.20  	protected void append(GeneralDBSqlPeriodOverlaps expr, GeneralDBSqlExprBuilder filter)
    9.21  			throws UnsupportedRdbmsOperatorException
    9.22  			{
    9.23 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.24 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.25  			}
    9.26  
    9.27  	@Override
    9.28  	protected void append(GeneralDBSqlAfterPeriod expr, GeneralDBSqlExprBuilder filter)
    9.29  			throws UnsupportedRdbmsOperatorException
    9.30  			{
    9.31 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.32 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.33  			}
    9.34  	
    9.35  	@Override
    9.36  	protected void append(GeneralDBSqlBeforePeriod expr,
    9.37  			GeneralDBSqlExprBuilder filter)
    9.38  			throws UnsupportedRdbmsOperatorException {
    9.39 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.40 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.41  		
    9.42  	}
    9.43  	@Override
    9.44  	protected void append(GeneralDBSqlOverrightPeriod expr,
    9.45  			GeneralDBSqlExprBuilder filter)
    9.46  			throws UnsupportedRdbmsOperatorException {
    9.47 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.48 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.49  		
    9.50  	}
    9.51  	@Override
    9.52  	protected void append(GeneralDBSqlOverleftPeriod expr,
    9.53  			GeneralDBSqlExprBuilder filter)
    9.54  			throws UnsupportedRdbmsOperatorException {
    9.55 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.56 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.57  		
    9.58  	}
    9.59  	@Override
    9.60  	protected void append(GeneralDBSqlEqualsPeriod expr,
    9.61  			GeneralDBSqlExprBuilder filter)
    9.62  			throws UnsupportedRdbmsOperatorException {
    9.63 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.64 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.65  		
    9.66  	}
    9.67  	@Override
    9.68  	protected void append(GeneralDBSqlNequalsPeriod expr,
    9.69  			GeneralDBSqlExprBuilder filter)
    9.70  			throws UnsupportedRdbmsOperatorException {
    9.71 -		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getOperator());
    9.72 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.73  		
    9.74  	}
    9.75  	
    9.76  	@Override
    9.77 +	protected void append(GeneralDBSqlMeets expr,
    9.78 +			GeneralDBSqlExprBuilder filter)
    9.79 +			throws UnsupportedRdbmsOperatorException {
    9.80 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.81 +		
    9.82 +	}
    9.83 +	
    9.84 +	@Override
    9.85 +	protected void append(GeneralDBSqlStarts expr,
    9.86 +			GeneralDBSqlExprBuilder filter)
    9.87 +			throws UnsupportedRdbmsOperatorException {
    9.88 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.89 +		
    9.90 +	}
    9.91 +	@Override
    9.92 +	protected void append(GeneralDBSqlFinishes expr,
    9.93 +			GeneralDBSqlExprBuilder filter)
    9.94 +			throws UnsupportedRdbmsOperatorException {
    9.95 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
    9.96 +		
    9.97 +	}
    9.98 +	@Override
    9.99 +	protected void append(GeneralDBSqlAdjacentPeriod expr,
   9.100 +			GeneralDBSqlExprBuilder filter)
   9.101 +			throws UnsupportedRdbmsOperatorException {
   9.102 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
   9.103 +		
   9.104 +	}
   9.105 +	
   9.106 +	
   9.107 +	@Override
   9.108  	protected void append(GeneralDBSqlPeriodIntersection expr, GeneralDBSqlExprBuilder filter)
   9.109  			throws UnsupportedRdbmsOperatorException
   9.110  			{
   9.111 @@ -1499,7 +1530,7 @@
   9.112  				}
   9.113  			}
   9.114  			/////
   9.115 -			
   9.116 +			filter.appendFunction(func); //postgres temporal operators get deprecated. I will use the function names instead- constant
   9.117  			filter.openBracket();
   9.118  			if (expr.getLeftArg() instanceof GeneralDBSqlTemporalConstructBinary)
   9.119  			{
   9.120 @@ -1529,7 +1560,7 @@
   9.121  			{
   9.122  				appendConstructFunction(expr.getLeftArg(), filter);
   9.123  			}
   9.124 -			else if(expr.getLeftArg() instanceof GeneralDBSqlCase)
   9.125 +			else if(expr.getLeftArg(functionName) instanceof GeneralDBSqlCase)
   9.126  			{
   9.127  				GeneralDBLabelColumn onlyLabel = (GeneralDBLabelColumn)((GeneralDBSqlCase)expr.getLeftArg()).getEntries().get(0).getResult();
   9.128  				appendMBB(onlyLabel,filter); 
   9.129 @@ -1540,8 +1571,8 @@
   9.130  			}*/
   9.131  			//filter.appendComma();
   9.132  
   9.133 -			
   9.134 -//			//filter.openBracket();
   9.135 +						//filter.openBracket();
   9.136 +			filter.appendComma();
   9.137  			if (expr.getRightArg() instanceof GeneralDBSqlTemporalConstructBinary)
   9.138  			{
   9.139  				appendConstructFunction(expr.getRightArg(), filter);