edu.umass.cs.sase.query
Class Operand

java.lang.Object
  extended by edu.umass.cs.sase.query.Operand

public class Operand
extends java.lang.Object

This class wraps an operand

Author:
haopeng

Constructor Summary
Operand(java.lang.String oper)
          Default constructor
 
Method Summary
 void checkSingle()
          Checks whether the operand is single
 void formatRepresentation()
          Format the representation of the operand
 java.lang.String getAggregation()
           
 java.lang.String getAttribute()
           
 java.lang.String getFormatedRepresentation()
           
 java.lang.String getOperandType()
           
 java.lang.String getOriginalRepresentation()
           
 java.lang.String getRelatedState()
           
 boolean isHasAggregation()
           
 boolean isHasRelatedState()
           
 boolean isNumber()
           
 boolean isSingle()
           
 void parse(java.lang.String operand)
          Parses the operand
 void parseAggregation(java.lang.String operand)
          Parses the aggregation
 void parseNonNum(java.lang.String operand)
          Parses the non number operands
 void parseRelatedEvent(java.lang.String operand)
          Parses related event
 void parseRelatedEventForAggregation(java.lang.String operand)
          Parses related event for aggregation
 void setAggregation(java.lang.String aggregation)
           
 void setAttribute(java.lang.String attribute)
           
 void setFormatedRepresentation(java.lang.String formatedRepresentation)
           
 void setHasAggregation(boolean hasAggregation)
           
 void setHasRelatedState(boolean hasRelatedState)
           
 void setNumber(boolean isNumber)
           
 void setOperandType(java.lang.String operandType)
           
 void setOriginalRepresentation(java.lang.String originalRepresentation)
           
 void setRelatedState(java.lang.String relatedState)
           
 void setSingle(boolean isSingle)
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Operand

public Operand(java.lang.String oper)
Default constructor

Parameters:
oper - the description of the operand
Method Detail

checkSingle

public void checkSingle()
Checks whether the operand is single


parse

public void parse(java.lang.String operand)
Parses the operand

Parameters:
operand - the operand description

parseNonNum

public void parseNonNum(java.lang.String operand)
Parses the non number operands

Parameters:
operand -

parseAggregation

public void parseAggregation(java.lang.String operand)
Parses the aggregation

Parameters:
operand -

parseRelatedEventForAggregation

public void parseRelatedEventForAggregation(java.lang.String operand)
Parses related event for aggregation

Parameters:
operand -

parseRelatedEvent

public void parseRelatedEvent(java.lang.String operand)
Parses related event

Parameters:
operand -

formatRepresentation

public void formatRepresentation()
Format the representation of the operand


toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getOperandType

public java.lang.String getOperandType()
Returns:
the operandType

setOperandType

public void setOperandType(java.lang.String operandType)
Parameters:
operandType - the operandType to set

getOriginalRepresentation

public java.lang.String getOriginalRepresentation()
Returns:
the originalRepresentation

setOriginalRepresentation

public void setOriginalRepresentation(java.lang.String originalRepresentation)
Parameters:
originalRepresentation - the originalRepresentation to set

getFormatedRepresentation

public java.lang.String getFormatedRepresentation()
Returns:
the formatedRepresentation

setFormatedRepresentation

public void setFormatedRepresentation(java.lang.String formatedRepresentation)
Parameters:
formatedRepresentation - the formatedRepresentation to set

getAttribute

public java.lang.String getAttribute()
Returns:
the attribute

setAttribute

public void setAttribute(java.lang.String attribute)
Parameters:
attribute - the attribute to set

getAggregation

public java.lang.String getAggregation()
Returns:
the aggregation

setAggregation

public void setAggregation(java.lang.String aggregation)
Parameters:
aggregation - the aggregation to set

getRelatedState

public java.lang.String getRelatedState()
Returns:
the relatedState

setRelatedState

public void setRelatedState(java.lang.String relatedState)
Parameters:
relatedState - the relatedState to set

isNumber

public boolean isNumber()
Returns:
the isNumber

setNumber

public void setNumber(boolean isNumber)
Parameters:
isNumber - the isNumber to set

isHasRelatedState

public boolean isHasRelatedState()
Returns:
the hasRelatedState

setHasRelatedState

public void setHasRelatedState(boolean hasRelatedState)
Parameters:
hasRelatedState - the hasRelatedState to set

isHasAggregation

public boolean isHasAggregation()
Returns:
the hasAggregation

setHasAggregation

public void setHasAggregation(boolean hasAggregation)
Parameters:
hasAggregation - the hasAggregation to set

isSingle

public boolean isSingle()
Returns:
the isSingle

setSingle

public void setSingle(boolean isSingle)
Parameters:
isSingle - the isSingle to set