if (reader.getNodeName().equals("name")) geomName = reader.getValue(); else if (reader.getNodeName().equals("type")) { Geometries geomType = Geometries.getForName(reader.getValue()); type = geomType == null ? Geometry.class : geomType.getBinding(); } else if (reader.getNodeName().equals("srid")) {
if (rs.next()) { String t = rs.getString(1); Geometries g = Geometries.getForName(t); if (g != null) { return g.getBinding();
if (rs.next()) { String type = rs.getString(1); Geometries g = Geometries.getForName(type); if (g != null) { return g.getBinding(); Geometries g = Geometries.getForName(remark); if (g != null) { return g.getBinding();
FeatureEntry createFeatureEntry(ResultSet rs) throws SQLException, IOException { FeatureEntry e = new FeatureEntry(); initEntry(e, rs); e.setGeometryColumn(rs.getString("column_name")); e.setGeometryType(Geometries.getForName(rs.getString("geometry_type_name"))); e.setZ(rs.getBoolean("z")); e.setM(rs.getBoolean("m")); return e; }
public Geometry toGeometry(DBObject obj) { if (obj == null) { return null; } String type = (String) obj.get("type"); Geometries g = Geometries.getForName(type); if (g == null) { throw new IllegalArgumentException("Unable to create geometry of type: " + type); } BasicDBList list = (BasicDBList) obj.get("coordinates"); switch (g) { case POINT: return toPoint(list); case LINESTRING: return toLineString(list); case POLYGON: return toPolygon(list); case MULTIPOINT: return toMultiPoint(list); case MULTILINESTRING: return toMultiLineString(list); case MULTIPOLYGON: return toMultiPolygon(list); case GEOMETRYCOLLECTION: return toGeometryCollection((BasicDBList) obj.get("geometries")); default: throw new IllegalArgumentException("Unknown geometry type: " + type); } }
private Class mapTypeName(String typeName) { // try xs simple type Schema xsTypeMappingProfile = XS.getInstance().getTypeMappingProfile(); NameImpl name = new NameImpl(XS.NAMESPACE, typeName); if (xsTypeMappingProfile.containsKey(name)) { AttributeType type = xsTypeMappingProfile.get(name); if (type.getBinding() != null) { return type.getBinding(); } } // try gml geometry types Geometries g = Geometries.getForName(typeName); if (g != null) { return g.getBinding(); } // default return String.class; } }
if (rs.next()) { String t = rs.getString(1); Geometries g = Geometries.getForName(t); if (g != null) { return g.getBinding();
if (rs.next()) { String type = rs.getString(1); Geometries g = Geometries.getForName(type); if (g != null) { return g.getBinding(); Geometries g = Geometries.getForName(remark); if (g != null) { return g.getBinding();
FeatureEntry createFeatureEntry(ResultSet rs) throws SQLException, IOException { FeatureEntry e = new FeatureEntry(); initEntry(e, rs); e.setGeometryColumn(rs.getString("column_name")); e.setGeometryType(Geometries.getForName(rs.getString("geometry_type_name"))); e.setZ(rs.getBoolean("z")); e.setM(rs.getBoolean("m")); return e; }
if ( rs.next() ) { String type = rs.getString( "type" ); return Geometries.getForName( type ).getBinding();
private Class mapTypeName(String typeName) { //try xs simple type Schema xsTypeMappingProfile = XS.getInstance().getTypeMappingProfile(); NameImpl name = new NameImpl(XS.NAMESPACE, typeName); if (xsTypeMappingProfile.containsKey(name)) { AttributeType type = xsTypeMappingProfile.get(name); if (type.getBinding() != null) { return type.getBinding(); } } //try gml geometry types Geometries g = Geometries.getForName(typeName); if (g != null) { return g.getBinding(); } //default return String.class; }