public void set(Object object, String xpath, Object value, Class target) throws IllegalAttributeException { if (object instanceof Feature) { final Feature f = (Feature) object; GeometryAttribute geom; if (value instanceof GeometryAttribute) { geom = (GeometryAttribute) value; f.setDefaultGeometryProperty(geom); } else if (value instanceof Geometry) { geom = f.getDefaultGeometryProperty(); geom.setValue(value); } else { throw new IllegalArgumentException("Argument is not a geometry: " + value); } } if (object instanceof FeatureType) { throw new IllegalAttributeException(null, "feature type is immutable"); } } }
if (att instanceof GeometryAttribute) { if (defaultGeometry.equals(att.getValue())) { feature.setDefaultGeometryProperty((GeometryAttribute) att);
public void set(Object object, String xpath, Object value, Class target) throws IllegalAttributeException { if (object instanceof Feature) { final Feature f = (Feature) object; GeometryAttribute geom; if (value instanceof GeometryAttribute) { geom = (GeometryAttribute) value; f.setDefaultGeometryProperty(geom); } else if (value instanceof Geometry) { geom = f.getDefaultGeometryProperty(); geom.setValue(value); } else { throw new IllegalArgumentException("Argument is not a geometry: " + value); } } if (object instanceof FeatureType) { throw new IllegalAttributeException("feature type is immutable"); } } }
public void set(Object object, String xpath, Object value, Class target) throws IllegalAttributeException { if (object instanceof Feature) { final Feature f = (Feature) object; GeometryAttribute geom; if (value instanceof GeometryAttribute) { geom = (GeometryAttribute) value; f.setDefaultGeometryProperty(geom); } else if (value instanceof Geometry) { geom = f.getDefaultGeometryProperty(); geom.setValue(value); } else { throw new IllegalArgumentException("Argument is not a geometry: " + value); } } if (object instanceof FeatureType) { throw new IllegalAttributeException(null, "feature type is immutable"); } } }
if (att instanceof GeometryAttribute) { if (defaultGeometry.equals(att.getValue())) { feature.setDefaultGeometryProperty((GeometryAttribute) att);