|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.store.ActiveTypeEntry
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:
Field Summary | |
---|---|
FeatureListenerManager |
listenerManager
Manages listener lists for FeatureSource |
protected static java.util.logging.Logger |
LOGGER
|
protected DataStore |
parent
Remember parent. |
Constructor Summary | |
---|---|
ActiveTypeEntry(DataStore parent,
org.opengis.feature.simple.SimpleFeatureType schema,
java.util.Map metadata)
|
Method Summary | |
---|---|
protected FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createAppend(Transaction transaction)
It would be great to kill this method, and add a "skipToEnd" method to featureWriter? |
protected FeatureLocking<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createFeatureLocking()
Create the FeatureLocking, override for your own custom implementation. |
abstract FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createFeatureSource()
Create a new FeatueSource allowing interaction with content. |
protected FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createFeatureSource(org.opengis.feature.simple.SimpleFeatureType featureType)
Create the FeatureSource, override for your own custom implementation. |
protected FeatureStore<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createFeatureStore()
Create the FeatureStore, override for your own custom implementation. |
FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createReader()
Create a reader for this query. |
protected FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createReader(Query query)
GR: this method is called from inside getFeatureReader(Query ,Transaction ) to allow subclasses return an optimized FeatureReader query |
protected FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
createWriter()
Low level feature writer access. |
void |
fireAdded(org.opengis.feature.simple.SimpleFeature newFeature,
Transaction transaction)
Change notifcation |
void |
fireChanged(org.opengis.feature.simple.SimpleFeature before,
org.opengis.feature.simple.SimpleFeature after,
Transaction transaction)
Change notifcation |
void |
fireRemoved(org.opengis.feature.simple.SimpleFeature removedFeature,
Transaction transaction)
Change notifcation |
org.opengis.util.InternationalString |
getDescription()
TODO summary sentence for getDescription ... |
org.opengis.util.InternationalString |
getDisplayName()
TODO summary sentence for getDisplayName ... |
org.opengis.feature.simple.SimpleFeatureType |
getFeatureType()
TODO summary sentence for getFeatureType ... |
java.lang.String[] |
getMetadataNames()
Metadata names from metadata.keySet(). |
java.lang.String |
getTypeName()
|
protected org.opengis.filter.Filter |
getUnsupportedFilter(org.opengis.filter.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. |
java.util.Map |
metadata()
Map of metadata by name. |
FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
reader(Query query,
Transaction transaction)
Access a FeatureReader |
FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> |
writer(Transaction transaction)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.geotools.data.store.TypeEntry |
---|
equals, hashCode |
Field Detail |
---|
protected static final java.util.logging.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, org.opengis.feature.simple.SimpleFeatureType schema, java.util.Map metadata)
Method Detail |
---|
public org.opengis.util.InternationalString getDisplayName()
getDisplayName
in interface TypeEntry
org.geotools.data.TypeEntry#getDisplayName()
public org.opengis.util.InternationalString getDescription()
getDescription
in interface TypeEntry
org.geotools.data.TypeEntry#getDescription()
public org.opengis.feature.simple.SimpleFeatureType getFeatureType()
getFeatureType
in interface TypeEntry
java.io.IOException
org.geotools.data.TypeEntry#getFeatureType()
public java.lang.String[] getMetadataNames()
public java.util.Map metadata()
public java.lang.String getTypeName()
public FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> reader(Query query, Transaction transaction) throws java.io.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:
java.io.IOException
public void fireAdded(org.opengis.feature.simple.SimpleFeature newFeature, Transaction transaction)
TypeEntry
public void fireRemoved(org.opengis.feature.simple.SimpleFeature removedFeature, Transaction transaction)
TypeEntry
fireRemoved
in interface TypeEntry
public void fireChanged(org.opengis.feature.simple.SimpleFeature before, org.opengis.feature.simple.SimpleFeature after, Transaction transaction)
TypeEntry
fireChanged
in interface TypeEntry
public abstract FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createFeatureSource()
TypeEntry
Subclass may optionally implement:
Several default implemenations are provided
createFeatureSource
in interface TypeEntry
protected FeatureSource<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createFeatureSource(org.opengis.feature.simple.SimpleFeatureType featureType)
Default implementation makes use of DataStore getReader( ... ), and listenerManager.
protected FeatureStore<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createFeatureStore()
protected FeatureLocking<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> 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<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createReader()
Subclass must override this to actually aquire content.
typeName
- query
-
protected FeatureReader<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createReader(Query query) throws java.io.IOException
query
A subclass that supports the creation of such an optimized FeatureReader
shold override this method. Otherwise, it just returns
getFeatureReader(typeName)
java.io.IOException
protected org.opengis.filter.Filter getUnsupportedFilter(org.opengis.filter.Filter filter)
If the complete filter is supported, the subclass must return Filter.INCLUDE
public FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> writer(Transaction transaction) throws java.io.IOException
java.io.IOException
protected FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createWriter()
This is the only method you must implement to aquire content.
protected FeatureWriter<org.opengis.feature.simple.SimpleFeatureType,org.opengis.feature.simple.SimpleFeature> createAppend(Transaction transaction) throws java.io.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).
java.io.IOException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |