Beispiel #1
0
class NB():
    """ Interface to Nasjonalbiblioteket, National Library of Norway catalog via SRU """

    global ENDPOINT_HOSTNAME, \
           ENDPOINT_PATH, \
           COUNTRY_CODE

    sru = False
    error = False

    countrycode = COUNTRY_CODE
    supported_formats = {"dc": DC()}

    def __init__(self):
        self.sru = SRU(ENDPOINT_HOSTNAME, ENDPOINT_PATH)

    def query(self, query):
        if self.sru:
            response = self.sru.query(query)
            if self.sru.failed:
                return
            return response
        return

    @property
    def failed(self):
        return self.error
Beispiel #2
0
class KB_NL():
    """ Interface to GGC - National Library of the Netherlands catalog via SRU 
        Current supported recordSchema/format dc, dcx
    """

    global ENDPOINT_HOSTNAME, \
           ENDPOINT_PATH, \
           COUNTRY_CODE

    sru = False
    error = False

    countrycode = COUNTRY_CODE

    supported_formats = {"dc": DC(), "dcx": DCX()}

    def __init__(self):
        self.sru = SRU(ENDPOINT_HOSTNAME, ENDPOINT_PATH)

    def query(self, query):
        if self.sru:
            response = self.sru.query(query)
            if self.sru.failed:
                return
            return response
        return

    @property
    def failed(self):
        return self.error
Beispiel #3
0
class LOC():
    """ Interface to Library of Congress catalog via SRU """

    global ENDPOINT_HOSTNAME, \
           ENDPOINT_PATH, \
           ENDPOINT_PORT, \
           COUNTRY_CODE

    sru = False
    error = False

    countrycode = COUNTRY_CODE
    supported_formats = {"dc": DC(), "mods": MODS()}

    def __init__(self):
        self.sru = SRU(ENDPOINT_HOSTNAME, ENDPOINT_PATH, ENDPOINT_PORT)

    def query(self, query):
        if self.sru:
            response = self.sru.query(query)
            if self.sru.failed:
                return
            return response
        return

    @property
    def failed(self):
        return self.error
Beispiel #4
0
class UC():
    """ Interface to UniCat - Belgian university libraries and the Royal Library catalog via SRU """

    global ENDPOINT_HOSTNAME, \
           ENDPOINT_PATH, \
           COUNTRY_CODE

    sru = False
    error = False

    countrycode = COUNTRY_CODE
    supported_formats = {"dc": DC()}

    def __init__(self):
        self.sru = SRU(ENDPOINT_HOSTNAME, ENDPOINT_PATH)

    def query(self, query):
        if self.sru:
            response = self.sru.query(query)
            if self.sru.failed:
                return
            return response
        return

    @property
    def failed(self):
        return self.error
Beispiel #5
0
class KB_SE():
    """ Interface to Libris - Swedish university and research libraries via SRU """

    global ENDPOINT_HOSTNAME, \
           ENDPOINT_PATH, \
           COUNTRY_CODE

    sru = False
    error = False

    countrycode = COUNTRY_CODE
    supported_formats = {"dc": DC()}

    def __init__(self):
        self.sru = SRU(ENDPOINT_HOSTNAME, ENDPOINT_PATH)

    def query(self, query):
        if self.sru:
            response = self.sru.query(query)
            if self.sru.failed:
                returnA
            return response
        return

    @property
    def failed(self):
        return self.error
Beispiel #6
0
 def __init__(self):
     self.sru = SRU(ENDPOINT_HOSTNAME, ENDPOINT_PATH)