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 SimpleFeatureCollectionMatched header from the GeoJSON feature collection, if found, or null otherwise.protected ObjectNodegetNext()protected SimpleFeatureCollectionreadNext(ObjectNode next) Reads the next feature collection, or return null if there is none.intsize()Returns the number of elements in this collection.Methods inherited from class BaseSimpleFeatureCollection
sort, subCollectionMethods inherited from class BaseFeatureCollection
accepts, contains, containsAll, getBounds, getID, getSchema, isEmpty, toArray, toArrayMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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:BaseFeatureCollectionReturns the number of elements in this collection.- Specified by:
sizein interfaceFeatureCollection<SimpleFeatureType,SimpleFeature> - Overrides:
sizein classBaseFeatureCollection<SimpleFeatureType,SimpleFeature> - Returns:
- Number of items, or Interger.MAX_VALUE
- See Also:
-
features
Description copied from class:BaseSimpleFeatureCollectionSubclasses 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:
featuresin interfaceFeatureCollection<SimpleFeatureType,SimpleFeature> - Specified by:
featuresin interfaceSimpleFeatureCollection- Specified by:
featuresin 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
-