Class OdfValidationException

  • All Implemented Interfaces:
    Serializable

    public class OdfValidationException
    extends SAXParseException
    This ODF specific validation exception facilitates the usage of a SAXParseException for non-XML validation, used by an ErrorHandler.
    See Also:
    Serialized Form
    • 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 constraint 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 constraint 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 constraint 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