org.shiwa.fgi.agwl2iwir.main
Class AGWLTranslator

java.lang.Object
  extended by org.shiwa.fgi.agwl2iwir.main.AGWLTranslator

public class AGWLTranslator
extends java.lang.Object

Author:
Margit Mutschlechner

Method Summary
static boolean createNewGlobalInputPorts()
          Returns the value of the boolean variable createNewGlobalInputPorts.
static void debug(java.lang.String s)
          If the debug is set to true it prints the debug string s.
static void newGlobalIP(java.lang.String s)
          Adds a new global input port with the name s if it is not already contained in the list of new global input ports.
static AbstractTranslator translate(org.askalon.agwl.cgwd.activity.GenericActivity activity)
          Translation-function.
Creates and returns a new translator-object depending on the type of the activity.
static void translateAgwlFileToIwirFile(java.lang.String fromAGWLFile, java.lang.String toIWIRFile, boolean withCL, boolean withDebug)
          Translates the agwl workflow stored in the file "fromAGWLFile" into a iwir workflow and stores it in the file "toIWIRFile".
static void translateAgwlFileToIwirFile(java.lang.String fromAGWLFile, java.lang.String toIWIRFile, boolean withCL, boolean withDebug, boolean createNewGlobalIPs)
          Translates the agwl workflow stored in the file "fromAGWLFile" into a iwir workflow and stores it in the file "toIWIRFile".
static org.shiwa.fgi.iwir.IWIR translateAgwlWfToIwirWf(org.askalon.agwl.cgwd.activity.CGWDWorkflow workflow, boolean withCL, boolean withDebug)
          Translates the given agwl workflow and returns the resulting iwir workflow.
static org.shiwa.fgi.iwir.IWIR translateAgwlWfToIwirWf(org.askalon.agwl.cgwd.activity.CGWDWorkflow workflow, boolean withCL, boolean withDebug, boolean createNewGlobalIPs)
          Translates the given agwl workflow and returns the resulting iwir workflow.
static boolean withControlLinks()
          Returns the value of the boolean variable withControlLinks.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

translateAgwlFileToIwirFile

public static void translateAgwlFileToIwirFile(java.lang.String fromAGWLFile,
                                               java.lang.String toIWIRFile,
                                               boolean withCL,
                                               boolean withDebug,
                                               boolean createNewGlobalIPs)
Translates the agwl workflow stored in the file "fromAGWLFile" into a iwir workflow and stores it in the file "toIWIRFile".

Parameters:
fromAGWLFile - file where the agwl workflow is stored
toIWIRFile - file where the iwir workflow should be stored
withCL - true if control links have to be created
withDebug - true if debugging information should be printed
createNewGlobalIPs - true if new global input ports should be created when needed

translateAgwlFileToIwirFile

public static void translateAgwlFileToIwirFile(java.lang.String fromAGWLFile,
                                               java.lang.String toIWIRFile,
                                               boolean withCL,
                                               boolean withDebug)
Translates the agwl workflow stored in the file "fromAGWLFile" into a iwir workflow and stores it in the file "toIWIRFile".

Parameters:
fromAGWLFile - file where the agwl workflow is stored
toIWIRFile - file where the iwir workflow should be stored
withCL - true if control links have to be created
withDebug - true if debugging information should be printed

translateAgwlWfToIwirWf

public static org.shiwa.fgi.iwir.IWIR translateAgwlWfToIwirWf(org.askalon.agwl.cgwd.activity.CGWDWorkflow workflow,
                                                              boolean withCL,
                                                              boolean withDebug)
Translates the given agwl workflow and returns the resulting iwir workflow.

Parameters:
workflow - agwl workflow to translate
withCL - true if control links have to be created
withDebug - true if debugging information should be printed
Returns:
the resulting iwir workflow

translateAgwlWfToIwirWf

public static org.shiwa.fgi.iwir.IWIR translateAgwlWfToIwirWf(org.askalon.agwl.cgwd.activity.CGWDWorkflow workflow,
                                                              boolean withCL,
                                                              boolean withDebug,
                                                              boolean createNewGlobalIPs)
Translates the given agwl workflow and returns the resulting iwir workflow.

Parameters:
workflow - agwl workflow to translate
withCL - true if control links have to be created
withDebug - true if debugging information should be printed
createNewGlobalIPs - true if new global input ports should be created when needed
Returns:
the resulting iwir workflow

translate

public static AbstractTranslator translate(org.askalon.agwl.cgwd.activity.GenericActivity activity)
Translation-function.
Creates and returns a new translator-object depending on the type of the activity.

Parameters:
activity - activity that has to be translated
Returns:
the translator
Throws:
TranslationException - if the type of the activity could not be recognized

withControlLinks

public static boolean withControlLinks()
Returns the value of the boolean variable withControlLinks.

Returns:
true if control links should be created, false otherwise

createNewGlobalInputPorts

public static boolean createNewGlobalInputPorts()
Returns the value of the boolean variable createNewGlobalInputPorts.

Returns:
true if new global input ports should be created when needed, false otherwise

newGlobalIP

public static void newGlobalIP(java.lang.String s)
Adds a new global input port with the name s if it is not already contained in the list of new global input ports.

Parameters:
s - the name of the new global input port

debug

public static void debug(java.lang.String s)
If the debug is set to true it prints the debug string s.

Parameters:
s - the string to be printed