org.geotools.feature.collection
Class SubFeatureState

java.lang.Object
  extended byorg.geotools.feature.collection.FeatureState
      extended byorg.geotools.feature.collection.SubFeatureState

public class SubFeatureState
extends 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 backed by an origional FeatureCollection.

To use cut&paste the following code exactly:

 
 TBA
 
 

On the bright side this means we can "fix" all the SubFeatureCollection implementationsin one fell-swoop.

Since:
GeoTools 2.2
Author:
Jody Garnett, Refractions Reserach, Inc.

Field Summary
 
Fields inherited from class org.geotools.feature.collection.FeatureState
bounds, data
 
Constructor Summary
SubFeatureState(FeatureCollection collection, FeatureCollection sub)
           
 
Method Summary
 void addListener(CollectionListener listener)
          Adds a listener for collection events.
 void close()
           
protected  void fireChange(Feature[] features, int type)
          To let listeners know that something has changed.
 FeatureType getChildFeatureType()
           
 FeatureType getFeatureType()
           
 java.lang.String getId()
           
 void removeListener(CollectionListener listener)
          Removes a listener for collection events.
 
Methods inherited from class org.geotools.feature.collection.FeatureState
fids, fireChange, fireChange, getAttribute, getAttribute, getAttributes, getBounds, getDefaultGeometry, getNumberOfAttributes, getParent, isFeatures, setAttribute, setAttribute, setDefaultGeometry, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SubFeatureState

public SubFeatureState(FeatureCollection collection,
                       FeatureCollection sub)
Method Detail

close

public void close()

addListener

public void addListener(CollectionListener listener)
Adds a listener for collection events.

Specified by:
addListener in class FeatureState
Parameters:
listener - The listener to add

removeListener

public void removeListener(CollectionListener listener)
Removes a listener for collection events.

Specified by:
removeListener in class FeatureState
Parameters:
listener - The listener to remove

fireChange

protected void fireChange(Feature[] features,
                          int type)
Description copied from class: FeatureState
To let listeners know that something has changed.

Specified by:
fireChange in class FeatureState

getFeatureType

public FeatureType getFeatureType()
Specified by:
getFeatureType in class FeatureState

getChildFeatureType

public FeatureType getChildFeatureType()
Specified by:
getChildFeatureType in class FeatureState

getId

public java.lang.String getId()
Specified by:
getId in class FeatureState


Copyright © GeoTools. All Rights Reserved.