Strabon

changeset 378:a3d3cfa4ecb5

fixed isGeometryValue for Literals with null datatype
author Babis Nikolaou <charnik@di.uoa.gr>
date Wed Jun 27 15:11:43 2012 +0300 (2012-06-27)
parents 0e417864a3a6
children a07bb7a0b9e5
files generaldb/src/main/java/org/openrdf/sail/generaldb/model/XMLGSDatatypeUtil.java
line diff
     1.1 --- a/generaldb/src/main/java/org/openrdf/sail/generaldb/model/XMLGSDatatypeUtil.java	Wed Jun 27 15:08:12 2012 +0300
     1.2 +++ b/generaldb/src/main/java/org/openrdf/sail/generaldb/model/XMLGSDatatypeUtil.java	Wed Jun 27 15:11:43 2012 +0300
     1.3 @@ -49,8 +49,10 @@
     1.4  	 */
     1.5  	public static boolean isGeometryValue(Value value) {
     1.6  		if (value instanceof Literal) {
     1.7 -			if (StrabonPolyhedron.WKT.equals(((Literal) value).getDatatype().stringValue()) || 
     1.8 -				StrabonPolyhedron.GML.equals(((Literal) value).getDatatype().stringValue())) {
     1.9 +			Literal literal = (Literal) value;
    1.10 +			String datatype = literal.getDatatype() == null ? "":literal.getDatatype().stringValue();
    1.11 +			
    1.12 +			if (StrabonPolyhedron.WKT.equals(datatype) || StrabonPolyhedron.GML.equals(datatype)) {
    1.13  				return true;
    1.14  			}
    1.15  		} else if (value instanceof GeneralDBPolyhedron) {