|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.geotools.feature.collection.FeatureState
This is *not* a Feature - it is a Delegate used by FeatureCollection implementations as "mix-in", provides implementation of featureCollection events, featureType, and attribute access.
To use cut&paste the following code exactly:
On the bright side this means we can "fix" all the FeatureCollection implementations in one fell-swoop.
Field Summary | |
protected com.vividsolutions.jts.geom.Envelope |
bounds
|
protected ResourceCollection |
data
|
Constructor Summary | |
protected |
FeatureState(ResourceCollection collection)
|
Method Summary | |
abstract void |
addListener(CollectionListener listener)
Adds a listener for collection events. |
static java.util.Set |
fids(java.util.Collection stuff)
Get the set of fids for the provided collection. |
protected void |
fireChange(java.util.Collection coll,
int type)
|
protected abstract void |
fireChange(Feature[] features,
int type)
To let listeners know that something has changed. |
protected void |
fireChange(Feature feature,
int type)
|
java.lang.Object |
getAttribute(int index)
|
java.lang.Object |
getAttribute(java.lang.String xPath)
Not really interested yet .. |
java.lang.Object[] |
getAttributes(java.lang.Object[] attributes)
|
com.vividsolutions.jts.geom.Envelope |
getBounds()
Gets the bounding box for the features in this feature collection. |
abstract FeatureType |
getChildFeatureType()
|
com.vividsolutions.jts.geom.Geometry |
getDefaultGeometry()
|
abstract FeatureType |
getFeatureType()
|
abstract java.lang.String |
getId()
|
int |
getNumberOfAttributes()
|
FeatureCollection |
getParent()
|
static boolean |
isFeatures(java.util.Collection stuff)
Test if collection is all features! |
abstract void |
removeListener(CollectionListener listener)
Removes a listener for collection events. |
void |
setAttribute(int position,
java.lang.Object val)
|
void |
setAttribute(java.lang.String xPath,
java.lang.Object attribute)
|
void |
setDefaultGeometry(com.vividsolutions.jts.geom.Geometry geometry)
|
void |
setParent(FeatureCollection parent)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected com.vividsolutions.jts.geom.Envelope bounds
protected ResourceCollection data
Constructor Detail |
protected FeatureState(ResourceCollection collection)
Method Detail |
public abstract void addListener(CollectionListener listener)
listener
- The listener to addpublic abstract void removeListener(CollectionListener listener)
listener
- The listener to removeprotected abstract void fireChange(Feature[] features, int type)
protected void fireChange(Feature feature, int type)
protected void fireChange(java.util.Collection coll, int type)
public com.vividsolutions.jts.geom.Envelope getBounds()
public abstract FeatureType getFeatureType()
public abstract FeatureType getChildFeatureType()
public abstract java.lang.String getId()
public FeatureCollection getParent()
public void setParent(FeatureCollection parent)
public java.lang.Object[] getAttributes(java.lang.Object[] attributes)
public java.lang.Object getAttribute(java.lang.String xPath)
public java.lang.Object getAttribute(int index)
public void setAttribute(int position, java.lang.Object val) throws IllegalAttributeException, java.lang.ArrayIndexOutOfBoundsException
IllegalAttributeException
java.lang.ArrayIndexOutOfBoundsException
public int getNumberOfAttributes()
public void setAttribute(java.lang.String xPath, java.lang.Object attribute) throws IllegalAttributeException
IllegalAttributeException
public com.vividsolutions.jts.geom.Geometry getDefaultGeometry()
public void setDefaultGeometry(com.vividsolutions.jts.geom.Geometry geometry) throws IllegalAttributeException
IllegalAttributeException
public static java.util.Set fids(java.util.Collection stuff)
By doing a quick pass through the collection we can do comparisons based on Feature ID (rather then collection membership).
A subclass that tracks its FID information may wish to override this method.
public static boolean isFeatures(java.util.Collection stuff)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |