Strabon

changeset 840:801830bd4d41 temporals

fixed issues in procedingPeriod and succeedindPeriod functions
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Fri Jan 04 17:12:02 2013 +0200 (2013-01-04)
parents 9a76dc603a5a
children 50e40dbb6082
files evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java
line diff
     1.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Fri Jan 04 16:59:47 2013 +0200
     1.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Fri Jan 04 17:12:02 2013 +0200
     1.3 @@ -54,5 +54,5 @@
     1.4  	public static final String periodUnion=stRDF+ "periodUnion";
     1.5  	public static final String minusPeriod=stRDF+ "minusPeriod";
     1.6  	public static final String precedingPeriod=stRDF+ "precedingPeriod";
     1.7 -	public static final String succedingPeriod=stRDF+ "succedingPeriod";
     1.8 +	public static final String succedingPeriod=stRDF+ "succeedingPeriod";
     1.9  }
     2.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Fri Jan 04 16:59:47 2013 +0200
     2.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Fri Jan 04 17:12:02 2013 +0200
     2.3 @@ -580,10 +580,14 @@
     2.4  		}
     2.5  		else if(function.getURI().equals(TemporalConstants.precedingPeriod))
     2.6  		{
     2.7 +			if(!right.toString().contains(",") || !left.toString().contains(","))
     2.8 +				return null;
     2.9  			return StrabonPeriod.precedingPeriod(new StrabonPeriod(left.toString()), new StrabonPeriod(right.toString()));
    2.10  		}
    2.11  		else if(function.getURI().equals(TemporalConstants.succedingPeriod))
    2.12  		{
    2.13 +			if(!right.toString().contains(",") || !left.toString().contains(","))
    2.14 +				return null;
    2.15  			return StrabonPeriod.succedingPeriod(new StrabonPeriod(left.toString()), new StrabonPeriod(right.toString()));
    2.16  		}
    2.17  		else if(function.getURI().equals(TemporalConstants.PERIOD))