Strabon

changeset 1226:7d77478a877f

#32 added result type in GeneralDBSqlSpatialConstructUnary, GeneralDBSqlSpatialConstructBinary
and GeneralDBSqlSpatialConstructTriple in order to remember whether the datatype is WKT or WktLiteral.
author Stella Giannakopoulou <sgian@di.uoa.gr>
date Tue Jul 16 19:21:12 2013 +0300 (2013-07-16)
parents d928a2a245f5
children 33a5a1ae743a
files generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoBoundary.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoBuffer.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoConvexHull.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoDifference.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoEnvelope.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoIntersection.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoSymDifference.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoTransform.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoUnion.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlST_Centroid.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlST_MakeLine.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructBinary.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructTriple.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructUnary.java 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/factories/GeneralDBNumericExprFactory.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoBoundary.java	Sun Jul 14 00:34:25 2013 +0300
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoBoundary.java	Tue Jul 16 19:21:12 2013 +0300
     1.3 @@ -5,14 +5,14 @@
     1.4   */
     1.5  package org.openrdf.sail.generaldb.algebra;
     1.6  
     1.7 -  
     1.8 +
     1.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    1.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    1.11  
    1.12  public class GeneralDBSqlGeoBoundary extends GeneralDBSqlSpatialConstructUnary{
    1.13  
    1.14 -	public GeneralDBSqlGeoBoundary(GeneralDBSqlExpr expr) {
    1.15 -		super(expr);
    1.16 +	public GeneralDBSqlGeoBoundary(GeneralDBSqlExpr expr, String resultType) {
    1.17 +		super(expr, resultType);
    1.18  	}
    1.19  
    1.20  	@Override
    1.21 @@ -22,4 +22,4 @@
    1.22  		visitor.meet(this);
    1.23  	}
    1.24  
    1.25 -}
    1.26 \ No newline at end of file
    1.27 +}
     2.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoBuffer.java	Sun Jul 14 00:34:25 2013 +0300
     2.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoBuffer.java	Tue Jul 16 19:21:12 2013 +0300
     2.3 @@ -5,15 +5,15 @@
     2.4   */
     2.5  package org.openrdf.sail.generaldb.algebra;
     2.6  
     2.7 -  
     2.8 +
     2.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    2.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    2.11  
    2.12  public class GeneralDBSqlGeoBuffer extends GeneralDBSqlSpatialConstructTriple {
    2.13  
    2.14 -	public GeneralDBSqlGeoBuffer(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third)
    2.15 +	public GeneralDBSqlGeoBuffer(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third, String resultType)
    2.16  	{
    2.17 -		super(left, right, third);
    2.18 +		super(left, right, third, resultType);
    2.19  	}
    2.20  
    2.21  	@Override
    2.22 @@ -21,4 +21,4 @@
    2.23  	{
    2.24  		visitor.meet(this);
    2.25  	}
    2.26 -}
    2.27 \ No newline at end of file
    2.28 +}
     3.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoConvexHull.java	Sun Jul 14 00:34:25 2013 +0300
     3.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoConvexHull.java	Tue Jul 16 19:21:12 2013 +0300
     3.3 @@ -5,14 +5,14 @@
     3.4   */
     3.5  package org.openrdf.sail.generaldb.algebra;
     3.6  
     3.7 -  
     3.8 +
     3.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    3.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    3.11  
    3.12  public class GeneralDBSqlGeoConvexHull extends GeneralDBSqlSpatialConstructUnary{
    3.13  
    3.14 -	public GeneralDBSqlGeoConvexHull(GeneralDBSqlExpr expr) {
    3.15 -		super(expr);
    3.16 +	public GeneralDBSqlGeoConvexHull(GeneralDBSqlExpr expr, String resultType) {
    3.17 +		super(expr, resultType);
    3.18  	}
    3.19  
    3.20  	@Override
    3.21 @@ -22,4 +22,4 @@
    3.22  		visitor.meet(this);
    3.23  	}
    3.24  
    3.25 -}
    3.26 \ No newline at end of file
    3.27 +}
     4.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoDifference.java	Sun Jul 14 00:34:25 2013 +0300
     4.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoDifference.java	Tue Jul 16 19:21:12 2013 +0300
     4.3 @@ -2,21 +2,21 @@
     4.4   * This Source Code Form is subject to the terms of the Mozilla Public
     4.5   * License, v. 2.0. If a copy of the MPL was not distributed with this
     4.6   * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     4.7 - * 
     4.8 + *
     4.9   * Copyright (C) 2010, 2011, 2012, 2013 Pyravlos Team
    4.10 - * 
    4.11 + *
    4.12   * http://www.strabon.di.uoa.gr/
    4.13   */
    4.14  package org.openrdf.sail.generaldb.algebra;
    4.15  
    4.16 -  
    4.17 +
    4.18  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    4.19  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    4.20  
    4.21  public class GeneralDBSqlGeoDifference extends GeneralDBSqlSpatialConstructBinary {
    4.22  
    4.23 -	public GeneralDBSqlGeoDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    4.24 -		super(left, right);
    4.25 +	public GeneralDBSqlGeoDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
    4.26 +		super(left, right, resultType);
    4.27  	}
    4.28  
    4.29  	@Override
    4.30 @@ -26,4 +26,4 @@
    4.31  		visitor.meet(this);
    4.32  	}
    4.33  
    4.34 -}
    4.35 \ No newline at end of file
    4.36 +}
     5.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoEnvelope.java	Sun Jul 14 00:34:25 2013 +0300
     5.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoEnvelope.java	Tue Jul 16 19:21:12 2013 +0300
     5.3 @@ -5,14 +5,14 @@
     5.4   */
     5.5  package org.openrdf.sail.generaldb.algebra;
     5.6  
     5.7 -  
     5.8 +
     5.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    5.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    5.11  
    5.12  public class GeneralDBSqlGeoEnvelope extends GeneralDBSqlSpatialConstructUnary{
    5.13  
    5.14 -	public GeneralDBSqlGeoEnvelope(GeneralDBSqlExpr expr) {
    5.15 -		super(expr);
    5.16 +	public GeneralDBSqlGeoEnvelope(GeneralDBSqlExpr expr, String resultType) {
    5.17 +		super(expr, resultType);
    5.18  	}
    5.19  
    5.20  	@Override
    5.21 @@ -22,4 +22,4 @@
    5.22  		visitor.meet(this);
    5.23  	}
    5.24  
    5.25 -}
    5.26 \ No newline at end of file
    5.27 +}
     6.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoIntersection.java	Sun Jul 14 00:34:25 2013 +0300
     6.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoIntersection.java	Tue Jul 16 19:21:12 2013 +0300
     6.3 @@ -5,14 +5,14 @@
     6.4   */
     6.5  package org.openrdf.sail.generaldb.algebra;
     6.6  
     6.7 -  
     6.8 +
     6.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    6.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    6.11  
    6.12  public class GeneralDBSqlGeoIntersection extends GeneralDBSqlSpatialConstructBinary{
    6.13  
    6.14 -	public GeneralDBSqlGeoIntersection(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    6.15 -		super(left, right);
    6.16 +	public GeneralDBSqlGeoIntersection(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
    6.17 +		super(left, right, resultType);
    6.18  	}
    6.19  
    6.20  	@Override
    6.21 @@ -22,4 +22,4 @@
    6.22  		visitor.meet(this);
    6.23  	}
    6.24  
    6.25 -}
    6.26 \ No newline at end of file
    6.27 +}
     7.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoSymDifference.java	Sun Jul 14 00:34:25 2013 +0300
     7.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoSymDifference.java	Tue Jul 16 19:21:12 2013 +0300
     7.3 @@ -5,14 +5,14 @@
     7.4   */
     7.5  package org.openrdf.sail.generaldb.algebra;
     7.6  
     7.7 -  
     7.8 +
     7.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    7.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    7.11  
    7.12  public class GeneralDBSqlGeoSymDifference extends GeneralDBSqlSpatialConstructBinary{
    7.13  
    7.14 -	public GeneralDBSqlGeoSymDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    7.15 -		super(left, right);
    7.16 +	public GeneralDBSqlGeoSymDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
    7.17 +		super(left, right, resultType);
    7.18  	}
    7.19  
    7.20  	@Override
    7.21 @@ -22,4 +22,4 @@
    7.22  		visitor.meet(this);
    7.23  	}
    7.24  
    7.25 -}
    7.26 \ No newline at end of file
    7.27 +}
     8.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoTransform.java	Sun Jul 14 00:34:25 2013 +0300
     8.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoTransform.java	Tue Jul 16 19:21:12 2013 +0300
     8.3 @@ -5,14 +5,14 @@
     8.4   */
     8.5  package org.openrdf.sail.generaldb.algebra;
     8.6  
     8.7 -  
     8.8 +
     8.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    8.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    8.11  
    8.12  public class GeneralDBSqlGeoTransform extends GeneralDBSqlSpatialConstructBinary{
    8.13  
    8.14 -	public GeneralDBSqlGeoTransform(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    8.15 -		super(left, right);
    8.16 +	public GeneralDBSqlGeoTransform(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
    8.17 +		super(left, right, resultType);
    8.18  	}
    8.19  
    8.20  	@Override
    8.21 @@ -22,4 +22,4 @@
    8.22  		visitor.meet(this);
    8.23  	}
    8.24  
    8.25 -}
    8.26 \ No newline at end of file
    8.27 +}
     9.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoUnion.java	Sun Jul 14 00:34:25 2013 +0300
     9.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlGeoUnion.java	Tue Jul 16 19:21:12 2013 +0300
     9.3 @@ -5,14 +5,14 @@
     9.4   */
     9.5  package org.openrdf.sail.generaldb.algebra;
     9.6  
     9.7 -  
     9.8 +
     9.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    9.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    9.11  
    9.12  public class GeneralDBSqlGeoUnion extends GeneralDBSqlSpatialConstructBinary{
    9.13  
    9.14 -	public GeneralDBSqlGeoUnion(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    9.15 -		super(left, right);
    9.16 +	public GeneralDBSqlGeoUnion(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
    9.17 +		super(left, right, resultType);
    9.18  	}
    9.19  
    9.20  	@Override
    9.21 @@ -22,4 +22,4 @@
    9.22  		visitor.meet(this);
    9.23  	}
    9.24  
    9.25 -}
    9.26 \ No newline at end of file
    9.27 +}
    10.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlST_Centroid.java	Sun Jul 14 00:34:25 2013 +0300
    10.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlST_Centroid.java	Tue Jul 16 19:21:12 2013 +0300
    10.3 @@ -2,9 +2,9 @@
    10.4   * This Source Code Form is subject to the terms of the Mozilla Public
    10.5   * License, v. 2.0. If a copy of the MPL was not distributed with this
    10.6   * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    10.7 - * 
    10.8 + *
    10.9   * Copyright (C) 2013, Pyravlos Team
   10.10 - * 
   10.11 + *
   10.12   * http://www.strabon.di.uoa.gr/
   10.13   */
   10.14  package org.openrdf.sail.generaldb.algebra;
   10.15 @@ -17,8 +17,8 @@
   10.16   */
   10.17  public class GeneralDBSqlST_Centroid extends GeneralDBSqlSpatialConstructUnary {
   10.18  
   10.19 -	public GeneralDBSqlST_Centroid(GeneralDBSqlExpr expr) {
   10.20 -		super(expr);
   10.21 +	public GeneralDBSqlST_Centroid(GeneralDBSqlExpr expr, String resultType) {
   10.22 +		super(expr, resultType);
   10.23  	}
   10.24  
   10.25  }
    11.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlST_MakeLine.java	Sun Jul 14 00:34:25 2013 +0300
    11.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlST_MakeLine.java	Tue Jul 16 19:21:12 2013 +0300
    11.3 @@ -2,9 +2,9 @@
    11.4   * This Source Code Form is subject to the terms of the Mozilla Public
    11.5   * License, v. 2.0. If a copy of the MPL was not distributed with this
    11.6   * file, You can obtain one at http://mozilla.org/MPL/2.0/.
    11.7 - * 
    11.8 + *
    11.9   * Copyright (C) 2013, Pyravlos Team
   11.10 - * 
   11.11 + *
   11.12   * http://www.strabon.di.uoa.gr/
   11.13   */
   11.14  package org.openrdf.sail.generaldb.algebra;
   11.15 @@ -17,8 +17,8 @@
   11.16   */
   11.17  public class GeneralDBSqlST_MakeLine extends GeneralDBSqlSpatialConstructBinary {
   11.18  
   11.19 -	public GeneralDBSqlST_MakeLine(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   11.20 -		super(left, right);
   11.21 +	public GeneralDBSqlST_MakeLine(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
   11.22 +		super(left, right, resultType);
   11.23  	}
   11.24  
   11.25  	@Override
    12.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructBinary.java	Sun Jul 14 00:34:25 2013 +0300
    12.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructBinary.java	Tue Jul 16 19:21:12 2013 +0300
    12.3 @@ -5,12 +5,15 @@
    12.4  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    12.5  
    12.6  /**
    12.7 - * 
    12.8 + *
    12.9   * @author Manos Karpathiotakis <mk@di.uoa.gr>
   12.10   */
   12.11  public class GeneralDBSqlSpatialConstructBinary extends BinaryGeneralDBOperator {
   12.12 -	public GeneralDBSqlSpatialConstructBinary(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   12.13 +	private String resultType;
   12.14 +
   12.15 +	public GeneralDBSqlSpatialConstructBinary(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
   12.16  		super(left, right);
   12.17 +		this.resultType = resultType;
   12.18  	}
   12.19  
   12.20  	@Override
   12.21 @@ -19,6 +22,14 @@
   12.22  	{
   12.23  		visitor.meet(this);
   12.24  	}
   12.25 +
   12.26 +	public String getResultType() {
   12.27 +		return resultType;
   12.28 +	}
   12.29 +
   12.30 +	public void setResultType(String resultType) {
   12.31 +		this.resultType = resultType;
   12.32 +	}
   12.33  }
   12.34  
   12.35  
    13.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructTriple.java	Sun Jul 14 00:34:25 2013 +0300
    13.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructTriple.java	Tue Jul 16 19:21:12 2013 +0300
    13.3 @@ -10,9 +10,12 @@
    13.4  import org.openrdf.sail.generaldb.algebra.base.TripleGeneralDBOperator;
    13.5  
    13.6  public class GeneralDBSqlSpatialConstructTriple extends TripleGeneralDBOperator {
    13.7 -	public GeneralDBSqlSpatialConstructTriple(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third) 
    13.8 +	private String resultType;
    13.9 +
   13.10 +	public GeneralDBSqlSpatialConstructTriple(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third, String resultType)
   13.11  	{
   13.12  		super(left, right, third);
   13.13 +		this.resultType = resultType;
   13.14  	}
   13.15  
   13.16  	@Override
   13.17 @@ -20,4 +23,12 @@
   13.18  	{
   13.19  		visitor.meet(this);
   13.20  	}
   13.21 +
   13.22 +	public String getResultType() {
   13.23 +		return resultType;
   13.24 +	}
   13.25 +
   13.26 +	public void setResultType(String resultType) {
   13.27 +		this.resultType = resultType;
   13.28 +	}
   13.29  }
    14.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructUnary.java	Sun Jul 14 00:34:25 2013 +0300
    14.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBSqlSpatialConstructUnary.java	Tue Jul 16 19:21:12 2013 +0300
    14.3 @@ -1,20 +1,16 @@
    14.4  package org.openrdf.sail.generaldb.algebra;
    14.5  
    14.6 -import java.util.ArrayList;
    14.7 -
    14.8 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator;
    14.9  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
   14.10  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
   14.11  import org.openrdf.sail.generaldb.algebra.base.UnaryGeneralDBOperator;
   14.12  
   14.13  public class GeneralDBSqlSpatialConstructUnary extends UnaryGeneralDBOperator
   14.14  {
   14.15 -	
   14.16 +	private String resultType;
   14.17  
   14.18 -	/*CONSTRUCTOR*/
   14.19 -	
   14.20 -	public GeneralDBSqlSpatialConstructUnary(GeneralDBSqlExpr expr) {
   14.21 +	public GeneralDBSqlSpatialConstructUnary(GeneralDBSqlExpr expr, String resultType) {
   14.22  		super(expr);
   14.23 +		this.resultType = resultType;
   14.24  	}
   14.25  
   14.26  	@Override
   14.27 @@ -24,4 +20,11 @@
   14.28  		visitor.meet(this);
   14.29  	}
   14.30  
   14.31 -}
   14.32 \ No newline at end of file
   14.33 +	public String getResultType() {
   14.34 +		return resultType;
   14.35 +	}
   14.36 +
   14.37 +	public void setResultType(String resultType) {
   14.38 +		this.resultType = resultType;
   14.39 +	}
   14.40 +}
    15.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Sun Jul 14 00:34:25 2013 +0300
    15.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Tue Jul 16 19:21:12 2013 +0300
    15.3 @@ -96,10 +96,10 @@
    15.4  
    15.5  /**
    15.6   * Support method to create SQL expressions.
    15.7 - * 
    15.8 + *
    15.9   * @author Manos Karpathiotakis <mk@di.uoa.gr>
   15.10   * @author James Leigh
   15.11 - * 
   15.12 + *
   15.13   */
   15.14  public class GeneralDBExprSupport {
   15.15  
   15.16 @@ -273,35 +273,35 @@
   15.17  		// no constructor
   15.18  	}
   15.19  
   15.20 -	//XXX Spatial Relationship Functions - all 9 of them - stSPARQL++	
   15.21 +	//XXX Spatial Relationship Functions - all 9 of them - stSPARQL++
   15.22  	public static GeneralDBSqlExpr equalsGeo(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.23  		return new GeneralDBSqlEqualsSpatial(left, right);
   15.24  	}
   15.25 -	
   15.26 +
   15.27  	public static GeneralDBSqlExpr disjoint(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.28  		return new GeneralDBSqlDisjoint(left, right);
   15.29  	}
   15.30 -	
   15.31 +
   15.32  	public static GeneralDBSqlExpr intersects(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.33  		return new GeneralDBSqlIntersects(left, right);
   15.34  	}
   15.35 -	
   15.36 +
   15.37  	public static GeneralDBSqlExpr touches(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.38  		return new GeneralDBSqlTouches(left, right);
   15.39  	}
   15.40 -	
   15.41 +
   15.42  	public static GeneralDBSqlExpr crosses(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.43  		return new GeneralDBSqlCrosses(left, right);
   15.44  	}
   15.45 -	
   15.46 +
   15.47  	public static GeneralDBSqlExpr within(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.48  		return new GeneralDBSqlWithin(left, right);
   15.49  	}
   15.50 -	
   15.51 +
   15.52  	public static GeneralDBSqlExpr contains(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.53  		return new GeneralDBSqlContains(left, right);
   15.54  	}
   15.55 -	
   15.56 +
   15.57  	public static GeneralDBSqlExpr overlaps(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.58  		return new GeneralDBSqlOverlaps(left, right);
   15.59  	}
   15.60 @@ -309,16 +309,16 @@
   15.61  	public static GeneralDBSqlExpr relate(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third) {
   15.62  		return new GeneralDBSqlRelate(left, right,third);
   15.63  	}
   15.64 -	
   15.65 +
   15.66  	// mbb functions
   15.67 -	
   15.68 +
   15.69  	public static GeneralDBSqlExpr mbbIntersects(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.70  		return new GeneralDBSqlMbbIntersects(left, right);
   15.71  	}
   15.72  	public static GeneralDBSqlExpr mbbWithin(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.73  		return new GeneralDBSqlMbbWithin(left, right);
   15.74  	}
   15.75 -		
   15.76 +
   15.77  	public static GeneralDBSqlExpr mbbEqualsGeo(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.78  		return new GeneralDBSqlMbbEquals(left, right);
   15.79  	}
   15.80 @@ -326,116 +326,116 @@
   15.81  	public static GeneralDBSqlExpr mbbContains(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.82  		return new GeneralDBSqlMbbContains(left, right);
   15.83  	}
   15.84 -	
   15.85 +
   15.86  	// directional
   15.87 -	
   15.88 +
   15.89  	public static GeneralDBSqlExpr left(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.90  		return new GeneralDBSqlLeft(left, right);
   15.91  	}
   15.92 -	
   15.93 +
   15.94  	public static GeneralDBSqlExpr right(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
   15.95  		return new GeneralDBSqlRight(left, right);
   15.96  	}
   15.97 -	
   15.98 +
   15.99  	public static GeneralDBSqlExpr above(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.100  		return new GeneralDBSqlAbove(left, right);
  15.101  	}
  15.102 -	
  15.103 +
  15.104  	public static GeneralDBSqlExpr below(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.105  		return new GeneralDBSqlBelow(left, right);
  15.106  	}
  15.107  
  15.108  	//XXX Spatial Construct Functions
  15.109 -	public static GeneralDBSqlExpr geoUnion(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.110 +	public static GeneralDBSqlExpr geoUnion(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
  15.111  
  15.112 -		return new GeneralDBSqlGeoUnion(left, right);
  15.113 +		return new GeneralDBSqlGeoUnion(left, right, resultType);
  15.114  	}
  15.115  
  15.116 -	public static GeneralDBSqlExpr geoBuffer(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third) {
  15.117 +	public static GeneralDBSqlExpr geoBuffer(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third, String resultType) {
  15.118  
  15.119 -		return new GeneralDBSqlGeoBuffer(left, right, third);
  15.120 -	}
  15.121 -	
  15.122 -	public static GeneralDBSqlExpr geoTransform(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.123 -
  15.124 -		return new GeneralDBSqlGeoTransform(left, right);
  15.125 -	}
  15.126 -	
  15.127 -	public static GeneralDBSqlExpr geoEnvelope(GeneralDBSqlExpr expr) {
  15.128 -
  15.129 -		return new GeneralDBSqlGeoEnvelope(expr);
  15.130 -	}
  15.131 -	
  15.132 -	public static GeneralDBSqlExpr geoConvexHull(GeneralDBSqlExpr expr) {
  15.133 -
  15.134 -		return new GeneralDBSqlGeoConvexHull(expr);
  15.135 -	}
  15.136 -	
  15.137 -	public static GeneralDBSqlExpr geoBoundary(GeneralDBSqlExpr expr) {
  15.138 -
  15.139 -		return new GeneralDBSqlGeoBoundary(expr);
  15.140 +		return new GeneralDBSqlGeoBuffer(left, right, third, resultType);
  15.141  	}
  15.142  
  15.143 -	public static GeneralDBSqlExpr geoIntersection(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.144 +	public static GeneralDBSqlExpr geoTransform(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
  15.145  
  15.146 -		return new GeneralDBSqlGeoIntersection(left, right);
  15.147 +		return new GeneralDBSqlGeoTransform(left, right, resultType);
  15.148  	}
  15.149 -	
  15.150 -	public static GeneralDBSqlExpr geoDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.151  
  15.152 -		return new GeneralDBSqlGeoDifference(left, right);
  15.153 +	public static GeneralDBSqlExpr geoEnvelope(GeneralDBSqlExpr expr, String resultType) {
  15.154 +
  15.155 +		return new GeneralDBSqlGeoEnvelope(expr, resultType);
  15.156  	}
  15.157 -	
  15.158 -	public static GeneralDBSqlExpr geoSymDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.159  
  15.160 -		return new GeneralDBSqlGeoSymDifference(left, right);
  15.161 +	public static GeneralDBSqlExpr geoConvexHull(GeneralDBSqlExpr expr, String resultType) {
  15.162 +
  15.163 +		return new GeneralDBSqlGeoConvexHull(expr, resultType);
  15.164  	}
  15.165 -	
  15.166 +
  15.167 +	public static GeneralDBSqlExpr geoBoundary(GeneralDBSqlExpr expr, String resultType) {
  15.168 +
  15.169 +		return new GeneralDBSqlGeoBoundary(expr, resultType);
  15.170 +	}
  15.171 +
  15.172 +	public static GeneralDBSqlExpr geoIntersection(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
  15.173 +
  15.174 +		return new GeneralDBSqlGeoIntersection(left, right, resultType);
  15.175 +	}
  15.176 +
  15.177 +	public static GeneralDBSqlExpr geoDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
  15.178 +
  15.179 +		return new GeneralDBSqlGeoDifference(left, right, resultType);
  15.180 +	}
  15.181 +
  15.182 +	public static GeneralDBSqlExpr geoSymDifference(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
  15.183 +
  15.184 +		return new GeneralDBSqlGeoSymDifference(left, right, resultType);
  15.185 +	}
  15.186 +
  15.187  	/** PostGIS Construct functions **/
  15.188  	// Binary
  15.189 -	public static GeneralDBSqlExpr st_MakeLine(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.190 +	public static GeneralDBSqlExpr st_MakeLine(GeneralDBSqlExpr left, GeneralDBSqlExpr right, String resultType) {
  15.191  
  15.192 -		return new GeneralDBSqlST_MakeLine(left, right);
  15.193 +		return new GeneralDBSqlST_MakeLine(left, right, resultType);
  15.194  	}
  15.195  	// Unary
  15.196 -	public static GeneralDBSqlExpr st_Centroid(GeneralDBSqlExpr expr) {
  15.197 +	public static GeneralDBSqlExpr st_Centroid(GeneralDBSqlExpr expr, String resultType) {
  15.198  
  15.199 -		return new GeneralDBSqlST_Centroid(expr);
  15.200 +		return new GeneralDBSqlST_Centroid(expr, resultType);
  15.201  	}
  15.202  	/** PostGIS Construct functions **/
  15.203 -	
  15.204 -	
  15.205 +
  15.206 +
  15.207  	/** Addition for datetime metric functions
  15.208 -	 * 
  15.209 +	 *
  15.210  	 * @author George Garbis <ggarbis@di.uoa.gr>
  15.211 -	 * 
  15.212 +	 *
  15.213  	 */
  15.214  	public static GeneralDBSqlExpr extDiffDateTime(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.215  
  15.216  		return new GeneralDBSqlExtDiffDateTime(left, right);
  15.217  	}
  15.218  	/***/
  15.219 -	
  15.220 +
  15.221  	/** Addition for datetime metric functions
  15.222 -	 * 
  15.223 +	 *
  15.224  	 * @author George Garbis <ggarbis@di.uoa.gr>
  15.225 -	 * 
  15.226 +	 *
  15.227  	 */
  15.228  	public static GeneralDBSqlExpr diffDateTime(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.229  
  15.230  		return new GeneralDBSqlDiffDateTime(left, right);
  15.231  	}
  15.232  	/***/
  15.233 -	
  15.234 +
  15.235  	//XXX Spatial Metric Functions
  15.236  	public static GeneralDBSqlExpr geoArea(GeneralDBSqlExpr expr) {
  15.237  		return new GeneralDBSqlGeoArea(expr);
  15.238  	}
  15.239 -	
  15.240 +
  15.241  	public static GeneralDBSqlExpr geoDistance(GeneralDBSqlExpr left, GeneralDBSqlExpr right, GeneralDBSqlExpr third) {
  15.242  		return new GeneralDBSqlGeoDistance(left, right,third);
  15.243  	}
  15.244 -	
  15.245 +
  15.246  	//XXX Spatial Property Functions
  15.247  	public static GeneralDBSqlExpr dimension(GeneralDBSqlExpr expr) {
  15.248  		return new GeneralDBSqlGeoDimension(expr);
  15.249 @@ -444,11 +444,11 @@
  15.250  	public static GeneralDBSqlExpr geometryType(GeneralDBSqlExpr expr) {
  15.251  		return new GeneralDBSqlGeoGeometryType(expr);
  15.252  	}
  15.253 -	
  15.254 +
  15.255  	public static GeneralDBSqlExpr asText(GeneralDBSqlExpr expr) {
  15.256  		return new GeneralDBSqlGeoAsText(expr);
  15.257  	}
  15.258 -	
  15.259 +
  15.260  	public static GeneralDBSqlExpr asGML(GeneralDBSqlExpr expr) {
  15.261  		return new GeneralDBSqlGeoAsGML(expr);
  15.262  	}
  15.263 @@ -456,7 +456,7 @@
  15.264  	public static GeneralDBSqlExpr srid(GeneralDBSqlExpr expr) {
  15.265  		return new GeneralDBSqlGeoSrid(expr);
  15.266  	}
  15.267 -	
  15.268 +
  15.269  	public static GeneralDBSqlExpr isEmpty(GeneralDBSqlExpr expr) {
  15.270  		return new GeneralDBSqlGeoIsEmpty(expr);
  15.271  	}
  15.272 @@ -464,7 +464,7 @@
  15.273  	public static GeneralDBSqlExpr isSimple(GeneralDBSqlExpr expr) {
  15.274  		return new GeneralDBSqlGeoIsSimple(expr);
  15.275  	}
  15.276 -	
  15.277 +
  15.278  
  15.279  	// GeoSPARQL - Spatial Relations
  15.280  	//Simple Features
  15.281 @@ -495,7 +495,7 @@
  15.282  	public static GeneralDBSqlExpr sfTouches(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.283  		return new GeneralDBSqlSF_Touches(left, right);
  15.284  	}
  15.285 -	
  15.286 +
  15.287  	public static GeneralDBSqlExpr sfWithin(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.288  		return new GeneralDBSqlSF_Within(left, right);
  15.289  	}
  15.290 @@ -528,11 +528,11 @@
  15.291  	public static GeneralDBSqlExpr rccNonTangentialProperPart(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.292  		return new GeneralDBSqlRCC8_Ntpp(left, right);
  15.293  	}
  15.294 -	
  15.295 +
  15.296  	public static GeneralDBSqlExpr rccNonTangentialProperPartInverse(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.297  		return new GeneralDBSqlRCC8_Ntppi(left, right);
  15.298  	}
  15.299 -	
  15.300 +
  15.301  	//Egenhofer
  15.302  	public static GeneralDBSqlExpr ehContains(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.303  		return new GeneralDBSqlEgenhofer_Contains(left, right);
  15.304 @@ -561,7 +561,7 @@
  15.305  	public static GeneralDBSqlExpr ehMeet(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.306  		return new GeneralDBSqlEgenhofer_Meet(left, right);
  15.307  	}
  15.308 -	
  15.309 +
  15.310  	public static GeneralDBSqlExpr ehOverlap(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
  15.311  		return new GeneralDBSqlEgenhofer_Overlap(left, right);
  15.312  	}
    16.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Sun Jul 14 00:34:25 2013 +0300
    16.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Tue Jul 16 19:21:12 2013 +0300
    16.3 @@ -1189,81 +1189,81 @@
    16.4  	{
    16.5  		if(function.getURI().equals(GeoConstants.stSPARQLunion))
    16.6  		{
    16.7 -			return geoUnion(leftArg, rightArg);
    16.8 +			return geoUnion(leftArg, rightArg, GeoConstants.WKT);
    16.9  		}
   16.10  		else if(function.getURI().equals(GeoConstants.stSPARQLbuffer))
   16.11  		{
   16.12 -			return geoBuffer(leftArg, rightArg, thirdArg);
   16.13 +			return geoBuffer(leftArg, rightArg, thirdArg, GeoConstants.WKT);
   16.14  		}
   16.15  		else if(function.getURI().equals(GeoConstants.stSPARQLtransform))
   16.16  		{
   16.17 -			return geoTransform(leftArg,rightArg);
   16.18 +			return geoTransform(leftArg,rightArg,GeoConstants.WKT);
   16.19  		}
   16.20  		else if(function.getURI().equals(GeoConstants.stSPARQLenvelope))
   16.21  		{
   16.22 -			return geoEnvelope(leftArg);
   16.23 +			return geoEnvelope(leftArg, GeoConstants.WKT);
   16.24  		}
   16.25  		else if(function.getURI().equals(GeoConstants.stSPARQLconvexHull))
   16.26  		{
   16.27 -			return geoConvexHull(leftArg);
   16.28 +			return geoConvexHull(leftArg, GeoConstants.WKT);
   16.29  		}
   16.30  		else if(function.getURI().equals(GeoConstants.stSPARQLboundary))
   16.31  		{
   16.32 -			return geoBoundary(leftArg);
   16.33 +			return geoBoundary(leftArg, GeoConstants.WKT);
   16.34  		}
   16.35  		else if(function.getURI().equals(GeoConstants.stSPARQLintersection))
   16.36  		{
   16.37 -			return geoIntersection(leftArg, rightArg);
   16.38 +			return geoIntersection(leftArg, rightArg, GeoConstants.WKT);
   16.39  		}
   16.40  		else if(function.getURI().equals(GeoConstants.stSPARQLdifference))
   16.41  		{
   16.42 -			return geoDifference(leftArg, rightArg);
   16.43 +			return geoDifference(leftArg, rightArg, GeoConstants.WKT);
   16.44  		}
   16.45  		else if(function.getURI().equals(GeoConstants.stSPARQLsymDifference))
   16.46  		{
   16.47 -			return geoSymDifference(leftArg, rightArg);
   16.48 +			return geoSymDifference(leftArg, rightArg, GeoConstants.WKT);
   16.49  		}
   16.50  		//XXX GeoSPARQL - Non topological - except distance		
   16.51  		else if(function.getURI().equals(GeoConstants.geoSparqlConvexHull))
   16.52  		{
   16.53 -			return geoConvexHull(leftArg);
   16.54 +			return geoConvexHull(leftArg, GeoConstants.WKTLITERAL);
   16.55  		}
   16.56  		else if(function.getURI().equals(GeoConstants.geoSparqlIntersection))
   16.57  		{
   16.58 -			return geoIntersection(leftArg, rightArg);
   16.59 +			return geoIntersection(leftArg, rightArg, GeoConstants.WKTLITERAL);
   16.60  		}
   16.61  		else if(function.getURI().equals(GeoConstants.geoSparqlUnion))
   16.62  		{
   16.63 -			return geoUnion(leftArg, rightArg);
   16.64 +			return geoUnion(leftArg, rightArg, GeoConstants.WKTLITERAL);
   16.65  		}
   16.66  		else if(function.getURI().equals(GeoConstants.geoSparqlDifference))
   16.67  		{
   16.68 -			return geoDifference(leftArg, rightArg);
   16.69 +			return geoDifference(leftArg, rightArg, GeoConstants.WKTLITERAL);
   16.70  		}
   16.71  		else if(function.getURI().equals(GeoConstants.geoSparqlSymmetricDifference))
   16.72  		{
   16.73 -			return geoSymDifference(leftArg, rightArg);
   16.74 +			return geoSymDifference(leftArg, rightArg, GeoConstants.WKTLITERAL);
   16.75  		}
   16.76  		else if(function.getURI().equals(GeoConstants.geoSparqlEnvelope))
   16.77  		{
   16.78 -			return geoEnvelope(leftArg);
   16.79 +			return geoEnvelope(leftArg, GeoConstants.WKTLITERAL);
   16.80  		}
   16.81  		else if(function.getURI().equals(GeoConstants.geoSparqlBoundary))
   16.82  		{
   16.83 -			return geoBoundary(leftArg);
   16.84 +			return geoBoundary(leftArg, GeoConstants.WKTLITERAL);
   16.85  		}
   16.86  		else if(function.getURI().equals(GeoConstants.geoSparqlBuffer))
   16.87  		{
   16.88 -			return geoBuffer(leftArg, rightArg, thirdArg);
   16.89 +			return geoBuffer(leftArg, rightArg, thirdArg, GeoConstants.WKTLITERAL);
   16.90  		}
   16.91  		/* PostGIS Construct functions */
   16.92  		else if (function.getURI().equals(PostGIS.ST_MAKELINE))
   16.93  		{
   16.94 -			return st_MakeLine(leftArg, rightArg);
   16.95 +			return st_MakeLine(leftArg, rightArg, GeoConstants.WKT);
   16.96  		}
   16.97  		else if (function.getURI().equals(PostGIS.ST_CENTROID))
   16.98  		{
   16.99 -			return st_Centroid(leftArg);
  16.100 +			return st_Centroid(leftArg, GeoConstants.WKT);
  16.101  		}
  16.102  		/* PostGIS Construct functions */
  16.103  
    17.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBNumericExprFactory.java	Sun Jul 14 00:34:25 2013 +0300
    17.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBNumericExprFactory.java	Tue Jul 16 19:21:12 2013 +0300
    17.3 @@ -431,81 +431,81 @@
    17.4  	{
    17.5  		if(function.getURI().equals(GeoConstants.stSPARQLunion))
    17.6  		{
    17.7 -			return geoUnion(leftArg, rightArg);
    17.8 +			return geoUnion(leftArg, rightArg, GeoConstants.WKT);
    17.9  		}
   17.10  		else if(function.getURI().equals(GeoConstants.stSPARQLbuffer))
   17.11  		{
   17.12 -			return geoBuffer(leftArg,rightArg, thirdArg);
   17.13 +			return geoBuffer(leftArg,rightArg, thirdArg, GeoConstants.WKT);
   17.14  		}
   17.15  		else if(function.getURI().equals(GeoConstants.stSPARQLtransform))
   17.16  		{
   17.17 -			return geoTransform(leftArg,rightArg);
   17.18 +			return geoTransform(leftArg,rightArg, GeoConstants.WKT);
   17.19  		}
   17.20  		else if(function.getURI().equals(GeoConstants.stSPARQLenvelope))
   17.21  		{
   17.22 -			return geoEnvelope(leftArg);
   17.23 +			return geoEnvelope(leftArg, GeoConstants.WKT);
   17.24  		}
   17.25  		else if(function.getURI().equals(GeoConstants.stSPARQLconvexHull))
   17.26  		{
   17.27 -			return geoConvexHull(leftArg);
   17.28 +			return geoConvexHull(leftArg, GeoConstants.WKT);
   17.29  		}
   17.30  		else if(function.getURI().equals(GeoConstants.stSPARQLboundary))
   17.31  		{
   17.32 -			return geoBoundary(leftArg);
   17.33 +			return geoBoundary(leftArg, GeoConstants.WKT);
   17.34  		}
   17.35  		else if(function.getURI().equals(GeoConstants.stSPARQLintersection))
   17.36  		{
   17.37 -			return geoIntersection(leftArg, rightArg);
   17.38 +			return geoIntersection(leftArg, rightArg, GeoConstants.WKT);
   17.39  		}
   17.40  		else if(function.getURI().equals(GeoConstants.stSPARQLdifference))
   17.41  		{
   17.42 -			return geoDifference(leftArg, rightArg);
   17.43 +			return geoDifference(leftArg, rightArg, GeoConstants.WKT);
   17.44  		}
   17.45  		else if(function.getURI().equals(GeoConstants.stSPARQLsymDifference))
   17.46  		{
   17.47 -			return geoSymDifference(leftArg, rightArg);
   17.48 +			return geoSymDifference(leftArg, rightArg, GeoConstants.WKT);
   17.49  		}
   17.50  		// GeoSPARQL - Non topological - except distance		
   17.51  		else if(function.getURI().equals(GeoConstants.geoSparqlConvexHull))
   17.52  		{
   17.53 -			return geoConvexHull(leftArg);
   17.54 +			return geoConvexHull(leftArg, GeoConstants.WKTLITERAL);
   17.55  		}
   17.56  		else if(function.getURI().equals(GeoConstants.geoSparqlIntersection))
   17.57  		{
   17.58 -			return geoIntersection(leftArg, rightArg);
   17.59 +			return geoIntersection(leftArg, rightArg, GeoConstants.WKTLITERAL);
   17.60  		}
   17.61  		else if(function.getURI().equals(GeoConstants.geoSparqlUnion))
   17.62  		{
   17.63 -			return geoUnion(leftArg, rightArg);
   17.64 +			return geoUnion(leftArg, rightArg, GeoConstants.WKTLITERAL);
   17.65  		}
   17.66  		else if(function.getURI().equals(GeoConstants.geoSparqlDifference))
   17.67  		{
   17.68 -			return geoDifference(leftArg, rightArg);
   17.69 +			return geoDifference(leftArg, rightArg, GeoConstants.WKTLITERAL);
   17.70  		}
   17.71  		else if(function.getURI().equals(GeoConstants.geoSparqlSymmetricDifference))
   17.72  		{
   17.73 -			return geoSymDifference(leftArg, rightArg);
   17.74 +			return geoSymDifference(leftArg, rightArg, GeoConstants.WKTLITERAL);
   17.75  		}
   17.76  		else if(function.getURI().equals(GeoConstants.geoSparqlEnvelope))
   17.77  		{
   17.78 -			return geoEnvelope(leftArg);
   17.79 +			return geoEnvelope(leftArg, GeoConstants.WKTLITERAL);
   17.80  		}
   17.81  		else if(function.getURI().equals(GeoConstants.geoSparqlBoundary))
   17.82  		{
   17.83 -			return geoBoundary(leftArg);
   17.84 +			return geoBoundary(leftArg, GeoConstants.WKTLITERAL);
   17.85  		}
   17.86  		else if(function.getURI().equals(GeoConstants.geoSparqlBuffer))
   17.87  		{
   17.88 -			return geoBuffer(leftArg,rightArg, thirdArg);
   17.89 +			return geoBuffer(leftArg,rightArg, thirdArg, GeoConstants.WKTLITERAL);
   17.90  		}
   17.91  		/** PostGIS construct functions */
   17.92  		else if(function.getURI().equals(PostGIS.ST_MAKELINE))
   17.93  		{
   17.94 -			return st_MakeLine(leftArg, rightArg);
   17.95 +			return st_MakeLine(leftArg, rightArg,GeoConstants.WKT);
   17.96  		}
   17.97  		else if(function.getURI().equals(PostGIS.ST_CENTROID))
   17.98  		{
   17.99 -			return st_Centroid(leftArg);
  17.100 +			return st_Centroid(leftArg, GeoConstants.WKT);
  17.101  		}
  17.102  		/** PostGIS construct functions */
  17.103  		//Should never reach this place