Strabon

changeset 912:6f3741509ddd

a bit more cleaning
author Babis Nikolaou <charnik@di.uoa.gr>
date Sat Mar 23 14:43:53 2013 +0200 (2013-03-23)
parents a51678bf3598
children 15947b70dce7
files generaldb/src/main/java/org/openrdf/sail/generaldb/iteration/GeneralDBBindingIteration.java generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java generaldb/src/main/java/org/openrdf/sail/generaldb/optimizers/GeneralDBSelectQueryOptimizer.java monetdb/src/main/java/org/openrdf/sail/monetdb/iteration/MonetDBBindingIteration.java postgis/src/main/java/org/openrdf/sail/postgis/iteration/PostGISBindingIteration.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/iteration/GeneralDBBindingIteration.java	Sat Mar 23 14:23:08 2013 +0200
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/iteration/GeneralDBBindingIteration.java	Sat Mar 23 14:43:53 2013 +0200
     1.3 @@ -29,7 +29,6 @@
     1.4   * Converts a {@link ResultSet} into a {@link BindingSet} in an iteration.
     1.5   * 
     1.6   * @author Manos Karpathiotakis <mk@di.uoa.gr>
     1.7 - * 
     1.8   */
     1.9  public abstract class GeneralDBBindingIteration extends RdbmIterationBase<BindingSet, QueryEvaluationException> {
    1.10  
    1.11 @@ -63,8 +62,6 @@
    1.12  		super(stmt);
    1.13  	}
    1.14  
    1.15 -	////
    1.16 -
    1.17  	public HashMap<GeneralDBSpatialFuncInfo, Integer> getConstructIndexesAndNames() {
    1.18  		return sp_ConstructIndexesAndNames;
    1.19  	}
     2.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java	Sat Mar 23 14:23:08 2013 +0200
     2.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/managers/LiteralManager.java	Sat Mar 23 14:43:53 2013 +0200
     2.3 @@ -85,19 +85,16 @@
     2.4  		String label = literal.getLabel();
     2.5  		String language = literal.getLanguage();
     2.6  		URI datatype = literal.getDatatype();
     2.7 +		
     2.8  		if (datatype == null && language == null) {
     2.9  			table.insertSimple(id, label);
    2.10  		}
    2.11  		else if (datatype == null) {
    2.12  			table.insertLanguage(id, label, language);
    2.13  		}
    2.14 -		else {
    2.15 +		else { // literal with datatype
    2.16  			String dt = datatype.stringValue();
    2.17 -			/**********************************************/
    2.18 -			//my additions
    2.19 -			//http://stsparql.di.uoa.gr/SemiLinearPointSet
    2.20 -			//System.out.println("the datatype i am gonna process is "+dt);
    2.21 -			/**********************************************/
    2.22 +			
    2.23  			try {
    2.24  				if (XMLGSDatatypeUtil.isNumericDatatype(datatype)) {
    2.25  //					if (logger.isDebugEnabled()) {
     3.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/optimizers/GeneralDBSelectQueryOptimizer.java	Sat Mar 23 14:23:08 2013 +0200
     3.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/optimizers/GeneralDBSelectQueryOptimizer.java	Sat Mar 23 14:43:53 2013 +0200
     3.3 @@ -8,8 +8,8 @@
     3.4  import static org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar.createCtx;
     3.5  import static org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar.createObj;
     3.6  import static org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar.createPred;
     3.7 +import static org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar.createSpatialColumn;
     3.8  import static org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar.createSubj;
     3.9 -import static org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar.createSpatialColumn;
    3.10  import static org.openrdf.sail.generaldb.algebra.base.GeneralDBExprSupport.coalesce;
    3.11  import static org.openrdf.sail.generaldb.algebra.base.GeneralDBExprSupport.eq;
    3.12  import static org.openrdf.sail.generaldb.algebra.base.GeneralDBExprSupport.isNull;
    3.13 @@ -19,7 +19,6 @@
    3.14  import java.util.ArrayList;
    3.15  import java.util.HashMap;
    3.16  import java.util.HashSet;
    3.17 -import java.util.Hashtable;
    3.18  import java.util.Iterator;
    3.19  import java.util.LinkedHashSet;
    3.20  import java.util.List;
    3.21 @@ -52,18 +51,16 @@
    3.22  import org.openrdf.query.algebra.Projection;
    3.23  import org.openrdf.query.algebra.ProjectionElem;
    3.24  import org.openrdf.query.algebra.ProjectionElemList;
    3.25 -import org.openrdf.query.algebra.QueryModelNode;
    3.26  import org.openrdf.query.algebra.Slice;
    3.27  import org.openrdf.query.algebra.StatementPattern;
    3.28 +import org.openrdf.query.algebra.StatementPattern.Scope;
    3.29  import org.openrdf.query.algebra.TupleExpr;
    3.30  import org.openrdf.query.algebra.UnaryValueOperator;
    3.31  import org.openrdf.query.algebra.Union;
    3.32  import org.openrdf.query.algebra.ValueExpr;
    3.33  import org.openrdf.query.algebra.Var;
    3.34 -import org.openrdf.query.algebra.StatementPattern.Scope;
    3.35 -import org.openrdf.query.algebra.evaluation.QueryOptimizer;
    3.36  import org.openrdf.query.algebra.evaluation.function.Function;
    3.37 -import org.openrdf.query.algebra.evaluation.function.FunctionRegistry; 
    3.38 +import org.openrdf.query.algebra.evaluation.function.FunctionRegistry;
    3.39  import org.openrdf.query.algebra.evaluation.function.spatial.DateTimeMetricFunc;
    3.40  import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    3.41  import org.openrdf.query.algebra.evaluation.function.spatial.SpatialConstructFunc;
    3.42 @@ -72,10 +69,8 @@
    3.43  import org.openrdf.query.algebra.evaluation.function.spatial.SpatialRelationshipFunc;
    3.44  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.aggregate.ExtentFunc;
    3.45  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.construct.BufferFunc;
    3.46 -import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.construct.EnvelopeFunc;
    3.47  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.construct.TransformFunc;
    3.48  import org.openrdf.query.algebra.evaluation.function.spatial.stsparql.construct.UnionFunc;
    3.49 -import org.openrdf.query.algebra.evaluation.iterator.SPARQLMinusIteration;
    3.50  import org.openrdf.sail.generaldb.GeneralDBValueFactory;
    3.51  import org.openrdf.sail.generaldb.algebra.GeneralDBBNodeColumn;
    3.52  import org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar;
    3.53 @@ -92,22 +87,17 @@
    3.54  import org.openrdf.sail.generaldb.algebra.GeneralDBSelectQuery;
    3.55  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlEq;
    3.56  import org.openrdf.sail.generaldb.algebra.GeneralDBSqlOr;
    3.57 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricBinary;
    3.58 -import org.openrdf.sail.generaldb.algebra.GeneralDBSqlSpatialMetricUnary;
    3.59  import org.openrdf.sail.generaldb.algebra.GeneralDBURIColumn;
    3.60  import org.openrdf.sail.generaldb.algebra.GeneralDBUnionItem;
    3.61 -import org.openrdf.sail.generaldb.algebra.base.BinaryGeneralDBOperator;
    3.62  import org.openrdf.sail.generaldb.algebra.base.GeneralDBQueryModelVisitorBase;
    3.63  import org.openrdf.sail.generaldb.algebra.base.GeneralDBSqlExpr;
    3.64 -import org.openrdf.sail.generaldb.algebra.base.UnaryGeneralDBOperator;
    3.65  import org.openrdf.sail.generaldb.algebra.factories.GeneralDBSqlExprFactory;
    3.66 +import org.openrdf.sail.generaldb.managers.TransTableManager;
    3.67 +import org.openrdf.sail.generaldb.schema.IdSequence;
    3.68  import org.openrdf.sail.rdbms.exceptions.RdbmsException;
    3.69  import org.openrdf.sail.rdbms.exceptions.RdbmsRuntimeException;
    3.70  import org.openrdf.sail.rdbms.exceptions.UnsupportedRdbmsOperatorException;
    3.71 -import org.openrdf.sail.generaldb.managers.TransTableManager;
    3.72  import org.openrdf.sail.rdbms.model.RdbmsResource;
    3.73 -import org.openrdf.sail.generaldb.schema.HashTable;
    3.74 -import org.openrdf.sail.generaldb.schema.IdSequence;
    3.75  
    3.76  /**
    3.77   * Rewrites the core algebra model with a relation optimised model, using SQL.
     4.1 --- a/monetdb/src/main/java/org/openrdf/sail/monetdb/iteration/MonetDBBindingIteration.java	Sat Mar 23 14:23:08 2013 +0200
     4.2 +++ b/monetdb/src/main/java/org/openrdf/sail/monetdb/iteration/MonetDBBindingIteration.java	Sat Mar 23 14:43:53 2013 +0200
     4.3 @@ -13,7 +13,6 @@
     4.4  import org.openrdf.query.BindingSet;
     4.5  import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
     4.6  import org.openrdf.sail.generaldb.iteration.GeneralDBBindingIteration;
     4.7 -import org.openrdf.sail.generaldb.model.GeneralDBPolyhedron;
     4.8  import org.openrdf.sail.rdbms.model.RdbmsValue;
     4.9  
    4.10  /**
    4.11 @@ -30,14 +29,6 @@
    4.12  		super(stmt);
    4.13  	}
    4.14  
    4.15 -	/**
    4.16 -	 * XXX additions
    4.17 -	 */
    4.18 -	/**
    4.19 -	 * 
    4.20 -	 * my addition
    4.21 -	 * 
    4.22 -	 */
    4.23  	@Override
    4.24  	protected RdbmsValue createGeoValue(ResultSet rs, int index)
    4.25  	throws SQLException
     5.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/iteration/PostGISBindingIteration.java	Sat Mar 23 14:23:08 2013 +0200
     5.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/iteration/PostGISBindingIteration.java	Sat Mar 23 14:43:53 2013 +0200
     5.3 @@ -5,7 +5,6 @@
     5.4   */
     5.5  package org.openrdf.sail.postgis.iteration;
     5.6  
     5.7 -import java.sql.Blob;
     5.8  import java.sql.PreparedStatement;
     5.9  import java.sql.ResultSet;
    5.10  import java.sql.SQLException;
    5.11 @@ -13,7 +12,6 @@
    5.12  import org.openrdf.query.BindingSet;
    5.13  import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
    5.14  import org.openrdf.sail.generaldb.iteration.GeneralDBBindingIteration;
    5.15 -import org.openrdf.sail.generaldb.model.GeneralDBPolyhedron;
    5.16  import org.openrdf.sail.rdbms.model.RdbmsValue;
    5.17  
    5.18  /**