com.vividsolutions.jump.feature
Class BasicFeature

java.lang.Object
  extended by com.vividsolutions.jump.feature.AbstractBasicFeature
      extended by com.vividsolutions.jump.feature.BasicFeature
All Implemented Interfaces:
Feature, java.io.Serializable, java.lang.Cloneable, java.lang.Comparable

public class BasicFeature
extends AbstractBasicFeature
implements java.io.Serializable

Default implementation of the Feature interface.

See Also:
Serialized Form

Constructor Summary
BasicFeature(FeatureSchema featureSchema)
          Constructs a BasicFeature with the given FeatureSchema specifying the attribute names and types.
 
Method Summary
 java.lang.Object getAttribute(int i)
          Returns the specified attribute.
 java.lang.Object[] getAttributes()
          A low-level accessor that is not normally used.
 boolean isModified()
          Returns true if the attributes of this BasicFeature have been modified after the BasicFeature has been created and the initial attribute values are set.
 void setAttribute(int attributeIndex, java.lang.Object newAttribute)
          Sets the specified attribute.
 void setAttributes(java.lang.Object[] attributes)
          A low-level accessor that is not normally used.
 void setGeometry(com.vividsolutions.jts.geom.Geometry argGeometry)
          Convenience method for setting the spatial attribute.
 
Methods inherited from class com.vividsolutions.jump.feature.AbstractBasicFeature
clone, clone, clone, compare, compareTo, getAttribute, getDouble, getGeometry, getID, getInteger, getSchema, getString, getString, setAttribute, setSchema
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

BasicFeature

public BasicFeature(FeatureSchema featureSchema)
Constructs a BasicFeature with the given FeatureSchema specifying the attribute names and types.

Method Detail

setAttributes

public void setAttributes(java.lang.Object[] attributes)
A low-level accessor that is not normally used. It is called by ViewSchemaPlugIn.

Specified by:
setAttributes in interface Feature
Parameters:
attributes - may have a different length than the current attributes.

setAttribute

public void setAttribute(int attributeIndex,
                         java.lang.Object newAttribute)
Sets the specified attribute.

Specified by:
setAttribute in interface Feature
Parameters:
attributeIndex - the array index at which to put the new attribute
newAttribute - the new attribute

getAttribute

public java.lang.Object getAttribute(int i)
Returns the specified attribute.

Specified by:
getAttribute in interface Feature
Parameters:
i - the index of the attribute to get
Returns:
the attribute

getAttributes

public java.lang.Object[] getAttributes()
A low-level accessor that is not normally used. It is called by ViewSchemaPlugIn.

Specified by:
getAttributes in interface Feature

isModified

public boolean isModified()
Returns true if the attributes of this BasicFeature have been modified after the BasicFeature has been created and the initial attribute values are set.


setGeometry

public void setGeometry(com.vividsolutions.jts.geom.Geometry argGeometry)
Description copied from class: AbstractBasicFeature
Convenience method for setting the spatial attribute. JUMP Workbench PlugIns and CursorTools should not use this method directly, but should use an EditTransaction, so that the proper events are fired.

Specified by:
setGeometry in interface Feature
Overrides:
setGeometry in class AbstractBasicFeature
Parameters:
argGeometry - the new spatial attribute