org.marc4j
Class MarcXmlParserThread

java.lang.Object
  extended by java.lang.Thread
      extended by org.marc4j.MarcXmlParserThread
All Implemented Interfaces:
Runnable

public class MarcXmlParserThread
extends Thread

Extends Thread to produce Record objects from MARCXML data.

Version:
$Revision: 1.3 $
Author:
Bas Peters

Nested Class Summary
 
Nested classes/interfaces inherited from class java.lang.Thread
Thread.State, Thread.UncaughtExceptionHandler
 
Field Summary
 
Fields inherited from class java.lang.Thread
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY
 
Constructor Summary
MarcXmlParserThread(RecordStack queue)
          Creates a new instance and registers the RecordQueue.
MarcXmlParserThread(RecordStack queue, InputSource input)
          Creates a new instance and registers the RecordQueue and the InputStream.
 
Method Summary
 InputSource getInputSource()
          Returns the input stream.
 TransformerHandler getTransformerHandler()
          Returns the content handler to transform the source to MARCXML.
 void run()
          Creates a new MarcXmlHandler instance, registers the RecordQueue and sends the InputStream to the MarcXmlParser parser.
 void setInputSource(InputSource input)
          Sets the input stream.
 void setTransformerHandler(TransformerHandler th)
          Sets the content handler to transform the source to MARCXML.
 
Methods inherited from class java.lang.Thread
activeCount, checkAccess, countStackFrames, currentThread, destroy, dumpStack, enumerate, getAllStackTraces, getContextClassLoader, getDefaultUncaughtExceptionHandler, getId, getName, getPriority, getStackTrace, getState, getThreadGroup, getUncaughtExceptionHandler, holdsLock, interrupt, interrupted, isAlive, isDaemon, isInterrupted, join, join, join, resume, setContextClassLoader, setDaemon, setDefaultUncaughtExceptionHandler, setName, setPriority, setUncaughtExceptionHandler, sleep, sleep, start, stop, stop, suspend, toString, yield
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

MarcXmlParserThread

public MarcXmlParserThread(RecordStack queue)
Creates a new instance and registers the RecordQueue.

Parameters:
queue - the record queue

MarcXmlParserThread

public MarcXmlParserThread(RecordStack queue,
                           InputSource input)
Creates a new instance and registers the RecordQueue and the InputStream.

Parameters:
queue - the record queue
input - the input stream
Method Detail

getTransformerHandler

public TransformerHandler getTransformerHandler()
Returns the content handler to transform the source to MARCXML.

Returns:
TransformerHandler - the transformation content handler

setTransformerHandler

public void setTransformerHandler(TransformerHandler th)
Sets the content handler to transform the source to MARCXML.

Parameters:
th - - the transformation content handler

getInputSource

public InputSource getInputSource()
Returns the input stream.

Returns:
InputSource - the input source

setInputSource

public void setInputSource(InputSource input)
Sets the input stream.

Parameters:
input - the input stream

run

public void run()
Creates a new MarcXmlHandler instance, registers the RecordQueue and sends the InputStream to the MarcXmlParser parser.

Specified by:
run in interface Runnable
Overrides:
run in class Thread


Copyright © 2002-2006 Bas Peters. All Rights Reserved.