public interface Feature extends GetItemByKeyWithSizeAndGetKeys<java.lang.String,java.lang.Object>, SupportToJson
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 store
FeatureType
that describes the Feature characteristics
(attributes, data types, default geometry, validation rules).
Modifier and Type | Field and Description |
---|---|
static int |
CHECK_BASIC |
static int |
CHECK_REQUIREDS |
static int |
CHECK_RULES_AT_EDITING |
static int |
CHECK_RULES_AT_FINISH |
Modifier and Type | Method and Description |
---|---|
ExpressionBuilder |
createBuilderFilter() |
Expression |
createFilter() |
java.lang.String |
format(int index) |
java.lang.String |
format(java.lang.String name) |
java.lang.Object |
get(int index)
Returns the value of an attribute given its position.
|
java.lang.Object |
get(java.lang.String name)
Returns the value of an attribute given its name.
|
java.lang.Object[] |
getArray(int index)
Returns the array value of an attribute given its position.
|
java.lang.Object[] |
getArray(java.lang.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(java.lang.String name)
Returns the Boolean value of an attribute given its name.
|
boolean |
getBooleanOrDefault(int index,
boolean defaultValue) |
boolean |
getBooleanOrDefault(java.lang.String name,
boolean defaultValue) |
byte |
getByte(int index)
Returns the byte value of an attribute given its position.
|
byte |
getByte(java.lang.String name)
Returns the byte value of an attribute given its name.
|
byte[] |
getByteArray(int index) |
byte[] |
getByteArray(java.lang.String name) |
Feature |
getCopy()
Creates and returns a copy of this
|
java.sql.Date |
getDate(int index)
Returns the Date value of an attribute given its position.
|
java.sql.Date |
getDate(java.lang.String name)
Returns the Date value of an attribute given its name.
|
java.util.Date |
getDateOrDefault(int index,
java.util.Date defaultValue) |
java.util.Date |
getDateOrDefault(java.lang.String name,
java.util.Date defaultValue) |
java.math.BigDecimal |
getDecimal(int index)
Returns the BigDecimal value of an attribute given its position.
|
java.math.BigDecimal |
getDecimal(java.lang.String name)
Returns the BigDecimal value of an attribute given its name.
|
java.math.BigDecimal |
getDecimalOrDefault(int index,
java.math.BigDecimal defaultValue) |
java.math.BigDecimal |
getDecimalOrDefault(java.lang.String name,
java.math.BigDecimal defaultValue) |
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(java.lang.String name)
Returns the double value of an attribute given its name.
|
double |
getDoubleOrDefault(int index,
double defaultValue) |
double |
getDoubleOrDefault(java.lang.String name,
double defaultValue) |
EditableFeature |
getEditable()
Returns the editable instance of this Feature.
|
EvaluatorData |
getEvaluatorData()
This lets Feature be used eaily with
Evaluator |
java.lang.Object |
getExtraValue(int index) |
java.lang.Object |
getExtraValue(java.lang.String name) |
Feature |
getFeature(int index)
Returns the Feature value of an attribute given its position.
|
Feature |
getFeature(java.lang.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(java.lang.String name)
Returns the float value of an attribute given its name.
|
float |
getFloatOrDefault(int index,
float defaultValue) |
float |
getFloatOrDefault(java.lang.String name,
float defaultValue) |
Feature |
getForeignFeature(java.lang.String attrName) |
java.lang.Object |
getFromProfile(int index) |
java.lang.Object |
getFromProfile(java.lang.String name) |
java.util.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(java.lang.String name)
Returns the Geometry value of an attribute given its name.
|
int |
getInt(int index)
Returns the int value of an attribute given its position.
|
int |
getInt(java.lang.String name)
Returns the int value of an attribute given its name.
|
int |
getIntOrDefault(int index,
int defaultValue) |
int |
getIntOrDefault(java.lang.String name,
int defaultValue) |
java.lang.String |
getLabelOfValue(java.lang.String name) |
long |
getLong(int index)
Returns the long value of an attribute given its position.
|
long |
getLong(java.lang.String name)
Returns the long value of an attribute given its name.
|
long |
getLongOrDefault(int index,
long defaultValue) |
long |
getLongOrDefault(java.lang.String name,
long defaultValue) |
java.lang.Object |
getOrDefault(int index,
java.lang.Object defaultValue) |
java.lang.Object |
getOrDefault(java.lang.String name,
DataType type,
java.lang.Object defaultValue) |
java.lang.Object |
getOrDefault(java.lang.String name,
int type,
java.lang.Object defaultValue) |
java.lang.Object |
getOrDefault(java.lang.String name,
java.lang.Object defaultValue) |
FeatureReference |
getReference()
Returns a unique identifier for this Feature in the associated store.
|
java.util.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.
|
java.lang.String |
getString(int index)
Returns the String value of an attribute given its position.
|
java.lang.String |
getString(java.lang.String name)
Returns the String value of an attribute given its name.
|
java.lang.String |
getStringOrDefault(int index,
java.lang.String defaultValue) |
java.lang.String |
getStringOrDefault(java.lang.String name,
java.lang.String defaultValue) |
java.sql.Time |
getTime(int index) |
java.sql.Time |
getTime(java.lang.String name) |
java.sql.Timestamp |
getTimestamp(int index) |
java.sql.Timestamp |
getTimestamp(java.lang.String name) |
FeatureType |
getType()
Returns the FeatureType that describes the structure of this Feature.
|
boolean |
hasExtraValue(java.lang.String name) |
boolean |
hasValue(java.lang.String name) |
boolean |
isBroken() |
boolean |
isNull(int index) |
boolean |
isNull(java.lang.String name) |
void |
setExtraValue(java.lang.String name,
java.lang.Object value) |
void |
validate(int mode) |
toJson, toJson, toJsonBuilder, toJsonBuilder
static final int CHECK_RULES_AT_EDITING
static final int CHECK_RULES_AT_FINISH
static final int CHECK_REQUIREDS
static final int CHECK_BASIC
FeatureReference getReference()
FeatureType getType()
Feature getCopy()
void validate(int mode) throws DataException
DataException
EditableFeature getEditable()
java.lang.Object getOrDefault(java.lang.String name, java.lang.Object defaultValue)
java.lang.Object getOrDefault(java.lang.String name, DataType type, java.lang.Object defaultValue)
java.lang.Object getOrDefault(java.lang.String name, int type, java.lang.Object defaultValue)
java.lang.String getStringOrDefault(java.lang.String name, java.lang.String defaultValue)
int getIntOrDefault(java.lang.String name, int defaultValue)
long getLongOrDefault(java.lang.String name, long defaultValue)
float getFloatOrDefault(java.lang.String name, float defaultValue)
double getDoubleOrDefault(java.lang.String name, double defaultValue)
java.math.BigDecimal getDecimalOrDefault(java.lang.String name, java.math.BigDecimal defaultValue)
java.util.Date getDateOrDefault(java.lang.String name, java.util.Date defaultValue)
java.lang.Object getOrDefault(int index, java.lang.Object defaultValue)
java.lang.String getStringOrDefault(int index, java.lang.String defaultValue)
int getIntOrDefault(int index, int defaultValue)
long getLongOrDefault(int index, long defaultValue)
float getFloatOrDefault(int index, float defaultValue)
double getDoubleOrDefault(int index, double defaultValue)
java.math.BigDecimal getDecimalOrDefault(int index, java.math.BigDecimal defaultValue)
java.util.Date getDateOrDefault(int index, java.util.Date defaultValue)
java.lang.Object get(java.lang.String name)
get
in interface GetItemByKey<java.lang.String,java.lang.Object>
name
- a string containing the name of the attributejava.lang.Object get(int index)
index
- position of the attributeboolean isNull(int index)
boolean isNull(java.lang.String name)
int getInt(java.lang.String name)
name
- a string containing the name of the attributeint getInt(int index)
index
- position of the attributeboolean getBoolean(java.lang.String name)
name
- name of the attributeboolean getBooleanOrDefault(java.lang.String name, boolean defaultValue)
boolean getBoolean(int index)
index
- position of the attributeboolean getBooleanOrDefault(int index, boolean defaultValue)
long getLong(java.lang.String name)
name
- name of the attributelong getLong(int index)
index
- position of the attributefloat getFloat(java.lang.String name)
name
- name of the attributefloat getFloat(int index)
index
- position of the attributedouble getDouble(java.lang.String name)
name
- name of the attributedouble getDouble(int index)
index
- position of the attributejava.math.BigDecimal getDecimal(java.lang.String name)
name
- name of the attributejava.math.BigDecimal getDecimal(int index)
index
- position of the attributejava.sql.Date getDate(java.lang.String name)
name
- name of the attributejava.sql.Date getDate(int index)
index
- position of the attributejava.sql.Time getTime(java.lang.String name)
java.sql.Time getTime(int index)
java.sql.Timestamp getTimestamp(java.lang.String name)
java.sql.Timestamp getTimestamp(int index)
java.lang.String getString(java.lang.String name)
name
- name of the attributejava.lang.String getString(int index)
index
- position of the attributebyte getByte(java.lang.String name)
name
- name of the attributebyte getByte(int index)
index
- position of the attributeGeometry getGeometry(java.lang.String name)
name
- name of the attributeGeometry getGeometry(int index)
index
- position of the attributebyte[] getByteArray(java.lang.String name)
byte[] getByteArray(int index)
java.lang.Object[] getArray(java.lang.String name)
name
- name of the attributejava.lang.Object[] getArray(int index)
index
- position of the attributeFeature getFeature(java.lang.String name)
name
- name of the attributeFeature getFeature(int index)
index
- position of the attributejava.lang.Object getFromProfile(int index)
java.lang.Object getFromProfile(java.lang.String name)
Envelope getDefaultEnvelope()
Geometry getDefaultGeometry()
Geometry
.java.util.List getGeometries()
IProjection getDefaultSRS()
java.util.List getSRSs()
DynObject getAsDynObject()
EvaluatorData getEvaluatorData()
Evaluator
EvaluatorData
which returns the data of this
featureFeatureStore getStore()
java.lang.String getLabelOfValue(java.lang.String name)
java.lang.Object getExtraValue(int index)
java.lang.Object getExtraValue(java.lang.String name)
boolean hasExtraValue(java.lang.String name)
void setExtraValue(java.lang.String name, java.lang.Object value)
boolean hasValue(java.lang.String name)
java.lang.String format(java.lang.String name)
java.lang.String format(int index)
Feature getForeignFeature(java.lang.String attrName)
Expression createFilter()
ExpressionBuilder createBuilderFilter()
boolean isBroken()