Hello,
In order to synchronize the contents of several instances of GeoServer, I need to be able to download the original files of coverage and datastores.
Basically, the REST API for those stores should implement a GET method returning ZIP archives containing all the appropriate files.
I’ve seen a couple of references for this feature, including on this very this mailing-list (dec. 2012):
https://www.mail-archive.com/geoserver-users@lists.sourceforge.net/msg12037.html
http://gis.stackexchange.com/questions/42546/how-to-download-geotiffs-using-the-rest-api-in-geoserver-2-2
I’ve already had a look inside the code of GeoServer, in particular these 2 files:
CoverageStoreFileResource.java
DataStoreFileResource.java
My understanding is that it needs to implement a handleGet() method.
And, in fact, it already does in DataStoreFileResource.
But it relies on the value of a directory parameter key, whereas store configuration files currently use url AFAIK.
Is that a kind of “leftover” from how GeoServer used to save its configuration files??
Anyway, I managed to quickly fix that issue but I’m left with a question: how do I determine which files a store is composed of?
I mean, say a Shapefile-based datastore, which files should be included in the ZIP archive? .shp, .dbf, etc
Is there an API in GeoServer to enumerate all the files bound to a store?
Thanks for your help,
–
Damiano Albani