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();
}
}
Aggregations