Пример #1
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The working position to be added.
        :type working_position: :class:`LibraryBaseLayoutPosition`

        :raises ValueError: If the added position is not a
            :attr:`POSITION_CLS` object.
        :raises AttributeError: If the layout is closed.
        :raises TypeError: if the position has the wrong type
        """
        if not self.is_closed:
            WorkingLayout.add_position(self, working_position)
        else:
            raise AttributeError('The layout is closed!')
Пример #2
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The working position to be added.
        :type working_position: :class:`LibraryBaseLayoutPosition`

        :raises ValueError: If the added position is not a
            :attr:`POSITION_CLS` object.
        :raises AttributeError: If the layout is closed.
        :raises TypeError: if the position has the wrong type
        """
        if not self.is_closed:
            WorkingLayout.add_position(self, working_position)
        else:
            raise AttributeError("The layout is closed!")
Пример #3
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The transfer position to be added.
        :type working_position: :class:`LibraryPosition`

        :raise ValueError: If the rack position is not allowed by the
            base layout.
        :raises TypeError: If the added position is not a
            :class:`TransferPosition` object.
        """
        rack_pos = working_position.rack_position
        if not self.base_layout_positions is None and not rack_pos in self.base_layout_positions:
            msg = "Position %s is not part of the base layout. It must not " "take up samples." % (rack_pos)
            raise ValueError(msg)
        WorkingLayout.add_position(self, working_position)
Пример #4
0
    def add_position(self, working_position):
        """
        Adds a :class:`Working_position` to the layout.

        :param working_position: The transfer position to be added.
        :type working_position: :class:`LibraryPosition`

        :raise ValueError: If the rack position is not allowed by the
            base layout.
        :raises TypeError: If the added position is not a
            :class:`TransferPosition` object.
        """
        rack_pos = working_position.rack_position
        if not self.base_layout_positions is None and \
                    not rack_pos in self.base_layout_positions:
            msg = 'Position %s is not part of the base layout. It must not ' \
                  'take up samples.' % (rack_pos)
            raise ValueError(msg)
        WorkingLayout.add_position(self, working_position)