edu.emory.mathcs.util.xml
Class AccumulatingErrorHandler

java.lang.Object
  extended byedu.emory.mathcs.util.xml.AccumulatingErrorHandler
All Implemented Interfaces:
org.xml.sax.ErrorHandler

public class AccumulatingErrorHandler
extends java.lang.Object
implements org.xml.sax.ErrorHandler

SAX error handler that remembers all errors and warnings encountered during parsing and offers methods to access them after parsing is done.

Version:
1.0
Author:
Dawid Kurzyniec

Constructor Summary
AccumulatingErrorHandler()
          Creates a new accumulating error handler.
AccumulatingErrorHandler(org.xml.sax.ErrorHandler delegate)
          Creates a new accumulating error handler that, in addition to its normal behavior, also delegates all events to the specified error handler.
 
Method Summary
 void error(org.xml.sax.SAXParseException ex)
           
 void fatalError(org.xml.sax.SAXParseException ex)
           
 org.xml.sax.SAXParseException[] getAllErrors()
           
 org.xml.sax.SAXParseException[] getAllProblems()
           
 java.lang.String getDetails()
           
 org.xml.sax.SAXParseException[] getFatalErrors()
           
 org.xml.sax.SAXParseException[] getNonfatalErrors()
           
 org.xml.sax.SAXParseException[] getWarnings()
           
 boolean hadAnyErrors()
           
 boolean hadAnyProblems()
           
 boolean hadFatalErrors()
           
 boolean hadNonfatalErrors()
           
 boolean hadWarnings()
           
 void warning(org.xml.sax.SAXParseException ex)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AccumulatingErrorHandler

public AccumulatingErrorHandler()
Creates a new accumulating error handler.


AccumulatingErrorHandler

public AccumulatingErrorHandler(org.xml.sax.ErrorHandler delegate)
Creates a new accumulating error handler that, in addition to its normal behavior, also delegates all events to the specified error handler.

Method Detail

warning

public void warning(org.xml.sax.SAXParseException ex)
             throws org.xml.sax.SAXException
Specified by:
warning in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

error

public void error(org.xml.sax.SAXParseException ex)
           throws org.xml.sax.SAXException
Specified by:
error in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

fatalError

public void fatalError(org.xml.sax.SAXParseException ex)
                throws org.xml.sax.SAXException
Specified by:
fatalError in interface org.xml.sax.ErrorHandler
Throws:
org.xml.sax.SAXException

hadWarnings

public boolean hadWarnings()

hadAnyErrors

public boolean hadAnyErrors()

hadNonfatalErrors

public boolean hadNonfatalErrors()

hadFatalErrors

public boolean hadFatalErrors()

hadAnyProblems

public boolean hadAnyProblems()

getWarnings

public org.xml.sax.SAXParseException[] getWarnings()

getAllErrors

public org.xml.sax.SAXParseException[] getAllErrors()

getNonfatalErrors

public org.xml.sax.SAXParseException[] getNonfatalErrors()

getFatalErrors

public org.xml.sax.SAXParseException[] getFatalErrors()

getAllProblems

public org.xml.sax.SAXParseException[] getAllProblems()

getDetails

public java.lang.String getDetails()