| java.lang.Object org.geotools.data.store.AbstractDataStore2
All known Subclasses: org.geotools.data.gml.GMLDataStore,
AbstractDataStore2 | public class AbstractDataStore2 implements DataStore(Code) | | Represents a stating point for implementing your own DataStore.
The goal is to have this class provide everything else if you only
need to provide:
-
Set getContents() - set of TypeEntry
-
FeatureReader getFeatureReader( typeName )
To support writing:
- set isWritable to true
- implement FeatureWriter getFeatureWriter( typeName )
All remaining functionality is implemented against these methods, including
Transaction and Locking Support. These implementations will not be optimal
but they will work.
To support custom query optimizations:
- Filter getUnsupportedFilter(String typeName, Filter filter)
- FeatureReader getFeatureReader(String typeName, Query query)
To provide high-level writing optimizations:
- Override createFeatureSource to use your own custom FeatureSource
To provide low-level writing optimizations:
- FeatureWriter getFeatureWriterAppend( typeName, transaction )
- FeatureWriter getFeatureWriterAppend( typeName, Filter, transaction )
-
To provide high-level writing optimizations:
- Stop using FeatureWriter completely
- Override createFeatureStore to use your own custom FeatureStore
Pleae note that there may be a better place for you to start out from, (like
JDBCDataStore).
author: jgarnett |
Field Summary | |
final protected static Logger | LOGGER The logger for the data module. |
LOGGER | final protected static Logger LOGGER(Code) | | The logger for the data module.
|
AbstractDataStore2 | public AbstractDataStore2()(Code) | | Default (Writeable) DataStore
|
createContents | protected List createContents()(Code) | | Subclass must overrride to connet to contents.
An implementation that has any doubt about its contents should aquire
them during object creation (where an IOException can be thrown).
This method is lazyly called to create a List of ActiveTypeEntry for
each FeatureCollection in this DataStore.
List. |
createLockingManager | protected InProcessLockingManager createLockingManager()(Code) | | Currently returns an InProcessLockingManager.
Subclasses that implement real locking may override this method to
return null .
InProcessLockingManager or null. |
dispose | public void dispose()(Code) | | Dummy implementation, it's a no-op. Subclasses holding to system resources must
override this method and release them.
|
entries | public List entries()(Code) | | List of ActiveTypeEntry entries - one for each featureType provided by this Datastore
|
getFeatureReader | public FeatureReader getFeatureReader(Query query, Transaction transaction) throws IOException(Code) | | Access a FeatureReader providing access to Feature information.
This implementation passes off responsibility to the following overrideable methods:
- getFeatureReader(String typeName) - subclass *required* to implement
If you can handle some aspects of Query natively (say expressions or reprojection) override the following:
getFeatureReader(typeName, query) - override to handle query natively
getUnsupportedFilter(typeName, filter) - everything you cannot handle natively
getFeatureReader(String typeName) - you must implement this, but you could point it back to getFeatureReader( typeName, Query.ALL );
|
getFeatureSource | public FeatureSource getFeatureSource(String typeName) throws IOException(Code) | | Aqure FeatureSource for indicated typeName.
Note this API is not sufficient; Namespace needs to be used as well.
|
getTypeNames | public String[] getTypeNames()(Code) | | Convience method for retriving all the names from the Catalog Entires
|
getView | public FeatureSource getView(Query query) throws IOException, SchemaException(Code) | | Create a FeatureSource that represents your Query.
If we can make this part of the public API, we can phase out FeatureResults.
(and reduce the number of classes people need to know about).
|
|
|