Package org.geotools.feature
Class GeometryAttributeImpl
- Object
-
- PropertyImpl
-
- AttributeImpl
-
- GeometryAttributeImpl
-
- All Implemented Interfaces:
Attribute,GeometryAttribute,Property
public class GeometryAttributeImpl extends AttributeImpl implements GeometryAttribute
TODO: rename to GeometricAttribute Provides ...TODO summary sentenceTODO Description
Example Use:
GeometryAttributeType x = new GeometryAttributeType( ... ); TODO code example- Since:
- 0.3 TODO: test wkt geometry parse.
- Author:
- Leprosy
-
-
Field Summary
Fields Modifier and Type Field Description protected BoundingBoxboundsbounds, derived-
Fields inherited from class AttributeImpl
id
-
Fields inherited from class PropertyImpl
descriptor, value
-
-
Constructor Summary
Constructors Constructor Description GeometryAttributeImpl(Object content, GeometryDescriptor descriptor, Identifier id)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanequals(Object o)Override of equals.BoundingBoxgetBounds()Returns the non null envelope of this attribute.GeometryDescriptorgetDescriptor()ThePropertyDscriptorof the property, null if this is a top-level value.GeometryTypegetType()The type of the property.GeometrygetValue()The value or content of the property.inthashCode()Override of hashCode.voidsetBounds(BoundingBox bbox)Set the bounds for the contained geometry.voidsetValue(Object newValue)Override of setValue to convert the newValue to specified type if need be.voidsetValue(Geometry geometry)StringtoString()-
Methods inherited from class AttributeImpl
getIdentifier, parse, validate
-
Methods inherited from class PropertyImpl
getName, getUserData, getUserData, isNillable
-
Methods inherited from interface Attribute
getIdentifier, validate
-
Methods inherited from interface Property
getName, getUserData, hasUserData, isNillable
-
-
-
-
Field Detail
-
bounds
protected BoundingBox bounds
bounds, derived
-
-
Constructor Detail
-
GeometryAttributeImpl
public GeometryAttributeImpl(Object content, GeometryDescriptor descriptor, Identifier id)
-
-
Method Detail
-
getType
public GeometryType getType()
Description copied from interface:PropertyThe type of the property.The type contains information about the value or content of the property such as its java class.
This value is also available via
getDescriptor().getType().- Specified by:
getTypein interfaceAttribute- Specified by:
getTypein interfaceGeometryAttribute- Specified by:
getTypein interfaceProperty- Overrides:
getTypein classAttributeImpl- Returns:
- The property type.
- See Also:
Property.getType()
-
getDescriptor
public GeometryDescriptor getDescriptor()
Description copied from interface:PropertyThePropertyDscriptorof the property, null if this is a top-level value.The descriptor provides information about the property with respect to its containing entity (more often then not a
FeatureorComplexAttribute.- Specified by:
getDescriptorin interfaceAttribute- Specified by:
getDescriptorin interfaceGeometryAttribute- Specified by:
getDescriptorin interfaceProperty- Overrides:
getDescriptorin classAttributeImpl- Returns:
- The property descriptor, null if this is a top-level value.
- See Also:
ComplexAttribute
-
getValue
public Geometry getValue()
Description copied from interface:PropertyThe value or content of the property.The class of this object is defined by
getType().getBinding().This value may be
null. In this casegetDescriptor().isNillable()would betrue.- Specified by:
getValuein interfaceProperty- Overrides:
getValuein classPropertyImpl- Returns:
- The value of the property.
-
setValue
public void setValue(Object newValue) throws IllegalArgumentException, IllegalStateException
Description copied from class:AttributeImplOverride of setValue to convert the newValue to specified type if need be.- Specified by:
setValuein interfaceProperty- Overrides:
setValuein classAttributeImpl- Parameters:
newValue- The new value of the property.- Throws:
IllegalArgumentExceptionIllegalStateException
-
setValue
public void setValue(Geometry geometry)
-
setBounds
public void setBounds(BoundingBox bbox)
Set the bounds for the contained geometry.- Specified by:
setBoundsin interfaceGeometryAttribute- Parameters:
bbox- The bounds of the attribute.
-
getBounds
public BoundingBox getBounds()
Returns the non null envelope of this attribute. If the attribute's geometry isnullthe returned EnvelopeisNull()is true.- Specified by:
getBoundsin interfaceGeometryAttribute- Returns:
- The bounds of the underlying geometry, possibly empty.
-
equals
public boolean equals(Object o)
Description copied from class:AttributeImplOverride of equals.- Overrides:
equalsin classAttributeImpl- Parameters:
o- the object to be tested for equality.- Returns:
- whether other is equal to this attribute Type.
-
hashCode
public int hashCode()
Description copied from class:AttributeImplOverride of hashCode.- Overrides:
hashCodein classAttributeImpl- Returns:
- hashCode for this object.
-
toString
public String toString()
- Overrides:
toStringin classAttributeImpl
-
-