|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |
See:
Description
Class Summary | |
---|---|
AbstractCompoundTask | The Class AbstractCompoundTask is the superclass of all compound tasks. |
AbstractDataPort | The Class AbstractDataPort represents a port and is the super class for all data ports. |
AbstractLink | The Class AbstractLink is the super class of DataLink and
ControlLink and provides a general way to describe the data flow. |
AbstractPort | The Class AbstractPort represents a port. |
AbstractSimpleCompoundTask | The Class AbstractSimpleCompoundTask provides support for one body element
and is the super class for WhileTask , ForTask ,
ForEachTask , ParallelForTask , ParallelForEachTask and
BlockScope . |
AbstractTask | The Class AbstractTask is the superclass of all tasks. |
BlockScope | The Class Block scope provides a block for tasks. |
CollectionType | The Class CollectionType represents the collection type of an IWIR data type. |
ConditionExpression | The Class ConditionExpression represents a condition. |
Constraint | The Class Constraint provides additional information for the workflow. |
ControlLink | The Class ControlLink provides a way to define a pure flow dependency between two tasks that does not involve any data dependency. |
DataLink | The Class Link is used to connect different data ports. |
DataType | The Class DataType represents a data type. |
ForEachTask | The Class ForEachTask enables the iteration over a data package collection. |
ForTask | The Class ForTask executes its body multiple times determined by a
LoopCounter . |
IfTask | The Class IfTask enables the conditional execution of the inner tasks. |
InputPort | The Class InputPort servers as an identifier for the data flow. |
IWIR | The Class IWIR represents an IWIR workflow. |
LoopCounter | The Class LoopCounter defines the control flow of the ForTask . |
LoopElement | The Class LoopElement controls the control flow of the ForEachTask . |
LoopPort | The Class LoopPort is used to express a cyclic data flow. |
OutputPort | The Class OutputPort serves as identifier for the data flow. |
ParallelForEachTask | The Class ParallelForEachTask provides the iteration over a data package without synchronization. |
ParallelForTask | The Class ParallelForTask. |
Property | The Class Property is used to model a stream of data produced and consumed at data ports. |
SimpleType | The Class SimpleType represents the simple types of an IWIR data type. |
Task | The Class Task is a task which is implemented by a single computational entity. |
UnionPort | The Class UnionPort is used to collect and access data produced in different iteration executions. |
WhileTask | The Class WhileTask. |
XMLHandler | The Class XMLHandler provides a simple interface for handling IWIR workflow objects. |
Enum Summary | |
---|---|
SimpleType.ConcreteType | The Enum ConcreteType list the simple types. |
Exception Summary | |
---|---|
NotWellFormedException | The Class NotWellFormedException is thrown if the IWIR object is not well-formed. |
Provides simple java classes to generate an IWIR workflow. The package encourages a top-down approach. Attributes are assigned using the constructors. If there can exist more than one child nodes of the same type (e.g.InputPort,UnionPort) the nodes are added using a add* method. If there can exist only a single child node (e.g Loopcounter, IWIR-Task) the node is set using a set* method. Consider the following complete example for a cross product:
IWIR i = new IWIR("crossProduct");
ParallelForEachTask forEach1 = new ParallelForEachTask("foreach1");
forEach1.addInputPort(new InputPort("collB",new CollectionType(SimpleType.FILE)));
forEach1.addLoopElement(new LoopElement("collA", new CollectionType(SimpleType.FILE)));
ParallelForEachTask forEach2 = new ParallelForEachTask("foreach2");
forEach2.addInputPort(new InputPort("elementA",SimpleType.FILE));
forEach2.addLoopElement(new LoopElement("collB",new CollectionType(SimpleType.FILE)));
Task a = new Task("A","consumer");
a.addInputPort(new InputPort("elementA",SimpleType.FILE));
a.addInputPort(new InputPort("elementB", SimpleType.FILE));
a.addOutputPort(new OutputPort("res",SimpleType.FILE));
forEach2.addTask(a);
forEach2.addOutputPort(new OutputPort("res",new CollectionType(SimpleType.FILE)));
forEach2.addLink(forEach2.getPort("elementA"), a.getPort("elementA"));
forEach2.addLink(forEach2.getPort("collB"), a.getPort("elementB"));
forEach2.addLink(a.getPort("res"), forEach2.getPort("res"));
forEach1.addTask(forEach2);
forEach1.addOutputPort(new OutputPort("res",new CollectionType(new CollectionType(SimpleType.FILE))));
forEach1.addLink(forEach1.getPort("collA"), forEach2.getPort("elementA"));
forEach1.addLink(forEach1.getPort("collB"), forEach2.getPort("collB"));
forEach1.addLink(forEach2.getPort("res"), forEach1.getPort("res"));
i.setTask(forEach1);
We can print out the result or write it into a file using following commands:
i.asXMLString();and
i.asXMLFile();and An IWIR object can be generated from a given file using a constructor:
IWIR i = new IWIR(file);Following lines depict the XML representation of our example:
<IWIR version="1.0" wfname="crossProduct" xmlns="http://shiwa-workflow.eu/IWIR"> <parallelForEach name="foreach1"> <inputPorts> <inputPort name="collB" type="collection/file"/> <loopElements> <loopElement name="collA" type="collection/file"/> </loopElements> </inputPorts> <body> <parallelForEach name="foreach2"> <inputPorts> <inputPort name="elementA" type="file"/> <loopElements> <loopElement name="collB" type="collection/file"/> </loopElements> </inputPorts> <body> <task name="A" tasktype="consumer"> <inputPorts> <inputPort name="elementA" type="file"/> <inputPort name="elementB" type="file"/> </inputPorts> <outputPorts> <outputPort name="res" type="file"/> </outputPorts> </task> </body> <outputPorts> <outputPort name="res" type="collection/file"/> </outputPorts> <links> <links from="forEach2/elementA" to="A/elementA"/> <links from="forEach2/collB" to="A/elementB"/> <links from="A/res" to="forEach2/res"/> </links> </parallelForEach> </body> <outputPorts> <outputPort name="res" type="collection/collection/file"/> </outputPorts> <links> <links from="forEach1/collA" to="forEach2/elementA"/> <links from="forEach1/collB" to="forEach2/collB"/> <links from="forEach2/res" to="forEach1/res"/> </links> </parallelForEach> </IWIR>
|
||||||||||
PREV PACKAGE NEXT PACKAGE | FRAMES NO FRAMES |