|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.geotools.data.DefaultCatalog
Simple Catalog so we can try out the api.
This class intends to track the Catalog API as it provides more metadata information. It is intended to be an In Memory data structure.
Other projectswill produce more persistent Catalog implementations. GeoServer for instance will back it's Catalog implementation with XML files.
Field Summary | |
protected java.util.Map |
registration
|
Constructor Summary | |
DefaultCatalog()
|
Method Summary | |
DataStore |
getDataStore(java.lang.String namespace)
Retrieve DataStore managed by this Catalog. |
java.lang.String[] |
getNameSpaces()
Retrieve registered Namespaces. |
boolean |
lockExists(java.lang.String lockID)
Implement lockExists. |
boolean |
lockRefresh(java.lang.String lockID,
Transaction transaction)
Implement lockRefresh. |
boolean |
lockRelease(java.lang.String lockID,
Transaction transaction)
Implement lockRelease. |
void |
register(java.util.Map params)
Finds and registers DataStore indicated by the parameters. |
void |
registerDataStore(java.lang.String namespace,
DataStore dataStore)
Registrers datastore with the provided namespace. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
protected java.util.Map registration
Constructor Detail |
public DefaultCatalog()
Method Detail |
public java.lang.String[] getNameSpaces()
Catalog
getNameSpaces
in interface Catalog
public void registerDataStore(java.lang.String namespace, DataStore dataStore)
registerDataStore
in interface Catalog
namespace
- dataStore
- Catalog.registerDataStore(java.lang.String,
org.geotools.data.DataStore)
public void register(java.util.Map params) throws java.io.IOException
The provided parameters must specify a namespace
for the
resulting DataStore.
params
-
java.io.IOException
public DataStore getDataStore(java.lang.String namespace)
getDataStore
in interface Catalog
namespace
-
Catalog.getDataStore(java.lang.String)
public boolean lockExists(java.lang.String lockID)
lockExists
in interface Catalog
lockID
-
Catalog.lockExists(java.lang.String)
public boolean lockRefresh(java.lang.String lockID, Transaction transaction) throws java.io.IOException
Currently it is an error if the lockID is not found. Because if we can't find it we cannot refresh it.
Since locks are time sensitive it is impossible to check if a lockExists and then be sure it will still exist when you try to refresh it. Nothing we do can protect client code from this fact, they will need to do with the IOException when (not if) this situation occurs.
lockRefresh
in interface Catalog
lockID
- Authorizataion of lock to refreshtransaction
- Transaction used to authorize refresh
java.io.IOException
- If opperation encounters problems, or lock not found
java.lang.IllegalArgumentException
- if lockID is null
Catalog.lockRefresh(java.lang.String, org.geotools.data.Transaction)
public boolean lockRelease(java.lang.String lockID, Transaction transaction) throws java.io.IOException
Currently it is not and error if the lockID is not found, it may have expired. Since locks are time sensitive it is impossible to check if a lockExists and then be sure it will still exist when you try to release it.
lockRelease
in interface Catalog
lockID
- Authorizataion of lock to refreshtransaction
- Transaction used to authorize refresh
java.io.IOException
- If opperation encounters problems
java.lang.IllegalArgumentException
- if lockID is null
Catalog.lockRefresh(java.lang.String, org.geotools.data.Transaction)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |