Package org.odftoolkit.odfdom.pkg
Class OdfValidationException
- java.lang.Object
-
- java.lang.Throwable
-
- java.lang.Exception
-
- org.xml.sax.SAXException
-
- org.xml.sax.SAXParseException
-
- org.odftoolkit.odfdom.pkg.OdfValidationException
-
- All Implemented Interfaces:
Serializable
public class OdfValidationException extends SAXParseException
This ODF specific validation excpetion faciliates the usage of a SAXParseException for none XML validation, used by anErrorHandler
.- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description OdfValidationException(ValidationConstraint constraint)
An OdfValidationException should be used for any validation result related to an ODF package.OdfValidationException(ValidationConstraint constraint, String sourcePath, Exception e, Object... messageParameters)
An OdfValidationException should be used for any validation result related to an ODF package.OdfValidationException(ValidationConstraint constraint, String sourcePath, Object... messageParameters)
An OdfValidationException should be used for any validation result related to an ODF package.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ValidationConstraint
getConstraint()
-
Methods inherited from class org.xml.sax.SAXParseException
getColumnNumber, getLineNumber, getPublicId, getSystemId, toString
-
Methods inherited from class org.xml.sax.SAXException
getCause, getException, getMessage
-
Methods inherited from class java.lang.Throwable
addSuppressed, fillInStackTrace, getLocalizedMessage, getStackTrace, getSuppressed, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
-
-
-
-
Constructor Detail
-
OdfValidationException
public OdfValidationException(ValidationConstraint constraint)
An OdfValidationException should be used for any validation result related to an ODF package. This constructor should only be used for SaxParseExceptions unrelated to XML. This constructor sets the public and system ID for XML and line and column number of the super class will be set to be invalid.- Parameters:
constraint
- the predefined constaint message
-
OdfValidationException
public OdfValidationException(ValidationConstraint constraint, String sourcePath, Object... messageParameters)
An OdfValidationException should be used for any validation result related to an ODF package. This constructor should only be used for SaxParseExceptions unrelated to XML. This constructor sets the public and system ID for XML and line and column number of the super class will be set to be invalid.- Parameters:
constraint
- the predefined constaint messagesourcePath
- the source path of the exception. For instance, it might be an ODF package or ODF document.messageParameters
- allow the customization of a constraint message with parameters.
-
OdfValidationException
public OdfValidationException(ValidationConstraint constraint, String sourcePath, Exception e, Object... messageParameters)
An OdfValidationException should be used for any validation result related to an ODF package. This constructor should only be used for SaxParseExceptions unrelated to XML. This constructor sets the public and system ID for XML and line and column number of the super class will be set to be invalid.- Parameters:
e
- root exception to be embedddedconstraint
- the predefined constaint messagesourcePath
- the source path of the exception. For instance, it might be an ODF package or ODF document.messageParameters
- allow the customization of a constraint message with parameters.
-
-
Method Detail
-
getConstraint
public ValidationConstraint getConstraint()
- Returns:
- constraint belonging to this exception
-
-