|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectjava.lang.Thread
org.ceryle.xnode.classifier.BackgroundClassifier
public class BackgroundClassifier
Extends Thread to validate an XML Document, provided with a Swing document. If verbose is true, indicates with progress bar and error messages. If not, is silent (not even error messages). This makes a first pass in validating mode if the Document has a DOCTYPE declaration, then a second pass if that fails. If there is no DOCTYPE, just a WF parse.
This writes directly to the supplied MessageWriter since using the MessageHandler would signal activity and halt the process. Only errors are flagged, which will stop the process.
| Nested Class Summary | |
|---|---|
class |
BackgroundClassifier.ClassificationScheduler
Extends Thread as a scheduler for classifying a list of XNodes. |
| Nested classes/interfaces inherited from class java.lang.Thread |
|---|
Thread.State, Thread.UncaughtExceptionHandler |
| Field Summary | |
|---|---|
static boolean |
failOnError
If true, upon an error on any single document kills all further processing of all documents. |
| Fields inherited from class java.lang.Thread |
|---|
MAX_PRIORITY, MIN_PRIORITY, NORM_PRIORITY |
| Constructor Summary | |
|---|---|
BackgroundClassifier(Idler idler,
MessageWriter messagewriter)
Constructor provided with the Document to check. |
|
| Method Summary | |
|---|---|
protected void |
classified(XNodeID xid)
Called by an XNodeClassifier upon successful classification of the XNode identified by the XNodeID xid. |
protected void |
finished()
Called at the end of the classification process, disabling further use of this instance. |
protected void |
halt()
Called at the end of each ClassificationScheduler (there may be many). |
void |
kill()
Interrupt any existing process, close the classifier and disable all further processes. |
void |
listErrors()
List the documents with errors to the MessageHandler. |
void |
listNotFound()
List the documents not found to the MessageHandler. |
| 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, run, 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 |
| Field Detail |
|---|
public static boolean failOnError
| Constructor Detail |
|---|
public BackgroundClassifier(Idler idler,
MessageWriter messagewriter)
throws ProcessException
idler - adds a IdlerListener to the Idler to trigger
the beginning and ending of background processing.messagewriter - the MessageWriter to receive messages and warnings.
ProcessException| Method Detail |
|---|
protected void classified(XNodeID xid)
public void kill()
Once killed the BackgroundClassifier stays dead. You never have to worry about it crawling across your bedroom floor at night, if that's the kind of thing you worry about.
protected void finished()
protected void halt()
public void listNotFound()
public void listErrors()
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||