For a project I am working on I need to programmatically add featureTypes. The project’s goal is to create a tool to which users can add new quantitative/spatial data which is then visualized according to their needs.
The best option I can come up with so far is to create a different (database) view and featureType for each of the users datasets.
The problem I have with this solutions is the lack of elegance and flexibility. It might well be that users will upload so much data that animations can be rendered from them, that would mean one view per frame. Technically it is also a mess, because adding a new featureType I will have to do programatically via the user interface ( http://docs.codehaus.org/display/GEOSDOC/Alternative+for+reloading+the+Geoserver+catalog ). Moreover there is also the chance of inconsistencies where each featureType has a one on one relation with the view in the database.
Personally I would much rather have a featureType and Datastore which are under my control.
I know that I can inherit from AbstractDataStore and do some magic there, but then I would have to enter into GeoServer’s memory space, right? My collegue did that by simply deploying Geoserver within the tool he made, but I disagree with this strategy because his tool then became dependend on that particular Geoserver and GeoTools. He basically mixed everything up, and then it became nearly impossible to sort them out. However I do like the idea of having a custom Datastore, but then I would like to deploy it as a plugin or something for Geoserver.
I have also played with the idea of creating some kind of generic Datastore, like HTTPDataStore which you could then have interact with one of your servlets. Something everybody could use, since I am not the only one with this question. But as of now I am new to the field of GIS.
Which strategy would you recommend me?