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 int createAlgorithmsDescriptionAndHelpFiles()
          Creates xml files calling grass commands using the --interface-description modifier
static void createAlgorithmSiblings()
           
static void deleteAlgorithms()
           
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 -

deleteAlgorithms

public static void deleteAlgorithms()

createAlgorithmSiblings

public static void createAlgorithmSiblings()

createAlgorithmsDescriptionAndHelpFiles

public static int createAlgorithmsDescriptionAndHelpFiles()
                                                   throws WrongGrassFolderException
Creates xml files calling grass commands using the --interface-description modifier

Throws:
WrongGrassFolderException

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