Strabon

changeset 1152:b23c7794ecba temporals

removed comments and made some tests. "insert [data]" clauses seem to work. UC works in updates as well. But it should be tested in more detail and the rewriting modules should be restructured.
author Konstantina Bereta <Konstantina.Bereta@di.uoa.gr>
date Wed May 08 14:29:51 2013 +0300 (2013-05-08)
parents c8f4ebc124a2
children 33c03bda26da
files runtime/src/main/java/eu/earthobservatory/runtime/generaldb/NQuadsParser.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java
line diff
     1.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/NQuadsParser.java	Wed May 08 13:28:42 2013 +0300
     1.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/NQuadsParser.java	Wed May 08 14:29:51 2013 +0300
     1.3 @@ -230,14 +230,13 @@
     1.4          String endDate=null;
     1.5          
     1.6          int syn=0;
     1.7 -        
     1.8          if (element1.contains("+"))
     1.9          {
    1.10          	syn = element1.indexOf('+');
    1.11           	if (syn<0)
    1.12           		syn = element1.indexOf('+');
    1.13          
    1.14 -         	startDate = element2.substring(0,syn);
    1.15 +         	startDate = element1.substring(0,syn);
    1.16          }
    1.17          else
    1.18          {
     2.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java	Wed May 08 13:28:42 2013 +0300
     2.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/utils.java	Wed May 08 14:29:51 2013 +0300
     2.3 @@ -57,11 +57,9 @@
     2.4  			Pattern updatePattern = Pattern.compile(updateREGEX, Pattern.DOTALL);
     2.5  			Matcher updateMatcher =  updatePattern.matcher(oldQueryString);
     2.6  			
     2.7 -			System.out.println("oldQuerySting "+oldQueryString);
     2.8  			while(updateMatcher.find())
     2.9  			{
    2.10  				String clause=oldQueryString.substring(updateMatcher.start(), updateMatcher.end()).trim();
    2.11 -				System.out.println("Clause is: "+ clause);
    2.12  				whereClauses.append(clause);
    2.13  			}
    2.14  			
    2.15 @@ -95,17 +93,12 @@
    2.16  				 * 
    2.17  				 */
    2.18  				String[] token = quadruple.split("(\\s)+");
    2.19 -				System.out.println("subject:"+ token[0]);
    2.20 -				System.out.println("predicate"+ token[1]);
    2.21 -				System.out.println("object:"+ token[2]);
    2.22 -				System.out.println("graph:"+ token[3]);
    2.23 +	
    2.24  				
    2.25  				int i=3;
    2.26  				if(!isVar(token[3]) && inWhere==false) //the forth element is a literal representation of valid time
    2.27  				{
    2.28 -					System.out.println("quad constant in where clause");
    2.29  					String graph =  "<"+parser.createValidTimeURI(token[3]).toString()+">";
    2.30 -					System.out.println("The graph URI = "+ graph.toString());
    2.31  					newQueryString+="\n GRAPH "+graph+" { " +token[0]+" "+token[1]+" "+token[2]+" .}\n";
    2.32  					i=5;
    2.33  	
    2.34 @@ -117,14 +110,12 @@
    2.35  					if(periodsAndGraphs.containsKey(token[3]))
    2.36  					{
    2.37  						tgraph = periodsAndGraphs.get(token[3]);
    2.38 -						System.out.println("no need to make an insert to the hashTable");
    2.39  
    2.40  					}
    2.41  					else
    2.42  					{
    2.43  						tgraph = graphVariable + numOfQuadruples;
    2.44  						periodsAndGraphs.put(token[3], tgraph);
    2.45 -						System.out.println("just inserted to hashTable: tvar: "+token[3]+" and tgraph: "+tgraph);
    2.46  					}
    2.47  					
    2.48  					if(inWhere == false)