Package net.ontopia.xml
Class Slf4jSaxErrorHandler
java.lang.Object
net.ontopia.xml.Slf4jSaxErrorHandler
- All Implemented Interfaces:
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.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprotected booleanprotected org.slf4j.Logger -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidvoidprotected StringvoidsetIgnoreNamespaceError(boolean ignore) INTERNAL: Sets error logging strategy when namespace is not declared.void
-
Field Details
-
log
protected org.slf4j.Logger log -
ignoreNamespaceErrors
protected boolean ignoreNamespaceErrors
-
-
Constructor Details
-
Slf4jSaxErrorHandler
public Slf4jSaxErrorHandler(org.slf4j.Logger log)
-
-
Method Details
-
setIgnoreNamespaceError
public void setIgnoreNamespaceError(boolean ignore) INTERNAL: Sets error logging strategy when namespace is not declared. -
getExceptionLocationInfo
-
warning
- Specified by:
warningin interfaceErrorHandler
-
error
- Specified by:
errorin interfaceErrorHandler
-
fatalError
- Specified by:
fatalErrorin interfaceErrorHandler- Throws:
SAXParseException
-