Package org.geotools.data.geojson
Class PagingFeatureCollection
- Object
-
- BaseFeatureCollection<SimpleFeatureType,SimpleFeature>
-
- BaseSimpleFeatureCollection
-
- PagingFeatureCollection
-
- All Implemented Interfaces:
SimpleFeatureCollection
,FeatureCollection<SimpleFeatureType,SimpleFeature>
public class PagingFeatureCollection extends BaseSimpleFeatureCollection
A GeoJSON specific feature collection that can follow "next" links in order to retrieve all data
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description protected class
PagingFeatureCollection.PagingFeatureIterator
-
Field Summary
Fields Modifier and Type Field Description protected static Logger
LOGGER
-
Fields inherited from class BaseFeatureCollection
id, schema
-
-
Constructor Summary
Constructors Constructor Description PagingFeatureCollection(SimpleFeatureCollection first, ObjectNode next, Integer matched)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SimpleFeatureIterator
features()
Subclasses required to implement this method to traverse FeatureCollection contents.Integer
getMatched()
Matched header from the GeoJSON feature collection, if found, or null otherwise.protected SimpleFeatureCollection
readNext(ObjectNode next)
Reads the next feature collection, or return null if there is none.int
size()
Returns the number of elements in this collection.-
Methods inherited from class BaseSimpleFeatureCollection
sort, subCollection
-
Methods inherited from class BaseFeatureCollection
accepts, contains, containsAll, getBounds, getID, getSchema, isEmpty, toArray, toArray
-
Methods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface FeatureCollection
accepts, contains, containsAll, getBounds, getID, getSchema, isEmpty, toArray, toArray
-
-
-
-
Field Detail
-
LOGGER
protected static final Logger LOGGER
-
-
Constructor Detail
-
PagingFeatureCollection
public PagingFeatureCollection(SimpleFeatureCollection first, ObjectNode next, Integer matched)
-
-
Method Detail
-
getMatched
public Integer getMatched()
Matched header from the GeoJSON feature collection, if found, or null otherwise.
-
size
public int size()
Description copied from class:BaseFeatureCollection
Returns the number of elements in this collection.- Specified by:
size
in interfaceFeatureCollection<SimpleFeatureType,SimpleFeature>
- Overrides:
size
in classBaseFeatureCollection<SimpleFeatureType,SimpleFeature>
- Returns:
- Number of items, or Interger.MAX_VALUE
- See Also:
Collection.size()
-
features
public SimpleFeatureIterator features()
Description copied from class:BaseSimpleFeatureCollection
Subclasses required to implement this method to traverse FeatureCollection contents.Note that
FeatureIterator.close()
is available to clean up after any resource use required during traversal.- Specified by:
features
in interfaceFeatureCollection<SimpleFeatureType,SimpleFeature>
- Specified by:
features
in interfaceSimpleFeatureCollection
- Specified by:
features
in classBaseSimpleFeatureCollection
- Returns:
- A FeatureIterator.
-
readNext
protected SimpleFeatureCollection readNext(ObjectNode next) throws IOException
Reads the next feature collection, or return null if there is none. Subclasses can override if they need a different logic for fetching the next page.- Throws:
IOException
-
-