| java.lang.Object org.geotools.data.store.ActiveTypeEntry
All known Subclasses: org.geotools.data.gml.GMLTypeEntry,
ActiveTypeEntry | abstract public class ActiveTypeEntry implements TypeEntry(Code) | | Starting place for holding information about a FeatureType.
Like say for instance the FeatureType, its metadata and so on.
The default implemenation should contain enough information to wean
us off of AbstractDataStore. That is it should provide its own locking
and event notification.
There is a naming convention:
- data access follows bean conventions: getTypeName(), getSchema()
- resource access methods follow Collections conventions reader(),
writer(), etc...
- overrrides are all protected and follow factory conventions:
createWriter(), createAppend(), createFeatureSource(),
createFeatureStore(), etc...
Feedback:
- even notification yes
- locking not - locking needs to be rejuggled
- naming convention really helps when subclassing
author: jgarnett |
Method Summary | |
protected FeatureWriter | createAppend(Transaction transaction) It would be great to kill this method, and add a "skipToEnd" method to featureWriter?
Override this if you can provide a native optimization for this. | protected FeatureLocking | createFeatureLocking() Create the FeatureLocking, override for your own custom implementation. | abstract public FeatureSource | createFeatureSource() | protected FeatureSource | createFeatureSource(FeatureType featureType) Create the FeatureSource, override for your own custom implementation.
Default implementation makes use of DataStore getReader( ... | protected FeatureStore | createFeatureStore() Create the FeatureStore, override for your own custom implementation. | public FeatureReader | createReader() Create a reader for this query. | protected FeatureReader | createReader(Query query) GR: this method is called from inside getFeatureReader(Query ,Transaction )
to allow subclasses return an optimized FeatureReader wich supports the
filter and attributes truncation specified in query
A subclass that supports the creation of such an optimized FeatureReader
shold override this method. | protected FeatureWriter | createWriter() Low level feature writer access. | public void | fireAdded(Feature newFeature, Transaction transaction) | public void | fireChanged(Feature before, Feature after, Transaction transaction) | public void | fireRemoved(Feature removedFeature, Transaction transaction) | public InternationalString | getDescription() TODO summary sentence for getDescription ... | public InternationalString | getDisplayName() TODO summary sentence for getDisplayName ... | public FeatureType | getFeatureType() TODO summary sentence for getFeatureType ... | public String[] | getMetadataNames() Metadata names from metadata.keySet(). | public String | getTypeName() | protected Filter | getUnsupportedFilter(Filter filter) GR: if a subclass supports filtering, it should override this method
to return the unsupported part of the passed filter, so a
FilteringFeatureReader will be constructed upon it. | public Map | metadata() Map of metadata by name. | public FeatureReader | reader(Query query, Transaction transaction) Access a FeatureReader providing access to Feature information. | TypeDiffState | state(Transaction transaction) | public FeatureWriter | writer(Transaction transaction) |
bounds | Envelope bounds(Code) | | Cached bounds
|
count | int count(Code) | | Cached count
|
parent | protected DataStore parent(Code) | | Remember parent.
We only refer to partent as a DataSource to keep hacks down.
|
createAppend | protected FeatureWriter createAppend(Transaction transaction) throws IOException(Code) | | It would be great to kill this method, and add a "skipToEnd" method to featureWriter?
Override this if you can provide a native optimization for this.
(aka copy file, open the file in append mode, replace origional on close).
|
createFeatureLocking | protected FeatureLocking createFeatureLocking()(Code) | | Create the FeatureLocking, override for your own custom implementation.
Warning: The default implementation of this method uses lockingManger.
You must override this method if you support your own locking system (like WFS).
|
createFeatureSource | protected FeatureSource createFeatureSource(FeatureType featureType)(Code) | | Create the FeatureSource, override for your own custom implementation.
Default implementation makes use of DataStore getReader( ... ), and listenerManager.
|
createFeatureStore | protected FeatureStore createFeatureStore()(Code) | | Create the FeatureStore, override for your own custom implementation.
|
createReader | public FeatureReader createReader()(Code) | | Create a reader for this query.
Subclass must override this to actually aquire content.
Parameters: typeName - Parameters: query - FeatureReader for all content |
createReader | protected FeatureReader createReader(Query query) throws IOException(Code) | | GR: this method is called from inside getFeatureReader(Query ,Transaction )
to allow subclasses return an optimized FeatureReader wich supports the
filter and attributes truncation specified in query
A subclass that supports the creation of such an optimized FeatureReader
shold override this method. Otherwise, it just returns
getFeatureReader(typeName)
|
createWriter | protected FeatureWriter createWriter()(Code) | | Low level feature writer access.
This is the only method you must implement to aquire content.
Subclass must supply a FeatureWriter |
getDescription | public InternationalString getDescription()(Code) | | TODO summary sentence for getDescription ...
See Also: org.geotools.data.TypeEntry.getDescription |
getDisplayName | public InternationalString getDisplayName()(Code) | | TODO summary sentence for getDisplayName ...
See Also: org.geotools.data.TypeEntry.getDisplayName |
getFeatureType | public FeatureType getFeatureType()(Code) | | TODO summary sentence for getFeatureType ...
See Also: org.geotools.data.TypeEntry.getFeatureType throws: IOException - |
getMetadataNames | public String[] getMetadataNames()(Code) | | Metadata names from metadata.keySet().
metadata names mentioned in metadata.keySet(); |
getUnsupportedFilter | protected Filter getUnsupportedFilter(Filter filter)(Code) | | GR: if a subclass supports filtering, it should override this method
to return the unsupported part of the passed filter, so a
FilteringFeatureReader will be constructed upon it. Otherwise it will
just return the same filter.
If the complete filter is supported, the subclass must return Filter.INCLUDE
|
metadata | public Map metadata()(Code) | | Map of metadata by name.
Map of metadata by name |
reader | public FeatureReader reader(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 );
|
|
|