Strabon

changeset 1261:f55f1c7c41d4

#32 fixed return datatype of spatial constructs in the case of xml and html format.
author Stella Giannakopoulou <sgian@di.uoa.gr>
date Thu Sep 05 11:50:02 2013 +0300 (2013-09-05)
parents 9ba8e8af9d1a
children 9af0661612c9
files generaldb/src/main/java/org/openrdf/sail/generaldb/model/GeneralDBPolyhedron.java resultio-spatial/sparqlxml/pom.xml resultio-spatial/sparqlxml/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsXMLWriter.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/model/GeneralDBPolyhedron.java	Fri Aug 02 19:35:03 2013 +0300
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/model/GeneralDBPolyhedron.java	Thu Sep 05 11:50:02 2013 +0300
     1.3 @@ -119,7 +119,7 @@
     1.4  		return new String("\""+this.polyhedronStringRep+";http://www.opengis.net/def/crs/EPSG/0/"
     1.5  				+this.getPolyhedron().getGeometry().getSRID()+"\"" + "^^<" + 
     1.6  				((StrabonPolyhedron.EnableConstraintRepresentation)  ? 
     1.7 -						GeoConstants.stRDFSemiLinearPointset : GeoConstants.WKT)
     1.8 +						GeoConstants.stRDFSemiLinearPointset : String.valueOf(datatype))
     1.9  						+">");
    1.10  	}
    1.11  
     2.1 --- a/resultio-spatial/sparqlxml/pom.xml	Fri Aug 02 19:35:03 2013 +0300
     2.2 +++ b/resultio-spatial/sparqlxml/pom.xml	Thu Sep 05 11:50:02 2013 +0300
     2.3 @@ -20,6 +20,10 @@
     2.4  		</dependency>
     2.5  		<dependency>
     2.6  			<groupId>org.openrdf.sesame</groupId>
     2.7 +			<artifactId>sesame-sail-generaldb</artifactId>
     2.8 +		</dependency>
     2.9 +		<dependency>
    2.10 +			<groupId>org.openrdf.sesame</groupId>
    2.11  			<artifactId>sesame-queryresultio-sparqlxml</artifactId>
    2.12  		</dependency>
    2.13                  <dependency> <!-- TO BE REMOVED -->
     3.1 --- a/resultio-spatial/sparqlxml/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsXMLWriter.java	Fri Aug 02 19:35:03 2013 +0300
     3.2 +++ b/resultio-spatial/sparqlxml/src/main/java/org/openrdf/query/resultio/sparqlxml/stSPARQLResultsXMLWriter.java	Thu Sep 05 11:50:02 2013 +0300
     3.3 @@ -37,6 +37,8 @@
     3.4  import org.openrdf.query.resultio.TupleQueryResultFormat;
     3.5  import org.openrdf.query.resultio.TupleQueryResultWriter;
     3.6  import org.openrdf.query.resultio.stSPARQLQueryResultFormat;
     3.7 +import org.openrdf.sail.generaldb.model.GeneralDBPolyhedron;
     3.8 +
     3.9  
    3.10  import eu.earthobservatory.constants.GeoConstants;
    3.11  
    3.12 @@ -158,7 +160,8 @@
    3.13  		else { // spatial literal
    3.14  			// else if (value instanceof RdbmsPolyhedron)
    3.15  			URI datatype = new URIImpl(GeoConstants.WKT);
    3.16 -			Literal literal = new LiteralImpl(value.stringValue(), datatype);
    3.17 +			GeneralDBPolyhedron dbpolyhedron = (GeneralDBPolyhedron) value;
    3.18 +			Literal literal = new LiteralImpl(value.stringValue(), dbpolyhedron.getDatatype());
    3.19  			writeLiteral(literal);
    3.20  		}
    3.21  	}