Strabon

changeset 665:38ce903ed362 temporals

some fixed, some to be fixed
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Thu Oct 25 20:57:22 2012 +0300 (2012-10-25)
parents 6b6d2fc83ed7
children 38625b0939f0
files generaldb/src/main/java/org/openrdf/sail/generaldb/GeneralDBValueFactory.java generaldb/src/main/java/org/openrdf/sail/generaldb/managers/HashManager.java generaldb/src/main/java/org/openrdf/sail/generaldb/schema/PeriodTable.java generaldb/src/main/java/org/openrdf/sail/generaldb/schema/ValueTableFactory.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/GeneralDBValueFactory.java	Thu Oct 25 14:40:36 2012 +0300
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/GeneralDBValueFactory.java	Thu Oct 25 20:57:22 2012 +0300
     1.3 @@ -234,6 +234,7 @@
     1.4          if (value instanceof StrabonPolyhedron)
     1.5              return asRdbmsLiteral((StrabonPolyhedron)value);
     1.6          /****************************************/
     1.7 +        System.out.println("OUTE LITERAL OUTE GEOMETRIA!!! :"+value.toString());
     1.8  		return asRdbmsResource((Resource)value);
     1.9  	}
    1.10  
    1.11 @@ -327,6 +328,7 @@
    1.12  			if (r == null)
    1.13  				return ValueTable.NIL_ID;
    1.14  			RdbmsValue value = asRdbmsValue(r);
    1.15 +			System.out.println("PIRA TO VALUE: "+value.toString());
    1.16  			if (value instanceof RdbmsURI)
    1.17  				return uris.getInternalId((RdbmsURI)value);
    1.18  			if (value instanceof RdbmsBNode)
     2.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/HashManager.java	Thu Oct 25 14:40:36 2012 +0300
     2.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/HashManager.java	Thu Oct 25 20:57:22 2012 +0300
     2.3 @@ -127,7 +127,7 @@
     2.4  						exc = e;
     2.5  						logger.error(e.toString(), e);
     2.6  						//konstantina-do sth to propagate the exception!
     2.7 -						//e.printStackTrace();
     2.8 +						e.printStackTrace();
     2.9  						//throw new RuntimeException(e);
    2.10  						
    2.11  
    2.12 @@ -136,8 +136,6 @@
    2.13  			}, "id-lookup");
    2.14  			lookupThread.start();
    2.15  
    2.16 -
    2.17 -	
    2.18  		}
    2.19  	}
    2.20  
    2.21 @@ -551,7 +549,7 @@
    2.22  		/***********************************************/
    2.23  		//FIXME den xerw kata poso boleyei edw i eisagwgi tis diaxeirisis tou neou pinaka
    2.24  		//den exei kopei akoma se kommatia
    2.25 -		//System.out.println("I am in hash manager, "+value.toString());
    2.26 +		System.out.println("I am in hash manager, "+value.toString());
    2.27  		/***********************************************/
    2.28  		Number id = value.getInternalId();
    2.29  		table.insert(id, idseq.hashOf(value));
     3.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/PeriodTable.java	Thu Oct 25 14:40:36 2012 +0300
     3.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/PeriodTable.java	Thu Oct 25 20:57:22 2012 +0300
     3.3 @@ -172,8 +172,8 @@
     3.4  
     3.5  	
     3.6  
     3.7 -	public synchronized void insert(Number id, String period)
     3.8 -		throws SQLException, InterruptedException, NullPointerException
     3.9 +	public  void insert(Number id, String period)
    3.10 +		throws SQLException, InterruptedException
    3.11  	{
    3.12  
    3.13  		System.out.println("PERIOD:"+period);
     4.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/ValueTableFactory.java	Thu Oct 25 14:40:36 2012 +0300
     4.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/ValueTableFactory.java	Thu Oct 25 20:57:22 2012 +0300
     4.3 @@ -133,7 +133,7 @@
     4.4  		/****************************************************************/
     4.5  		//TODO
     4.6  		PeriodTable temporals = createPeriodTable(conn,queue,"period_values",VARCHAR,VCL);
     4.7 -		literals.setGeoSpatialTable(myAddition);
     4.8 +		literals.setTemporalTable(temporals);
     4.9  		
    4.10  		return literals;
    4.11  	}
     5.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Thu Oct 25 14:40:36 2012 +0300
     5.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Thu Oct 25 20:57:22 2012 +0300
     5.3 @@ -382,7 +382,12 @@
     5.4  			            "<http://www.v/dat/4b> <http://www.w3.org/20/ica#dtend> <http://sin/value/2> \"[2005-01-01 00:00:00+01,2006-01-01 00:00:00+01]\"^^<http://strdf.di.uoa.gr/ontology#validTime> ."
     5.5  			            .getBytes()
     5.6  			        );
     5.7 -			Collection<Statement> statements = translator.translate(bais, baseURI);
     5.8 +			 final ByteArrayInputStream bais2 = new ByteArrayInputStream(
     5.9 +			            "<http://strdf.di.uoa.gr/ontology#validTime2005-01-01 00:00:00_2005-01-01 00:00:00_Europe/Athens> <http://strdf.di.uoa.gr/ontology#hasValidTime> \"[2005-01-01 00:00:00+01,2006-01-01 00:00:00+01]\"^^<http://strdf.di.uoa.gr/ontology#validTime> ."
    5.10 +			            .getBytes()
    5.11 +			        );
    5.12 +			 
    5.13 +			Collection<Statement> statements = translator.translate(bais2, baseURI);
    5.14  			Iterator iterator = statements.iterator();
    5.15  			for(Statement st: statements)
    5.16  			{