Class InputPortsBuilder


  • public class InputPortsBuilder
    extends Object
    This class allow to easily create input ports for a step.
    Since:
    2.0
    Author:
    Laurent Jourdren
    • 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
    • Constructor Detail

      • InputPortsBuilder

        public InputPortsBuilder()
    • Method Detail

      • 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
      • 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
      • 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
      • 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
      • 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
      • 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
      • 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
      • 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