public static class SoftwareServerAuxiliary.Task extends Object
Constructor and Description |
---|
SoftwareServerAuxiliary.Task(SoftwareServerClient icr)
Class constructor.
|
SoftwareServerAuxiliary.Task(SoftwareServerClient icr,
String application_string,
SoftwareServerAuxiliary.Data input_data,
SoftwareServerAuxiliary.Data output_data)
Class constructor, create a sequence of tasks that will allow an application to go from the input to the output format.
|
SoftwareServerAuxiliary.Task(Vector<SoftwareServerAuxiliary.Application> applications)
Class constructor.
|
Modifier and Type | Method and Description |
---|---|
void |
add(SoftwareServerAuxiliary.Subtask subtask)
Add a subtask to the list.
|
void |
add(SoftwareServerAuxiliary.Task task)
Merge this task list with another.
|
void |
add(String application_alias,
String operation_name,
SoftwareServerAuxiliary.Data input_data,
SoftwareServerAuxiliary.Data output_data)
Create a new subtask for the given application and operation names.
|
void |
add(String application_alias,
String operation_name,
String input_filename,
String output_filename)
Create a new subtask for the given application, operation, file, and format names.
|
void |
addSubtasks(String application_string,
SoftwareServerAuxiliary.Data input_data,
SoftwareServerAuxiliary.Data output_data)
Add a sequence of subtasks that will allow an application to go from the input to the output format.
|
void |
addSubtasks(String application_string,
String task_string,
SoftwareServerAuxiliary.Data input_data,
SoftwareServerAuxiliary.Data output_data)
Add a sequence of subtasks that will allow an application to go from the input to the output format.
|
void |
cache()
Cache all task input data if not already.
|
SoftwareServerAuxiliary.Data |
execute()
Execute the this task list and return the result of the last task.
|
SoftwareServerAuxiliary.FileData |
execute(String output_path)
Execute the this task list and save the result of the last task to the specified path.
|
SoftwareServerAuxiliary.Subtask |
get(int index)
Get a task from the list.
|
kgm.utility.Pair<Integer,Integer> |
getApplicationOperation(String application_string,
String operation_name,
SoftwareServerAuxiliary.Data input_data,
SoftwareServerAuxiliary.Data output_data)
Find a suitable application/operation given the desired application, operation, and data.
|
String |
getApplicationString(String alias)
Get the string associated with the given application alias
|
static Vector<TreeSet<SoftwareServerAuxiliary.TaskInfo>> |
getApplicationTasks(Vector<SoftwareServerAuxiliary.Application> applications)
Get the tasks available for each of the given applications.
|
static String |
getResult(String cache_path,
int session,
Vector<SoftwareServerAuxiliary.Subtask> task)
Get the result of the given task (i.e.
|
SoftwareServerClient |
getSoftwareReuseClient()
Get the associated software reuse client.
|
Vector<SoftwareServerAuxiliary.Subtask> |
getSubtasks()
Get the vector of subtasks.
|
void |
print()
Print information about the given tasks.
|
static void |
print(Vector<SoftwareServerAuxiliary.Subtask> task)
Print the given tasks.
|
static void |
print(Vector<SoftwareServerAuxiliary.Subtask> task,
Vector<SoftwareServerAuxiliary.Application> applications)
Print the given tasks.
|
void |
printApplicationOperation(kgm.utility.Pair<Integer,Integer> apop)
Print information about a given application/operation.
|
int |
size()
Get the number of tasks in the list.
|
String |
toString() |
public SoftwareServerAuxiliary.Task(SoftwareServerClient icr)
icr
- the software reuse client we will create tasks forpublic SoftwareServerAuxiliary.Task(SoftwareServerClient icr, String application_string, SoftwareServerAuxiliary.Data input_data, SoftwareServerAuxiliary.Data output_data)
icr
- the software reuse client we will create tasks forapplication_string
- an applications string representation (can be null)input_data
- the input fileoutput_data
- the output filepublic SoftwareServerAuxiliary.Task(Vector<SoftwareServerAuxiliary.Application> applications)
applications
- the applications from the software reuse client we will create tasks forpublic int size()
public void print()
public SoftwareServerClient getSoftwareReuseClient()
public SoftwareServerAuxiliary.Subtask get(int index)
index
- the index of the desired taskpublic Vector<SoftwareServerAuxiliary.Subtask> getSubtasks()
public String getApplicationString(String alias)
alias
- an application aliaspublic kgm.utility.Pair<Integer,Integer> getApplicationOperation(String application_string, String operation_name, SoftwareServerAuxiliary.Data input_data, SoftwareServerAuxiliary.Data output_data)
application_string
- the application string representation (can be null)operation_name
- the operation nameinput_data
- input data (can be null)output_data
- output data (can be null)public void printApplicationOperation(kgm.utility.Pair<Integer,Integer> apop)
apop
- a pair containing the index of an application and an operationpublic void add(SoftwareServerAuxiliary.Subtask subtask)
subtask
- the subtask to addpublic void add(String application_alias, String operation_name, SoftwareServerAuxiliary.Data input_data, SoftwareServerAuxiliary.Data output_data)
application_alias
- the application aliasoperation_name
- the operation nameinput_data
- the input data for the operationoutput_data
- the output data for the operationpublic void add(String application_alias, String operation_name, String input_filename, String output_filename)
application_alias
- the application aliasoperation_name
- the operation nameinput_filename
- the input file nameoutput_filename
- the output file namepublic void add(SoftwareServerAuxiliary.Task task)
task
- another task (must have same software reuse client!)public void addSubtasks(String application_string, String task_string, SoftwareServerAuxiliary.Data input_data, SoftwareServerAuxiliary.Data output_data)
application_string
- an applications string representation (can be null)task_string
- the task to perform (null assumed to be conversion)input_data
- the input fileoutput_data
- the output filepublic void addSubtasks(String application_string, SoftwareServerAuxiliary.Data input_data, SoftwareServerAuxiliary.Data output_data)
application_string
- an applications string representation (can be null)input_data
- the input fileoutput_data
- the output filepublic void cache()
public SoftwareServerAuxiliary.Data execute()
public SoftwareServerAuxiliary.FileData execute(String output_path)
output_path
- the path to save results intopublic static void print(Vector<SoftwareServerAuxiliary.Subtask> task)
task
- the task to printpublic static void print(Vector<SoftwareServerAuxiliary.Subtask> task, Vector<SoftwareServerAuxiliary.Application> applications)
task
- the task to printapplications
- the application data referencedpublic static Vector<TreeSet<SoftwareServerAuxiliary.TaskInfo>> getApplicationTasks(Vector<SoftwareServerAuxiliary.Application> applications)
applications
- a list of applicationspublic static String getResult(String cache_path, int session, Vector<SoftwareServerAuxiliary.Subtask> task)
cache_path
- the cache path (assumes data resides in server cache)session
- the session idtask
- the taskCopyright © 2014. All rights reserved.