net.ontopia.xml
Class Slf4jSaxErrorHandler
java.lang.Object
net.ontopia.xml.Slf4jSaxErrorHandler
- All Implemented Interfaces:
- org.xml.sax.ErrorHandler
public class Slf4jSaxErrorHandler
- extends java.lang.Object
- implements org.xml.sax.ErrorHandler
INTERNAL: SAX2 error handler implementation that uses slf4j to log
warnings, errors and fatal errors.
Note: You can set the default for ignoring namespace related error
messages by setting the boolean system property
'net.ontopia.xml.Slf4jSaxErrorHandler.ignoreNamespaceErrors'. The
default can later be overriden by calling the
setIgnoreNamespaceError(boolean) method. The system property only
has effect when the instance is being creates.
Method Summary |
void |
error(org.xml.sax.SAXParseException e)
|
void |
fatalError(org.xml.sax.SAXParseException e)
|
protected java.lang.String |
getExceptionLocationInfo(org.xml.sax.SAXParseException e)
|
void |
setIgnoreNamespaceError(boolean ignore)
INTERNAL: Sets error logging strategy when namespace is not
declared. |
void |
warning(org.xml.sax.SAXParseException e)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
log
protected org.slf4j.Logger log
ignoreNamespaceErrors
protected boolean ignoreNamespaceErrors
Slf4jSaxErrorHandler
public Slf4jSaxErrorHandler(org.slf4j.Logger log)
setIgnoreNamespaceError
public void setIgnoreNamespaceError(boolean ignore)
- INTERNAL: Sets error logging strategy when namespace is not
declared.
getExceptionLocationInfo
protected java.lang.String getExceptionLocationInfo(org.xml.sax.SAXParseException e)
warning
public void warning(org.xml.sax.SAXParseException e)
- Specified by:
warning
in interface org.xml.sax.ErrorHandler
error
public void error(org.xml.sax.SAXParseException e)
- Specified by:
error
in interface org.xml.sax.ErrorHandler
fatalError
public void fatalError(org.xml.sax.SAXParseException e)
throws org.xml.sax.SAXParseException
- Specified by:
fatalError
in interface org.xml.sax.ErrorHandler
- Throws:
org.xml.sax.SAXParseException
Copyright © 2000-2012 Ontopia.