Class InputPortsBuilder
- java.lang.Object
-
- fr.ens.biologie.genomique.eoulsan.core.InputPortsBuilder
-
public class InputPortsBuilder extends Object
This class allow to easily create input ports for a step.- Since:
- 2.0
- Author:
- Laurent Jourdren
-
-
Field Summary
Fields Modifier and Type Field Description static String
DEFAULT_SINGLE_INPUT_PORT_NAME
Default single input port name.
-
Constructor Summary
Constructors Constructor Description InputPortsBuilder()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description InputPortsBuilder
addPort(String name, boolean list, DataFormat format)
Add an input port.InputPortsBuilder
addPort(String name, boolean list, DataFormat format, boolean requiredInWorkingDirectory)
Add an input port.InputPortsBuilder
addPort(String name, boolean list, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted)
Add an input port.InputPortsBuilder
addPort(String name, boolean list, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted, boolean requiredInWorkingDirectory)
Add an input port.InputPortsBuilder
addPort(String name, DataFormat format)
Add an input port.InputPortsBuilder
addPort(String name, DataFormat format, boolean requiredInWorkingDirectory)
Add an input port.InputPortsBuilder
addPort(String name, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted)
Add an input port.InputPortsBuilder
addPort(String name, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted, boolean requiredInWorkingDirectory)
Add an input port.static InputPorts
allPortsRequiredInWorkingDirectory(InputPorts inputPorts)
Set all ports of an existing input ports to be required in working directory.static InputPorts
copy(InputPorts ports)
Convenient method to create a defensive copy of an InputPorts object.InputPorts
create()
Create the ports.static InputPorts
noInputPort()
Create the ports with no ports.static InputPorts
singleInputPort(DataFormat format)
Convenient method to create the ports with only one port.static InputPorts
singleInputPort(String name, DataFormat format)
Convenient method to create the ports with only one port.
-
-
-
Field Detail
-
DEFAULT_SINGLE_INPUT_PORT_NAME
public static final String DEFAULT_SINGLE_INPUT_PORT_NAME
Default single input port name.- See Also:
- Constant Field Values
-
-
Method Detail
-
addPort
public InputPortsBuilder addPort(String name, DataFormat format)
Add an input port.- Parameters:
name
- name of the portformat
- format of the port
-
addPort
public InputPortsBuilder addPort(String name, boolean list, DataFormat format)
Add an input port.- Parameters:
name
- name of the portlist
- true if a list is excepted as port valueformat
- format of the port
-
addPort
public InputPortsBuilder addPort(String name, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted)
Add an input port.- Parameters:
name
- name of the portformat
- format of the portcompressionsAccepted
- compression accepted
-
addPort
public InputPortsBuilder addPort(String name, boolean list, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted)
Add an input port.- Parameters:
name
- name of the portlist
- true if a list is excepted as port valueformat
- format of the portcompressionsAccepted
- compression accepted
-
addPort
public InputPortsBuilder addPort(String name, DataFormat format, boolean requiredInWorkingDirectory)
Add an input port.- Parameters:
name
- name of the portformat
- format of the portrequiredInWorkingDirectory
- if data is required in working directory
-
addPort
public InputPortsBuilder addPort(String name, boolean list, DataFormat format, boolean requiredInWorkingDirectory)
Add an input port.- Parameters:
name
- name of the portlist
- true if a list is excepted as port valueformat
- format of the portrequiredInWorkingDirectory
- if data is required in working directory
-
addPort
public InputPortsBuilder addPort(String name, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted, boolean requiredInWorkingDirectory)
Add an input port.- Parameters:
name
- name of the portformat
- format of the portcompressionsAccepted
- compression acceptedrequiredInWorkingDirectory
- if data is required in working directory
-
addPort
public InputPortsBuilder addPort(String name, boolean list, DataFormat format, EnumSet<fr.ens.biologie.genomique.kenetre.io.CompressionType> compressionsAccepted, boolean requiredInWorkingDirectory)
Add an input port.- Parameters:
name
- name of the portlist
- true if a list is excepted as port valueformat
- format of the portcompressionsAccepted
- compression acceptedrequiredInWorkingDirectory
- if data is required in working directory
-
create
public InputPorts create()
Create the ports.- Returns:
- a new InputPorts object
-
noInputPort
public static InputPorts noInputPort()
Create the ports with no ports.- Returns:
- a new InputPorts object
-
singleInputPort
public static InputPorts singleInputPort(DataFormat format)
Convenient method to create the ports with only one port.- Returns:
- a new InputPorts object
-
singleInputPort
public static InputPorts singleInputPort(String name, DataFormat format)
Convenient method to create the ports with only one port.- Returns:
- a new InputPorts object
-
allPortsRequiredInWorkingDirectory
public static InputPorts allPortsRequiredInWorkingDirectory(InputPorts inputPorts)
Set all ports of an existing input ports to be required in working directory.- Parameters:
inputPorts
- original input ports- Returns:
- a new InputPorts object that ports data are required in working directory
-
copy
public static InputPorts copy(InputPorts ports)
Convenient method to create a defensive copy of an InputPorts object.- Parameters:
ports
- an existing OutputPorts object- Returns:
- a new InputPorts object or null if the ports parameter is null
-
-