Strabon

changeset 1153:33c03bda26da temporals

Forgot to update also the "hasValidTime" graph pattern in the update clause of the query when a temporal constant is encountered in the update clause
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Wed May 08 16:07:48 2013 +0300 (2013-05-08)
parents b23c7794ecba
children 2691ca58c5f6
files generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java	Wed May 08 14:29:51 2013 +0300
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java	Wed May 08 16:07:48 2013 +0300
     1.3 @@ -125,8 +125,7 @@
     1.4  					}
     1.5  					else if(XMLGSDatatypeUtil.isPeriodDatatype(datatype)) // valid period  case- Constant
     1.6  					{ //TODO remember that the period should be validated, haven't decided the level yet though
     1.7 -//						System.out.println("LABEL TO literalTable:"+label);
     1.8 -//						System.out.println("ID TO literalTable:"+id.toString());
     1.9 +
    1.10  						table.insertTemporal(id, label);
    1.11  					}
    1.12  				}
     2.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java	Wed May 08 14:29:51 2013 +0300
     2.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java	Wed May 08 16:07:48 2013 +0300
     2.3 @@ -1,3 +1,17 @@
     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 + *  @author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
    2.14 + *
    2.15 + *
    2.16 + */
    2.17 +
    2.18  package eu.earthobservatory.runtime.generaldb;
    2.19  
    2.20  import java.util.Hashtable;
    2.21 @@ -98,9 +112,10 @@
    2.22  				int i=3;
    2.23  				if(!isVar(token[3]) && inWhere==false) //the forth element is a literal representation of valid time
    2.24  				{
    2.25 -					String graph =  "<"+parser.createValidTimeURI(token[3]).toString()+">";
    2.26 -					newQueryString+="\n GRAPH "+graph+" { " +token[0]+" "+token[1]+" "+token[2]+" .}\n";
    2.27 -					i=5;
    2.28 +					String tgraph =  "<"+parser.createValidTimeURI(token[3]).toString()+">";
    2.29 +					newQueryString+="\n GRAPH "+tgraph+" { " +token[0]+" "+token[1]+" "+token[2]+" .}\n";
    2.30 +					newQueryString+= tgraph+" <http://strdf.di.uoa.gr/ontology#hasValidTime>";
    2.31 +					i=3;
    2.32  	
    2.33  				}
    2.34  				else