|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.ObjectAbstractResourceCollection
org.geotools.feature.collection.SubFeatureCollection
public class SubFeatureCollection
Xulu:
Code taken from gt-2.4.2 to optimize the size()
method!
The original variant always iterates ALL features at every call!.
Used as a reasonable default implementation for subCollection.
Note: to implementors, this is not optimal, please do your own thing - your users will thank you.
Field Summary | |
---|---|
protected FeatureCollection |
collection
Origional Collection |
protected FilterFactory |
ff
|
protected Filter |
filter
Filter |
protected FeatureState |
state
|
Constructor Summary | |
---|---|
SubFeatureCollection(FeatureCollection collection)
|
|
SubFeatureCollection(FeatureCollection collection,
Filter subfilter)
|
Method Summary | |
---|---|
void |
accepts(FeatureVisitor visitor,
ProgressListener progress)
Accepts a visitor, which then visits each feature in the collection. |
void |
addListener(CollectionListener listener)
|
void |
close(FeatureIterator close)
|
void |
closeIterator(Iterator iterator)
|
FeatureCollection |
collection()
|
protected Filter |
createFilter()
Override to implement subsetting |
FeatureIterator |
features()
|
protected Filter |
filter()
|
Object |
getAttribute(int index)
|
Object |
getAttribute(String xPath)
|
Object[] |
getAttributes(Object[] attributes)
|
ReferencedEnvelope |
getBounds()
|
int |
getCount()
|
Geometry |
getDefaultGeometry()
|
FeatureType |
getFeatureType()
|
String |
getID()
|
int |
getNumberOfAttributes()
|
FeatureCollection |
getParent()
|
FeatureType |
getSchema()
|
boolean |
isEmpty()
|
Iterator |
openIterator()
|
void |
purge()
|
FeatureReader |
reader()
|
void |
removeListener(CollectionListener listener)
|
void |
setAttribute(int position,
Object val)
|
void |
setAttribute(String xPath,
Object attribute)
|
void |
setDefaultGeometry(Geometry g)
|
void |
setParent(FeatureCollection collection)
|
int |
size()
|
FeatureList |
sort(SortBy order)
|
FeatureCollection |
subCollection(Filter filter)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Filter filter
protected FeatureCollection collection
protected FeatureState state
protected FilterFactory ff
Constructor Detail |
---|
public SubFeatureCollection(FeatureCollection collection)
public SubFeatureCollection(FeatureCollection collection, Filter subfilter)
Method Detail |
---|
protected Filter filter()
protected Filter createFilter()
public FeatureType getFeatureType()
public FeatureIterator features()
public void closeIterator(Iterator iterator)
public void close(FeatureIterator close)
public String getID()
public ReferencedEnvelope getBounds()
public Geometry getDefaultGeometry()
public void setDefaultGeometry(Geometry g) throws IllegalAttributeException
IllegalAttributeException
public void addListener(CollectionListener listener) throws NullPointerException
NullPointerException
public void removeListener(CollectionListener listener) throws NullPointerException
NullPointerException
public FeatureCollection getParent()
public void setParent(FeatureCollection collection)
public Object[] getAttributes(Object[] attributes)
public Object getAttribute(String xPath)
public Object getAttribute(int index)
public void setAttribute(int position, Object val) throws IllegalAttributeException, ArrayIndexOutOfBoundsException
IllegalAttributeException
ArrayIndexOutOfBoundsException
public int getNumberOfAttributes()
public void setAttribute(String xPath, Object attribute) throws IllegalAttributeException
IllegalAttributeException
public FeatureCollection subCollection(Filter filter)
public int size()
public boolean isEmpty()
public Iterator openIterator()
public FeatureType getSchema()
public void accepts(FeatureVisitor visitor, ProgressListener progress) throws IOException
IOException
public FeatureReader reader() throws IOException
IOException
public int getCount() throws IOException
IOException
public FeatureCollection collection() throws IOException
IOException
public FeatureList sort(SortBy order)
public void purge()
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |