This module exists to provide ability to convert from Aleph’s data structures to AMQP data structures, specifically to convert MARCXMLRecord to EPublication simplified data structure.
Pick informations from MARCXMLRecord object and use it to build SemanticInfo structure.
Parameters: | xml (str/MARCXMLRecord) – MarcXML which will be converted to SemanticInfo. In case of str, <record> tag is required. |
---|---|
Returns: | structure – SemanticInfo. |
Convert MARCXMLRecord object to EPublication namedtuple.
Parameters: | xml (str/MARCXMLRecord) – MarcXML which will be converted to EPublication. In case of str, <record> tag is required. |
---|---|
Returns: | structure – EPublication namedtuple with data about publication. |
See also
aleph.datastructures.epublication for details of EPublication, structure.
Parse <doc_number> tag from xml.
Parameters: | xml (str) – XML string returned from aleph.aleph.downloadRecords() |
---|---|
Returns: | str – Doc ID as string or “-1” if not found. |