Docker-in-Docker (DinD) capabilities of public runners deactivated. More info

msgcollection.py 871 Bytes
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
# -*- coding: utf-8 -*-
""" harvest_tools.msgcollection

"""
from gluon.storage import Storage


class MsgCollection(Storage):
    """Message for a collection. The class contains five public attributes:
        - C{error}: error when scanning the collection
        - C{found}: number of publication found in the harvester repository
        - C{url}: URL used to scan the harvester repository, returning a list
                  ids.
        - C{title}: title of the collection

    """
    def __init__(self, error="", found=0, title="", url=""):
        Storage.__init__(self)
        self.error = error
        self.found = found
        self.title = title
        self.url = url

    def url_hb(self):
        """
        @rtype: str
        @return: the URL return a list of record in readable format.

        """
        return self.url.replace("of=id", "of=hb")