Package org.geotools.data.geojson.store
Class GeoJSONFeatureSource
- Object
- 
- ContentFeatureSource
- 
- GeoJSONFeatureSource
 
 
- 
- All Implemented Interfaces:
- FeatureSource<SimpleFeatureType,SimpleFeature>,- SimpleFeatureSource
 
 public class GeoJSONFeatureSource extends ContentFeatureSource 
- 
- 
Field Summary- 
Fields inherited from class ContentFeatureSourceentry, hints, lock, query, queryCapabilities, schema, transaction
 
- 
 - 
Constructor SummaryConstructors Constructor Description GeoJSONFeatureSource(GeoJSONDataStore datastore)GeoJSONFeatureSource(GeoJSONDataStore datastore, Query query)GeoJSONFeatureSource(ContentEntry entry)GeoJSONFeatureSource(ContentEntry entry, Query query)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected SimpleFeatureTypebuildFeatureType()Creates the feature type or schema for the feature source.protected ReferencedEnvelopegetBoundsInternal(Query query)Calculates the bounds of a specified query.protected intgetCountInternal(Query query)Calculates the number of features of a specified query.GeoJSONDataStoregetDataStore()The datastore that this feature source originated from.protected FeatureReader<SimpleFeatureType,SimpleFeature>getReaderInternal(Query query)Subclass method for returning a native reader from the datastore.protected booleanhandleVisitor(Query query, FeatureVisitor visitor)Subclass method which allows subclasses to natively handle a visitor.booleanisQuick()voidsetQuick(boolean quick)- 
Methods inherited from class ContentFeatureSourceaccepts, addFeatureListener, addHints, buildQueryCapabilities, canEvent, canFilter, canFilter, canLimit, canLimit, canLock, canOffset, canOffset, canReproject, canRetype, canRetype, canSort, canSort, canTransact, doLockInternal, doUnlockInternal, getAbsoluteSchema, getBounds, getBounds, getCount, getEntry, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getReader, getReader, getReader, getSchema, getState, getSupportedHints, getTransaction, getView, getView, isView, joinQuery, lockFeatures, lockFeatures, lockFeatures, processLock, removeFeatureListener, resolvePropertyNames, resolvePropertyNames, setFeatureLock, setTransaction, unLockFeatures, unLockFeatures, unLockFeatures
 
- 
 
- 
- 
- 
Constructor Detail- 
GeoJSONFeatureSourcepublic GeoJSONFeatureSource(ContentEntry entry, Query query) 
 - 
GeoJSONFeatureSourcepublic GeoJSONFeatureSource(GeoJSONDataStore datastore) 
 - 
GeoJSONFeatureSourcepublic GeoJSONFeatureSource(GeoJSONDataStore datastore, Query query) 
 - 
GeoJSONFeatureSourcepublic GeoJSONFeatureSource(ContentEntry entry) 
 
- 
 - 
Method Detail- 
getDataStorepublic GeoJSONDataStore getDataStore() Description copied from class:ContentFeatureSourceThe datastore that this feature source originated from.Subclasses may wish to extend this method in order to type narrow its return type. - Specified by:
- getDataStorein interface- FeatureSource<SimpleFeatureType,SimpleFeature>
- Overrides:
- getDataStorein class- ContentFeatureSource
- Returns:
- the data source providing this FeatureSource
 
 - 
getBoundsInternalprotected ReferencedEnvelope getBoundsInternal(Query query) throws IOException Description copied from class:ContentFeatureSourceCalculates the bounds of a specified query. Subclasses must implement this method. If the computation is not fast, subclasses can returnnull.- Specified by:
- getBoundsInternalin class- ContentFeatureSource
- Throws:
- IOException
 
 - 
getCountInternalprotected int getCountInternal(Query query) throws IOException Description copied from class:ContentFeatureSourceCalculates the number of features of a specified query. Subclasses must implement this method. If the computation is not fast, it's possible to return -1.- Specified by:
- getCountInternalin class- ContentFeatureSource
- Throws:
- IOException
 
 - 
getReaderInternalprotected FeatureReader<SimpleFeatureType,SimpleFeature> getReaderInternal(Query query) throws IOException Description copied from class:ContentFeatureSourceSubclass method for returning a native reader from the datastore.It is important to note that if the native reader intends to handle any of the following natively: - reprojection
- filtering
- max feature limiting
- sorting
- locking
- transactions
 true:- ContentFeatureSource.canReproject()- handles- Query.getCoordinateSystemReproject()internally. Example would be PostGIS using Proj to handle reproejction internally
- ContentFeatureSource.canFilter(Query)- handles- internally.
- {@link #canLimit(Query)} - handles {@link Query#getMaxFeatures()} and {@link Query#getStartIndex()} internally.
- {@link #canSort(Query)} - handles {@link Query#getSortBy()} natively.
- {@link #canRetype(Query)} - handles {@link Query#getProperties()} natively. Example would be only parsing the properties the user asks for from an XML file
- {@link #canLock()} - handles read-locks natively
- {@link #canTransact()} - handles transactions natively
 - Specified by:
- getReaderInternalin class- ContentFeatureSource
- Throws:
- IOException
 
 - 
buildFeatureTypeprotected SimpleFeatureType buildFeatureType() throws IOException Description copied from class:ContentFeatureSourceCreates the feature type or schema for the feature source.Implementations should use SimpleFeatureTypeBuilderto build the feature type. Also, the builder should be injected with the feature factory which has been set on the DataStore (seeContentDataStore.getFeatureFactory(). Example:SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setFeatureTypeFactory( getDataStore().getFeatureTypeFactory() ); //build the feature type ... - Specified by:
- buildFeatureTypein class- ContentFeatureSource
- Throws:
- IOException
 
 - 
handleVisitorprotected boolean handleVisitor(Query query, FeatureVisitor visitor) throws IOException Description copied from class:ContentFeatureSourceSubclass method which allows subclasses to natively handle a visitor.Subclasses would override this method and return true in cases where the specific visitor could be handled without iterating over the entire result set of query. An example would be handling visitors that calculate aggregate values. - Overrides:
- handleVisitorin class- ContentFeatureSource
- Parameters:
- query- The query being made.
- visitor- The visitor to
- Returns:
- true if the visitor can be handled natively, otherwise false.
- Throws:
- IOException
 
 - 
isQuickpublic boolean isQuick() - Returns:
- the quick
 
 - 
setQuickpublic void setQuick(boolean quick) - Parameters:
- quick- the quick to set
 
 
- 
 
-