Hi Daniele:

Out of your two options I prefer recognise the consistency of using 
StructuredGridCoverage2DReader, but I think that GridCoverage2DReader is the 
better candidate as it already "owns" an book keeping files (like a property 
file for an image pyramid).

Notes:
- I recommend writing a code example of each alternative and see which one 
reads better
- I was thinking about this as well with the recent removeSchema method, and 
wondering if we need a "FileSet" to capture all the sidecar files for a shape 
file and support add/remove/rename. Probably too much of an implementation 
detail but you may make something of the idea.

-- 
Jody Garnett

On 18 November 2013 at 9:47:40 pm, Daniele Romagnoli 
(daniele.romagn...@geo-solutions.it) wrote:

Hi list,
I'm working on adding the capability to do a cleanup/delete of a 
coverageStore/GridCoverageReader.
Suppose we have a multidimensional ImageMosaic. It's composed of some stuff on 
disk (granules,  auxiliary files, property files) and a DB with records for the 
coverages.

Now suppose we would like to remove the store (as an instance through REST) and 
cleanup everything related to it: coverages, records in the DB, granules on 
disk, auxiliary files, hidden files.
That work should be delegated to the Reader (it's the only one which has full 
knowledge of the data structure) which may delegate some parts to the 
underlying readers (you may think about an ImageMosaic of NetCDFs... The 
ImageMosaic may delegate some cleanup to the underlying NetCDF readers which 
delete hidden files and purge quick access DBs).

Therefore, I would like to know your opinion about where the "delete" method 
should be added.

I can see 2 options:
1) StructuredGridCoverage2DReader interface: This interface already supports 
createCoverage (to define new coverages), removeCoverage (to remove a specific 
coverage), and harvest (to add more granules to a coverage). It could be a good 
candidate to adding a delete method to cleanup everything since it already 
supports "editing" methods.

2) GridCoverage2DReader interface: This interface is the one which supports 
multiple coverages access. It's parent for StructuredGridCoverage2DReader. 
Adding the delete method on this base class could be useful for other readers 
which doesn't implement StructuredGridCoverage2DReader but which may have the 
need to cleanup the store.

In both cases we will add a note to the API stating that not all the reader are 
supporting it.

What do you think about it?
The outcome will be used to setup a Proposal.
Please, let me know.
Daniele



==
Our support, Your Success! Visit http://opensdi.geo-solutions.it for more 
information.
==
Ing. Daniele Romagnoli
Senior Software Engineer

GeoSolutions S.A.S.
Via Poggio alle Viti 1187
55054  Massarosa (LU)
Italy
phone: +39 0584 962313
fax:      +39 0584 1660272

http://www.geo-solutions.it
http://twitter.com/geosolutions_it

-------------------------------------------------------
------------------------------------------------------------------------------  
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps  
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access  
Free app hosting. Or install the open source package on any LAMP server.  
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!  
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk_______________________________________________
  
GeoTools-Devel mailing list  
GeoTools-Devel@lists.sourceforge.net  
https://lists.sourceforge.net/lists/listinfo/geotools-devel  
------------------------------------------------------------------------------
DreamFactory - Open Source REST & JSON Services for HTML5 & Native Apps
OAuth, Users, Roles, SQL, NoSQL, BLOB Storage and External API Access
Free app hosting. Or install the open source package on any LAMP server.
Sign up and see examples for AngularJS, jQuery, Sencha Touch and Native!
http://pubads.g.doubleclick.net/gampad/clk?id=63469471&iu=/4140/ostg.clktrk
_______________________________________________
GeoTools-Devel mailing list
GeoTools-Devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to