public GeometryAttribute createGeometryAttribute( Object value, GeometryDescriptor descriptor, String id, CoordinateReferenceSystem crs) { return new GeometryAttributeImpl(value, descriptor, id == null ? null : ff.gmlObjectId(id)); }
public String toString() { StringBuffer sb = new StringBuffer(getClass().getSimpleName()).append(":"); sb.append(getDescriptor().getName().getLocalPart()); CoordinateReferenceSystem crs = getDescriptor().getType().getCoordinateReferenceSystem(); if (!getDescriptor() .getName() .getLocalPart() .equals(getDescriptor().getType().getName().getLocalPart()) || id != null || crs != null) { sb.append("<"); sb.append(getDescriptor().getType().getName().getLocalPart()); if (id != null) { sb.append(" id=");
/** * Returns the non null envelope of this attribute. If the attribute's geometry is <code>null * </code> the returned Envelope <code>isNull()</code> is true. * * @return */ public synchronized BoundingBox getBounds() { if (bounds == null) { ReferencedEnvelope bbox = new ReferencedEnvelope(getType().getCoordinateReferenceSystem()); Geometry geom = (Geometry) getValue(); if (geom != null) { bbox.expandToInclude(geom.getEnvelopeInternal()); } else { bbox.setToNull(); } bounds = bbox; } return bounds; }
public void setValue(Object newValue) throws IllegalArgumentException, IllegalStateException { setValue( (Geometry) newValue ); }
public Property getProperty(String name) { final Integer idx = index.get(name); if (idx == null) { return null; } else { int index = idx.intValue(); AttributeDescriptor descriptor = featureType.getDescriptor(index); if (descriptor instanceof GeometryDescriptor) { return new GeometryAttributeImpl( values[index], (GeometryDescriptor) descriptor, null); } else { return new Attribute(index); } } }
/** * Returns the non null envelope of this attribute. If the attribute's * geometry is <code>null</code> the returned Envelope * <code>isNull()</code> is true. * * @return */ public synchronized BoundingBox getBounds() { if( bounds == null ){ ReferencedEnvelope bbox = new ReferencedEnvelope(getType().getCoordinateReferenceSystem()); Geometry geom = (Geometry) getValue(); if (geom != null) { bbox.expandToInclude(geom.getEnvelopeInternal()); } else { bbox.setToNull(); } bounds = bbox; } return bounds; }
public String toString() { StringBuffer sb = new StringBuffer(getClass().getSimpleName()).append(":"); sb.append(getDescriptor().getName().getLocalPart()); CoordinateReferenceSystem crs = getDescriptor().getType().getCoordinateReferenceSystem(); if(!getDescriptor().getName().getLocalPart().equals(getDescriptor().getType().getName().getLocalPart()) || id != null || crs != null){ sb.append("<"); sb.append(getDescriptor().getType().getName().getLocalPart()); if( id != null ){ sb.append( " id="); sb.append( id ); } if( crs != null ){ sb.append( " crs="); sb.append( crs ); } if( id != null ){ sb.append( " id="); sb.append( id ); } sb.append(">"); } sb.append("="); sb.append(value); return sb.toString(); } }
public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if (geometryDescriptor != null) { Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }
@Override public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if (geometryDescriptor != null) { Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }
public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if (geometryDescriptor != null) { Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }
public GeometryAttribute getDefaultGeometryProperty() { Object value = feature.getAttribute(backendGeomPropertyName); GeometryAttribute attr = new GeometryAttributeImpl(value, featureTyp.getGeometryDescriptor(), null); return attr; }
private Property createProperty(String name) { Object value = name.equals(geomPropertyName) ? feature.getAttribute(backendGeomPropertyName) : feature.getAttribute(name); AttributeDescriptor attrDescr = featureTyp.getDescriptor(name); if (attrDescr == null) return null; if (attrDescr instanceof GeometryDescriptor) return new GeometryAttributeImpl(value, (GeometryDescriptor) attrDescr, null); else return new AttributeImpl(value, attrDescr, null); }
if (pd instanceof GeometryDescriptor) { value.add( new GeometryAttributeImpl( ((AttributeDescriptor) pd).getDefaultValue(), (GeometryDescriptor) pd,
descriptor.getUserData().putAll(descriptor.getUserData()); return new GeometryAttributeImpl(value, descriptor, buildSafeGmlObjectId(id));
parentDescriptor.getDefaultValue()); GeometryAttributeImpl geom = new GeometryAttributeImpl(value, geomDescriptor, null); ArrayList<Property> geomAtts = new ArrayList<Property>(); geomAtts.add(geom);
public GeometryAttribute createGeometryAttribute( Object value, GeometryDescriptor descriptor, String id, CoordinateReferenceSystem crs ) { return new GeometryAttributeImpl(value,descriptor, id == null? null : ff.gmlObjectId(id)); }
@Override public Property getProperty(String name) { final Integer revTypeIdx = nameToRevTypeIndex.get(name); if (revTypeIdx == null) { return null; } else { int index = typeToRevTypeIndex.inverse().get(revTypeIdx).intValue(); AttributeDescriptor descriptor = featureType.getDescriptor(index); if (descriptor instanceof GeometryDescriptor) { return new GeometryAttributeImpl(revFeatureValues.get(revTypeIdx.intValue()) .orNull(), (GeometryDescriptor) descriptor, null); } else { return new Attribute(index); } } }
public Property getProperty(String name) { final Integer idx = index.get(name); if(idx == null){ return null; } else { int index = idx.intValue(); AttributeDescriptor descriptor = featureType.getDescriptor(index); if(descriptor instanceof GeometryDescriptor){ return new GeometryAttributeImpl(values[index], (GeometryDescriptor) descriptor, null); }else{ return new Attribute( index ); } } }
public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if(geometryDescriptor != null){ Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }
@Override public GeometryAttribute getDefaultGeometryProperty() { GeometryDescriptor geometryDescriptor = featureType.getGeometryDescriptor(); GeometryAttribute geometryAttribute = null; if (geometryDescriptor != null) { Object defaultGeometry = getDefaultGeometry(); geometryAttribute = new GeometryAttributeImpl(defaultGeometry, geometryDescriptor, null); } return geometryAttribute; }