org.objectweb.medor.filter.api
Interface ExpressionHelper

All Superinterfaces:
java.lang.Cloneable, Cloneable
All Known Implementing Classes:
PostfixExpressionHelper

public interface ExpressionHelper
extends Cloneable

Author:
Sebastien Chassande-Barrioz

Method Summary
 Operand evaluate(Expression[] stack, ParameterOperand[] parameters, Tuple t)
           
 void fixIndexes(QueryNode node, Expression e)
          For a given Expression used at a QueryNode, sets the index of its FieldOperands (index in the tuple resulting from the concatenation of the children QueryNode tuples).
 java.lang.String[] getParameterNames(Expression e)
           
 Expression join(Expression[] es)
           
 Expression substituteParameters(ParameterOperand[] pos, Expression e)
           
 Expression[] substituteParameters(ParameterOperand[] pos, Expression[] e)
           
 Expression[] toStack(Expression e)
           
 
Methods inherited from interface org.objectweb.medor.api.Cloneable
clone
 

Method Detail

toStack

public Expression[] toStack(Expression e)
                     throws ExpressionException,
                            TypingException
ExpressionException
TypingException

join

public Expression join(Expression[] es)
                throws ExpressionException,
                       TypingException
ExpressionException
TypingException

evaluate

public Operand evaluate(Expression[] stack,
                        ParameterOperand[] parameters,
                        Tuple t)
                 throws MedorException,
                        java.lang.IllegalStateException
MedorException
java.lang.IllegalStateException

substituteParameters

public Expression substituteParameters(ParameterOperand[] pos,
                                       Expression e)
                                throws ExpressionException,
                                       TypingException
ExpressionException
TypingException

substituteParameters

public Expression[] substituteParameters(ParameterOperand[] pos,
                                         Expression[] e)
                                  throws ExpressionException,
                                         TypingException
ExpressionException
TypingException

getParameterNames

public java.lang.String[] getParameterNames(Expression e)
                                     throws ExpressionException,
                                            TypingException
ExpressionException
TypingException

fixIndexes

public void fixIndexes(QueryNode node,
                       Expression e)
For a given Expression used at a QueryNode, sets the index of its FieldOperands (index in the tuple resulting from the concatenation of the children QueryNode tuples). It will call the setIndex method of FieldOperand.

See Also:
FieldOperand