Strabon

changeset 841:50e40dbb6082 temporals

adding two more construct functions..
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Fri Jan 04 19:38:07 2013 +0200 (2013-01-04)
parents 801830bd4d41
children 908beb56b3f4
files evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/construct/PeriodEndsFunc.java evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/construct/PeriodStartsFunc.java 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 --- /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/construct/PeriodEndsFunc.java	Fri Jan 04 19:38:07 2013 +0200
     1.3 @@ -0,0 +1,29 @@
     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) 2013, 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.construct;
    1.14 +
    1.15 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalConstants;
    1.16 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalRelationFunc;
    1.17 +
    1.18 +/**
    1.19 + * @author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
    1.20 + * This function constructs a period given two timestamps(dateTime values)
    1.21 + */
    1.22 +public class PeriodEndsFunc  extends TemporalConstructFunc {
    1.23 +	
    1.24 +    
    1.25 +	@Override
    1.26 +	public String getURI() {
    1.27 +	
    1.28 +		return TemporalConstants.end;
    1.29 +	}
    1.30 +
    1.31 +	
    1.32 +}
    1.33 \ 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/construct/PeriodStartsFunc.java	Fri Jan 04 19:38:07 2013 +0200
     2.3 @@ -0,0 +1,29 @@
     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) 2013, 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.construct;
    2.14 +
    2.15 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalConstants;
    2.16 +import org.openrdf.query.algebra.evaluation.function.temporal.stsparql.relation.TemporalRelationFunc;
    2.17 +
    2.18 +/**
    2.19 + * @author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
    2.20 + * This function constructs a period given two timestamps(dateTime values)
    2.21 + */
    2.22 +public class PeriodStartsFunc  extends TemporalConstructFunc {
    2.23 +	
    2.24 +    
    2.25 +	@Override
    2.26 +	public String getURI() {
    2.27 +	
    2.28 +		return TemporalConstants.start;
    2.29 +	}
    2.30 +
    2.31 +	
    2.32 +}
    2.33 \ No newline at end of file
     3.1 --- a/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Fri Jan 04 17:12:02 2013 +0200
     3.2 +++ b/evaluation/src/main/java/org/openrdf/query/algebra/evaluation/function/temporal/stsparql/relation/TemporalConstants.java	Fri Jan 04 19:38:07 2013 +0200
     3.3 @@ -50,9 +50,11 @@
     3.4  	public static final String finishes= stRDF +"finishes";
     3.5  	
     3.6  	//Temporal Constructs
     3.7 -	public static final String periodIntersection=stRDF+ "periodIntersection";
     3.8 -	public static final String periodUnion=stRDF+ "periodUnion";
     3.9 -	public static final String minusPeriod=stRDF+ "minusPeriod";
    3.10 -	public static final String precedingPeriod=stRDF+ "precedingPeriod";
    3.11 -	public static final String succedingPeriod=stRDF+ "succeedingPeriod";
    3.12 +	public static final String periodIntersection=stRDF+ "period_intersect";
    3.13 +	public static final String periodUnion=stRDF+ "period_union";
    3.14 +	public static final String minusPeriod=stRDF+ "period_minus";
    3.15 +	public static final String precedingPeriod=stRDF+ "preceding_period";
    3.16 +	public static final String succedingPeriod=stRDF+ "succeeding_period";
    3.17 +	public static final String start=stRDF+ "period_end";
    3.18 +	public static final String end=stRDF+ "period_start";
    3.19  }
     4.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Fri Jan 04 17:12:02 2013 +0200
     4.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/evaluation/GeneralDBEvaluation.java	Fri Jan 04 19:38:07 2013 +0200
     4.3 @@ -459,7 +459,6 @@
     4.4  					int targetSRID = leftGeom.getSRID();
     4.5  					int sourceSRID = rightGeom.getSRID();
     4.6  					Geometry rightConverted = JTSWrapper.getInstance().transform(rightGeom, sourceSRID, targetSRID);
     4.7 -					System.out.println("FUNCTION TOUCHFUNC CALLED AND JTS WILL BE USED!!!");
     4.8  					funcResult = leftGeom.touches(rightConverted);
     4.9  				}
    4.10  				else if(function instanceof MbbIntersectsFunc)