es.unex.sextante.core
Class Sextante

java.lang.Object
  extended by es.unex.sextante.core.Sextante

public class Sextante
extends java.lang.Object


Constructor Summary
Sextante()
           
 
Method Summary
static void addErrorToLog(java.lang.String sError)
          Adds an error message to the SEXTANTE logger
static void addErrorToLog(java.lang.Throwable e)
          logs an error or exception to the SEXTANTE logger
static void addInfoToLog(java.lang.String sInfo)
          Adds an info message to the SEXTANTE logger
static void addWarningToLog(java.lang.String sWarning)
          Adds a warning message to the SEXTANTE logger
static GeoAlgorithm getAlgorithmFromCommandLineName(java.lang.String sName)
          returns an algorithm based on its command line name.
static java.util.HashMap getAlgorithms()
          Returns a map of all algorithms in the library.
static java.util.HashMap getAlgorithms(IGeoAlgorithmFilter filter)
          Returns a map of algorithms in the library filtered using a given filter.
static SextanteLogHandler getLogger()
          Returns the logger to log SEXTANTE issues
static java.lang.String getText(java.lang.String sKey)
          Returns an internationalized string based on a key value (i.e the string in the current language associated with the key value) Use this method to support internationalization.
static void initialize()
          initializes the library, loading algorithms and properties.
static void initialize(java.lang.String sFolder)
          initializes the library, loading algorithms and properties.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Sextante

public Sextante()
Method Detail

initialize

public static void initialize()
initializes the library, loading algorithms and properties. Algorithms and properties are loaded from files in the classpath.


initialize

public static void initialize(java.lang.String sFolder)
initializes the library, loading algorithms and properties.

Parameters:
sFolder - the folder where sextante jars are located. Algorithms and properties files are loaded from those jar files prior to library initialization.

addErrorToLog

public static void addErrorToLog(java.lang.Throwable e)
logs an error or exception to the SEXTANTE logger

Parameters:
e - the throwable object to log

addErrorToLog

public static void addErrorToLog(java.lang.String sError)
Adds an error message to the SEXTANTE logger

Parameters:
sError - the error message

addWarningToLog

public static void addWarningToLog(java.lang.String sWarning)
Adds a warning message to the SEXTANTE logger

Parameters:
sWarning - the warning message

addInfoToLog

public static void addInfoToLog(java.lang.String sInfo)
Adds an info message to the SEXTANTE logger

Parameters:
sInfo - the info message

getLogger

public static SextanteLogHandler getLogger()
Returns the logger to log SEXTANTE issues

Returns:
the logger to log SEXTANTE issues

getAlgorithms

public static java.util.HashMap getAlgorithms()
Returns a map of all algorithms in the library. command-line names (see GeoAlgorithm.getCommandLineName()) are used as keys. The library must have been initialized before. Otherwise, this method will return an empty map

Returns:
a map of all algorithms in the library.

getAlgorithms

public static java.util.HashMap getAlgorithms(IGeoAlgorithmFilter filter)
Returns a map of algorithms in the library filtered using a given filter. command-line names (see GeoAlgorithm.getCommandLineName()) are used as keys. The library must have been initialized before. Otherwise, this method will return an empty map

Parameters:
filter - The filter to use
Returns:
a map of algorithms in the library filtered according to a given filter.

getAlgorithmFromCommandLineName

public static GeoAlgorithm getAlgorithmFromCommandLineName(java.lang.String sName)
returns an algorithm based on its command line name. (see GeoAlgorithm.getCommandLineName())

Parameters:
sName - the command-line name
Returns:
an algorithm. null if there is no algorithm with that name

getText

public static java.lang.String getText(java.lang.String sKey)
Returns an internationalized string based on a key value (i.e the string in the current language associated with the key value) Use this method to support internationalization. Resource strings are loaded when the library is initialized, so the initialize() method has to be called to use the corresponding translations.

Parameters:
sKey - the key to search
Returns:
the corresponding string in the current language. If the key was not found, it returns that same key.