es.unex.sextante.gridCalculus.gridCalculator
Class FormulaParser

java.lang.Object
  extended by es.unex.sextante.gridCalculus.gridCalculator.FormulaParser

public class FormulaParser
extends java.lang.Object


Constructor Summary
FormulaParser()
           
 
Method Summary
static java.util.List<es.unex.sextante.parameters.RasterLayerAndBand> getBandsFromFormula(java.lang.String sFormula, java.util.List<es.unex.sextante.dataObjects.IRasterLayer> layers)
           
static java.util.List<java.lang.String> getBandsFromFormulaForModeler(java.lang.String sFormula, es.unex.sextante.core.ObjectAndDescription[] layers, es.unex.sextante.core.ObjectAndDescription[] numerical)
           
static java.lang.String getNormalizedName(java.lang.String name)
          Converts the name of a layer in a normalized name.
static java.lang.String prepareFormula(java.lang.String sFormula, java.util.List<java.lang.String> names)
           
static java.lang.String replaceDots(java.lang.String s)
           
static java.lang.String replaceVariables(java.lang.String formula, java.lang.String layerName, java.lang.String normalizedName)
          Replace all variables in a formula by a normalized name
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FormulaParser

public FormulaParser()
Method Detail

getBandsFromFormula

public static java.util.List<es.unex.sextante.parameters.RasterLayerAndBand> getBandsFromFormula(java.lang.String sFormula,
                                                                                                 java.util.List<es.unex.sextante.dataObjects.IRasterLayer> layers)

getBandsFromFormulaForModeler

public static java.util.List<java.lang.String> getBandsFromFormulaForModeler(java.lang.String sFormula,
                                                                             es.unex.sextante.core.ObjectAndDescription[] layers,
                                                                             es.unex.sextante.core.ObjectAndDescription[] numerical)

getNormalizedName

public static java.lang.String getNormalizedName(java.lang.String name)
Converts the name of a layer in a normalized name.

Parameters:
name -
Returns:

prepareFormula

public static java.lang.String prepareFormula(java.lang.String sFormula,
                                              java.util.List<java.lang.String> names)

replaceDots

public static java.lang.String replaceDots(java.lang.String s)

replaceVariables

public static java.lang.String replaceVariables(java.lang.String formula,
                                                java.lang.String layerName,
                                                java.lang.String normalizedName)
Replace all variables in a formula by a normalized name

Parameters:
formula -
layerName -
normalizedName -
Returns:


Copyright © 2014 gvSIG Association. All Rights Reserved.