org.shiwa.fgi.iwir
Class ForEachTask

java.lang.Object
  extended by org.shiwa.fgi.iwir.AbstractTask
      extended by org.shiwa.fgi.iwir.AbstractCompoundTask
          extended by org.shiwa.fgi.iwir.AbstractSimpleCompoundTask
              extended by org.shiwa.fgi.iwir.ForEachTask

public class ForEachTask
extends AbstractSimpleCompoundTask

The Class ForEachTask enables the iteration over a data package collection.


Constructor Summary
ForEachTask(java.lang.String name)
          Instantiates a new for each task.
 
Method Summary
 void addLoopElement(LoopElement loopelement)
          Adds an additional loop element to the task Throws a NotWellFormedException if loop element already exist, for example.
 void addLoopPort(LoopPort loopPort)
          Adds an additional loop port to the task Throws a NotWellFormedException if loop port already exist, for example.
 void addUnionPort(UnionPort unionPort)
          Adds an additional union port to the task.
 java.util.List<AbstractDataPort> getAllInputPorts()
          Returns a list of all input ports (inputPort, loopPoort,...).
 java.util.List<AbstractDataPort> getAllOutputPorts()
          Returns a list of all output ports (outputPort, unionPort,...).
 java.util.List<LoopElement> getLoopElements()
          Returns a shallow copy of the loop elements.
 java.util.List<LoopPort> getLoopPorts()
          Returns a shallow copy of the loop ports.
 java.util.List<UnionPort> getUnionPorts()
          Returns a shallow copy of the union ports.
 
Methods inherited from class org.shiwa.fgi.iwir.AbstractSimpleCompoundTask
addTask, equals, getBodyTasks, getChildren, hashCode
 
Methods inherited from class org.shiwa.fgi.iwir.AbstractCompoundTask
addLink, addLink, getControlLinks, getDataLinks, getLinks
 
Methods inherited from class org.shiwa.fgi.iwir.AbstractTask
addConstraint, addInputPort, addOutputPort, addProperty, getConstraints, getInputPorts, getName, getOutputPorts, getParentTask, getPort, getProperties, getUniqueId, isTopLevelTask, removeProperty, setPortValue, setPortValue, setPortValue, setPortValue, toString
 
Methods inherited from class java.lang.Object
getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ForEachTask

public ForEachTask(java.lang.String name)
Instantiates a new for each task.

Parameters:
name - the name of the for each task
Method Detail

addLoopPort

public void addLoopPort(LoopPort loopPort)
                 throws NotWellFormedException
Adds an additional loop port to the task Throws a NotWellFormedException if loop port already exist, for example.

Parameters:
loopPort - the loopport to add to the task
Throws:
NotWellFormedException

addLoopElement

public void addLoopElement(LoopElement loopelement)
                    throws NotWellFormedException
Adds an additional loop element to the task Throws a NotWellFormedException if loop element already exist, for example.

Parameters:
loopelement - the loopelement to add to the task
Throws:
NotWellFormedException

addUnionPort

public void addUnionPort(UnionPort unionPort)
                  throws NotWellFormedException
Adds an additional union port to the task. Throws a NotWellFormedException if union port already exist, for example.

Parameters:
unionPort - the union port to add to the task
Throws:
NotWellFormedException

getLoopPorts

public java.util.List<LoopPort> getLoopPorts()
Returns a shallow copy of the loop ports. Returns an empty list if no loop port exists.

Returns:
the loop ports of the task

getLoopElements

public java.util.List<LoopElement> getLoopElements()
Returns a shallow copy of the loop elements. Returns an empty list if no loop element exists.

Returns:
the loop elements of the task

getUnionPorts

public java.util.List<UnionPort> getUnionPorts()
Returns a shallow copy of the union ports. Returns an empty list if no union ports exists.

Returns:
the union ports of the task

getAllInputPorts

public java.util.List<AbstractDataPort> getAllInputPorts()
Description copied from class: AbstractTask
Returns a list of all input ports (inputPort, loopPoort,...). For the loopCounter its ports (from,to,step) are added, if they exist.

Specified by:
getAllInputPorts in class AbstractTask
Returns:
the all input ports

getAllOutputPorts

public java.util.List<AbstractDataPort> getAllOutputPorts()
Description copied from class: AbstractTask
Returns a list of all output ports (outputPort, unionPort,...).

Specified by:
getAllOutputPorts in class AbstractTask
Returns:
the all input ports