edu.ntnu.cikmr.workflow
Class Condition

java.lang.Object
  extended by edu.ntnu.cikmr.workflow.Statement
      extended by edu.ntnu.cikmr.workflow.Condition
All Implemented Interfaces:
Executable, XMLRepresentation
Direct Known Subclasses:
Incentive

public class Condition
extends Statement

Title: Condition statement

Description: A conditional block

Copyright: Copyright (c) 2007


Constructor Summary
Condition()
           
 
Method Summary
 boolean execute()
           
 void fromXML(org.w3c.dom.Node n)
           
 boolean getAndBinding()
          Return if the and or or binding is used.
 java.lang.String getIffalse()
          Returns the id to execute if false
 java.lang.String getIftrue()
          Return the id to execute if true.
 boolean getResult()
           
 Statement getStatement(int index)
           
 int getStatementCount()
           
 java.util.Iterator<Statement> getStatementIterator()
           
 void removeStatement(int index)
           
 void setAndBinding(boolean andBinding)
          Sets if the binding should be and or or.
 void setIffalse(java.lang.String iffalse)
          Sets the acitity to execute if false.
 void setIftrue(java.lang.String iftrue)
          Sets the activity to execute if true
 java.lang.String toXML()
           
 
Methods inherited from class edu.ntnu.cikmr.workflow.Statement
getParent, resolve, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

Condition

public Condition()
Method Detail

fromXML

public void fromXML(org.w3c.dom.Node n)

toXML

public java.lang.String toXML()

execute

public boolean execute()

getResult

public boolean getResult()

getIftrue

public java.lang.String getIftrue()
Return the id to execute if true.

Returns:
id

getIffalse

public java.lang.String getIffalse()
Returns the id to execute if false

Returns:
id

getAndBinding

public boolean getAndBinding()
Return if the and or or binding is used.

Returns:
boolean

setAndBinding

public void setAndBinding(boolean andBinding)
Sets if the binding should be and or or.

Parameters:
andBinding - boolean

setIffalse

public void setIffalse(java.lang.String iffalse)
Sets the acitity to execute if false.

Parameters:
iffalse - id

setIftrue

public void setIftrue(java.lang.String iftrue)
Sets the activity to execute if true.,

Parameters:
iftrue - id

getStatementCount

public int getStatementCount()

getStatement

public Statement getStatement(int index)

removeStatement

public void removeStatement(int index)

getStatementIterator

public java.util.Iterator<Statement> getStatementIterator()