|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
ObjectThread
MARCIndexSource.RecordHandler
private class MARCIndexSource.RecordHandler
Handles running blocks of records through the stylesheet
| Nested Class Summary |
|---|
| Nested classes/interfaces inherited from class Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
private StringBuffer |
buffer
Accumulates the current MARCXML record |
Throwable |
error
If an exception occured, it is recorded here |
boolean |
isDone
Set to true when this thread has finished its business. |
String |
parsedMarcXML
A single parsed MARCXML record |
private Vector |
prefixNames
Names of XML namespace prefixes |
private Vector |
prefixUris
URIs of XML namespace prefixes |
private HashMap |
prefixUriToName
Mapping from URI to name |
private int |
recordNum
|
| Fields inherited from class Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
private |
MARCIndexSource.RecordHandler()
|
| Method Summary | |
|---|---|
private void |
beginChunk()
|
void |
characters(char[] ch,
int start,
int length)
|
String |
convertFromUTF8(char[] chars,
int start,
int length)
Look for probable UTF-8 encoding. |
private void |
convertRecords()
|
private void |
endChunk()
|
void |
endDocument()
|
void |
endElement(String uri,
String localName,
String qName)
|
void |
endPrefixMapping(String prefix)
|
void |
ignorableWhitespace(char[] ch,
int start,
int length)
|
void |
processingInstruction(String target,
String data)
|
void |
run()
|
void |
setDocumentLocator(Locator locator)
|
private boolean |
skipBadRecord()
|
void |
skippedEntity(String name)
|
void |
startDocument()
|
void |
startElement(String uri,
String localName,
String qName,
Attributes atts)
|
void |
startPrefixMapping(String prefix,
String uri)
|
| Methods inherited from class Thread |
|---|
activeCount, checkAccess, clone, 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 Object |
|---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Field Detail |
|---|
public String parsedMarcXML
public boolean isDone
public Throwable error
private Vector prefixNames
private Vector prefixUris
private HashMap prefixUriToName
private StringBuffer buffer
private int recordNum
| Constructor Detail |
|---|
private MARCIndexSource.RecordHandler()
| Method Detail |
|---|
public void run()
run in interface Runnablerun in class Thread
private void convertRecords()
throws Exception
Exception
private boolean skipBadRecord()
throws IOException
IOException
private void beginChunk()
throws SAXException
SAXException
private void endChunk()
throws SAXException
SAXException
public void startDocument()
throws SAXException
startDocument in interface ContentHandlerSAXException
public void endDocument()
throws SAXException
endDocument in interface ContentHandlerSAXException
public void startElement(String uri,
String localName,
String qName,
Attributes atts)
throws SAXException
startElement in interface ContentHandlerSAXException
public void endElement(String uri,
String localName,
String qName)
throws SAXException
endElement in interface ContentHandlerSAXException
public void characters(char[] ch,
int start,
int length)
throws SAXException
characters in interface ContentHandlerSAXException
public void startPrefixMapping(String prefix,
String uri)
throws SAXException
startPrefixMapping in interface ContentHandlerSAXException
public void endPrefixMapping(String prefix)
throws SAXException
endPrefixMapping in interface ContentHandlerSAXException
public void ignorableWhitespace(char[] ch,
int start,
int length)
throws SAXException
ignorableWhitespace in interface ContentHandlerSAXException
public void processingInstruction(String target,
String data)
throws SAXException
processingInstruction in interface ContentHandlerSAXExceptionpublic void setDocumentLocator(Locator locator)
setDocumentLocator in interface ContentHandler
public void skippedEntity(String name)
throws SAXException
skippedEntity in interface ContentHandlerSAXException
public String convertFromUTF8(char[] chars,
int start,
int length)
chars - Array of characters to convertstart - Where to start in the arraylength - How many characters to examine
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||