This functionality is new as of M5 or M6

Jesse

On 14-Mar-06, at 1:11 AM, Adrian Custer wrote:

Hey Jessie,

Thanks for your answer. Some clarification.


On Mon, 2006-03-13 at 10:19 -0800, Jesse Eichar wrote:

The catalog API has a method for creating "temporary georesources" such
as a memoryDatastore.


The method is something like:
CatalogPlugin.getDefault().getLocalCatalog ().createTemporaryResource( featureType );


Is this really recent method in ICatalog? I can't find it in 1.1M4SDK
nor on the web javadocs.

this method will return a IGeoResource that backs onto a
MemoryDatastore.  Once you have the georesource you can do the normal
things such as get a FeatureStore from the IGeoResource  and add
features to the layer using the feature store...  Remember that
FeatureStores obtained from a IGeoResource uses AUTOCOMMIT, not a
transaction like layers.





2) What's the elegant/correct way to bail out of an operation if I
get
to a point where something doesn't resolve or some other assertion
fails?


Make sure you close all you resources (file handlers, readers/writers
etc... ) and return. The framework doesn't really care as long as you
clean up after yourself.

So we can bail out, even firing off exceptions, and the RCP will
continue happily? If so, is there a uDig policy on how to transmit error
messages to the user?

You can use the enablement element of the  the operation extension
declaration to ensure that the operation will only be enabled for
certain resources.

Cool.

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

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

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

Reply via email to