Ejemplo n.º 1
0
def convert_metajson(metajson, output_format):
    if output_format == constants.FORMAT_METAJSON or output_format == constants.FORMAT_HTML:
        return metajson

    elif output_format == constants.FORMAT_OPENURL:
        return openurl_crosswalk.metajson_to_openurl(metajson)

    elif output_format == constants.FORMAT_OPENURLCOINS:
        return openurl_crosswalk.metajson_to_openurlcoins(metajson)

    elif output_format == constants.FORMAT_REPEC:
        return repec_crosswalk.metajson_to_repec(metajson)

    elif output_format == constants.FORMAT_MODS:
        return mods_crosswalk.metajson_to_mods_xmletree(metajson)

    elif output_format == constants.FORMAT_BIBTEX:
        return bibtex_crosswalk.metajson_to_bibtex_entry(metajson)

    elif output_format == constants.FORMAT_OAI_DC:
        return oai_dc_crosswalk.metajson_to_oai_dc_xmletree(metajson)

    elif output_format == constants.FORMAT_METS:
        return mets_crosswalk.metajson_to_mets_xmletree(metajson)

    else:
        logging.error("convert_metajson : ERROR Not managed format: {}".format(output_format))
Ejemplo n.º 2
0
def convert_metajson(metajson, output_format):
    if output_format == constants.FORMAT_METAJSON or output_format == constants.FORMAT_HTML:
        return metajson

    elif output_format == constants.FORMAT_OPENURL:
        return openurl_crosswalk.metajson_to_openurl(metajson)

    elif output_format == constants.FORMAT_OPENURLCOINS:
        return openurl_crosswalk.metajson_to_openurlcoins(metajson)

    elif output_format == constants.FORMAT_REPEC:
        return repec_crosswalk.metajson_to_repec(metajson)

    elif output_format == constants.FORMAT_MODS:
        return mods_crosswalk.metajson_to_mods_xmletree(metajson)

    elif output_format == constants.FORMAT_BIBTEX:
        return bibtex_crosswalk.metajson_to_bibtex_entry(metajson)

    elif output_format == constants.FORMAT_OAI_DC:
        return oai_dc_crosswalk.metajson_to_oai_dc_xmletree(metajson)

    elif output_format == constants.FORMAT_METS:
        return mets_crosswalk.metajson_to_mets_xmletree(metajson)

    else:
        logging.error("convert_metajson : ERROR Not managed format: {}".format(output_format))
Ejemplo n.º 3
0
def request_by_document(document):
    openurl_string = openurl_crosswalk.metajson_to_openurl(document)
    return request_by_openurl_string(openurl_string)
Ejemplo n.º 4
0
def request_by_document(document):
    openurl_string = openurl_crosswalk.metajson_to_openurl(document)
    return request_by_openurl_string(openurl_string)