On 31-Mar-06, at 10:17 AM, Jonas Johansson wrote:

Hi again,

I have a question on MemoryDataStore persistence between sessions (or
whatever the term for quitting uDig, saving workspace and loading it
again).

Since the MemoryDataStore shows up in the Catalog with the layers that
existed before quitting (but with all features gone when doing Feature
Count and CRS unknown when doing Resource Summary), I figure there must
be some persistence after all.

This is where you can help write history. How and what is persisted is still kind of being determined. Here is the current plan more or less:

On quitting uDig a user will be prompted to save the memory layers. If they are saved then the layers in the map will be replaced with the persistent layer. (For 1.1 you will only be able to save to shapefile but later version will provide a choice).

Here are some choices, but will be settable in preferences

1. a) If the layer isn't saved it stays in the map and will be part of it the next time uDig is loaded (obviously without the features, but sometimes it is the Featuretype that is important)
    b) the layer is removed from the map.

2. a) Everytime uDig is shutdown the memory datastore is removed from the catalog b) The memory datastore and its resources are left in catalog for later use. Again users might not want to redefine the features types.

By default I'm thinking 1 b) and 2) a) will be used.  What do you think?


When in the second session, I check the Catalog and get a
MemoryServiceImpl as "resolve" and it turns out that it can not resolve
to a IService, and not resolve to a DataStore. The same goes for my
WFSServiceImpl so I guess there is nothing strange with that.
I'm not sure what you mean here. You can get the members of a catalog and one should be a MemoryServiceImpl. Although you should do you search by checking which service can resolve to a MemoryDataStore because we will probably hide MemoryServiceImpl so you can't check for that.


However, the MemoryServiceImpl can resolve to a MemoryDataStore. So the question is, how do I get to pick up that MemoryDataStore and use it as
an IService like I did in the previous session? It doesn't seem to be
able to adapt itself to a IService....

A MemoryDatastore cannot adapt to an IService it is a one way street. You can to get the IService and keep the reference. What are you trying to do here?

Jesse
_______________________________________________
User-friendly Desktop Internet GIS (uDig)
http://udig.refractions.net
http://lists.refractions.net/mailman/listinfo/udig-devel

Reply via email to