Strabon

changeset 819:d6578cb9fcb7 temporals

modified storage manager to parse and store periods with beginning and ending points of type xsd:DateTime format
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Wed Dec 19 19:33:46 2012 +0200 (2012-12-19)
parents 63cfdc8ef2d8
children 9cd84c21ffbd
files generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/NQuadsParser.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java	Wed Dec 19 19:18:07 2012 +0200
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java	Wed Dec 19 19:33:46 2012 +0200
     1.3 @@ -196,10 +196,11 @@
     1.4  		//TODO the label should be validated as a period before reaching this point. Not sure yet on which level this should be done
     1.5  //		System.out.println("LABEL: "+label);
     1.6  //		System.out.println("NUMBER: "+id.toString());
     1.7 -
     1.8 -		temporalTable.insert(id, label);
     1.9 +		String postgresPeriodLabel = label.replace("T"," ");
    1.10 +		temporalTable.insert(id, postgresPeriodLabel);
    1.11  	}
    1.12  	
    1.13 +	
    1.14  	/********************************************************************/
    1.15  	public void insertGeoSpatial(Number id, String label, String datatype,Timestamp start,Timestamp end) throws SQLException, InterruptedException
    1.16  	{
     2.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/NQuadsParser.java	Wed Dec 19 19:18:07 2012 +0200
     2.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/NQuadsParser.java	Wed Dec 19 19:33:46 2012 +0200
     2.3 @@ -257,7 +257,7 @@
     2.4       		endDate = element2;
     2.5       	}
     2.6       	
     2.7 -     	SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
     2.8 +     	SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
     2.9       	Date start = format.parse(startDate);
    2.10       	//System.out.println("start date:"+startDate.toString());
    2.11       	Date end = format.parse(endDate);