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 protected
ValidationHandler()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
error(SAXParseException e)
Routine called when a error occurs in parser.void
fatalError(SAXParseException e)
Routine called when a fatal error occurs in parser.int
getErrorCount()
Returns the number of Errors encountered.SAXParseException
getException()
Returns a saved parser exception.boolean
isError()
Returns boolean indicating if an error has occurred.void
warning(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:
warning
in 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:
error
in 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:
fatalError
in 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
-
-