Search in sources :

Example 1 with MarcXmlParser

use of org.marc4j.MarcXmlParser in project RecordManager2 by moravianlibrary.

the class MarcXmlParserThread method run.

/**
 * Creates a new <code>MarcXmlHandler</code> instance, registers the
 * <code>RecordQueue</code> and sends the <code>InputStream</code> to the
 * <code>MarcXmlParser</code> parser.
 */
public void run() {
    try {
        MarcXmlHandler handler = new MarcXmlHandler(queue);
        MarcXmlParser parser = new MarcXmlParser(handler);
        if (th == null) {
            parser.parse(input);
        } else {
            parser.parse(input, th);
        }
    } catch (MarcException me) {
        queue.passException(me);
    } finally {
        queue.end();
    }
}
Also used : MarcException(org.marc4j.MarcException) MarcXmlParser(org.marc4j.MarcXmlParser)

Aggregations

MarcException (org.marc4j.MarcException)1 MarcXmlParser (org.marc4j.MarcXmlParser)1