edu.northwestern.at.morphadorner.tools.validatexmlfiles

## Class ValidationErrorHandler

- java.lang.Object
- - edu.northwestern.at.morphadorner.tools.validatexmlfiles.ValidationErrorHandler

- All Implemented Interfaces:
    org.xml.sax.ErrorHandler

      public class ValidationErrorHandler
      extends java.lang.Object
      implements org.xml.sax.ErrorHandler

  Error handler class for a JAXP Schema validation.

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `protected int` | `errorCount` Counts validation errors.

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `ValidationErrorHandler()` Construct error handler.

  - ### Method Summary

    Methods
    Modifier and Type | Method and Description
    --- | ---
    `void` | `error(org.xml.sax.SAXParseException e)` Callback from a JAXP validation process for an error.
    `void` | `fatalError(org.xml.sax.SAXParseException e)` Callback from a JAXP validation process for a fatal error.
    `int` | `getErrorCount()` Get the validation error count.
    `protected void` | `printError(org.xml.sax.SAXParseException e)` Print error.
    `void` | `resetErrorCount()` Reset the error count to zero.
    `void` | `warning(org.xml.sax.SAXParseException e)` Callback from a JAXP validation process for a warning.

    - ### Methods inherited from class java.lang.Object

      `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- - ### Field Detail

    - #### errorCount

          protected int errorCount

      Counts validation errors.

  - ### Constructor Detail

    - #### ValidationErrorHandler

          public ValidationErrorHandler()

      Construct error handler.

  - ### Method Detail

    - #### resetErrorCount

          public void resetErrorCount()

      Reset the error count to zero.

    - #### getErrorCount

          public int getErrorCount()

      Get the validation error count.
      Returns:
        The validation error count.

    - #### warning

          public void warning(org.xml.sax.SAXParseException e)
                       throws org.xml.sax.SAXException

      Callback from a JAXP validation process for a warning.
      Specified by:
        `warning` in interface `org.xml.sax.ErrorHandler`
      Parameters:
        `e` - SAX parser exception.
      Throws:
        `org.xml.sax.SAXException`

    - #### error

          public void error(org.xml.sax.SAXParseException e)
                     throws org.xml.sax.SAXException

      Callback from a JAXP validation process for an error.
      Specified by:
        `error` in interface `org.xml.sax.ErrorHandler`
      Parameters:
        `e` - SAX parser exception.
      Throws:
        `org.xml.sax.SAXException`

    - #### fatalError

          public void fatalError(org.xml.sax.SAXParseException e)
                          throws org.xml.sax.SAXException

      Callback from a JAXP validation process for a fatal error.
      Specified by:
        `fatalError` in interface `org.xml.sax.ErrorHandler`
      Parameters:
        `e` - SAX parser exception.
      Throws:
        `org.xml.sax.SAXException`

    - #### printError

          protected void printError(org.xml.sax.SAXParseException e)

      Print error.
      Parameters:
        `e` - SAX parser exception.