org.apache.uima.util

## Class InvalidXMLException

- java.lang.Object
- - java.lang.Throwable
  - - java.lang.Exception
    - - org.apache.uima.InternationalizedException
      - - org.apache.uima.UIMAException
        - - org.apache.uima.util.InvalidXMLException

- All Implemented Interfaces:
    Serializable

      public class InvalidXMLException
      extends UIMAException

  Thrown by the `XMLParser` to indicate that an XML document is invalid or does not specify a valid object of the desired class.
  See Also:
    Serialized Form

- - ### Field Summary

    Fields
    Modifier and Type | Field and Description
    --- | ---
    `static String` | `CIRCULAR_AE_IMPORT` Message key for a standard UIMA exception message: Cycle found in imports.
    `static String` | `DUPLICATE_ELEMENT_FOUND` Message key for a standard UIMA exception message: "Element type {0} cannot be duplicated within element type {1}."
    `static String` | `ELEMENT_NOT_FOUND` Message key for a standard UIMA exception message: "Required element type {0} not found within element type {1}."
    `static String` | `FS_INDEXES_OUTSIDE_FS_INDEX_COLLECTION` Message key for a standard UIMA exception message: The element "fsIndexes" cannot occur outside the containing element "fsIndexCollection"
    `static String` | `IMPORT_BY_NAME_TARGET_NOT_FOUND` Message key for a standard UIMA exception message: An import could not be resolved.
    `static String` | `IMPORT_FAILED_COULD_NOT_READ_FROM_URL` Message key for a standard UIMA exception message: Import failed.
    `static String` | `IMPORT_MUST_HAVE_NAME_XOR_LOCATION` Message key for a standard UIMA exception message: Invalid import declaration.
    `static String` | `INCLUDE_FILE_NOT_FOUND` Message key for a standard UIMA exception message: "The XML document attempted to include an external file "{0}", which was not found."
    `static String` | `INVALID_CLASS` Message key for a standard UIMA exception message: "An object of class {0} was requested, but the XML input contained an object of class {1}."
    `static String` | `INVALID_CPE_DESCRIPTOR` Message key for a standard UIMA exception message: This is not a valid CPE descriptor.
    `static String` | `INVALID_DESCRIPTOR_FILE` Message key for a standard UIMA exception message: "Invalid descriptor file {0}."
    `static String` | `INVALID_ELEMENT_TEXT` Message key for a standard UIMA exception message: "The text "{0}" is not valid content for the element "{1}"."
    `static String` | `INVALID_ELEMENT_TYPE` Message key for a standard UIMA exception message: "Expected an element of type {0}, but found an element of type {1}."
    `static String` | `MALFORMED_IMPORT_URL` Message key for a standard UIMA exception message: Malformed URL {0} in import declaration.
    `static String` | `REQUIRED_ATTRIBUTE_MISSING` Message key for a standard UIMA exception message: "Required attribute {0} not found within element type {1}."
    `static String` | `UNKNOWN_ELEMENT` Message key for a standard UIMA exception message: "The XML parser encountered an unknown element type: {0}."

    - ### Fields inherited from class org.apache.uima.UIMAException

      `STANDARD_MESSAGE_CATALOG`

  - ### Constructor Summary

    Constructors
    Constructor and Description
    `InvalidXMLException()` Creates a new exception with a null message.
    `InvalidXMLException(String aMessageKey, Object[] aArguments)` Creates a new exception with a message from the `UIMAException.STANDARD_MESSAGE_CATALOG`.
    `InvalidXMLException(String aMessageKey, Object[] aArguments, Throwable aCause)` Creates a new exception with the specified cause and a message from the `UIMAException.STANDARD_MESSAGE_CATALOG`.
    `InvalidXMLException(String aResourceBundleName, String aMessageKey, Object[] aArguments)` Creates a new exception with a the specified message.
    `InvalidXMLException(String aResourceBundleName, String aMessageKey, Object[] aArguments, Throwable aCause)` Creates a new exception with the specified message and cause.
    `InvalidXMLException(Throwable aCause)` Creates a new exception with the specified cause and a null message.

  - ### Method Summary

    - ### Methods inherited from class org.apache.uima.InternationalizedException

      `getArguments, getCause, getLocalizedMessage, getLocalizedMessage, getMessage, getMessageKey, getResourceBundleName, hasMessageKey, initCause, setResourceBundle`

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

      `addSuppressed, fillInStackTrace, getStackTrace, getSuppressed, printStackTrace, printStackTrace, printStackTrace, setStackTrace, toString`

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

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

- - ### Field Detail

    - #### INVALID_DESCRIPTOR_FILE

          public static final String INVALID_DESCRIPTOR_FILE

      Message key for a standard UIMA exception message: "Invalid descriptor file {0}."
      See Also:
        Constant Field Values

    - #### UNKNOWN_ELEMENT

          public static final String UNKNOWN_ELEMENT

      Message key for a standard UIMA exception message: "The XML parser encountered an unknown element type: {0}."
      See Also:
        Constant Field Values

    - #### INVALID_CLASS

          public static final String INVALID_CLASS

      Message key for a standard UIMA exception message: "An object of class {0} was requested, but the XML input contained an object of class {1}."
      See Also:
        Constant Field Values

    - #### INVALID_ELEMENT_TYPE

          public static final String INVALID_ELEMENT_TYPE

      Message key for a standard UIMA exception message: "Expected an element of type {0}, but found an element of type {1}."
      See Also:
        Constant Field Values

    - #### ELEMENT_NOT_FOUND

          public static final String ELEMENT_NOT_FOUND

      Message key for a standard UIMA exception message: "Required element type {0} not found within element type {1}."
      See Also:
        Constant Field Values

    - #### REQUIRED_ATTRIBUTE_MISSING

          public static final String REQUIRED_ATTRIBUTE_MISSING

      Message key for a standard UIMA exception message: "Required attribute {0} not found within element type {1}."
      See Also:
        Constant Field Values

    - #### INCLUDE_FILE_NOT_FOUND

          public static final String INCLUDE_FILE_NOT_FOUND

      Message key for a standard UIMA exception message: "The XML document attempted to include an external file "{0}", which was not found."
      See Also:
        Constant Field Values

    - #### INVALID_ELEMENT_TEXT

          public static final String INVALID_ELEMENT_TEXT

      Message key for a standard UIMA exception message: "The text "{0}" is not valid content for the element "{1}"."
      See Also:
        Constant Field Values

    - #### MALFORMED_IMPORT_URL

          public static final String MALFORMED_IMPORT_URL

      Message key for a standard UIMA exception message: Malformed URL {0} in import declaration.
      See Also:
        Constant Field Values

    - #### IMPORT_BY_NAME_TARGET_NOT_FOUND

          public static final String IMPORT_BY_NAME_TARGET_NOT_FOUND

      Message key for a standard UIMA exception message: An import could not be resolved. No .xml file with name "{0}" was found in the class path or data path.
      See Also:
        Constant Field Values

    - #### IMPORT_FAILED_COULD_NOT_READ_FROM_URL

          public static final String IMPORT_FAILED_COULD_NOT_READ_FROM_URL

      Message key for a standard UIMA exception message: Import failed. Could not read from URL {0}.
      See Also:
        Constant Field Values

    - #### IMPORT_MUST_HAVE_NAME_XOR_LOCATION

          public static final String IMPORT_MUST_HAVE_NAME_XOR_LOCATION

      Message key for a standard UIMA exception message: Invalid import declaration. Import declarations must have a "name" or a "location" attribute, but not both.
      See Also:
        Constant Field Values

    - #### INVALID_CPE_DESCRIPTOR

          public static final String INVALID_CPE_DESCRIPTOR

      Message key for a standard UIMA exception message: This is not a valid CPE descriptor.
      See Also:
        Constant Field Values

    - #### CIRCULAR_AE_IMPORT

          public static final String CIRCULAR_AE_IMPORT

      Message key for a standard UIMA exception message: Cycle found in imports. The descriptor for Aggregate Analysis Engine "{0}" has imported itself as one of its delegate descriptors (perhaps indirectly through another intermediate Analysis Engine descriptor).
      See Also:
        Constant Field Values

    - #### FS_INDEXES_OUTSIDE_FS_INDEX_COLLECTION

          public static final String FS_INDEXES_OUTSIDE_FS_INDEX_COLLECTION

      Message key for a standard UIMA exception message: The element "fsIndexes" cannot occur outside the containing element "fsIndexCollection"
      See Also:
        Constant Field Values

    - #### DUPLICATE_ELEMENT_FOUND

          public static final String DUPLICATE_ELEMENT_FOUND

      Message key for a standard UIMA exception message: "Element type {0} cannot be duplicated within element type {1}."
      See Also:
        Constant Field Values

  - ### Constructor Detail

    - #### InvalidXMLException

          public InvalidXMLException()

      Creates a new exception with a null message.

    - #### InvalidXMLException

          public InvalidXMLException(Throwable aCause)

      Creates a new exception with the specified cause and a null message.
      Parameters:
        `aCause` - the original exception that caused this exception to be thrown, if any

    - #### InvalidXMLException

          public InvalidXMLException(String aResourceBundleName,
                                     String aMessageKey,
                                     Object[] aArguments)

      Creates a new exception with a the specified message.
      Parameters:
        `aResourceBundleName` - the base name of the resource bundle in which the message for this exception is located.
        `aMessageKey` - an identifier that maps to the message for this exception. The message may contain placeholders for arguments as defined by the `MessageFormat` class.
        `aArguments` - The arguments to the message. `null` may be used if the message has no arguments.

    - #### InvalidXMLException

          public InvalidXMLException(String aResourceBundleName,
                                     String aMessageKey,
                                     Object[] aArguments,
                                     Throwable aCause)

      Creates a new exception with the specified message and cause.
      Parameters:
        `aResourceBundleName` - the base name of the resource bundle in which the message for this exception is located.
        `aMessageKey` - an identifier that maps to the message for this exception. The message may contain placeholders for arguments as defined by the `MessageFormat` class.
        `aArguments` - The arguments to the message. `null` may be used if the message has no arguments.
        `aCause` - the original exception that caused this exception to be thrown, if any

    - #### InvalidXMLException

          public InvalidXMLException(String aMessageKey,
                                     Object[] aArguments)

      Creates a new exception with a message from the `UIMAException.STANDARD_MESSAGE_CATALOG`.
      Parameters:
        `aMessageKey` - an identifier that maps to the message for this exception. The message may contain placeholders for arguments as defined by the `MessageFormat` class.
        `aArguments` - The arguments to the message. `null` may be used if the message has no arguments.

    - #### InvalidXMLException

          public InvalidXMLException(String aMessageKey,
                                     Object[] aArguments,
                                     Throwable aCause)

      Creates a new exception with the specified cause and a message from the `UIMAException.STANDARD_MESSAGE_CATALOG`.
      Parameters:
        `aMessageKey` - an identifier that maps to the message for this exception. The message may contain placeholders for arguments as defined by the `MessageFormat` class.
        `aArguments` - The arguments to the message. `null` may be used if the message has no arguments.
        `aCause` - the original exception that caused this exception to be thrown, if any

Copyright © 2006–2019 The Apache Software Foundation. All rights reserved.