Package com.tangosol.run.xml
Class SaxParser.ValidationHandler
- java.lang.Object
 - 
- com.tangosol.run.xml.SaxParser.ValidationHandler
 
 
- 
- All Implemented Interfaces:
 ErrorHandler
- Enclosing class:
 - SaxParser
 
protected class SaxParser.ValidationHandler extends Object implements ErrorHandler
An inner class Error Handler that is registered in parser that performs validation. It gets called when on warning, error, or fatalError. 
- 
- 
Constructor Summary
Constructors Modifier Constructor Description protectedValidationHandler() 
- 
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voiderror(SAXParseException e)Routine called when a error occurs in parser.voidfatalError(SAXParseException e)Routine called when a fatal error occurs in parser.intgetErrorCount()Returns the number of Errors encountered.SAXParseExceptiongetException()Returns a saved parser exception.booleanisError()Returns boolean indicating if an error has occurred.voidwarning(SAXParseException e)Routine called when a warning occurs in parser. 
 - 
 
- 
- 
Method Detail
- 
warning
public void warning(SAXParseException e) throws SAXException
Routine called when a warning occurs in parser. Logs the warning message.- Specified by:
 warningin interfaceErrorHandler- Parameters:
 e- SAXParseException is warning exception.- Throws:
 SAXException
 
- 
error
public void error(SAXParseException e) throws SAXException
Routine called when a error occurs in parser. Logs the error message, saves the first exception and increments an errorCounter. Error count and exception can be retrieved when parsing is complete.- Specified by:
 errorin interfaceErrorHandler- Parameters:
 e- SAXParseException is error exception.- Throws:
 SAXException
 
- 
fatalError
public void fatalError(SAXParseException e) throws SAXException
Routine called when a fatal error occurs in parser. Logs the fatal error message and throws the exception.- Specified by:
 fatalErrorin interfaceErrorHandler- Parameters:
 e- SAXParseException is fatal error exception.- Throws:
 SAXException- if SAX error occurs
 
- 
getErrorCount
public int getErrorCount()
Returns the number of Errors encountered.- Returns:
 - int error count
 
 
- 
getException
public SAXParseException getException()
Returns a saved parser exception.- Returns:
 - SAXParseException Parser exception
 
 
- 
isError
public boolean isError()
Returns boolean indicating if an error has occurred.- Returns:
 - boolean true if error else false
 
 
 - 
 
 -