public class WorkflowUtilities extends Object
Constructor and Description |
---|
WorkflowUtilities() |
Modifier and Type | Method and Description |
---|---|
static com.google.gson.JsonObject |
createCommandlineOption(String type,
String value,
String flag,
String optionId,
String inputOutput,
String filename,
boolean commandline)
Creates new command line option around a workflow tool parameter or data
input/output
|
static String |
createDataWolfTool(File toolzip)
Calls DataWolf REST endpoint to create the DataWolf tool
|
static String |
createDataWolfTool(String toolName,
String toolTask,
String toolOutput,
String toolInput,
String softwareServerURL,
com.google.gson.JsonObject creator)
Creates a new DataWolf tool.
|
static com.google.gson.JsonObject |
createWorkflow(String title,
String description,
com.google.gson.JsonObject creator)
Creates a workflow with the given title, description and creator.
|
static com.google.gson.JsonObject |
createWorkflowStep(com.google.gson.JsonObject tool,
com.google.gson.JsonObject creator)
Creates a new workflow step for a DataWolf tool
|
static com.google.gson.JsonObject |
createWorkflowToolData(String title,
String description,
String mimeType)
Creates a new workflow tool data
|
static com.google.gson.JsonObject |
createWorkflowToolParameter(String title,
String description,
boolean allowNull,
String type,
boolean hidden,
String value)
Creates a new workflow tool parameter
|
static String |
getShellScript()
Returns DataWolf tool shell script for calling SoftwareServers
|
static com.google.gson.JsonObject |
getShellScriptDescriptor()
Creates a FileDescriptor to associate the shell script with for the
DataWolf tool.
|
static com.google.gson.JsonObject |
getUser()
Returns DataWolf user as JSON object
|
static com.google.gson.JsonObject |
getWorkflowTool(String toolId)
Fetches a DataWolf tool by ID
|
static String |
parseLogfile(String file)
Parses a log file and creates a DataWolf workflow representation.
|
static com.google.gson.JsonObject |
saveWorkflow(com.google.gson.JsonObject workflow,
boolean update)
Calls the DataWolf REST endpoint to save the workflow.
|
static com.google.gson.JsonObject |
updateWorkflow(com.google.gson.JsonObject workflow)
Calls the DataWolf REST endpoint to update the workflow
|
public static String parseLogfile(String file)
file
- log file to parsepublic static com.google.gson.JsonObject createWorkflow(String title, String description, com.google.gson.JsonObject creator)
title
- Workflow titledescription
- Workflow descriptioncreator
- Workflow creatorpublic static com.google.gson.JsonObject updateWorkflow(com.google.gson.JsonObject workflow)
workflow
- Workflow to updatepublic static com.google.gson.JsonObject saveWorkflow(com.google.gson.JsonObject workflow, boolean update)
workflow
- Workflow to saveupdate
- True if the workflow is being updated, false if this is the
initial savepublic static com.google.gson.JsonObject createWorkflowStep(com.google.gson.JsonObject tool, com.google.gson.JsonObject creator)
tool
- DataWolf tool to create step forcreator
- Workflow creatorpublic static String createDataWolfTool(String toolName, String toolTask, String toolOutput, String toolInput, String softwareServerURL, com.google.gson.JsonObject creator)
toolName
- Name of the tooltoolTask
- Tool tasktoolOutput
- Tool outputtoolInput
- Tool inputsoftwareServerURL
- SoftwareServer URLcreator
- Tool creatorpublic static com.google.gson.JsonObject getWorkflowTool(String toolId)
toolId
- ID of the toolpublic static com.google.gson.JsonObject createWorkflowToolParameter(String title, String description, boolean allowNull, String type, boolean hidden, String value)
title
- Workflow tool parameter titledescription
- Workflow tool parameter descriptionallowNull
- True - can be null, False - must not be nulltype
- Parameter Typehidden
- True - hidden from the user, False - not hiddenvalue
- Default value for the parameterpublic static com.google.gson.JsonObject createWorkflowToolData(String title, String description, String mimeType)
title
- Workflow tool data field titledescription
- Workflow tool data descriptionmimeType
- Workflow tool data typepublic static com.google.gson.JsonObject createCommandlineOption(String type, String value, String flag, String optionId, String inputOutput, String filename, boolean commandline)
type
- The type of command line optionvalue
- Fixed value for the optionflag
- Optional flag for the optionoptionId
- Unique id of the optinoinputOutput
- Specifies whether an option is an input, output or both (if
applicable)filename
- Name of the input/output file to store (if applicable)commandline
- True - option passed at the command line to the tool, False -
option not passedpublic static String createDataWolfTool(File toolzip)
toolzip
- Zip file containing tool information and datapublic static com.google.gson.JsonObject getShellScriptDescriptor()
public static String getShellScript()
public static com.google.gson.JsonObject getUser()
Copyright © 2021. All rights reserved.