Strabon

changeset 949:b4da61de4970 temporals

changed "periodOverlaps", "starts" and "finished" so that they are completely aligned with Allen definitions (In the database level, new Postgres functions have been created to map postgres temporal to allen definitions)
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Fri Mar 29 17:52:10 2013 +0200 (2013-03-29)
parents c7e4d63ef1ab
children b473371456f0
files evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/PeriodIntersectsFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/PeriodOverlapsFunc.java 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/GeneralDBSqlFinishes.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlPeriodIntersects.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlPeriodOverlaps.java generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlStarts.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 runtime/src/test/java/eu/earthobservatory/runtime/postgres/temporals/TemporalRelationTests.java
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/PeriodIntersectsFunc.java	Fri Mar 29 17:52:10 2013 +0200
     1.3 @@ -0,0 +1,25 @@
     1.4 +/**
     1.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     1.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     1.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     1.8 + *
     1.9 + * Copyright (C) 2012, Pyravlos Team
    1.10 + *
    1.11 + * http://www.strabon.di.uoa.gr/
    1.12 + */
    1.13 +package org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation;
    1.14 +
    1.15 +/**
    1.16 + * @author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
    1.17 + *
    1.18 + */
    1.19 +public class PeriodIntersectsFunc extends TemporalRelationFunc {
    1.20 +	    
    1.21 +	@Override
    1.22 +	public String getURI(){
    1.23 +	
    1.24 +		return TemporalConstants.periodIntersects;
    1.25 +	}
    1.26 +
    1.27 +	
    1.28 +}
    1.29 \ No newline at end of file
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/PeriodOverlapsFunc.java	Fri Mar 29 17:52:10 2013 +0200
     2.3 @@ -0,0 +1,25 @@
     2.4 +/**
     2.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     2.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     2.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     2.8 + *
     2.9 + * Copyright (C) 2012, Pyravlos Team
    2.10 + *
    2.11 + * http://www.strabon.di.uoa.gr/
    2.12 + */
    2.13 +package org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation;
    2.14 +
    2.15 +/**
    2.16 + * @author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
    2.17 + *
    2.18 + */
    2.19 +public class PeriodOverlapsFunc extends TemporalRelationFunc {
    2.20 +	    
    2.21 +	@Override
    2.22 +	public String getURI(){
    2.23 +	
    2.24 +		return TemporalConstants.periodOverlaps;
    2.25 +	}
    2.26 +
    2.27 +	
    2.28 +}
    2.29 \ No newline at end of file
     3.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Thu Mar 28 17:01:27 2013 +0200
     3.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Fri Mar 29 17:52:10 2013 +0200
     3.3 @@ -27,6 +27,8 @@
     3.4  	public static final String during= stRDF+ "during";
     3.5  
     3.6  	public static final String periodOverlaps= stRDF+ "PeriodOverlaps";
     3.7 +	
     3.8 +	public static final String periodIntersects= stRDF+ "PeriodIntersects";
     3.9  
    3.10  	public static final String equalsPeriod= stRDF+ "equalsPeriod";
    3.11  
     4.1 --- a/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Thu Mar 28 17:01:27 2013 +0200
     4.2 +++ b/evaluation/src/main/resources/META-INF/services/org.openrdf.query.algebra.evaluation.function.Function	Fri Mar 29 17:52:10 2013 +0200
     4.3 @@ -95,7 +95,8 @@
     4.4  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.OverrightPeriodFunc
     4.5  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodContainedByFunc
     4.6  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodContainsFunc
     4.7 -org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.periodOverlapsFunc
     4.8 +org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodOverlapsFunc
     4.9 +org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodIntersectsFunc
    4.10  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.MeetsFunc
    4.11  org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.startsFunc
    4.12 -org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.finishesFunc
    4.13 +org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.finishesFunc
    4.14 \ No newline at end of file
     5.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Thu Mar 28 17:01:27 2013 +0200
     5.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/base/GeneralDBExprSupport.java	Fri Mar 29 17:52:10 2013 +0200
     5.3 @@ -103,6 +103,7 @@
     5.4  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodContains;
     5.5  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodEnd;
     5.6  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodIntersection;
     5.7 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodIntersects;
     5.8  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodMinus;
     5.9  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodOverlaps;
    5.10  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodStart;
    5.11 @@ -418,6 +419,9 @@
    5.12  	public static GeneralDBSqlExpr periodOverlaps(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    5.13  		return new GeneralDBSqlPeriodOverlaps(left, right);
    5.14  	}
    5.15 +	public static GeneralDBSqlExpr periodIntersects(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    5.16 +		return new GeneralDBSqlPeriodIntersects(left, right);
    5.17 +	}
    5.18  	public static GeneralDBSqlExpr meets(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    5.19  		return new GeneralDBSqlMeets(left, right);
    5.20  	}
     6.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Thu Mar 28 17:01:27 2013 +0200
     6.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/factories/GeneralDBBooleanExprFactory.java	Fri Mar 29 17:52:10 2013 +0200
     6.3 @@ -67,7 +67,7 @@
     6.4  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalConstants;
     6.5  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalRelationFunc;
     6.6  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.finishesFunc;
     6.7 -import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.periodOverlapsFunc;
     6.8 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.PeriodOverlapsFunc;
     6.9  import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.startsFunc;
    6.10  import org.openrdf.query.algebra.helpers.QueryModelVisitorBase;
    6.11  import org.openrdf.sail.generaldb.algebra.GeneralDBFalseValue;
    6.12 @@ -1133,7 +1133,7 @@
    6.13  		{
    6.14  			return periodContainedBy(leftArg, rightArg);
    6.15  		}
    6.16 -		else if(function instanceof periodOverlapsFunc)
    6.17 +		else if(function instanceof PeriodOverlapsFunc)
    6.18  		{
    6.19  			return periodOverlaps(leftArg, rightArg);
    6.20  		}
     7.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlFinishes.java	Thu Mar 28 17:01:27 2013 +0200
     7.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlFinishes.java	Fri Mar 29 17:52:10 2013 +0200
     7.3 @@ -36,7 +36,7 @@
     7.4  	@Override
     7.5  	public String getPostgresFunction() {
     7.6  		// TODO Auto-generated method stub
     7.7 -		return "finishes";
     7.8 +		return "finishesAllen";
     7.9  	}
    7.10  
    7.11  }
    7.12 \ No newline at end of file
     8.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     8.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlPeriodIntersects.java	Fri Mar 29 17:52:10 2013 +0200
     8.3 @@ -0,0 +1,43 @@
     8.4 +/**
     8.5 + * This Source Code Form is subject to the terms of the Mozilla Public
     8.6 + * License, v. 2.0. If a copy of the MPL was not distributed with this
     8.7 + * file, You can obtain one at http://mozilla.org/MPL/2.0/.
     8.8 + *
     8.9 + * Copyright (C) 2012, Pyravlos Team
    8.10 + *
    8.11 + * http://www.strabon.di.uoa.gr/
    8.12 + */
    8.13 +package org.openrdf.sail.generaldb.algebra.temporal;
    8.14 +
    8.15 +import org.openrdf.sail.generaldb.algebra.GeneralDBSqlGeoSpatial;
    8.16 +import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    8.17 +
    8.18 +/**
    8.19 + * @author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
    8.20 + *
    8.21 + */
    8.22 +public class GeneralDBSqlPeriodIntersects  extends GeneralDBSqlTemporal{
    8.23 +
    8.24 +	public GeneralDBSqlPeriodIntersects(GeneralDBSqlExpr left, GeneralDBSqlExpr right) {
    8.25 +		super(left, right);
    8.26 +	}
    8.27 +
    8.28 +	/* (non-Javadoc)
    8.29 +	 * @see org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlTemporal#getOperator()
    8.30 +	 */
    8.31 +	@Override
    8.32 +	public String getOperator() {
    8.33 +
    8.34 +		return "&&";
    8.35 +	}
    8.36 +
    8.37 +	/* (non-Javadoc)
    8.38 +	 * @see org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlTemporal#getPostgresFunction()
    8.39 +	 */
    8.40 +	@Override
    8.41 +	public String getPostgresFunction() {
    8.42 +
    8.43 +		return "intersects";
    8.44 +	}
    8.45 +
    8.46 +}
    8.47 \ No newline at end of file
     9.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlPeriodOverlaps.java	Thu Mar 28 17:01:27 2013 +0200
     9.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlPeriodOverlaps.java	Fri Mar 29 17:52:10 2013 +0200
     9.3 @@ -28,7 +28,7 @@
     9.4  	@Override
     9.5  	public String getOperator() {
     9.6  
     9.7 -		return "&&";
     9.8 +		return null;
     9.9  	}
    9.10  
    9.11  	/* (non-Javadoc)
    9.12 @@ -37,7 +37,7 @@
    9.13  	@Override
    9.14  	public String getPostgresFunction() {
    9.15  
    9.16 -		return "overlaps";
    9.17 +		return "overlapsAllen";
    9.18  	}
    9.19  
    9.20  }
    9.21 \ No newline at end of file
    10.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlStarts.java	Thu Mar 28 17:01:27 2013 +0200
    10.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/algebra/temporal/GeneralDBSqlStarts.java	Fri Mar 29 17:52:10 2013 +0200
    10.3 @@ -36,7 +36,7 @@
    10.4  	@Override
    10.5  	public String getPostgresFunction() {
    10.6  		// TODO Auto-generated method stub
    10.7 -		return "starts";
    10.8 +		return "startsAllen";
    10.9  	}
   10.10  
   10.11  }
   10.12 \ No newline at end of file
    11.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java	Thu Mar 28 17:01:27 2013 +0200
    11.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBQueryBuilder.java	Fri Mar 29 17:52:10 2013 +0200
    11.3 @@ -125,6 +125,7 @@
    11.4  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodContains;
    11.5  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodEnd;
    11.6  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodIntersection;
    11.7 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodIntersects;
    11.8  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodMinus;
    11.9  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodOverlaps;
   11.10  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodStart;
   11.11 @@ -627,8 +628,8 @@
   11.12  		else if(expr instanceof GeneralDBSqlPeriodOverlaps){
   11.13  			append((GeneralDBSqlPeriodOverlaps)expr, filter);
   11.14  		}
   11.15 -		else if(expr instanceof GeneralDBSqlPeriodOverlaps){
   11.16 -			append((GeneralDBSqlPeriodOverlaps)expr, filter);
   11.17 +		else if(expr instanceof GeneralDBSqlPeriodIntersects){
   11.18 +			append((GeneralDBSqlPeriodIntersects)expr, filter);
   11.19  		}
   11.20  		else if(expr instanceof GeneralDBSqlMeets){
   11.21  			append((GeneralDBSqlMeets)expr, filter);
   11.22 @@ -1395,6 +1396,10 @@
   11.23  		GeneralDBSqlExprBuilder filter)
   11.24  		throws UnsupportedRdbmsOperatorException;
   11.25  
   11.26 +protected abstract void append(GeneralDBSqlPeriodIntersects expr,
   11.27 +		GeneralDBSqlExprBuilder filter)
   11.28 +		throws UnsupportedRdbmsOperatorException;
   11.29 +
   11.30  protected abstract void append(GeneralDBSqlPeriodUnion expr,
   11.31  		GeneralDBSqlExprBuilder filter)
   11.32  		throws UnsupportedRdbmsOperatorException;
    12.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Thu Mar 28 17:01:27 2013 +0200
    12.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/evaluation/MonetDBQueryBuilder.java	Fri Mar 29 17:52:10 2013 +0200
    12.3 @@ -107,6 +107,7 @@
    12.4  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodContains;
    12.5  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodEnd;
    12.6  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodIntersection;
    12.7 +import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodIntersects;
    12.8  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodMinus;
    12.9  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodOverlaps;
   12.10  import org.openrdf.sail.generaldb.algebra.temporal.GeneralDBSqlPeriodStart;
   12.11 @@ -2352,4 +2353,12 @@
   12.12  		
   12.13  	}
   12.14  
   12.15 +	@Override
   12.16 +	protected void append(GeneralDBSqlPeriodIntersects expr,
   12.17 +			GeneralDBSqlExprBuilder filter)
   12.18 +			throws UnsupportedRdbmsOperatorException {
   12.19 +		// TODO Auto-generated method stub
   12.20 +		
   12.21 +	}
   12.22 +
   12.23  }
    13.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Thu Mar 28 17:01:27 2013 +0200
    13.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/evaluation/PostGISQueryBuilder.java	Fri Mar 29 17:52:10 2013 +0200
    13.3 @@ -1079,6 +1079,13 @@
    13.4  			}
    13.5  
    13.6  	@Override
    13.7 +	protected void append(GeneralDBSqlPeriodIntersects expr, GeneralDBSqlExprBuilder filter)
    13.8 +			throws UnsupportedRdbmsOperatorException
    13.9 +			{
   13.10 +		appendGeneralDBTemporalFunctionBinary(expr, filter, expr.getPostgresFunction());
   13.11 +			}
   13.12 +
   13.13 +	@Override
   13.14  	protected void append(GeneralDBSqlAfterPeriod expr, GeneralDBSqlExprBuilder filter)
   13.15  			throws UnsupportedRdbmsOperatorException
   13.16  			{
   13.17 @@ -1693,7 +1700,7 @@
   13.18  				appendPeriod((GeneralDBLabelColumn)(expr.getLeftArg()),filter);
   13.19  
   13.20  			}
   13.21 -			
   13.22 +		
   13.23  			if(func.equals("=")|| func.equals("!=")|| func.equals("-")|| func.equals("+")|| func.equals("~")|| 
   13.24  					func.equals("@")|| func.equals("<<")|| func.equals(">>")|| func.equals("&<")|| func.equals("&>")|| func.equals("&&"))
   13.25  			{
    14.1 --- a/runtime/src/test/java/eu/earthobservatory/runtime/postgres/temporals/TemporalRelationTests.java	Thu Mar 28 17:01:27 2013 +0200
    14.2 +++ b/runtime/src/test/java/eu/earthobservatory/runtime/postgres/temporals/TemporalRelationTests.java	Fri Mar 29 17:52:10 2013 +0200
    14.3 @@ -303,27 +303,19 @@
    14.4  		
    14.5  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(strabon.queryRewriting(query),strabon.getSailRepoConnection());
    14.6  	
    14.7 -		assertEquals(14, bindings.size());
    14.8 +		assertEquals(6, bindings.size());
    14.9  		//assertTrue(-1 < bindings.indexOf(""));
   14.10  		/*for(String result: bindings)
   14.11  		{
   14.12  			System.out.println(result.toString());
   14.13  		}*/
   14.14  		
   14.15 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item8]"));
   14.16 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item7]"));
   14.17  		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item7;x1=http://example.org/item3]"));
   14.18 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item1;x1=http://example.org/item3]"));
   14.19 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item3;x1=http://example.org/item7]"));
   14.20  		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item7;x1=http://example.org/item1]"));
   14.21 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item8;x1=http://example.org/item2]"));
   14.22 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item3]"));
   14.23 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item1]"));
   14.24  		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item3;x1=http://example.org/item2]"));
   14.25  		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item1;x1=http://example.org/item2]"));
   14.26  		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item7;x1=http://example.org/item2]"));
   14.27 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item3;x1=http://example.org/item1]"));
   14.28 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item1;x1=http://example.org/item7]"));
   14.29 +		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item8;x1=http://example.org/item2]"));
   14.30  		
   14.31  	}
   14.32  	
   14.33 @@ -422,19 +414,14 @@
   14.34  		
   14.35  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(strabon.queryRewriting(query),strabon.getSailRepoConnection());
   14.36  
   14.37 -		assertEquals(6, bindings.size());
   14.38 +		assertEquals(1, bindings.size());
   14.39  		//assertTrue(-1 < bindings.indexOf(""));
   14.40 -		/*for(String result: bindings)
   14.41 -		{
   14.42 +		for(String result: bindings)
   14.43 +		/*{
   14.44  			System.out.println(result.toString());
   14.45  		}*/
   14.46  		
   14.47 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item3]"));
   14.48 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item1;x1=http://example.org/item2]"));
   14.49  		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item1]"));
   14.50 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item3;x1=http://example.org/item1]"));
   14.51 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item3;x1=http://example.org/item2]"));
   14.52 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item1;x1=http://example.org/item3]"));
   14.53  		
   14.54  	}
   14.55  	
   14.56 @@ -453,16 +440,14 @@
   14.57  		
   14.58  		ArrayList<String> bindings = (ArrayList<String>) strabon.query(strabon.queryRewriting(query),strabon.getSailRepoConnection());
   14.59  		
   14.60 -		assertEquals(4, bindings.size());
   14.61 +		assertEquals(1, bindings.size());
   14.62  		//assertTrue(-1 < bindings.indexOf(""));
   14.63  		/*for(String result: bindings)
   14.64  		{
   14.65  			System.out.println(result.toString());
   14.66  		}*/
   14.67  		
   14.68 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item3]"));
   14.69 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item1;x1=http://example.org/item3]"));
   14.70 -		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item1;x1=http://example.org/item2]"));
   14.71 +
   14.72  		assertTrue(-1 < bindings.indexOf("[x2=http://example.org/item2;x1=http://example.org/item8]"));
   14.73  	}
   14.74