I have been making some important changes in the last 2-3 weeks and, although I still have to test them an finish a few things, most of there are already working. These changes are rather big, since they involve modification of the SEXTANTE core architecture and, specially, the sextante_gui project. Here is a detailed description of some of them.
-Removal of WPS client. The WPS client was not working and it was somehow difficult to mantain, so, after asking SEXTANTE users and developers on the mailing lists, I decided to remove it. I guess that no one was using it, and the idea was not just removing it, but reimplementing it in a different way. Removing the project was not as easy as just taking a project away, but required some changes in the core classes as well. That made me see that its design was not right, and made me think about a new way of implementing extensions to the set of native algorithms of SEXTANTE. And that's how I came up with the next big change: Algorithm Providers
-Algorihtm Providers: Along with the basic set of algorithms (those programmed in Java using the SEXTANTE base classes), SEXTANTE includes algoritms from different sources. The WPS client was one of those sources, as well as the modeler or the GRASS interface. However, all these were developed independently and needed some adjustment in the core os SEXTANTE. Although a model or an algorithm coming from GRASS is technically a SEXTANTE geoalgorithm (it extends the GeoAlgorithm class), there are some minor differences, and I solved the problems associated with those differences by adding some patches to the SEXTANTE core.
This is, however, not a very clean option, specially considering that other sources of algorithms might be added in the future. For this reason, I decided to create a mechanism for "plugging" algorithm sources in a clean and robust manner. What I have done is to create an interface named IAlgorithmProvider and methods to add ojects of this class to SEXTANTE before initializing the library, so the list of algorithms is enriched with the algorithm it provides.
An algorithm provider takes care of everything needed to incorporate algorithms, from the particular characteristics of their execution, to the location of their associated help files, and including things such as the configuration panel that the provider might need or the icon of the algorithms in the toolbox and the modeler. With this change, all algorithms behave exactly the same and there is no need to add patches to the core classes. For instance, there was a "model" command in the command line interface to execute models. Now there is just the "runalg" algorithm, and it can be used to execute any algorithm, no matter if it is a model or a GRASS algorithm or it comes from any other provider yet to be developed.
After making these changes to the core classes, I have created 3 providers. The first two ones simply adapt the modeler interface and the GRASS interface, so now they are not part of the core classes. Adapting them has been relatively easy, although the GRASS one needs some testing yet, and I have detected a few issues while rewriting it. The third provider wraps SAGA algorithms and it took me just a couple of days to develop (still need to test it in linux and add some minor stuff, but it is almost done). This is partly due to the good knowledge I have of SAGA after speding many years using it and developing many of its modules, but also due to the new SEXTANTE design, which makes it very easy to incorporate third-party algorithms through an algorithm provider. Here is a picture of the toolbox, with both SAGA and GRASS algorithms activated.
More info about other changes in the next post, to come soon...