[Geoserver-users] Custom DataStores

Patel, Ronak Avinash (US SSA) wrote:

Andrea,

Thanks for helping out with answering my questions.

I see method signatures such as:

Boolean accepts(Object input)
getReader(Object source)
getWriter(Object destination)

1. What are the sources, inputs, and destination? Where does it come
from?

I don't know, I don't generally work on coverages, Simone and Alessio
do. So if I was in your place and tried to understand what they method
do I'd look into the javadocs and the existing implementations
in GeoTools 2.5.x branch.

2. I retrieve this information from a web service call to an external
service so I would put my logic for that here. Are there any patterns I
should be following for that?

Not that I know of. The only coverage code that does sort of
remote calls is the ArcSDE one, but it's going thru a ready made
API that

3. How does my implementation of these things get plugged into
Geoserver? What does the spring configuration have to look like?

DataStore/CoverageStore are not GeoServer plugins in this sense,
they are really GeoTools level plugins. For that you have to use
SPI, which basically requires you to add a specific file in
META-INF/services, which is named after the interface the store/format
implements, and that contains a list of the classes that do implement
it inside the jar. Again, look into the GeoTools implementations
to figure that out, especially the gtopo30 one which should be
the simplest, and the geotiff, which should be the most
comprehensive. I'm not aware of any docs beyond the code and
the javadoc embedded in it, but if anybody does, please add
a link to this thread.

Cheers
Andrea