org.odftoolkit.odfdom.pkg
Class OdfValidationException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.xml.sax.SAXException
              extended by org.xml.sax.SAXParseException
                  extended by 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 an ErrorHandler.

See Also:
Serialized Form

Constructor Summary
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
 ValidationConstraint getConstraint()
           
 
Methods inherited from class org.xml.sax.SAXParseException
getColumnNumber, getLineNumber, getPublicId, getSystemId
 
Methods inherited from class org.xml.sax.SAXException
getCause, getException, getMessage, toString
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

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 message
sourcePath - 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 embeddded
constraint - the predefined constaint message
sourcePath - 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


Copyright © 2008-2011 The Apache Software Foundation. All Rights Reserved.