anl.aida.formula
Class FormulaFactory

java.lang.Object
  extended by anl.aida.formula.FormulaFactory

public class FormulaFactory
extends java.lang.Object

Factory for producing formulas for different type data plots.

Version:
$Revision$ $Date$

Field Summary
private static DataTransformer NO_OP_TRANSFORMER
           
 
Constructor Summary
FormulaFactory()
           
 
Method Summary
 Formula createFormula(java.lang.String formula)
           
private  FormulaParser createParser(java.lang.String formula)
           
 Formula createTileFormula(java.lang.String formula, javax.measure.unit.Unit<?> commonUnit)
          Creates a formula that produces data appropriate for a tile plot.
 Formula createTimeStepFormula(java.lang.String formula, javax.measure.unit.Unit<?> commonUnit)
          Creates a formula that produces data appropriate for a time step plot.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

NO_OP_TRANSFORMER

private static final DataTransformer NO_OP_TRANSFORMER
Constructor Detail

FormulaFactory

public FormulaFactory()
Method Detail

createParser

private FormulaParser createParser(java.lang.String formula)

createFormula

public Formula createFormula(java.lang.String formula)

createTileFormula

public Formula createTileFormula(java.lang.String formula,
                                 javax.measure.unit.Unit<?> commonUnit)
Creates a formula that produces data appropriate for a tile plot. The data produced by the formula will contain individual values for each x,y cell in the domain for each layer and timestep.

Parameters:
formula - the formula to evaluate
commonUnit - the desired unit for the result
Returns:
a Formula that will produce tile-style data.

createTimeStepFormula

public Formula createTimeStepFormula(java.lang.String formula,
                                     javax.measure.unit.Unit<?> commonUnit)
Creates a formula that produces data appropriate for a time step plot. The data produced by the formula will contain an average of the data at each time step. For each time step, first each layer's x,y domain data is averaged into a value of each layer. Then these layer values are themselves averaged.

Parameters:
formula - the formula to evaluate
commonUnit - the desired unit for the result
Returns:
a Formula that will produce tile-style data.