|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.caching.grid.featurecache.readers.CombiningCachingFeatureReader
public class CombiningCachingFeatureReader
This feature reader reads features from two sources. The results of either are optionally cached.
All features are read from the feature readers and cached (if requested) however only those features which pass the postFilter filter are returned.
Constructor Summary | |
---|---|
CombiningCachingFeatureReader(FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> reader1,
FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> reader2,
boolean cache1,
boolean cache2,
SpatialIndex cache,
org.opengis.filter.Filter postFilter)
Creates a new feature reader that combines the results from two feature reads and optionally caches the results. |
Method Summary | |
---|---|
void |
close()
Closes the feature reader |
org.opengis.feature.simple.SimpleFeatureType |
getFeatureType()
Get type associated with reader. |
boolean |
hasNext()
Query whether this FeatureReader has another Feature. |
org.opengis.feature.simple.SimpleFeature |
next()
Returns the next element in the collection. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public CombiningCachingFeatureReader(FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> reader1, FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> reader2, boolean cache1, boolean cache2, SpatialIndex cache, org.opengis.filter.Filter postFilter) throws java.io.IOException
reader1
- feature reader 1reader2
- feature reader 2cache1
- if results from feature reader 1 should be cachedcache2
- if results from feature reader 2 should be cachedcache
- cachepostFilter
- the filter to be applied as feature read
java.io.IOException
Method Detail |
---|
public void close() throws java.io.IOException
close
in interface FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
java.io.IOException
- DOCUMENT ME!public org.opengis.feature.simple.SimpleFeatureType getFeatureType()
This function returns the type from feature reader 1. Assumes that both feature readers have the same type.
getFeatureType
in interface FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
public boolean hasNext() throws java.io.IOException
FeatureReader
hasNext
in interface FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
java.io.IOException
- If an error occurs determining if there are more
Features.public org.opengis.feature.simple.SimpleFeature next() throws java.io.IOException, java.lang.IllegalArgumentException, java.util.NoSuchElementException
next
in interface FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature>
java.io.IOException
- If an error occurs reading the Feature.
java.util.NoSuchElementException
- If there are no more Features in the
Reader.
java.lang.IllegalArgumentException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |