com.thaiopensource.xml.sax
Class CountingErrorHandler

java.lang.Object
  extended by com.thaiopensource.xml.sax.CountingErrorHandler
All Implemented Interfaces:
ErrorHandler
Direct Known Subclasses:
SchemaReaderImpl.UserWrapErrorHandler, SchemaReaderImpl.UserWrapErrorHandler

public class CountingErrorHandler
extends Object
implements ErrorHandler


Field Summary
private  int errorCount
           
private  ErrorHandler errorHandler
           
private  int fatalErrorCount
           
private  boolean hadErrorOrFatalError
           
private  int warningCount
           
 
Constructor Summary
CountingErrorHandler()
           
CountingErrorHandler(ErrorHandler errorHandler)
           
 
Method Summary
 void error(SAXParseException exception)
           
 void fatalError(SAXParseException exception)
           
 int getErrorCount()
           
 ErrorHandler getErrorHandler()
           
 int getFatalErrorCount()
           
 boolean getHadErrorOrFatalError()
           
 int getWarningCount()
           
 void reset()
           
 void setErrorHandler(ErrorHandler errorHandler)
           
 void warning(SAXParseException exception)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

errorHandler

private ErrorHandler errorHandler

fatalErrorCount

private int fatalErrorCount

errorCount

private int errorCount

warningCount

private int warningCount

hadErrorOrFatalError

private boolean hadErrorOrFatalError
Constructor Detail

CountingErrorHandler

public CountingErrorHandler()

CountingErrorHandler

public CountingErrorHandler(ErrorHandler errorHandler)
Method Detail

reset

public void reset()

getHadErrorOrFatalError

public boolean getHadErrorOrFatalError()

getFatalErrorCount

public int getFatalErrorCount()

getErrorCount

public int getErrorCount()

getWarningCount

public int getWarningCount()

getErrorHandler

public ErrorHandler getErrorHandler()

setErrorHandler

public void setErrorHandler(ErrorHandler errorHandler)

warning

public void warning(SAXParseException exception)
             throws SAXException
Specified by:
warning in interface ErrorHandler
Throws:
SAXException

error

public void error(SAXParseException exception)
           throws SAXException
Specified by:
error in interface ErrorHandler
Throws:
SAXException

fatalError

public void fatalError(SAXParseException exception)
                throws SAXException
Specified by:
fatalError in interface ErrorHandler
Throws:
SAXException