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 Details

    • DEFAULT_SINGLE_INPUT_PORT_NAME

      public static final String DEFAULT_SINGLE_INPUT_PORT_NAME
      Default single input port name.
      See Also:
  • Constructor Details

    • InputPortsBuilder

      public InputPortsBuilder()
  • Method Details

    • addPort

      public InputPortsBuilder addPort(String name, DataFormat format)
      Add an input port.
      Parameters:
      name - name of the port
      format - format of the port
      Returns:
      the instance of the builder
    • addPort

      public InputPortsBuilder addPort(String name, boolean list, DataFormat format)
      Add an input port.
      Parameters:
      name - name of the port
      list - true if a list is excepted as port value
      format - format of the port
      Returns:
      the instance of the builder
    • 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 port
      format - format of the port
      compressionsAccepted - compression accepted
      Returns:
      the instance of the builder
    • 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 port
      list - true if a list is excepted as port value
      format - format of the port
      compressionsAccepted - compression accepted
      Returns:
      the instance of the builder
    • addPort

      public InputPortsBuilder addPort(String name, DataFormat format, boolean requiredInWorkingDirectory)
      Add an input port.
      Parameters:
      name - name of the port
      format - format of the port
      requiredInWorkingDirectory - if data is required in working directory
      Returns:
      the instance of the builder
    • addPort

      public InputPortsBuilder addPort(String name, boolean list, DataFormat format, boolean requiredInWorkingDirectory)
      Add an input port.
      Parameters:
      name - name of the port
      list - true if a list is excepted as port value
      format - format of the port
      requiredInWorkingDirectory - if data is required in working directory
      Returns:
      the instance of the builder
    • 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 port
      format - format of the port
      compressionsAccepted - compression accepted
      requiredInWorkingDirectory - if data is required in working directory
      Returns:
      the instance of the builder
    • 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 port
      list - true if a list is excepted as port value
      format - format of the port
      compressionsAccepted - compression accepted
      requiredInWorkingDirectory - if data is required in working directory
      Returns:
      the instance of the builder
    • 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.
      Parameters:
      format - format of the 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.
      Parameters:
      name - of the port
      format - data format
      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