[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [List Home]
[udig-dev] How to extent export functionality

Hello folks

recently I thought about improving export functionality. At the moment the user can export resources to shapefile (selected features and complete datasets).

CatalogExport provide this capability. I'm not sure what would be the best way to implement for some reasons I'd like to discuss here:

* my reading of module dependencies is: There is no dependency from catalog bundles to project bundles.
* from CatalogExport I do not really have access to Layer (althought a GeoResource (which might be a LayerResource) is in the data object
* using the LayerResource.resolve method a could get access to the style but whenever a shapefile has been imported without having a side-SLD file the style is null
* not sure how other resources would act

I thought about using ResourceInterceptor on a layer but for some reasons internal caching in LayerResource.resolve seems to block it.

Can anybode exlain the implementation of LayerResource.resolve()?

ÂÂÂÂÂÂÂ T resource = processResourceCachingStrategy(monitor, adaptee);
ÂÂÂÂÂÂÂ if (resource == null){
ÂÂÂÂÂÂÂÂÂÂÂ return null; // could not do it
ÂÂÂÂÂÂÂ resource = processPostResourceInterceptors(resource, adaptee);
ÂÂÂÂÂÂÂ return resource;
In addition to have access to the layer style this would'n work if the user exports resource from catalog view (which is OK).

However it looks like the CatalogExport class can handle this BUT I'm not sure how to access the Style correctly.

Do you have any suggestions?

Thanks in advance