Package ca.uqac.lif.cep.tuples
Class AttributeExpression
- java.lang.Object
-
- ca.uqac.lif.cep.tuples.AttributeExpression
-
public class AttributeExpression extends java.lang.Object
Association between an expression to compute a value from an AttributeGroup and an attribute name. ASELECT
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 inputAttributeGroup
. In terms of SQL, this corresponds to the "exp AS somename
" construct following theSELECT
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 valueprotected 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 expressionjava.lang.Object
getValue(AttributeGroup group)
Gets the value associated to the attribute namejava.lang.String
toString()
-
-
-
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 valuename
- 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 classjava.lang.Object
-
build
public static void build(java.util.ArrayDeque<java.lang.Object> stack)
-
-