public interface Feature extends Cloneable, Comparable
In the current Workbench model, each feature has one spatial attribute (Geometry) and zero or more non-spatial attributes.
| Modifier and Type | Method and Description |
|---|---|
Object |
clone()
Clones this Feature.
|
Feature |
clone(boolean deep)
Clones this Feature.
|
Object |
getAttribute(int i)
Returns the specified attribute.
|
Object |
getAttribute(String name)
Returns the specified attribute.
|
Object[] |
getAttributes()
A low-level accessor that is not normally used.
|
double |
getDouble(int attributeIndex)
Returns a double attribute.
|
com.vividsolutions.jts.geom.Geometry |
getGeometry()
Convenience method for returning the spatial attribute.
|
int |
getID()
Returns a number that uniquely identifies this feature.
|
int |
getInteger(int attributeIndex)
Returns a integer attribute.
|
FeatureSchema |
getSchema()
Returns the feature's metadata
|
String |
getString(int attributeIndex)
Returns the result of calling #toString on the attribute at the given (zero-based)
index, or "" if it is null.
|
String |
getString(String attributeName)
Returns the result of calling #toString on the attribute with the given
(case-sensitive) name, or "" if it is null.
|
void |
setAttribute(int attributeIndex,
Object newAttribute)
Sets the specified attribute.
|
void |
setAttribute(String attributeName,
Object newAttribute)
Sets the specified attribute.
|
void |
setAttributes(Object[] attributes)
A low-level accessor that is not normally used.
|
void |
setGeometry(com.vividsolutions.jts.geom.Geometry geometry)
Convenience method for setting the spatial attribute.
|
void |
setSchema(FeatureSchema schema)
A low-level accessor that is not normally used.
|
compareTovoid setAttributes(Object[] attributes)
attributes - may have a different
length than the current attributes.void setSchema(FeatureSchema schema)
int getID()
void setAttribute(int attributeIndex,
Object newAttribute)
attributeIndex - the array index at which to put the new attributenewAttribute - the new attributevoid setAttribute(String attributeName, Object newAttribute)
attributeName - the name of the attribute to setnewAttribute - the new attributevoid setGeometry(com.vividsolutions.jts.geom.Geometry geometry)
geometry - the new spatial attributeObject getAttribute(int i)
i - the index of the attribute to getObject getAttribute(String name)
name - the name of the attribute to getString getString(int attributeIndex)
int getInteger(int attributeIndex)
attributeIndex - the index of the attribute to retrievedouble getDouble(int attributeIndex)
attributeIndex - the index of the attribute to retrieveString getString(String attributeName)
com.vividsolutions.jts.geom.Geometry getGeometry()
FeatureSchema getSchema()
Object clone()
Feature clone(boolean deep)
deep - whether or not to clone the geometryObject[] getAttributes()
Copyright © 2015. All rights reserved.