|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
ObjectFeatureTypeHandler
public class FeatureTypeHandler
This class acts as a manager for FIDMappers and FeatureTypeInfo on behalf of a JDBCDataStore.
At the same time, it acts as a FeatureTypeInfo cache, with a user selectable timeout. Set the
timeout to 0 if you want each request to be in-line with the actual database state, to
Long.MAX_VALUE in order to make it work basically in-memory, or to an intermediate value to
make requests cached allowing at the same time to keep it in-line with a changing database.
Field Summary | |
---|---|
protected Map |
featureTypeMap
|
protected Map |
featureTypeTimeoutMap
|
Constructor Summary | |
---|---|
FeatureTypeHandler(JDBC1DataStore store,
FIDMapperFactory fmFactory,
long cacheTimeOut)
Creates a new feature type handler |
Method Summary | |
---|---|
void |
forceRefresh()
Forces the type handler to throw away all cached information and parse again the database on type requests |
FeatureTypeInfo |
getFeatureTypeInfo(String featureTypeName)
Retreives the FeatureTypeInfo object for a SimpleFeatureType. |
FIDMapper |
getFIDMapper(String typeName)
|
FIDMapperFactory |
getFIDMapperFactory()
Returns the FIDMapperFactory used by this FeatureTypeHandler |
SimpleFeatureType |
getSchema(String typeName)
Will reverse engineer and return the schema from the database. |
String[] |
getTypeNames()
Returns a list of FeatureType names contained in the parent JDBCDataStore |
void |
resetFIDMappers()
Clears the map between FeatureType name and FIDMappers |
void |
setFIDMapper(String typeName,
FIDMapper mapper)
|
void |
setFIDMapperFactory(FIDMapperFactory factory)
Sets the FIDMapperFactory used by this FeatureTypeHandler. |
Methods inherited from class Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
protected Map featureTypeMap
protected Map featureTypeTimeoutMap
Constructor Detail |
---|
public FeatureTypeHandler(JDBC1DataStore store, FIDMapperFactory fmFactory, long cacheTimeOut)
store
- the parent data storefmFactory
- the FIDMapper factorycacheTimeOut
- timeout used to purge possibly stale data from the cachesMethod Detail |
---|
public String[] getTypeNames() throws IOException
IOException
public void resetFIDMappers()
public SimpleFeatureType getSchema(String typeName) throws IOException
typeName
-
IOException
public FeatureTypeInfo getFeatureTypeInfo(String featureTypeName) throws IOException
This allows subclasses to get access to the information about a feature type, this includes the schema and the fidColumnName.
featureTypeName
- The name of the feature type to get the info for.
IOException
- If an error occurs creating the FeatureTypeInfo.public FIDMapper getFIDMapper(String typeName) throws IOException
IOException
getFIDMapper(java.lang.String)
public void setFIDMapper(String typeName, FIDMapper mapper)
org.geotools.data.jdbc.FeatureTypeHandler#setFIDMapper(java.lang.String)
public void forceRefresh()
public FIDMapperFactory getFIDMapperFactory()
public void setFIDMapperFactory(FIDMapperFactory factory)
factory
-
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |