public class WorkflowUtil extends Object
| Constructor and Description |
|---|
WorkflowUtil() |
| Modifier and Type | Method and Description |
|---|---|
static CommandLineImplementation |
createCommandlineImplementation(String executable,
String captureStdOut,
String captureStdErr,
boolean joinStdOutStdErr,
List<CommandLineOption> commandLineOptions,
Map<String,String> env)
Create command line implementation based on options, standard out/error
logs, environment, etc
|
static CommandLineOption |
createCommandlineOption(CommandLineOption.Type type,
String value,
String flag,
String optionId,
CommandLineOption.InputOutput inputOutput,
String filename,
boolean commandline)
Create command line option
|
static Workflow |
createDAPWorkflow(String fileId,
String fenceURL,
String token,
Person creator) |
static Workflow |
createDTSWorkflow(String fileId,
String fenceURL,
String token,
Person creator)
Creates a workflow representing the DTS extractors ran on a file
|
static Workflow |
createWorkflow(String title,
String description,
Person creator)
Create an empty workflow
|
static WorkflowStep |
createWorkflowStep(String title,
Person creator,
WorkflowTool tool,
Map<String,String> inputs,
Map<String,String> outputs,
Map<String,String> parameters)
Create workflow step
|
static WorkflowTool |
createWorkflowTool(String title,
String description,
String version,
Person creator,
List<WorkflowToolParameter> parameters,
List<WorkflowToolData> inputs,
List<WorkflowToolData> outputs,
Set<FileDescriptor> blobs,
String impl,
String executor)
Create workflow tool
|
static WorkflowToolData |
createWorkflowToolData(String title,
String description,
String mimeType)
Create workflow tool data
|
static WorkflowToolParameter |
createWorkflowToolParameter(String title,
String description,
boolean allowNull,
WorkflowToolParameter.ParameterType type,
boolean hidden,
String value)
Create workflow tool parameter
|
static String |
getDAPLogFile(String fileId,
String fenceURL,
String token) |
static String |
getDAPScript()
Create DataWolf tool shell script for calling SoftwareServers
|
static String |
getDTSShellScript()
Shell script to run DTS extractor
|
static List<String> |
getDTSTools(String fileId,
String fenceURL,
String token)
Get list of DTS tools
|
static com.google.gson.JsonElement |
getMetadataJsonLD(String fileId,
String fenceURL,
String token)
Get metadata for file extraction from api/files/{file-id}/metadata.jsonld
|
public static Workflow createDAPWorkflow(String fileId, String fenceURL, String token, Person creator) throws Exception
Exceptionpublic static Workflow createDTSWorkflow(String fileId, String fenceURL, String token, Person creator) throws Exception
fileId - - id of the file to create the workflow fordtsURL - - DTS URL to communicate withcreator - - user to create the workflow underExceptionpublic static Workflow createWorkflow(String title, String description, Person creator)
title - Title of workflowdescription - description of workflowcreator - workflow creatorpublic static WorkflowStep createWorkflowStep(String title, Person creator, WorkflowTool tool, Map<String,String> inputs, Map<String,String> outputs, Map<String,String> parameters)
title - step titlecreator - step creatortool - workflow tool associated with the stepinputs - step inputsoutputs - step outputsparameters - step parameterspublic static WorkflowTool createWorkflowTool(String title, String description, String version, Person creator, List<WorkflowToolParameter> parameters, List<WorkflowToolData> inputs, List<WorkflowToolData> outputs, Set<FileDescriptor> blobs, String impl, String executor)
title - tool titledescription - tool descriptionversion - tool versioncreator - tool creatorparameters - tool parametersinputs - tool inputsoutputs - tool outputsblobs - file blobs associated with the toolimpl - tool implementationexecutor - tool executor typepublic static WorkflowToolParameter createWorkflowToolParameter(String title, String description, boolean allowNull, WorkflowToolParameter.ParameterType type, boolean hidden, String value)
title - parameter titledescription - parameter descriptionallowNull - parameter accepts nulltype - parameter typehidden - is parameter hiddenvalue - initial parameter valuepublic static WorkflowToolData createWorkflowToolData(String title, String description, String mimeType)
title - tool data titledescription - tool data descriptionmimeType - tool data mime typepublic static List<String> getDTSTools(String fileId, String fenceURL, String token) throws org.apache.http.client.ClientProtocolException, IOException
fileId - file idfenceURL - BD-API gateway URLtoken - authorization tokenorg.apache.http.client.ClientProtocolExceptionIOExceptionpublic static com.google.gson.JsonElement getMetadataJsonLD(String fileId, String fenceURL, String token) throws org.apache.http.client.ClientProtocolException, IOException
fileId - file idfenceURL - BD-API gateway URLtoken - authorization tokenorg.apache.http.client.ClientProtocolExceptionIOExceptionpublic static String getDAPLogFile(String fileId, String fenceURL, String token) throws org.apache.http.client.ClientProtocolException, IOException
org.apache.http.client.ClientProtocolExceptionIOExceptionpublic static CommandLineOption createCommandlineOption(CommandLineOption.Type type, String value, String flag, String optionId, CommandLineOption.InputOutput inputOutput, String filename, boolean commandline)
type - command line option typevalue - initial value of command line optionflag - flag associated with the command line optionoptionId - command line option idinputOutput - specify whether command line option is an input, output or
bothfilename - filename for command line option, if applicablecommandline - pass option at the command linepublic static CommandLineImplementation createCommandlineImplementation(String executable, String captureStdOut, String captureStdErr, boolean joinStdOutStdErr, List<CommandLineOption> commandLineOptions, Map<String,String> env)
executable - Executable to runcaptureStdOut - data id to capture standard outcaptureStdErr - data id to capture standard errorjoinStdOutStdErr - Join standard out and error to a single filecommandLineOptions - command line optionsenv - environment variables to set before executionpublic static String getDTSShellScript()
public static String getDAPScript()
Copyright © 2017. All rights reserved.