es.unex.sextante.gui.grass
Class GrassAlgorithmsFactory

java.lang.Object
  extended by es.unex.sextante.gui.grass.GrassAlgorithmsFactory

public class GrassAlgorithmsFactory
extends java.lang.Object


Constructor Summary
GrassAlgorithmsFactory()
           
 
Method Summary
static boolean createAlgorithmsDescriptionAndHelpFiles()
          Creates xml files calling grass commands using the --interface-description modifier and html help files using the --html--description modifier
static GrassAlgorithm getGrassAlgorithm(java.lang.String sAlgName)
          Returns the algorithm corresponding to a given grass algorithm name
static GrassAlgorithm[] getGrassAlgorithms()
          Returns an array of geoalgorithms based on grass commands
static java.lang.String getGrassDescriptionFolder()
          Returns the folder where grass description files (xml file generated using the grass --interface-description modifier) are located
static void initAlgorithms()
          Creates algorithms from grass command descriptions.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GrassAlgorithmsFactory

public GrassAlgorithmsFactory()
Method Detail

getGrassAlgorithms

public static GrassAlgorithm[] getGrassAlgorithms()
Returns an array of geoalgorithms based on grass commands

Returns:
a list of geoalgorithms based on grass commands

initAlgorithms

public static void initAlgorithms()
Creates algorithms from grass command descriptions. This should be called before calling the getAlgorithms() method.

Parameters:
grassFolder -

createAlgorithmsDescriptionAndHelpFiles

public static boolean createAlgorithmsDescriptionAndHelpFiles()
Creates xml files calling grass commands using the --interface-description modifier and html help files using the --html--description modifier


getGrassDescriptionFolder

public static java.lang.String getGrassDescriptionFolder()
Returns the folder where grass description files (xml file generated using the grass --interface-description modifier) are located

Returns:
Returns the folder where grass description files (xml file generated using the grass --interface-description modifier) are located

getGrassAlgorithm

public static GrassAlgorithm getGrassAlgorithm(java.lang.String sAlgName)
Returns the algorithm corresponding to a given grass algorithm name

Parameters:
sAlgName - the name of the grass algorithm (the grass command to execute it)
Returns:
the algorithm corresponding to the passed grass algorithm name