org.datamixer.functions
Class FunctionStrategy

java.lang.Object
  extended byorg.datamixer.functions.FunctionStrategy
Direct Known Subclasses:
AddStrategy, AddValueStrategy, ConcatStrategy, DivideStrategy, ForEachStrategy, LineStrategy, MultiplyStrategy, SubtractStrategy

public abstract class FunctionStrategy
extends java.lang.Object


Field Summary
protected  FunctionIterator functionIterator_
          the associated function
protected  org.apache.log4j.Logger logger_
           
protected  StrategyResult result_
          the result
 
Constructor Summary
FunctionStrategy()
           
 
Method Summary
protected  void doInitialize()
           
 int findDataType(int type)
          Set the datatype.
 int getDataType()
          Get the datatype.
 FunctionIterator getFunctionIterator()
          Returns the current function iterator.
protected  void handleArguments(Value value)
          If value is a ValueListValue, calls handleArguments recursively on its values.
 void initialize()
           
protected  void initResult()
           
protected  void operate(Value value)
          Operates on value.
 Value operator()
          Applies an operator to the children of a Function node.
 void setDataType(int type)
          Set the datatype.
 void setFunctionIterator(FunctionIterator value)
          Sets the current function iterator.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

functionIterator_

protected FunctionIterator functionIterator_
the associated function


result_

protected StrategyResult result_
the result


logger_

protected org.apache.log4j.Logger logger_
Constructor Detail

FunctionStrategy

public FunctionStrategy()
Method Detail

getDataType

public int getDataType()
Get the datatype.


setDataType

public void setDataType(int type)
Set the datatype.


findDataType

public int findDataType(int type)
                 throws DatamixerException
Set the datatype.

Throws:
DatamixerException

getFunctionIterator

public FunctionIterator getFunctionIterator()
Returns the current function iterator.

Returns:
the current function iterator.

setFunctionIterator

public void setFunctionIterator(FunctionIterator value)
Sets the current function iterator.

Parameters:
value - the current function iterator.

operator

public Value operator()
               throws DatamixerException
Applies an operator to the children of a Function node.

Throws:
DatamixerException

initialize

public void initialize()

doInitialize

protected void doInitialize()

initResult

protected void initResult()

handleArguments

protected void handleArguments(Value value)
                        throws DatamixerException
If value is a ValueListValue, calls handleArguments recursively on its values. Otherwise calls operate(org.datamixer.values.Value) on value.

Throws:
DatamixerException

operate

protected void operate(Value value)
                throws DatamixerException
Operates on value.

Throws:
DatamixerException


Copyright © 2004-2006 datamixer.org. All Rights Reserved.