org.gvsig.fmap.dal.feature
Interface Feature

All Known Subinterfaces:
EditableFeature

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:


Field Summary
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
 
Method Summary
 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.
 org.gvsig.fmap.geom.primitive.Envelope getDefaultEnvelope()
          Envelope (AKA extent or bounding box) of the default geometry attribute.
 org.gvsig.fmap.geom.Geometry getDefaultGeometry()
          Returns the value of the default geometry attribute, which is a Geometry.
 org.cresques.cts.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.
 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.
 org.gvsig.fmap.geom.Geometry getGeometry(int index)
          Returns the Geometry value of an attribute given its position.
 org.gvsig.fmap.geom.Geometry getGeometry(String name)
          Returns the Geometry value of an attribute given its name.
 org.gvsig.timesupport.Instant getInstant(int index)
          Returns the instant value of an attribute given its position.
 org.gvsig.timesupport.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.
 org.gvsig.timesupport.Interval getInterval(int index)
          Returns the interval value of an attribute given its position.
 org.gvsig.timesupport.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.
 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.
 

Field Detail

ALL

static final int ALL
Mode that indicates the validation of all FeatureRules

See Also:
Constant Field Values

UPDATE

static final int UPDATE
Mode that indicates the validation of the update FeatureRules

See Also:
Constant Field Values

FINISH_EDITING

static final int FINISH_EDITING
Mode that indicates the validation of the finish editing FeatureRules

See Also:
Constant Field Values
Method Detail

getReference

FeatureReference getReference()
Returns a unique identifier for this Feature in the associated store.

Returns:
a unique FeatureReference in the associated store

getType

FeatureType getType()
Returns the FeatureType that describes the structure of this Feature.

Returns:
a FeatureType describing this Feature structure.

getCopy

Feature getCopy()
Creates and returns a copy of this

Returns:
a new instance of Feature which is equal to this

validate

void validate(int mode)
Validates this Feature by applying the FeatureRules corresponding to the given mode.

Parameters:
mode - one of the constants {ALL, UPDATE, FINISH_EDITING}

getEditable

EditableFeature getEditable()
Returns the editable instance of this Feature. EditableFeature offers methods for Feature editing.

Returns:
EditableFeature of this

get

Object get(String name)
Returns the value of an attribute given its name.

Parameters:
name - a string containing the name of the attribute
Returns:
value of the specified attribute

get

Object get(int index)
Returns the value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getInt

int getInt(String name)
Returns the int value of an attribute given its name.

Parameters:
name - a string containing the name of the attribute
Returns:
value of the specified attribute

getInt

int getInt(int index)
Returns the int value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getBoolean

boolean getBoolean(String name)
Returns the Boolean value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getBoolean

boolean getBoolean(int index)
Returns the Boolean value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getLong

long getLong(String name)
Returns the long value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getLong

long getLong(int index)
Returns the long value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getFloat

float getFloat(String name)
Returns the float value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getFloat

float getFloat(int index)
Returns the float value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getDouble

double getDouble(String name)
Returns the double value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getDouble

double getDouble(int index)
Returns the double value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getDate

Date getDate(String name)
Returns the Date value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getDate

Date getDate(int index)
Returns the Date value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getString

String getString(String name)
Returns the String value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getString

String getString(int index)
Returns the String value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getByte

byte getByte(String name)
Returns the byte value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getByte

byte getByte(int index)
Returns the byte value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getGeometry

org.gvsig.fmap.geom.Geometry getGeometry(String name)
Returns the Geometry value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getGeometry

org.gvsig.fmap.geom.Geometry getGeometry(int index)
Returns the Geometry value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getArray

Object[] getArray(String name)
Returns the array value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getArray

Object[] getArray(int index)
Returns the array value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getFeature

Feature getFeature(String name)
Returns the Feature value of an attribute given its name.

Parameters:
name - name of the attribute
Returns:
value of the specified attribute

getFeature

Feature getFeature(int index)
Returns the Feature value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getDefaultEnvelope

org.gvsig.fmap.geom.primitive.Envelope getDefaultEnvelope()
Envelope (AKA extent or bounding box) of the default geometry attribute.

Returns:
Envelope of the default geometry attribute

getDefaultGeometry

org.gvsig.fmap.geom.Geometry getDefaultGeometry()
Returns the value of the default geometry attribute, which is a Geometry.

Returns:
value of the default geometry attribute

getGeometries

List getGeometries()
Returns a list with the values of this Feature's geometry attributes.

Returns:
a list with the values of this Feature's geometry attributes

getDefaultSRS

org.cresques.cts.IProjection getDefaultSRS()
Returns the Spatial Reference System in which is expressed the default geometry attribute.

Returns:
A string containing the default geometry attribute SRS.

getSRSs

List getSRSs()
Returns a list with the Spatial Reference Systems in which are expressed this Feature's geometry attributes.

Returns:
a list with the Spatial Reference Systems.

getInstant

org.gvsig.timesupport.Instant getInstant(int index)
Returns the instant value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getInstant

org.gvsig.timesupport.Instant getInstant(String name)
Returns the instant value of an attribute given its name.

Parameters:
name - a string containing the name of the attribute
Returns:
value of the specified attribute

getInterval

org.gvsig.timesupport.Interval getInterval(int index)
Returns the interval value of an attribute given its position.

Parameters:
index - position of the attribute
Returns:
value of the specified attribute

getInterval

org.gvsig.timesupport.Interval getInterval(String name)
Returns the interval value of an attribute given its name.

Parameters:
name - a string containing the name of the attribute
Returns:
value of the specified attribute

getAsDynObject

DynObject getAsDynObject()


Copyright © 2004-2012 gvSIG. All Rights Reserved.