Strabon

changeset 359:10dcd779521e

updated condition to raise warning when no spatial bindings are found in the result when encoding is KML or GeoJSON
author Babis Nikolaou <charnik@di.uoa.gr>
date Mon Jun 25 20:18:51 2012 +0300 (2012-06-25)
parents ef3b1a05b95b
children 67376341384d
files resultio/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsKMLWriter.java resultio/src/main/java/org/openrdf/query/resultio/stSPARQLQueryResultWriterFactory.java runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java
line diff
     1.1 --- a/resultio/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsKMLWriter.java	Mon Jun 25 20:16:38 2012 +0300
     1.2 +++ b/resultio/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsKMLWriter.java	Mon Jun 25 20:18:51 2012 +0300
     1.3 @@ -80,12 +80,7 @@
     1.4  	 * The number of geometries seen.
     1.5  	 */
     1.6  	private int ngeometries;
     1.7 -	
     1.8 -	/**
     1.9 -	 * factory for geometry objects
    1.10 -	 */
    1.11 -	//private GeometryFactory gf;
    1.12 -	
    1.13 +
    1.14  	/**
    1.15  	 * The JTS wrapper
    1.16  	 */
    1.17 @@ -129,7 +124,6 @@
    1.18  		
    1.19  		depth = 4;
    1.20  				
    1.21 -		//gf = new GeometryFactory(new PrecisionModel(), 4326);
    1.22  		jts = JTSWrapper.getInstance();
    1.23  		
    1.24  		baos = new ByteArrayOutputStream();
    1.25 @@ -165,7 +159,7 @@
    1.26  			
    1.27  			baos.close();
    1.28  			
    1.29 -			if (nresults > 0 && ngeometries == 0) {
    1.30 +			if (ngeometries < nresults) {
    1.31  				logger.warn("[Strabon.KMLWriter] No spatial binding found in the result. KML requires that at least one binding maps to a geometry.", nresults);
    1.32  			}
    1.33  		}
     2.1 --- a/resultio/src/main/java/org/openrdf/query/resultio/stSPARQLQueryResultWriterFactory.java	Mon Jun 25 20:16:38 2012 +0300
     2.2 +++ b/resultio/src/main/java/org/openrdf/query/resultio/stSPARQLQueryResultWriterFactory.java	Mon Jun 25 20:18:51 2012 +0300
     2.3 @@ -5,7 +5,7 @@
     2.4  
     2.5  import java.io.OutputStream;
     2.6  
     2.7 -import org.openrdf.query.resultio.sparqljson.stSPARQLResultsGeoJSONWriterFactory;
     2.8 +import org.openrdf.query.resultio.sparqlgeojson.stSPARQLResultsGeoJSONWriterFactory;
     2.9  import org.openrdf.query.resultio.sparqlxml.Format;
    2.10  import org.openrdf.query.resultio.sparqlxml.stSPARQLResultsKMLWriterFactory;
    2.11  import org.openrdf.query.resultio.sparqlxml.stSPARQLResultsXMLWriterFactory;
     3.1 --- a/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Mon Jun 25 20:16:38 2012 +0300
     3.2 +++ b/runtime/src/main/java/eu/earthobservatory/runtime/generaldb/Strabon.java	Mon Jun 25 20:18:51 2012 +0300
     3.3 @@ -33,7 +33,7 @@
     3.4  import org.openrdf.query.UpdateExecutionException;
     3.5  import org.openrdf.query.resultio.TupleQueryResultWriter;
     3.6  import org.openrdf.query.resultio.stSPARQLQueryResultWriterFactory;
     3.7 -import org.openrdf.query.resultio.sparqljson.stSPARQLResultsGeoJSONWriterFactory;
     3.8 +import org.openrdf.query.resultio.sparqlgeojson.stSPARQLResultsGeoJSONWriterFactory;
     3.9  import org.openrdf.query.resultio.sparqlxml.Format;
    3.10  import org.openrdf.query.resultio.sparqlxml.stSPARQLResultsKMLWriterFactory;
    3.11  import org.openrdf.query.resultio.sparqlxml.stSPARQLResultsXMLWriterFactory;