def _buildFromPerPartition(self, item, partition):
        """
        This function will get the partition info and then it'll write the container and preservation data
        to the dictionary 'item'
        :param item: a dict which contains the ARTeplate data columns
        :param partition: a dict with some partition info
        :returns: the item dict with the partition's data
        """
        uc = getToolByName(self, 'uid_catalog')
        container = uc(UID=partition.get('container_uid', ''))
        preservation = uc(UID=partition.get('preservation_uid', ''))
        if container:
            container = container[0].getObject()
            item['ContainerTitle'] = container.title
            item['replace']['ContainerTitle'] = "<a href='%s'>%s</a>" % \
                                                (container.absolute_url(), item['ContainerTitle'])
            item['ContainerVolume'] = container.getCapacity()
        else:
            item['ContainerTitle'] = ''
            item['ContainerVolume'] = ''
        if preservation:
            preservation = preservation[0].getObject()
            item['Preservation'] = preservation.title
            item['replace']['Preservation'] = "<a href='%s'>%s</a>" % \
                                              (preservation.absolute_url(), item['Preservation'])
        else:
            item['Preservation'] = ''
        item['PreparationMethod'] = ''
        return item
def _buildFromPerPartition ( self , item , partition ) : uc = getToolByName ( self , 'uid_catalog' ) container = uc ( UID = partition . get ( 'container_uid' , '' ) ) preservation = uc ( UID = partition . get ( 'preservation_uid' , '' ) ) if container : container = container [ 0 ] . getObject ( ) item [ 'ContainerTitle' ] = container . title item [ 'replace' ] [ 'ContainerTitle' ] = "<a href='%s'>%s</a>" % ( container . absolute_url ( ) , item [ 'ContainerTitle' ] ) item [ 'ContainerVolume' ] = container . getCapacity ( ) else : item [ 'ContainerTitle' ] = '' item [ 'ContainerVolume' ] = '' if preservation : preservation = preservation [ 0 ] . getObject ( ) item [ 'Preservation' ] = preservation . title item [ 'replace' ] [ 'Preservation' ] = "<a href='%s'>%s</a>" % ( preservation . absolute_url ( ) , item [ 'Preservation' ] ) else : item [ 'Preservation' ] = '' item [ 'PreparationMethod' ] = '' return item
This function will get the partition info and then it'll write the container and preservation data
        to the dictionary 'item'
        :param item: a dict which contains the ARTeplate data columns
        :param partition: a dict with some partition info
        :returns: the item dict with the partition's data