Home » xmlbeans-2.5.0-src » org.apache » xmlbeans » [javadoc | source]
org.apache.xmlbeans
public class: XmlError [javadoc | source]
java.lang.Object
   org.apache.xmlbeans.XmlError

All Implemented Interfaces:
    java$io$Serializable

Direct Known Subclasses:
    XmlValidationError

Represents a message at a specific XML location.

The message can be an error, warning, or simple information, and it may optionally be associated with a specific location in an XML document. The class includes methods for extracting the location as a line number, XmlCursor, or XmlObject, as well as for obtaining and message and severity of the error.

Field Summary
public static final  int SEVERITY_ERROR    An error. See #getSeverity
public static final  int SEVERITY_WARNING    A warning. See #getSeverity
public static final  int SEVERITY_INFO    An informational message. See #getSeverity
Constructor:
 public XmlError(XmlError src) 
    Copy constructor.
    Parameters:
    src - The original XmlError to copy.
 protected XmlError(String message,
    String code,
    int severity,
    XmlCursor cursor) 
    The static factory methods should be used instead of this constructor.
 protected XmlError(String code,
    Object[] args,
    int severity,
    XmlCursor cursor) 
 protected XmlError(String message,
    String code,
    int severity,
    Location loc) 
    The static factory methods should be used instead of this constructor.
 protected XmlError(String code,
    Object[] args,
    int severity,
    Location loc) 
Method from org.apache.xmlbeans.XmlError Summary:
forCursor,   forCursor,   forCursor,   forCursor,   forLocation,   forLocation,   forLocation,   forLocation,   forLocationAndCursor,   forMessage,   forMessage,   forMessage,   forMessage,   forObject,   forObject,   forObject,   forObject,   forSource,   forSource,   forSource,   formattedFileName,   formattedMessage,   getColumn,   getCursorLocation,   getErrorCode,   getLine,   getLocation,   getMessage,   getObjectLocation,   getOffset,   getSeverity,   getSourceName,   severityAsString,   toString,   toString
Methods from java.lang.Object:
clone,   equals,   finalize,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.apache.xmlbeans.XmlError Detail:
 public static XmlError forCursor(String message,
    XmlCursor cursor) 
    Returns an XmlError for the given message, located at the XmlCursor, with #SEVERITY_ERROR .
 public static XmlError forCursor(String code,
    Object[] args,
    XmlCursor cursor) 
    Returns an XmlError for the given message, located at the XmlCursor, with #SEVERITY_ERROR .
 public static XmlError forCursor(String message,
    int severity,
    XmlCursor cursor) 
    Returns an XmlError for the given message, with the given severity, located at the XmlCursor.
 public static XmlError forCursor(String code,
    Object[] args,
    int severity,
    XmlCursor cursor) 
    Returns an XmlError for the given message, with the given severity, located at the XmlCursor.
 public static XmlError forLocation(String message,
    String sourceName,
    Location location) 
    Returns an XmlError for the given message, located at a specific point in the given file and #SEVERITY_ERROR .
 public static XmlError forLocation(String message,
    String sourceName,
    int line,
    int column,
    int offset) 
    Returns an XmlError for the given message, located at a specific point in the given file and #SEVERITY_ERROR .
 public static XmlError forLocation(String message,
    int severity,
    String sourceName,
    int line,
    int column,
    int offset) 
    Returns an XmlError for the given message, with the given severity, located at a specific point in the given file.
 public static XmlError forLocation(String code,
    Object[] args,
    int severity,
    String sourceName,
    int line,
    int column,
    int offset) 
    Returns an XmlError for the given message, with the given severity, located at a specific point in the given file.
 public static XmlError forLocationAndCursor(String message,
    int severity,
    String sourceName,
    int line,
    int column,
    int offset,
    XmlCursor cursor) 
    Returns an XmlError for the given message, with the given severity, located at the given physcial location and XmlCursor.
 public static XmlError forMessage(String message) 
    Returns an XmlError for the given message, with no location and #SEVERITY_ERROR .
 public static XmlError forMessage(String message,
    int severity) 
    Returns an XmlError for the given message, with no location and the given severity.
 public static XmlError forMessage(String code,
    Object[] args) 
    Returns an XmlError for the given message, with no location and the given severity.
 public static XmlError forMessage(String code,
    Object[] args,
    int severity) 
    Returns an XmlError for the given message, with no location and the given severity.
 public static XmlError forObject(String message,
    XmlObject xobj) 
    Returns an XmlError for the given message, located at the XmlObject, with #SEVERITY_ERROR .
 public static XmlError forObject(String code,
    Object[] args,
    XmlObject xobj) 
    Returns an XmlError for the given message, located at the XmlObject, with #SEVERITY_ERROR .
 public static XmlError forObject(String message,
    int severity,
    XmlObject xobj) 
    Returns an XmlError for the given message, with the given severity, located at the XmlObject.
 public static XmlError forObject(String code,
    Object[] args,
    int severity,
    XmlObject xobj) 
    Returns an XmlError for the given message, with the given severity, located at the XmlObject.
 public static XmlError forSource(String message,
    String sourceName) 
    Returns an XmlError for the given message, located in the given file and #SEVERITY_ERROR .
 public static XmlError forSource(String message,
    int severity,
    String sourceName) 
    Returns an XmlError for the given message, with the given severity, located in the given file.
 public static XmlError forSource(String code,
    Object[] args,
    int severity,
    String sourceName) 
    Returns an XmlError for the given message, with the given severity, located in the given file.
 protected static String formattedFileName(String rawString,
    URI base) 
    Tries to produce a nicely formatted filename from the given string.
 public static String formattedMessage(String code,
    Object[] args) 
    Tries to format a message using the error code.
 public int getColumn() 
    Returns the column number of the error, if available, -1 if not.
 public XmlCursor getCursorLocation() 
    Returns a location of the error as an XmlCursor , null if not available.
 public String getErrorCode() 
 public int getLine() 
    Returns the line number of the error, if available, -1 if not.
 public Object getLocation(Object type) 
    Returns a location object of the given type. XmlCursor.class and XmlObject.class can be passed, for example. Null if not available.
 public String getMessage() 
    Returns the error message without location information.
 public XmlObject getObjectLocation() 
    Returns a location of the error as an XmlObject , null if not available.
 public int getOffset() 
    Returns the file character offset of the error, if available, -1 if not.
 public int getSeverity() 
 public String getSourceName() 
    Returns the URL (or other name) of the file with the error, if available.
 public static String severityAsString(int severity) 
 public String toString() 
    Produces a standard string for the error message, complete with filename and location offsets if available.
 public String toString(URI base) 
    Produces a standard string with the error message. If a non-null URI is supplied, source names are relativized against the given URI.