public class MemoryFeatureStore extends ContentFeatureStore
FeatureLocking.ResponseORIGINAL_FEATURE_KEY, WRITER_ADD, WRITER_COMMIT, WRITER_UPDATEentry, hints, lock, query, queryCapabilities, schema, transaction| Constructor and Description |
|---|
MemoryFeatureStore(ContentEntry entry,
Query query) |
| Modifier and Type | Method and Description |
|---|---|
protected SimpleFeatureType |
buildFeatureType()
Creates the feature type or schema for the feature source.
|
protected QueryCapabilities |
buildQueryCapabilities()
Builds the query capabilities for this feature source.
|
protected ReferencedEnvelope |
getBoundsInternal(Query query)
Calculates the bounds of a specified query.
|
protected int |
getCountInternal(Query query)
Calculates the number of features of a specified query.
|
protected FeatureReader<SimpleFeatureType,SimpleFeature> |
getReaderInternal(Query query)
Subclass method for returning a native reader from the datastore.
|
MemoryState |
getState()
The current state for the feature source.
|
protected FeatureWriter<SimpleFeatureType,SimpleFeature> |
getWriterInternal(Query query,
int flags)
Subclass method for returning a native writer from the datastore.
|
protected boolean |
handleVisitor(Query query,
FeatureVisitor visitor)
Subclass method which allows subclasses to natively handle a visitor.
|
void |
setTransaction(Transaction transaction)
Sets the current transaction the feature source is working against.
|
addFeatures, addFeatures, getWriter, getWriter, getWriter, getWriter, modifyFeatures, modifyFeatures, modifyFeatures, modifyFeatures, modifyFeatures, modifyFeatures, removeFeatures, setFeaturesaccepts, addFeatureListener, addHints, canEvent, canFilter, canLimit, canLock, canOffset, canReproject, canRetype, canSort, canTransact, doLockInternal, doUnlockInternal, getAbsoluteSchema, getBounds, getBounds, getCount, getDataStore, getEntry, getFeatures, getFeatures, getFeatures, getInfo, getName, getQueryCapabilities, getReader, getReader, getReader, getSchema, getSupportedHints, getTransaction, getView, getView, isView, joinQuery, lockFeatures, lockFeatures, lockFeatures, processLock, removeFeatureListener, resolvePropertyNames, resolvePropertyNames, setFeatureLock, unLockFeatures, unLockFeatures, unLockFeaturesclone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitgetFeatures, getFeatures, getFeatureslockFeatures, lockFeatures, lockFeatures, setFeatureLock, unLockFeatures, unLockFeatures, unLockFeaturesgetTransactionaddFeatureListener, getBounds, getBounds, getCount, getDataStore, getInfo, getName, getQueryCapabilities, getSchema, getSupportedHints, removeFeatureListenerpublic MemoryFeatureStore(ContentEntry entry, Query query)
public MemoryState getState()
ContentFeatureSourceThis value is derived from current transaction of the feature source.
getState in class ContentFeatureSource#setTransaction(Transaction)}.protected FeatureWriter<SimpleFeatureType,SimpleFeature> getWriterInternal(Query query, int flags) throws IOException
ContentFeatureStoreIt is important to note that if the native writer intends to handle any of the following natively:
true:
getWriterInternal in class ContentFeatureStorequery - Queryflags - See ContentFeatureStore.WRITER_ADD and ContentFeatureStore.WRITER_UPDATEIOExceptionpublic void setTransaction(Transaction transaction)
ContentFeatureSourcetransaction may be null. This signifies that the auto-commit
transaction is used: Transaction.AUTO_COMMIT.
setTransaction in interface FeatureStore<SimpleFeatureType,SimpleFeature>setTransaction in class ContentFeatureSourcetransaction - The new transaction, or null.protected SimpleFeatureType buildFeatureType() throws IOException
ContentFeatureSourceImplementations should use SimpleFeatureTypeBuilder to build the feature type.
Also, the builder should be injected with the feature factory which has been set on the
DataStore (see ContentDataStore.getFeatureFactory(). Example:
SimpleFeatureTypeBuilder b = new SimpleFeatureTypeBuilder(); b.setFeatureTypeFactory( getDataStore().getFeatureTypeFactory() ); //build the feature type ...
buildFeatureType in class ContentFeatureSourceIOExceptionprotected ReferencedEnvelope getBoundsInternal(Query query) throws IOException
ContentFeatureSourcegetBoundsInternal in class ContentFeatureSourceIOExceptionprotected int getCountInternal(Query query) throws IOException
ContentFeatureSourcegetCountInternal in class ContentFeatureSourceIOExceptionprotected FeatureReader<SimpleFeatureType,SimpleFeature> getReaderInternal(Query query) throws IOException
ContentFeatureSourceIt is important to note that if the native reader intends to handle any of the following natively:
true:
ContentFeatureSource.canReproject() - handles Query.getCoordinateSystemReproject() internally.
Example would be PostGIS using Proj to handle reproejction internallyContentFeatureSource.canFilter() - handles Query#getFilter() internally.getReaderInternal in class ContentFeatureSourceIOExceptionprotected boolean handleVisitor(Query query, FeatureVisitor visitor) throws IOException
ContentFeatureSourceSubclasses 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.
handleVisitor in class ContentFeatureSourcequery - The query being made.visitor - The visitor toIOExceptionprotected QueryCapabilities buildQueryCapabilities()
ContentFeatureSourcebuildQueryCapabilities in class ContentFeatureSourceCopyright © 1996–2019 Geotools. All rights reserved.