May I suggest a requirement?

uDig's biggest motivation for this feature is to be able to disconnect
the uDig client from the world and still view data.  I see mention of
this in your original proposal, so perhaps this is already a bona fide
requirement.


I plan to achieve this with a cache which uses a persistent storage backend,
and will be able to initialize from the underlying storage. I still have to
think more about this.

Random thoughts:
- in addition to wrapping the source datastore, the storage medium used
to hold the cached features could be a datastore as well -- be it a
shapefile datastore, local postgis instance, or memory datastore...


yes, the internal storage of the cache could be another datastore.
The only limitation is some datastores can't store any FeatureTypes, think
of shapefiles.
So I had in mind that the internal store should be any hashmap-like data
structure :

public interface IInternalStore {

   public abstract boolean contains(Feature f) ;

   public abstract void put(Feature f) ;

   public abstract Feature get(String featureId) ;

   public abstract Collection getAll() ;

   public abstract void clear() ;

   public abstract void remove(String featureId) ;

}

Extension of existing datastore can easily adapts this interface.

--
Christophe
-------------------------------------------------------------------------
This SF.net email is sponsored by DB2 Express
Download DB2 Express C - the FREE version of DB2 express and take
control of your XML. No limits. Just data. Click to get it now.
http://sourceforge.net/powerbar/db2/
_______________________________________________
Geotools-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to