Class AttributeExpression

java.lang.Object
ca.uqac.lif.cep.tuples.AttributeExpression

public class AttributeExpression extends Object
Association between an expression to compute a value from an AttributeGroup and an attribute name. A SELECT processor is made of one or more such expressions; each is responsible for computing the value of one of the attributes of the output tuple, expressed in terms of elements of an input AttributeGroup. In terms of SQL, this corresponds to the "exp AS somename" construct following the SELECT keyword.
Author:
Sylvain Hallé
  • Field Details

    • m_expression

      protected ca.uqac.lif.cep.functions.Function m_expression
      The expression to compute the output value
    • m_targetName

      protected String m_targetName
      The attribute name to be given to this value
  • Constructor Details

    • AttributeExpression

      protected AttributeExpression()
    • AttributeExpression

      public AttributeExpression(ca.uqac.lif.cep.functions.Function expression, String name)
      Creates a new attribute expression
      Parameters:
      expression - The expression to compute the output value
      name - The attribute name to be given to this value
  • Method Details

    • getName

      public String getName()
      Gets the attribute name given to that expression
      Returns:
      The name
    • getValue

      public Object getValue(AttributeGroup group)
      Gets the value associated to the attribute name
      Parameters:
      group - The attribute group from which the value is to be computed
      Returns:
      The value
    • toString

      public String toString()
      Overrides:
      toString in class Object
    • build

      public static void build(ArrayDeque<Object> stack)