On 13-Mar-06, at 3:45 AM, Adrian Custer 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 ); 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. 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. You can use the enablement element of the the operation extension declaration to ensure that the operation will only be enabled for certain resources. |
_______________________________________________ User-friendly Desktop Internet GIS (uDig) http://udig.refractions.net http://lists.refractions.net/mailman/listinfo/udig-devel
