public class DefaultFeature extends Object implements Feature, EvaluatorData, Cloneable
Modifier and Type | Field and Description |
---|---|
protected FeatureProvider |
data |
protected FeatureReference |
reference |
ALL, FINISH_EDITING, UPDATE
Constructor and Description |
---|
DefaultFeature(FeatureStore store) |
DefaultFeature(FeatureStore store,
FeatureProvider data) |
Modifier and Type | Method and Description |
---|---|
void |
clear() |
Object |
clone()
Creates a copy of the object.
|
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.
|
Object |
getContextValue(String name) |
Feature |
getCopy()
Creates and returns a copy of this
|
FeatureProvider |
getData() |
Iterator |
getDataNames() |
protected DataTypesManager |
getDataTypesManager() |
Object |
getDataValue(String name) |
Iterator |
getDataValues() |
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.
|
boolean |
has_key(String key) |
boolean |
hasContextValue(String name) |
boolean |
hasDataValue(String name) |
void |
initializeValues() |
void |
initializeValues(Feature feature) |
boolean |
isInserted() |
Iterator |
iteritems() |
Iterator<String> |
iterkeys() |
List<String> |
keys() |
void |
setData(FeatureProvider data) |
void |
setInserted(boolean inserted) |
String |
toString() |
void |
validate(int mode)
Validates this Feature by applying the
FeatureRules
corresponding to the given mode. |
protected FeatureProvider data
protected FeatureReference reference
public DefaultFeature(FeatureStore store)
public DefaultFeature(FeatureStore store, FeatureProvider data)
public void setData(FeatureProvider data)
public FeatureProvider getData()
protected DataTypesManager getDataTypesManager()
public void initializeValues()
public void clear()
public void initializeValues(Feature feature)
public FeatureStore getStore()
Feature
public FeatureType getType()
Feature
public EditableFeature getEditable()
Feature
getEditable
in interface Feature
public Feature getCopy()
Feature
public Object clone() throws CloneNotSupportedException
Cloneable
clone
in class Object
CloneNotSupportedException
- if the instance of the object cannot
be cloned. As this is extending Cloneable
so
its sure it implements it, so this exception may be used for problems
on specific object instances.Object#clone()}.
public FeatureReference getReference()
Feature
getReference
in interface Feature
public void validate(int mode) throws DataException
Feature
FeatureRules
corresponding to the given mode.validate
in interface Feature
mode
- one of the constants {ALL, UPDATE, FINISH_EDITING}DataException
- on validation errorspublic List getSRSs()
Feature
public Envelope getDefaultEnvelope()
Feature
getDefaultEnvelope
in interface Feature
public Geometry getDefaultGeometry()
Feature
Geometry
.getDefaultGeometry
in interface Feature
public IProjection getDefaultSRS()
Feature
getDefaultSRS
in interface Feature
public List getGeometries()
Feature
getGeometries
in interface Feature
public Object get(String name)
Feature
public boolean has_key(String key)
public Iterator iteritems()
public Object get(int index)
Feature
public Object[] getArray(String name)
Feature
public Object[] getArray(int index)
Feature
public boolean getBoolean(String name)
Feature
getBoolean
in interface Feature
name
- name of the attributepublic boolean getBoolean(int index)
Feature
getBoolean
in interface Feature
index
- position of the attributepublic byte getByte(String name)
Feature
public byte getByte(int index)
Feature
public Date getDate(String name)
Feature
public Date getDate(int index)
Feature
public double getDouble(String name)
Feature
public double getDouble(int index)
Feature
public Feature getFeature(String name)
Feature
getFeature
in interface Feature
name
- name of the attributepublic Feature getFeature(int index)
Feature
getFeature
in interface Feature
index
- position of the attributepublic float getFloat(String name)
Feature
public float getFloat(int index)
Feature
public Geometry getGeometry(String name)
Feature
getGeometry
in interface Feature
name
- name of the attributepublic Geometry getGeometry(int index)
Feature
getGeometry
in interface Feature
index
- position of the attributepublic int getInt(String name)
Feature
public int getInt(int index)
Feature
public long getLong(String name)
Feature
public long getLong(int index)
Feature
public String getString(String name)
Feature
public String getString(int index)
Feature
public Object getContextValue(String name)
getContextValue
in interface EvaluatorData
public Iterator getDataNames()
getDataNames
in interface EvaluatorData
public Object getDataValue(String name)
getDataValue
in interface EvaluatorData
public Iterator getDataValues()
getDataValues
in interface EvaluatorData
public boolean hasContextValue(String name)
hasContextValue
in interface EvaluatorData
public boolean hasDataValue(String name)
hasDataValue
in interface EvaluatorData
public Instant getInstant(int index)
Feature
getInstant
in interface Feature
index
- position of the attributepublic Instant getInstant(String name)
Feature
getInstant
in interface Feature
name
- a string containing the name of the attributepublic Interval getInterval(int index)
Feature
getInterval
in interface Feature
index
- position of the attributepublic Interval getInterval(String name)
Feature
getInterval
in interface Feature
name
- a string containing the name of the attributepublic DynObject getAsDynObject()
getAsDynObject
in interface Feature
public boolean isInserted()
public void setInserted(boolean inserted)
inserted
- the inserted to setpublic EvaluatorData getEvaluatorData()
Feature
Evaluator
getEvaluatorData
in interface Feature
EvaluatorData
which returns the data
of this feature