tassl.application.cometcloud
Class GenerateTasksAbstract

java.lang.Object
  extended by tassl.application.cometcloud.GenerateTasksAbstract
Direct Known Subclasses:
GenerateTasks, GenerateTasks, GenerateTasks, GenerateTasksMontage

public abstract class GenerateTasksAbstract
extends java.lang.Object


Constructor Summary
GenerateTasksAbstract()
           
 
Method Summary
 void addRelatedWorkflowResults(java.util.HashMap relatedResultsResults, java.lang.String workflowId)
           
abstract  GenerateTasksObject createTasks(java.lang.String stageId, java.util.List<FileProperties> input, FileProperties output, java.lang.String propertyFileValues, java.util.List dependencies, java.lang.String method)
          Create Tasks for the specified stage of the workflow.
static java.lang.String executeSsh(java.lang.String address, java.lang.String command)
          Execute a command in a remote machine using ssh
 java.util.HashMap<java.lang.String,FileProperties> generatePreviousResultFiles(java.lang.String stageId, java.util.List dependencies)
          Get result files of the previous stages that had dependencies with the current one This is assuming that ALL Results of previous stages are FileProperties objects
 java.util.HashMap<java.lang.String,FileProperties> generatePreviousResultFilesStageId(java.lang.String previousStage)
          Get result files of a specific previous stage This is assuming that ALL Results of previous stages are FileProperties objects
 java.util.HashMap<java.lang.String,java.util.List<Results>> getPreviousResults()
          Get results from previous stages
 java.lang.String getProperty(java.lang.String value)
           
 java.lang.String getProperty(java.lang.String value, java.lang.String defvalue)
           
 java.util.HashMap<java.lang.String,java.util.List<Results>> getRelatedWorkflowsResults(java.lang.String workflowId)
          Get results of all stages of a related workflow id
 void loadProperties(java.lang.String propertyFileValues)
          Load properties contained in the file specified in the argument.
 void setPreviousResults(java.util.HashMap previousResults)
           
 void setProperty(java.lang.String variable, java.lang.String value)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

GenerateTasksAbstract

public GenerateTasksAbstract()
Method Detail

getPreviousResults

public java.util.HashMap<java.lang.String,java.util.List<Results>> getPreviousResults()
Get results from previous stages

Returns:
HashMap {stageId:{result1,result2,...},stageId:{result1,result2,...},...}

generatePreviousResultFiles

public java.util.HashMap<java.lang.String,FileProperties> generatePreviousResultFiles(java.lang.String stageId,
                                                                                      java.util.List dependencies)
Get result files of the previous stages that had dependencies with the current one This is assuming that ALL Results of previous stages are FileProperties objects

Parameters:
stageId -
dependencies -
Returns:
a hashmap with {"filename":FileProperties,"filename":FileProperties,...}

getRelatedWorkflowsResults

public java.util.HashMap<java.lang.String,java.util.List<Results>> getRelatedWorkflowsResults(java.lang.String workflowId)
Get results of all stages of a related workflow id

Parameters:
workflowId -
Returns:
a hashmap with {stageid:{results,results ..},...}

generatePreviousResultFilesStageId

public java.util.HashMap<java.lang.String,FileProperties> generatePreviousResultFilesStageId(java.lang.String previousStage)
Get result files of a specific previous stage This is assuming that ALL Results of previous stages are FileProperties objects

Parameters:
previousStage -
Returns:
a hashmap with {"filename":FileProperties,"filename":FileProperties,...}

setPreviousResults

public void setPreviousResults(java.util.HashMap previousResults)

addRelatedWorkflowResults

public void addRelatedWorkflowResults(java.util.HashMap relatedResultsResults,
                                      java.lang.String workflowId)

getProperty

public java.lang.String getProperty(java.lang.String value,
                                    java.lang.String defvalue)

getProperty

public java.lang.String getProperty(java.lang.String value)

setProperty

public void setProperty(java.lang.String variable,
                        java.lang.String value)

loadProperties

public void loadProperties(java.lang.String propertyFileValues)
Load properties contained in the file specified in the argument. After this command properties should be accessible using the function getProperty


executeSsh

public static java.lang.String executeSsh(java.lang.String address,
                                          java.lang.String command)
Execute a command in a remote machine using ssh

Parameters:
address. - Address of the remote machine
command. - Command to execute in the remote machine

createTasks

public abstract GenerateTasksObject createTasks(java.lang.String stageId,
                                                java.util.List<FileProperties> input,
                                                FileProperties output,
                                                java.lang.String propertyFileValues,
                                                java.util.List dependencies,
                                                java.lang.String method)
Create Tasks for the specified stage of the workflow.

Parameters:
stage -
input - list of input FileProperties, which include URI (address:/dir/path/) where you can find input files, and constraints. Correspond to InputData in the input xml
output - a FileProperties object, which includes URI (address:/dir/path/) that should be placed in the task to know where to upload the results. Correspond to Results in the input xml.
propertyFileValues - Values of the propertyFile specified in the XML workflow description
dependencies - Previous stages. This can be use to get results values from those previous stages
method. - Method to use for task generation
Returns:
return an object with requirements and task parameters