edu.umass.cs.sase.query
Class Edge

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

public class Edge
extends java.lang.Object

This class represents an edge of an NFA.

Author:
haopeng

Constructor Summary
Edge(int edgeTypeNum)
           
Edge(java.lang.String edgeDescription)
          Constructor, based on the input string
 
Method Summary
 void addPredicate(java.lang.String predicateDescription)
           
 boolean evaluatePredicate(Event currentEvent, Event previousEvent)
          Evaluates an event on this edge
 boolean evaluatePredicate(Event currentEvent, Run r, EventBuffer b)
          Override method, evaluates event based on the current event, and a run.
 java.lang.String getEdgeDescription()
           
 java.lang.String getEdgeType()
           
 PredicateOptimized[] getPredicates()
           
 void setEdgeDescription(java.lang.String edgeDescription)
           
 void setEdgeType(java.lang.String edgeType)
           
 void setPredicates(PredicateOptimized[] predicates)
           
 java.lang.String toString()
          Self-description
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

Edge

public Edge(java.lang.String edgeDescription)
Constructor, based on the input string

Parameters:
edgeDescription - the description sentence in the nfa file

Edge

public Edge(int edgeTypeNum)
Method Detail

addPredicate

public void addPredicate(java.lang.String predicateDescription)

evaluatePredicate

public boolean evaluatePredicate(Event currentEvent,
                                 Event previousEvent)
                          throws net.sourceforge.jeval.EvaluationException
Evaluates an event on this edge

Parameters:
currentEvent - current event
previousEvent - the previous event
Returns:
the evaluation result.
Throws:
net.sourceforge.jeval.EvaluationException

evaluatePredicate

public boolean evaluatePredicate(Event currentEvent,
                                 Run r,
                                 EventBuffer b)
Override method, evaluates event based on the current event, and a run.

Parameters:
currentEvent - the current event
r - a run
Returns:
the evaluate result

toString

public java.lang.String toString()
Self-description

Overrides:
toString in class java.lang.Object

getEdgeDescription

public java.lang.String getEdgeDescription()
Returns:
the edgeDescription

setEdgeDescription

public void setEdgeDescription(java.lang.String edgeDescription)
Parameters:
edgeDescription - the edgeDescription to set

getEdgeType

public java.lang.String getEdgeType()
Returns:
the edgeType

setEdgeType

public void setEdgeType(java.lang.String edgeType)
Parameters:
edgeType - the edgeType to set

getPredicates

public PredicateOptimized[] getPredicates()
Returns:
the predicates

setPredicates

public void setPredicates(PredicateOptimized[] predicates)
Parameters:
predicates - the predicates to set