es.unex.sextante.gui.cmd
Class Parser

java.lang.Object
  extended by es.unex.sextante.gui.cmd.Parser

public class Parser
extends java.lang.Object

This class has methods to parse command-line expressions and create instances of SEXTANTE algorithms from them

Author:
volaya

Constructor Summary
Parser()
           
 
Method Summary
static GeoAlgorithm getAlgorithm(java.lang.String sAlgName, java.lang.String[] args)
          Return a ready-to-be-executed instance of a given algorithm, based on its command-line name and an array of strings representing parameter values
static GeoAlgorithm getModel(java.lang.String sModelFilename, java.lang.String[] args)
          Return a ready-to-be-executed instance of a given model, based on its filename and an array of strings representing parameter values
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Parser

public Parser()
Method Detail

getAlgorithm

public static GeoAlgorithm getAlgorithm(java.lang.String sAlgName,
                                        java.lang.String[] args)
                                 throws CommandLineException
Return a ready-to-be-executed instance of a given algorithm, based on its command-line name and an array of strings representing parameter values

Parameters:
sAlgName - the command-line name of the algorithm
args - an array of string representing parameter values
Returns:
an instance of the algorithm with the given parameters
Throws:
CommandLineException

getModel

public static GeoAlgorithm getModel(java.lang.String sModelFilename,
                                    java.lang.String[] args)
                             throws CommandLineException
Return a ready-to-be-executed instance of a given model, based on its filename and an array of strings representing parameter values

Parameters:
sModelFilename - the filename of the file containing the model, which must be in the models folder
args - an array of string representing parameter values
Returns:
an instance of the algorithm with the given parameters
Throws:
CommandLineException