Strabon

changeset 739:0c901336e803 temporals

name handling for temporal variables
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Mon Nov 26 14:38:29 2012 +0200 (2012-11-26)
parents 47bac570d9ea
children 60a14eba94dd
files generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBLongLabelColumn.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBLabelExprFactory.java generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBLongLabelColumn.java	Mon Nov 26 01:52:09 2012 +0200
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/GeneralDBLongLabelColumn.java	Mon Nov 26 14:38:29 2012 +0200
     1.3 @@ -31,6 +31,14 @@
     1.4  			var.setName(originalName);
     1.5  			super.setVarName(originalName);
     1.6  		}
     1.7 +		else if(var.getName().endsWith("?temporal"))
     1.8 +		{
     1.9 +			setSpatial(true);
    1.10 +			int whereToCut = var.getName().lastIndexOf("?");
    1.11 +			String originalName = var.getName().substring(0, whereToCut);
    1.12 +			var.setName(originalName);
    1.13 +			super.setVarName(originalName);
    1.14 +		}
    1.15  	}
    1.16  
    1.17  	public GeneralDBLongLabelColumn(GeneralDBColumnVar var) {
     2.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBLabelExprFactory.java	Mon Nov 26 01:52:09 2012 +0200
     2.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBLabelExprFactory.java	Mon Nov 26 14:38:29 2012 +0200
     2.3 @@ -103,6 +103,10 @@
     2.4  				//XXX spatial var!
     2.5  				result = new GeneralDBLabelColumn(var);
     2.6  			}
     2.7 +			else if(var.getName().endsWith("?temporal"))
     2.8 +			{
     2.9 +				result = new GeneralDBLabelColumn(var);
    2.10 +			}
    2.11  			else
    2.12  			{
    2.13  				//DEFAULT BEHAVIOR!
     3.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Mon Nov 26 01:52:09 2012 +0200
     3.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Mon Nov 26 14:38:29 2012 +0200
     3.3 @@ -203,7 +203,10 @@
     3.4  		{
     3.5  			var.setName(var.getName().replace("?spatial",""));
     3.6  		}
     3.7 -
     3.8 +		else if(var.getName().endsWith("?temporal"))
     3.9 +		{
    3.10 +			var.setName(var.getName().replace("?temporal",""));
    3.11 +		}
    3.12  		if(var.getName().endsWith("?forGroupBy"))
    3.13  		{
    3.14  			var.setName(var.getName().replace("?forGroupBy",""));