public interface Feature
Represents the basic data unit of a tabular structure, equivalent to a record in a data base table. In SIG domain, a Feature is a compound data structure that may contain a geographic component. The conventional term Feature comes from the term cartographic feature and both represent the same concept.
A Feature may contain more than one geometry attribute. In the case there is not any geometry data,
the getDefaultGeometry() will return null.
Features are not editable as such. To edit a Feature you have to obtain an
editable instance EditableFeature using the method getEditable().
Modify that editable instance and then apply the changes to the Feature. This
mechanism is to avoid ambiguity and loosing track on the Feature internal state.
The Feature:
FeatureReference
to recognize our Feature from each other from the same data storeFeatureType that describes the Feature characteristics (attributes,
data types, default geometry, validation rules).| Modifier and Type | Field and Description |
|---|---|
static int |
ALL
Mode that indicates the validation of all FeatureRules
|
static int |
FINISH_EDITING
Mode that indicates the validation of the finish editing FeatureRules
|
static int |
UPDATE
Mode that indicates the validation of the update FeatureRules
|
| Modifier and Type | Method and Description |
|---|---|
Object |
get(int index)
Returns the value of an attribute given its position.
|
Object |
get(String name)
Returns the value of an attribute given its name.
|
Object[] |
getArray(int index)
Returns the array value of an attribute given its position.
|
Object[] |
getArray(String name)
Returns the array value of an attribute given its name.
|
DynObject |
getAsDynObject() |
boolean |
getBoolean(int index)
Returns the Boolean value of an attribute given its position.
|
boolean |
getBoolean(String name)
Returns the Boolean value of an attribute given its name.
|
byte |
getByte(int index)
Returns the byte value of an attribute given its position.
|
byte |
getByte(String name)
Returns the byte value of an attribute given its name.
|
Feature |
getCopy()
Creates and returns a copy of this
|
Date |
getDate(int index)
Returns the Date value of an attribute given its position.
|
Date |
getDate(String name)
Returns the Date value of an attribute given its name.
|
Envelope |
getDefaultEnvelope()
Envelope (AKA extent or bounding box) of the default
geometry attribute.
|
Geometry |
getDefaultGeometry()
Returns the value of the default geometry attribute,
which is a
Geometry. |
IProjection |
getDefaultSRS()
Returns the Spatial Reference System in which is
expressed the default geometry attribute.
|
double |
getDouble(int index)
Returns the double value of an attribute given its position.
|
double |
getDouble(String name)
Returns the double value of an attribute given its name.
|
EditableFeature |
getEditable()
Returns the editable instance of this Feature.
|
EvaluatorData |
getEvaluatorData()
This lets Feature be used eaily with
Evaluator |
Feature |
getFeature(int index)
Returns the Feature value of an attribute given its position.
|
Feature |
getFeature(String name)
Returns the Feature value of an attribute given its name.
|
float |
getFloat(int index)
Returns the float value of an attribute given its position.
|
float |
getFloat(String name)
Returns the float value of an attribute given its name.
|
List |
getGeometries()
Returns a list with the values of this Feature's
geometry attributes.
|
Geometry |
getGeometry(int index)
Returns the Geometry value of an attribute given its position.
|
Geometry |
getGeometry(String name)
Returns the Geometry value of an attribute given its name.
|
Instant |
getInstant(int index)
Returns the instant value of an attribute given its position.
|
Instant |
getInstant(String name)
Returns the instant value of an attribute given its name.
|
int |
getInt(int index)
Returns the int value of an attribute given its position.
|
int |
getInt(String name)
Returns the int value of an attribute given its name.
|
Interval |
getInterval(int index)
Returns the interval value of an attribute given its position.
|
Interval |
getInterval(String name)
Returns the interval value of an attribute given its name.
|
long |
getLong(int index)
Returns the long value of an attribute given its position.
|
long |
getLong(String name)
Returns the long value of an attribute given its name.
|
FeatureReference |
getReference()
Returns a unique identifier for this Feature in the associated store.
|
List |
getSRSs()
Returns a list with the Spatial Reference Systems in which
are expressed this Feature's geometry attributes.
|
FeatureStore |
getStore()
Return the store associated to this feature.
|
String |
getString(int index)
Returns the String value of an attribute given its position.
|
String |
getString(String name)
Returns the String value of an attribute given its name.
|
FeatureType |
getType()
Returns the FeatureType that describes the structure of this Feature.
|
void |
validate(int mode)
Validates this Feature by applying the
FeatureRules
corresponding to the given mode. |
static final int ALL
static final int UPDATE
static final int FINISH_EDITING
FeatureReference getReference()
FeatureType getType()
Feature getCopy()
void validate(int mode)
throws DataException
FeatureRules
corresponding to the given mode.mode - one of the constants {ALL, UPDATE, FINISH_EDITING}DataException - on validation errorsEditableFeature getEditable()
Object get(String name)
name - a string containing the name of the attributeObject get(int index)
index - position of the attributeint getInt(String name)
name - a string containing the name of the attributeint getInt(int index)
index - position of the attributeboolean getBoolean(String name)
name - name of the attributeboolean getBoolean(int index)
index - position of the attributelong getLong(String name)
name - name of the attributelong getLong(int index)
index - position of the attributefloat getFloat(String name)
name - name of the attributefloat getFloat(int index)
index - position of the attributedouble getDouble(String name)
name - name of the attributedouble getDouble(int index)
index - position of the attributeDate getDate(String name)
name - name of the attributeDate getDate(int index)
index - position of the attributeString getString(String name)
name - name of the attributeString getString(int index)
index - position of the attributebyte getByte(String name)
name - name of the attributebyte getByte(int index)
index - position of the attributeGeometry getGeometry(String name)
name - name of the attributeGeometry getGeometry(int index)
index - position of the attributeObject[] getArray(String name)
name - name of the attributeObject[] getArray(int index)
index - position of the attributeFeature getFeature(String name)
name - name of the attributeFeature getFeature(int index)
index - position of the attributeEnvelope getDefaultEnvelope()
Geometry getDefaultGeometry()
Geometry.List getGeometries()
IProjection getDefaultSRS()
List getSRSs()
Instant getInstant(int index)
index - position of the attributeInstant getInstant(String name)
name - a string containing the name of the attributeInterval getInterval(int index)
index - position of the attributeInterval getInterval(String name)
name - a string containing the name of the attributeDynObject getAsDynObject()
EvaluatorData getEvaluatorData()
EvaluatorEvaluatorData which returns the data
of this featureFeatureStore getStore()