Class AttributeExpression


  • public class AttributeExpression
    extends java.lang.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 Summary

      Fields 
      Modifier and Type Field Description
      protected ca.uqac.lif.cep.functions.Function m_expression
      The expression to compute the output value
      protected java.lang.String m_targetName
      The attribute name to be given to this value
    • Constructor Summary

      Constructors 
      Modifier Constructor Description
      protected AttributeExpression()  
        AttributeExpression​(ca.uqac.lif.cep.functions.Function expression, java.lang.String name)
      Creates a new attribute expression
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static void build​(java.util.ArrayDeque<java.lang.Object> stack)  
      java.lang.String getName()
      Gets the attribute name given to that expression
      java.lang.Object getValue​(AttributeGroup group)
      Gets the value associated to the attribute name
      java.lang.String toString()  
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • m_expression

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

        protected java.lang.String m_targetName
        The attribute name to be given to this value
    • Constructor Detail

      • AttributeExpression

        protected AttributeExpression()
      • AttributeExpression

        public AttributeExpression​(ca.uqac.lif.cep.functions.Function expression,
                                   java.lang.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 Detail

      • getName

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

        public java.lang.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 java.lang.String toString()
        Overrides:
        toString in class java.lang.Object
      • build

        public static void build​(java.util.ArrayDeque<java.lang.Object> stack)