Hi,
I'm trying to integrate Sextante own pluin structure
with GeoTools own and... I'm having quite some difficulties.

Long story short, Sextante has its own algorithm plugin
system based on a convention over configuration approach,
every class contained in a "sextante_*" jar ending with
*Algorithm is considered to be an algorithm.
I can get the list of algorithms from the Sextante utility
class, and wrap them into a GeoTools compliant ProcessFactory.

And then I just want to add all of these process factories
to the GeoTools SPI using GeoTools.addProcessFactoryIterator.
That does not seem difficult, but it does not work at all.

This seems to happen because the SPI subsystem expects
to have a different factory class returned each time
by the iterator, whilst I do have a single class,
whose instances wrap a different Sextante algorithm each time.
The net result of this discrepancy is that the SPI won't
accept more than one factory class around, and thus I
end up with only one Sextante process instead of the 200+
I was expecting.

It seems the problem is structural, and I definitely won't
create a different wrapper for each item in the growing set
of Sextante algorithms...
It seems to me I will have to abandon this road and
deal with these discrepancies in GeoServer explicitly.
Unless someone has any good idea to share?

Cheers
Andrea

PS: in GeoServer we use this "parametrized class" approach
quite a bit for output formats and the like, and works
quite well (e.g., all XML output formats are actually
created using a handful of classes configured with different
paramters). I'm a bit suprised the GeoTools SPI
requires a different class for each factory (hopefully I'm
just mis-diagnosing the situation?)

-- 
Andrea Aime
OpenGeo - http://opengeo.org
Expert service straight from the developers.

------------------------------------------------------------------------------
_______________________________________________
Geotools-devel mailing list
Geotools-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/geotools-devel

Reply via email to