|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
ObjectActiveTypeEntry
public abstract class ActiveTypeEntry
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:
Feedback:
modules/library/main (gt2-main.jar) (Maven report) (SVN head)| Field Summary | |
|---|---|
FeatureListenerManager |
listenerManager
Manages listener lists for FeatureSource implementation |
protected static Logger |
LOGGER
|
protected DataStore |
parent
Remember parent. |
| Constructor Summary | |
|---|---|
ActiveTypeEntry(DataStore parent,
FeatureType schema,
Map metadata)
|
|
| Method Summary | |
|---|---|
protected FeatureWriter |
createAppend(Transaction transaction)
It would be great to kill this method, and add a "skipToEnd" method to featureWriter? |
protected FeatureLocking |
createFeatureLocking()
Create the FeatureLocking, override for your own custom implementation. |
abstract FeatureSource |
createFeatureSource()
Create a new FeatueSource allowing interaction with content. |
protected FeatureSource |
createFeatureSource(FeatureType featureType)
Create the FeatureSource, override for your own custom implementation. |
protected FeatureStore |
createFeatureStore()
Create the FeatureStore, override for your own custom implementation. |
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. |
void |
fireAdded(Feature newFeature,
Transaction transaction)
Change notifcation |
void |
fireChanged(Feature before,
Feature after,
Transaction transaction)
Change notifcation |
void |
fireRemoved(Feature removedFeature,
Transaction transaction)
Change notifcation |
InternationalString |
getDescription()
TODO summary sentence for getDescription ... |
InternationalString |
getDisplayName()
TODO summary sentence for getDisplayName ... |
FeatureType |
getFeatureType()
TODO summary sentence for getFeatureType ... |
String[] |
getMetadataNames()
Metadata names from metadata.keySet(). |
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. |
Map |
metadata()
Map of metadata by name. |
FeatureReader |
reader(Query query,
Transaction transaction)
Access a FeatureReader providing access to Feature information. |
FeatureWriter |
writer(Transaction transaction)
|
| Methods inherited from class Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface TypeEntry |
|---|
equals, hashCode |
| Field Detail |
|---|
protected static final Logger LOGGER
protected DataStore parent
We only refer to partent as a DataSource to keep hacks down.
public FeatureListenerManager listenerManager
| Constructor Detail |
|---|
public ActiveTypeEntry(DataStore parent, FeatureType schema, Map metadata)
| Method Detail |
|---|
public InternationalString getDisplayName()
getDisplayName in interface TypeEntryorg.geotools.data.TypeEntry#getDisplayName()public InternationalString getDescription()
getDescription in interface TypeEntryorg.geotools.data.TypeEntry#getDescription()public FeatureType getFeatureType()
getFeatureType in interface TypeEntryIOExceptionorg.geotools.data.TypeEntry#getFeatureType()public String[] getMetadataNames()
public Map metadata()
public String getTypeName()
public FeatureReader reader(Query query, Transaction transaction) throws IOException
This implementation passes off responsibility to the following overrideable methods:
If you can handle some aspects of Query natively (say expressions or reprojection) override the following:
IOExceptionpublic void fireAdded(Feature newFeature, Transaction transaction)
TypeEntry
public void fireRemoved(Feature removedFeature, Transaction transaction)
TypeEntry
fireRemoved in interface TypeEntrypublic void fireChanged(Feature before, Feature after, Transaction transaction)
TypeEntry
fireChanged in interface TypeEntrypublic abstract FeatureSource createFeatureSource()
TypeEntrySubclass may optionally implement:
Several default implemenations are provided
createFeatureSource in interface TypeEntryprotected FeatureSource createFeatureSource(FeatureType featureType)
Default implementation makes use of DataStore getReader( ... ), and listenerManager.
protected FeatureStore createFeatureStore()
protected FeatureLocking createFeatureLocking()
Warning: The default implementation of this method uses lockingManger. You must override this method if you support your own locking system (like WFS).
public FeatureReader createReader()
Subclass must override this to actually aquire content.
typeName - query -
protected FeatureReader createReader(Query query) throws IOException
query
A subclass that supports the creation of such an optimized FeatureReader
shold override this method. Otherwise, it just returns
getFeatureReader(typeName)
IOExceptionprotected Filter getUnsupportedFilter(Filter filter)
If the complete filter is supported, the subclass must return Filter.INCLUDE
public FeatureWriter writer(Transaction transaction) throws IOException
IOExceptionprotected FeatureWriter createWriter()
This is the only method you must implement to aquire content.
protected FeatureWriter createAppend(Transaction transaction) throws IOException
Override this if you can provide a native optimization for this. (aka copy file, open the file in append mode, replace origional on close).
IOException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||