If you are attending FOSS4G this year I have an intermediate geotools
workshop which is covering exactly this question :)
The quick answer is your jar needs to include an file in META-INF/services
documenting what interface you are implementing for GeoServer to use Each
line of this file lists a class that implements this interface.
So for a DataStore we get a file like this:
-
https://github.com/geotools/geotools/blob/master/modules/plugin/property/src/main/resources/META-INF/services/org.geotools.data.DataStoreFactorySpi
For now please see the geotools documentation on how factories (and how
Java Service Provider Interface - SPI) works.
- http://docs.geotools.org/latest/userguide/tutorial/factory.html
There is a tutorial showing how to make a new function, and register it
with SPI here:
- http://docs.geotools.org/latest/userguide/tutorial/function.html
There is also a long form tutorial on the older AbstractDataStore base
class here:
- http://docs.geotools.org/latest/userguide/tutorial/abstractdatastore.html
Jody Garnett
On Sat, Jul 26, 2014 at 3:57 AM, Girija Kalyani <[email protected]>
wrote:
> Dear Group,
>
> Is it possible to write a code in java platform, generate a JAR file, put
> that jar file under a geoserver (installed under say tomcat), and have
> that store appear in the geoserver web UI such that
> the features it provides can be composed into layer sets?
>
> I've been swirling around in geotools and geoserver documentation APIs
> and examples for days and days now, but i can't for the life of me
> figure out how to do this. i don't know if my mental model of how this
> should work is wrong,
> or if there is more configuration i need to provide to geoserver, or one
> of a thousand other possible mistakes i could be making, so i'm backing
> up and challenging my basic assumptions.
> Please do suggest
> --
>
>
>
> *GIRIJA KALYANIGFM DEPARTMENTIIRS-ITCISRO*
>
>
> ------------------------------------------------------------------------------
> Want fast and easy access to all the code in your enterprise? Index and
> search up to 200,000 lines of code with a free copy of Black Duck
> Code Sight - the same software that powers the world's largest code
> search on Ohloh, the Black Duck Open Hub! Try it now.
> http://p.sf.net/sfu/bds
> _______________________________________________
> Geoserver-devel mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/geoserver-devel
>
>
------------------------------------------------------------------------------
Want fast and easy access to all the code in your enterprise? Index and
search up to 200,000 lines of code with a free copy of Black Duck
Code Sight - the same software that powers the world's largest code
search on Ohloh, the Black Duck Open Hub! Try it now.
http://p.sf.net/sfu/bds
_______________________________________________
Geoserver-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/geoserver-devel