Package org.geotools.data.geojson
Class PagingFeatureCollection
Object
BaseFeatureCollection<SimpleFeatureType,SimpleFeature>
BaseSimpleFeatureCollection
PagingFeatureCollection
- All Implemented Interfaces:
SimpleFeatureCollection
,FeatureCollection<SimpleFeatureType,
SimpleFeature>
A GeoJSON specific feature collection that can follow "next" links in order to retrieve all data
-
Nested Class Summary
Nested Classes -
Field Summary
FieldsFields inherited from class BaseFeatureCollection
id, schema
-
Constructor Summary
ConstructorsConstructorDescriptionPagingFeatureCollection
(SimpleFeatureCollection first, ObjectNode next, Integer matched) -
Method Summary
Modifier and TypeMethodDescriptionfeatures()
Subclasses required to implement this method to traverse FeatureCollection contents.protected SimpleFeatureCollection
Matched header from the GeoJSON feature collection, if found, or null otherwise.protected ObjectNode
getNext()
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 Details
-
LOGGER
-
-
Constructor Details
-
PagingFeatureCollection
-
-
Method Details
-
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:
-
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.
-
getFirstCollection
-
getNext
protected ObjectNode getNext() -
readNext
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
-