Class FlexibleFeature
java.lang.Object
com.vividsolutions.jump.feature.AbstractBasicFeature
com.vividsolutions.jump.feature.BasicFeature
com.vividsolutions.jump.feature.FlexibleFeature
- All Implemented Interfaces:
Feature, Serializable, Cloneable, Comparable
a FlexibleFeature based on
BasicFeature originally used by the
GeoJSON reader. currently adding this functionality
- "autoextends" by returning null for undefined attribs
- lazy conversion of attributes (see getAttribute(int))
currently String, Date, Time, Timestamp- See Also:
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetAttribute(int i) Returns the specified attribute.Object[]Returns all attributes in an array of Objects.org.locationtech.jts.geom.Geometrygetting the geometry by explicitly using the flexible getAttribute() method abovevoidsetAttribute(int attributeIndex, Object newAttribute) setting an attribute, fixing the underlying array in case the schema changed inbetweenvoidsetGeometry(org.locationtech.jts.geom.Geometry geometry) setting the geometry by explicitly using the flexible setAttribute() method aboveMethods inherited from class BasicFeature
isModified, setAttributes, setModifiedMethods inherited from class AbstractBasicFeature
clone, clone, clone, clone, compare, compareTo, getAttribute, getDouble, getID, getInteger, getSchema, getString, getString, getUserData, removeAllUserData, removeUserData, setAttribute, setSchema, setUserData
-
Constructor Details
-
FlexibleFeature
-
-
Method Details
-
getAttribute
Description copied from class:BasicFeatureReturns the specified attribute.- Specified by:
getAttributein interfaceFeature- Overrides:
getAttributein classBasicFeature- Parameters:
i- the index of the attribute to get- Returns:
- the attribute
-
getAttributes
Returns all attributes in an array of Objects. Use getAttribute(i) to convert raw gml strings into typed attributes.- Specified by:
getAttributesin interfaceFeature- Overrides:
getAttributesin classBasicFeature
-
setAttribute
setting an attribute, fixing the underlying array in case the schema changed inbetween- Specified by:
setAttributein interfaceFeature- Overrides:
setAttributein classBasicFeature- Parameters:
attributeIndex- the array index at which to put the new attributenewAttribute- the new attribute
-
setGeometry
public void setGeometry(org.locationtech.jts.geom.Geometry geometry) setting the geometry by explicitly using the flexible setAttribute() method above- Specified by:
setGeometryin interfaceFeature- Overrides:
setGeometryin classAbstractBasicFeature- Parameters:
geometry- the new spatial attribute
-
getGeometry
public org.locationtech.jts.geom.Geometry getGeometry()getting the geometry by explicitly using the flexible getAttribute() method above- Specified by:
getGeometryin interfaceFeature- Overrides:
getGeometryin classAbstractBasicFeature- Returns:
- the feature's spatial attribute
-