Class CommandWorkflowParser
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.core.workflow.CommandWorkflowParser
-
public class CommandWorkflowParser extends Object
This class allow parse the workflow file.- Since:
- 1.0
- Author:
- Laurent Jourdren
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
CommandWorkflowParser.StepOutputPort
-
Field Summary
Fields Modifier and Type Field Description static String
AVAILABLE_PROCESSORS_CONSTANT_NAME
Available processor constant name.static String
BUILD_DATE_CONSTANT_NAME
Build date constant name.static String
BUILD_NUMBER_CONSTANT_NAME
Build number constant name.static String
DESIGN_FILE_PATH_CONSTANT_NAME
Design file path constant name.static String
JOB_ID_CONSTANT_NAME
Job id constant name.static String
JOB_PATH_CONSTANT_NAME
Logs path constant name.static String
JOB_UUID_CONSTANT_NAME
Job UUID constant name.static String
OUTPUT_PATH_CONSTANT_NAME
Output path constant name.static String
VERSION_CONSTANT_NAME
Version constant name.static String
WORKFLOW_FILE_PATH_CONSTANT_NAME
Parameters file path constant name.
-
Constructor Summary
Constructors Constructor Description CommandWorkflowParser(DataFile file)
Public constructor.CommandWorkflowParser(File file)
Public constructor.CommandWorkflowParser(InputStream is)
Public constructor.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
addConstant(String constantName, String constantValue)
Add a constant.void
addConstant(String constantName, String constantValue, boolean evaluateValue)
Add a constant.void
addConstants(ExecutorArguments arguments)
Add job arguments information to constants.CommandWorkflowModel
parse()
Parse the workflow file.
-
-
-
Field Detail
-
VERSION_CONSTANT_NAME
public static final String VERSION_CONSTANT_NAME
Version constant name.
-
BUILD_NUMBER_CONSTANT_NAME
public static final String BUILD_NUMBER_CONSTANT_NAME
Build number constant name.
-
BUILD_DATE_CONSTANT_NAME
public static final String BUILD_DATE_CONSTANT_NAME
Build date constant name.
-
AVAILABLE_PROCESSORS_CONSTANT_NAME
public static final String AVAILABLE_PROCESSORS_CONSTANT_NAME
Available processor constant name.
-
DESIGN_FILE_PATH_CONSTANT_NAME
public static final String DESIGN_FILE_PATH_CONSTANT_NAME
Design file path constant name.- See Also:
- Constant Field Values
-
WORKFLOW_FILE_PATH_CONSTANT_NAME
public static final String WORKFLOW_FILE_PATH_CONSTANT_NAME
Parameters file path constant name.- See Also:
- Constant Field Values
-
OUTPUT_PATH_CONSTANT_NAME
public static final String OUTPUT_PATH_CONSTANT_NAME
Output path constant name.- See Also:
- Constant Field Values
-
JOB_ID_CONSTANT_NAME
public static final String JOB_ID_CONSTANT_NAME
Job id constant name.- See Also:
- Constant Field Values
-
JOB_UUID_CONSTANT_NAME
public static final String JOB_UUID_CONSTANT_NAME
Job UUID constant name.- See Also:
- Constant Field Values
-
JOB_PATH_CONSTANT_NAME
public static final String JOB_PATH_CONSTANT_NAME
Logs path constant name.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
CommandWorkflowParser
public CommandWorkflowParser(File file) throws FileNotFoundException
Public constructor.- Parameters:
file
- the workflow file- Throws:
FileNotFoundException
- if the file is not found
-
CommandWorkflowParser
public CommandWorkflowParser(DataFile file) throws IOException
Public constructor.- Parameters:
file
- the workflow file- Throws:
IOException
- if an error occurs while opening the file
-
CommandWorkflowParser
public CommandWorkflowParser(InputStream is)
Public constructor.- Parameters:
is
- Input stream
-
-
Method Detail
-
parse
public CommandWorkflowModel parse() throws EoulsanException
Parse the workflow file.- Throws:
EoulsanException
- if an error occurs while parsing file
-
addConstants
public void addConstants(ExecutorArguments arguments) throws EoulsanException
Add job arguments information to constants.- Parameters:
arguments
- job arguments- Throws:
EoulsanException
- if an error occurs while evaluating the constant
-
addConstant
public void addConstant(String constantName, String constantValue) throws EoulsanException
Add a constant.- Parameters:
constantName
- constant NameconstantValue
- constant value- Throws:
EoulsanException
- if an error occurs while evaluating the constant
-
addConstant
public void addConstant(String constantName, String constantValue, boolean evaluateValue) throws EoulsanException
Add a constant.- Parameters:
constantName
- constant NameconstantValue
- constant valueevaluateValue
- allow evaluate the value of the constant and start an external process to do this- Throws:
EoulsanException
- if an error occurs while evaluating the constant
-
-