Strabon

changeset 921:7c0cc3f1e8b5

a bit of cleaning
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon Mar 25 00:35:42 2013 +0200 (2013-03-25)
parents 167bc144ef2f
children 4ff3e6717a62
files generaldb/src/main/java/org/openrdf/sail/generaldb/iteration/GeneralDBBindingIteration.java generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.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	Mon Mar 25 00:15:39 2013 +0200
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/iteration/GeneralDBBindingIteration.java	Mon Mar 25 00:35:42 2013 +0200
     1.3 @@ -15,6 +15,7 @@
     1.4  import org.openrdf.query.BindingSet;
     1.5  import org.openrdf.query.QueryEvaluationException;
     1.6  import org.openrdf.query.algebra.evaluation.QueryBindingSet;
     1.7 +import org.openrdf.query.algebra.evaluation.function.spatial.GeoConstants;
     1.8  import org.openrdf.sail.generaldb.GeneralDBSpatialFuncInfo;
     1.9  import org.openrdf.sail.generaldb.GeneralDBValueFactory;
    1.10  import org.openrdf.sail.generaldb.algebra.GeneralDBColumnVar;
    1.11 @@ -40,7 +41,6 @@
    1.12  
    1.13  	protected IdSequence ids;
    1.14  
    1.15 -	//XXX addition
    1.16  	protected HashMap<Integer,String> geoNames = new HashMap<Integer, String>();
    1.17  
    1.18  	//protected HashMap<String, Integer> sp_ConstructIndexesAndNames = new HashMap<String, Integer>();
    1.19 @@ -94,7 +94,6 @@
    1.20  		this.ids = ids;
    1.21  	}
    1.22  
    1.23 -	//XXX Numerous additions here!
    1.24  	@Override
    1.25  	protected BindingSet convert(ResultSet rs)
    1.26  	throws SQLException
    1.27 @@ -199,18 +198,22 @@
    1.28  	}
    1.29  
    1.30  	/**
    1.31 -	 * XXX additions
    1.32 -	 */
    1.33 -	/**
    1.34 -	 * 
    1.35 -	 * my addition
    1.36 -	 * 
    1.37 +	 * FIXME the implementation of this function for PostGIS and MonetDB
    1.38 +	 * uses by default the {@link GeoConstants#WKT} datatype when creating WKT
    1.39 +	 * literals. What about geo:wktLiteral?
    1.40 +	 * However, this method is called by {@link convert} method only, which
    1.41 +	 * in turn is not called by any method!
    1.42  	 */
    1.43  	protected abstract RdbmsValue createGeoValue(ResultSet rs, int index)
    1.44  	throws SQLException;
    1.45  
    1.46 -
    1.47 -
    1.48 +	/**
    1.49 +	 * FIXME the implementation of this function for PostGIS and MonetDB
    1.50 +	 * uses by default the {@link GeoConstants#WKT} datatype when creating WKT
    1.51 +	 * literals. What about geo:wktLiteral?
    1.52 +	 * However, this method is called by {@link convert} method only, which
    1.53 +	 * in turn is not called by any method!
    1.54 +	 */
    1.55  	protected abstract RdbmsValue createBinaryGeoValueForSelectConstructs(ResultSet rs, int index)
    1.56  	throws SQLException;
    1.57  
    1.58 @@ -250,26 +253,4 @@
    1.59  		return vf.asRdbmsLiteral(vf.createLiteral(spProperty));
    1.60  
    1.61  	}
    1.62 -
    1.63 -	//	protected RdbmsValue createGeoValueForSelectConstructs(ResultSet rs, int index)
    1.64 -	//	throws SQLException
    1.65 -	//	{
    1.66 -	//		double potentialMetric;
    1.67 -	//		try
    1.68 -	//		{
    1.69 -	//			//case of metrics
    1.70 -	//			potentialMetric = rs.getFloat(index + 1);
    1.71 -	//
    1.72 -	//			return vf.asRdbmsLiteral(vf.createLiteral(potentialMetric));
    1.73 -	//
    1.74 -	//		}
    1.75 -	//		catch(SQLException e)
    1.76 -	//		{
    1.77 -	//			//Case of spatial constructs
    1.78 -	//			byte[] label = rs.getBytes(index + 1);
    1.79 -	//			return vf.getRdbmsPolyhedron(114, StrabonPolyhedron.ogcGeometry, label);
    1.80 -	//		}
    1.81 -	//
    1.82 -	//	}
    1.83 -
    1.84  }
     2.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java	Mon Mar 25 00:15:39 2013 +0200
     2.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/schema/LiteralTable.java	Mon Mar 25 00:35:42 2013 +0200
     2.3 @@ -5,17 +5,13 @@
     2.4   */
     2.5  package org.openrdf.sail.generaldb.schema;
     2.6  
     2.7 -import java.io.IOException;
     2.8  import java.sql.SQLException;
     2.9  import java.sql.Timestamp;
    2.10 -import java.lang.IllegalArgumentException;
    2.11  
    2.12  import javax.xml.bind.JAXBException;
    2.13  
    2.14 -import org.openrdf.sail.generaldb.exceptions.conversionException;
    2.15  import org.openrdf.query.algebra.evaluation.function.spatial.AbstractWKT;
    2.16  import org.openrdf.query.algebra.evaluation.function.spatial.StrabonPolyhedron;
    2.17 -import org.openrdf.query.algebra.evaluation.function.spatial.WKTHelper;
    2.18  import org.openrdf.query.algebra.evaluation.util.JTSWrapper;
    2.19  import org.slf4j.Logger;
    2.20  import org.slf4j.LoggerFactory;
     3.1 --- a/postgis/src/main/java/org/openrdf/sail/postgis/iteration/PostGISBindingIteration.java	Mon Mar 25 00:15:39 2013 +0200
     3.2 +++ b/postgis/src/main/java/org/openrdf/sail/postgis/iteration/PostGISBindingIteration.java	Mon Mar 25 00:35:42 2013 +0200
     3.3 @@ -28,14 +28,6 @@
     3.4  		super(stmt);
     3.5  	}
     3.6  
     3.7 -	/**
     3.8 -	 * XXX additions
     3.9 -	 */
    3.10 -	/**
    3.11 -	 * 
    3.12 -	 * my addition
    3.13 -	 * 
    3.14 -	 */
    3.15  	@Override
    3.16  	protected RdbmsValue createGeoValue(ResultSet rs, int index)
    3.17  	throws SQLException
    3.18 @@ -52,7 +44,6 @@
    3.19  		return createResource(rs, index);
    3.20  	}
    3.21  
    3.22 -
    3.23  	@Override
    3.24  	protected RdbmsValue createBinaryGeoValueForSelectConstructs(ResultSet rs, int index)
    3.25  	throws SQLException