org.apache.uima.cas.impl
Class AnnotationImplException

java.lang.Object
  extended by java.lang.Throwable
      extended by java.lang.Exception
          extended by org.apache.uima.cas.impl.AnnotationImplException
All Implemented Interfaces:
java.io.Serializable

public class AnnotationImplException
extends java.lang.Exception

Exception class for package org.apache.uima.cas.impl. Automatically generated from message catalog.

See Also:
Serialized Form

Field Summary
static int CANT_ADD_TOP
          Type system parsing error for file "{0}": couldn't add top type "{1}" at line {2}, column {3}.
static int COULDNT_ADD_FEAT
          Error parsing types system file "{0}": feature "{1}" could not be added at line {2}, column {3}.
static int COULDNT_ADD_TYPE
          Error parsing types system file "{0}": type "{1}" could not be added at line {2}, column {3}.
static int NULL_DOCSTREAM
          Error printing type system: set docStream first.
static int PARSING_ERROR
          Error parsing types system file "{0}": expected {1} but found "{2}" at line {3}, column {4}.
static int UNKN_TYPE
          Error parsing types system file "{0}": type "{1}" must be declared before it is used at line {2}, column {3}.
 
Constructor Summary
AnnotationImplException(int error)
          Create a new AnnotationImplException
 
Method Summary
 boolean addArgument(java.lang.String s)
          Add an argument to a AnnotationImplException object.
 java.lang.String[] getArguments()
          Get the arguments to the exception string.
 java.lang.String getBundleShortName()
          Get the short name of the message bundle, i.e., the name without the package prefix.
 int getError()
           
 java.lang.String getMessage()
           
 java.lang.String getMessageCode()
          Get the string identifier for this exception.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Throwable
fillInStackTrace, getCause, getLocalizedMessage, getStackTrace, initCause, printStackTrace, printStackTrace, printStackTrace, setStackTrace
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

CANT_ADD_TOP

public static final int CANT_ADD_TOP
Type system parsing error for file "{0}": couldn't add top type "{1}" at line {2}, column {3}. Non-empty hierarchy?

See Also:
Constant Field Values

PARSING_ERROR

public static final int PARSING_ERROR
Error parsing types system file "{0}": expected {1} but found "{2}" at line {3}, column {4}.

See Also:
Constant Field Values

UNKN_TYPE

public static final int UNKN_TYPE
Error parsing types system file "{0}": type "{1}" must be declared before it is used at line {2}, column {3}.

See Also:
Constant Field Values

COULDNT_ADD_FEAT

public static final int COULDNT_ADD_FEAT
Error parsing types system file "{0}": feature "{1}" could not be added at line {2}, column {3}. Name already in use?

See Also:
Constant Field Values

COULDNT_ADD_TYPE

public static final int COULDNT_ADD_TYPE
Error parsing types system file "{0}": type "{1}" could not be added at line {2}, column {3}. Name already in use?

See Also:
Constant Field Values

NULL_DOCSTREAM

public static final int NULL_DOCSTREAM
Error printing type system: set docStream first.

See Also:
Constant Field Values
Constructor Detail

AnnotationImplException

public AnnotationImplException(int error)
Create a new AnnotationImplException

Parameters:
error - The error code.
Method Detail

getError

public int getError()
Returns:
The error code for the exception. This may be useful when the error needs to be handed over language boundaries. Instead of handing over the complete exception object, return the error code, and the receiving application can look up the error in the message file. Unfortunately, the error parameters get lost that way.

getMessage

public java.lang.String getMessage()
Overrides:
getMessage in class java.lang.Throwable
Returns:
The message of the exception. Useful for including the text in another exception.

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Throwable
Returns:
The same as getMessage(), but prefixed with "AnnotationImplException: ".

addArgument

public boolean addArgument(java.lang.String s)
Add an argument to a AnnotationImplException object. Excess arguments will be ignored, and missing arguments will have the value null. Add arguments in the order in which they are specified in the message catalog (i.e. add %1 first, %2 next, and so on). Adding a null String has no effect! So if you don't know the value of an argument, use something like "" or "UNKNOWN", but not null.


getMessageCode

public java.lang.String getMessageCode()
Get the string identifier for this exception.

Returns:
The internal message key.

getArguments

public java.lang.String[] getArguments()
Get the arguments to the exception string.

Returns:
The arguments to the exception.

getBundleShortName

public java.lang.String getBundleShortName()
Get the short name of the message bundle, i.e., the name without the package prefix.

Returns:
The short name of the message bundle.


Copyright © 2011. All Rights Reserved.