edu.usc.alfa.xalfa.ast.primitive
Class TwoWayNode

java.lang.Object
  extended byedu.usc.alfa.xalfa.ast.Node
      extended byedu.usc.alfa.xalfa.ast.NamedNode
          extended byedu.usc.alfa.xalfa.ast.primitive.PortalGroupNode
              extended byedu.usc.alfa.xalfa.ast.primitive.TwoWayNode

public final class TwoWayNode
extends PortalGroupNode

A Twoway is a special interface, which has exactly one input and one output portal. It also possesses one of two directions.


Field Summary
static java.lang.String INITIATOR
          The initiator direction implying that the twoway is an originator of bi-directional communication
static java.lang.String TERMINATOR
          The initiator direction implying that the twoway is an respondent of bi-directional communication
 
Constructor Summary
TwoWayNode(java.lang.String ID, java.lang.String label, java.lang.String direction)
          Creates a new instance of TwowayNode
 
Method Summary
 void accept(edu.usc.alfa.xalfa.visitor.NodeVisitor v)
          The visitor method to analyze xAlfa objects.
 java.lang.String getDirection()
          Find the direction of this twoway
 InputNode getInput()
          Find the input of this twoway
 OutputNode getOutput()
          Find the output of this twoway
 void setPortals(PortalNode[] portals)
          Setter for property portals.
 java.lang.String toDebugString(int level)
          Generate debug information for this node.
 java.lang.String toString()
           
 
Methods inherited from class edu.usc.alfa.xalfa.ast.primitive.PortalGroupNode
getPortals, getTemplate, setTemplate
 
Methods inherited from class edu.usc.alfa.xalfa.ast.NamedNode
getName
 
Methods inherited from class edu.usc.alfa.xalfa.ast.Node
equals, getID, getTabs, hashCode, nodeSequenceString, nodeSequenceString, toDebugString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Field Detail

INITIATOR

public static final java.lang.String INITIATOR
The initiator direction implying that the twoway is an originator of bi-directional communication

See Also:
Constant Field Values

TERMINATOR

public static final java.lang.String TERMINATOR
The initiator direction implying that the twoway is an respondent of bi-directional communication

See Also:
Constant Field Values
Constructor Detail

TwoWayNode

public TwoWayNode(java.lang.String ID,
                  java.lang.String label,
                  java.lang.String direction)
Creates a new instance of TwowayNode

Parameters:
ID - uniquely identifying the node
label - for manual identification
direction - for specifying the twoway's direction
Method Detail

accept

public void accept(edu.usc.alfa.xalfa.visitor.NodeVisitor v)
Description copied from class: Node
The visitor method to analyze xAlfa objects. This method is part of the Visitor pattern from GOF.

Overrides:
accept in class PortalGroupNode

getDirection

public java.lang.String getDirection()
Find the direction of this twoway

Returns:
String either @see:INITIATOR or @see:TERMINATOR

getOutput

public OutputNode getOutput()
Find the output of this twoway

Returns:
OutputNode the output in this twoway

getInput

public InputNode getInput()
Find the input of this twoway

Returns:
InputNode the input in this twoway

toDebugString

public java.lang.String toDebugString(int level)
Description copied from class: Node
Generate debug information for this node. Nesting levels are provided so that hierarchical information can be easily debugged. Typically, debugging information includes values of various parameters and the debugging information for internal objects

Overrides:
toDebugString in class PortalGroupNode

toString

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

setPortals

public void setPortals(PortalNode[] portals)
Description copied from class: PortalGroupNode
Setter for property portals.

Overrides:
setPortals in class PortalGroupNode
Parameters:
portals - New value of property portals.