Update Repository adapter interface
-----------------------------------
Key: GEOT-2486
URL: http://jira.codehaus.org/browse/GEOT-2486
Project: GeoTools
Issue Type: Improvement
Components: data
Reporter: Jody Garnett
The Repository interface in GeoTools is used to offer an API that code can use
to look up DataStore instances. This is useful for code such as the validation
module which needs to make use of several FeatureSources in order to verify
integrity constraints.
{code}
interface {
Map<String,DataStore> getDataStores();
SortedMap<String,FeatureSource> getFeatureSources();
Set<String> getPrefixes();
boolean lockExists(String lockId)
boolean lockRefresh(String lockId, Transaction)
boolean lockRelease(String lockId, Transaction)
Source source(String dataStoreId, String typeName )
}
{code}
The Repository interface and DefaultRepository implementation also offered
"cross datastore" operations such as lock management; and a few ways to
directly look up a FeatureSource instance. These methods were to facilitate
management of DataStore instances.
This interface needs to be updated to:
- work with DataAccess rather than DataStore
- remove the horrible String "typeRef" notation (dataStoreID:::typeName) now
that we have Name
- remove the cross datastore operations; since they do not add any value; the
same methods can be written for any List<DataAccess>
Christian Müller is working on a pregeneralized data store; and has a similar
need to look up DataStore instances; but has reduced the API down to fewer
methods.
{code}
public interface DataStoreLookup {
public void initialize(Object source);
public DataStore getDataStoreFor(String name);
public DataStore getDataStoreFor(String namespace, String name);
}
{code}
The final interface agreed on is as follows:
{code}
public interface Repository {
DataAccess<?,?> access( Name name );
DataStore dataStore( Name name );
}
{code}
The DefaultRepository interface will maintain extra methods to facilitate the
management of DataStore instances; leaving the above methods as the minimum
required to adapt GeoTools code to the GeoServer catalog.
--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators:
http://jira.codehaus.org/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira
------------------------------------------------------------------------------
Crystal Reports - New Free Runtime and 30 Day Trial
Check out the new simplified licensing option that enables
unlimited royalty-free distribution of the report engine
for externally facing server and web deployment.
http://p.sf.net/sfu/businessobjects
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel