|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.shiwa.fgi.agwl2iwir.misc.Utils
public class Utils
| Constructor Summary | |
|---|---|
Utils()
|
|
| Method Summary | |
|---|---|
static void |
addPredecessorProperty(java.util.List<org.shiwa.fgi.iwir.AbstractTask> predTasks,
java.util.List<org.shiwa.fgi.iwir.AbstractTask> succTasks)
Adds properties to tasks for adding control links later on. Adds a property with key 'predecessors' to all tasks of "succTasks" that have a property with key 'last'. |
static void |
checkSignature(org.askalon.agwl.cgwd.activity.GenericActivity topLevelActivity,
org.shiwa.fgi.iwir.AbstractTask topLevelTask,
int globalIPCount)
Checks whether the original agwl activity has as many input and output ports as the translated iwir task. |
static boolean |
existsPath(java.util.List<org.shiwa.fgi.iwir.AbstractLink> links,
java.lang.String fromTaskName,
java.lang.String toTaskName)
Checks whether there exists a path from the first to the second task. Either a direct link exists or the function gets again called to find also paths with intermediate tasks. |
static java.util.Set<java.lang.String> |
getNames(java.util.List<org.shiwa.fgi.iwir.Property> properties,
java.lang.String name)
Returns all names needed for the translation that are stored as properties. Those are all properties with keys "agwl-name", "switch-name" or "workflow-name". |
static java.lang.String |
getOriginalIwirName(org.askalon.agwl.cgwd.CGWDProperties properties,
java.lang.String name)
Searches for a property that stores the original iwir name of the activity. If it was translated from a iwir task/port then the original name of the activity/port is stored as property with key "agwl-name". |
static org.askalon.agwl.cgwd.activity.GenericActivity |
getTopLevelActivity(org.askalon.agwl.cgwd.activity.CGWDWorkflow cgwdWorkflow)
Returns the top level activity of the workflow. It generates a new sequence, moves the body of the workflow, global ports, properties and constraints from the workflow to itself. |
static java.lang.String |
getUniquePortNameInTask(java.lang.String name,
org.shiwa.fgi.iwir.AbstractTask task)
Returns a unique name for a given port in a task. Is needed for ports that have to be generated. |
static org.shiwa.fgi.iwir.Constraint |
hasConstraint(java.util.List<org.shiwa.fgi.iwir.Constraint> constraint,
java.lang.String name,
java.lang.String value)
Checks whether the list of constraints has a constraint with the given name and given value. Goes through all constraints and compares the name and if value is not null also the given value. |
static org.shiwa.fgi.iwir.Property |
hasProperty(java.util.List<org.shiwa.fgi.iwir.Property> properties,
java.lang.String name,
java.lang.String value)
Checks whether the list of properties has a property with the given name and given value. Goes through all properties and compares the name and, if value is not null, also the given value. |
static org.shiwa.fgi.iwir.AbstractDataPort |
searchPortInPortList(java.util.List<org.shiwa.fgi.iwir.AbstractDataPort> ports,
java.lang.String searchedPortName,
java.util.Set<java.lang.String> taskNames)
Searches in the given list of ports for a certain port name. Because the searched port name is given in the form <taskName>/<portName> also all names of the task have to be given. |
static org.shiwa.fgi.iwir.AbstractTask |
searchTaskInTaskList(java.util.List<org.shiwa.fgi.iwir.AbstractTask> tasks,
java.lang.String searchedTaskName)
Searches in the given list of tasks for a certain taskname. Compares all names of the tasks with the searched name. |
| Methods inherited from class java.lang.Object |
|---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Utils()
| Method Detail |
|---|
public static java.lang.String getOriginalIwirName(org.askalon.agwl.cgwd.CGWDProperties properties,
java.lang.String name)
public static java.util.Set<java.lang.String> getNames(java.util.List<org.shiwa.fgi.iwir.Property> properties,
java.lang.String name)
properties - keys have to be search in this propertiesname - name of the task or port
public static java.lang.String getUniquePortNameInTask(java.lang.String name,
org.shiwa.fgi.iwir.AbstractTask task)
name - current name of the porttask - task of the port
public static org.shiwa.fgi.iwir.Property hasProperty(java.util.List<org.shiwa.fgi.iwir.Property> properties,
java.lang.String name,
java.lang.String value)
properties - properties that have to be searched throughname - name of the searched propertyvalue - value of the searched property or null if it can be any value
public static org.shiwa.fgi.iwir.Constraint hasConstraint(java.util.List<org.shiwa.fgi.iwir.Constraint> constraint,
java.lang.String name,
java.lang.String value)
constraint - constraints that have to be searched throughname - name of the searched propertyvalue - value of the searched constraint or null if it can be any
value
public static org.shiwa.fgi.iwir.AbstractTask searchTaskInTaskList(java.util.List<org.shiwa.fgi.iwir.AbstractTask> tasks,
java.lang.String searchedTaskName)
tasks - list of tasks to search for the namesearchedTaskName - name of the searched task
public static org.shiwa.fgi.iwir.AbstractDataPort searchPortInPortList(java.util.List<org.shiwa.fgi.iwir.AbstractDataPort> ports,
java.lang.String searchedPortName,
java.util.Set<java.lang.String> taskNames)
ports - list of ports to be searched throughsearchedPortName - name of the port that has to be searched fortaskNames - set of names of the task where the ports belongs to
public static boolean existsPath(java.util.List<org.shiwa.fgi.iwir.AbstractLink> links,
java.lang.String fromTaskName,
java.lang.String toTaskName)
links - list of links where to search for the pathfromTaskName - the task where the path startstoTaskName - the task where the path ends
public static org.askalon.agwl.cgwd.activity.GenericActivity getTopLevelActivity(org.askalon.agwl.cgwd.activity.CGWDWorkflow cgwdWorkflow)
cgwdWorkflow - workflow from which to generate top level activity
public static void checkSignature(org.askalon.agwl.cgwd.activity.GenericActivity topLevelActivity,
org.shiwa.fgi.iwir.AbstractTask topLevelTask,
int globalIPCount)
topLevelActivity - original agwl activitytopLevelTask - translated iwir task
TranslationException - if the number of ports differs
public static void addPredecessorProperty(java.util.List<org.shiwa.fgi.iwir.AbstractTask> predTasks,
java.util.List<org.shiwa.fgi.iwir.AbstractTask> succTasks)
predTasks - list of possible predecessorssuccTasks - list of possible successors
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||