Strabon

changeset 666:38625b0939f0 temporals

fixed bugs. Now periods are also stored in a separate, temporally enabled (by temporal postgres) table, using the period datatype. Used period_in and textout functions to convert from text to cstring and then from cstring to period.
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Fri Oct 26 18:12:21 2012 +0300 (2012-10-26)
parents 38ce903ed362
children 6438a594cf66
files generaldb/src/main/java/org/openrdf/sail/generaldb/schema/PeriodTable.java postgis/src/main/java/org/openrdf/sail/postgis/PostGISSqlTable.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/QuadRDFHandler.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/PeriodTable.java	Thu Oct 25 20:57:22 2012 +0300
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/PeriodTable.java	Fri Oct 26 18:12:21 2012 +0300
     1.3 @@ -130,7 +130,7 @@
     1.4  	{
     1.5  		StringBuilder sb = new StringBuilder();
     1.6  		sb.append("INSERT INTO ").append(getInsertTable().getName());
     1.7 -//		sb.append(((GeneralDBSqlTable)table).buildInsertGeometryValue());
     1.8 +		sb.append(((GeneralDBSqlTable)table).buildInsertPeriodValue());
     1.9  		INSERT = sb.toString();
    1.10  		sb.delete(0, sb.length());
    1.11  		sb.append("DELETE FROM ").append(table.getName()).append("\n");
    1.12 @@ -175,7 +175,6 @@
    1.13  	public  void insert(Number id, String period)
    1.14  		throws SQLException, InterruptedException
    1.15  	{
    1.16 -
    1.17  		System.out.println("PERIOD:"+period);
    1.18  		ValueBatch batch = getValueBatch();
    1.19  		if (isExpired(batch)) {
    1.20 @@ -196,6 +195,7 @@
    1.21  //			System.err.println(id+", "+hexString);
    1.22  			///
    1.23  			batch.setObject(2,period);
    1.24 +			
    1.25  		}
    1.26  		
    1.27  		batch.addBatch();
     2.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/PostGISSqlTable.java	Thu Oct 25 20:57:22 2012 +0300
     2.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/PostGISSqlTable.java	Fri Oct 26 18:12:21 2012 +0300
     2.3 @@ -47,7 +47,7 @@
     2.4  	
     2.5  	@Override
     2.6  	public String buildInsertPeriodValue() {
     2.7 -		return " (id, period) VALUES (?,period_in(?))";
     2.8 +		return " (id, period) VALUES (?,period_in(textout(?)))";
     2.9  	}
    2.10  	
    2.11  	
     3.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/QuadRDFHandler.java	Thu Oct 25 20:57:22 2012 +0300
     3.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/QuadRDFHandler.java	Fri Oct 26 18:12:21 2012 +0300
     3.3 @@ -2,10 +2,10 @@
     3.4  
     3.5  import java.text.ParseException;
     3.6  
     3.7 -import org.junit.Assert;
     3.8 +//import org.junit.Assert;
     3.9  import org.openrdf.model.Resource;
    3.10  import org.openrdf.model.Statement;
    3.11 -import org.openrdf.model.URI;
    3.12 +//import org.openrdf.model.URI;
    3.13  import org.openrdf.rio.RDFHandlerException;
    3.14  import org.openrdf.rio.RDFParseException;
    3.15  import org.openrdf.rio.helpers.StatementCollector;