javax.xml.bind

Interface ValidationEvent

public interface ValidationEvent

An instance of ValidationEvent indicates some error condition, which occurred when validating a JAXB object. The purpose of the ValidationEventHandler is to customize the reply on instances of ValidationEvent. The default event handler will throw an exception in case of events, but application specific validation event handlers need not do the same.

Since: JAXB1.0

Author: JSR-31

See Also: Validator ValidationEventHandler

Field Summary
static intERROR

This value indicates an "error", as specified by section 1.2 of the W3C XML 1.0 Recommendation.

static intFATAL_ERROR

This value indicates a "fatal error", as specified by section 1.2 of the W3C XML 1.0 Recommendation.

static intWARNING

In contrast to errors or fatal errors, this indicates an event which can possibly be ignored.

Method Summary
ThrowablegetLinkedException()

Returns a Throwable related to the event.

ValidationEventLocatorgetLocator()

Returns a description of the location, where the event occurred.

StringgetMessage()

Returns a textual description of the event.

intgetSeverity()

Returns the events severity: Either of WARNING, ERROR, or FATAL_ERROR.

Field Detail

ERROR

public static final int ERROR

This value indicates an "error", as specified by section 1.2 of the W3C XML 1.0 Recommendation. The constant value is 1.

See Also: WARNING FATAL_ERROR getSeverity

FATAL_ERROR

public static final int FATAL_ERROR

This value indicates a "fatal error", as specified by section 1.2 of the W3C XML 1.0 Recommendation. The constant value is 2.

See Also: WARNING ERROR getSeverity

WARNING

public static final int WARNING

In contrast to errors or fatal errors, this indicates an event which can possibly be ignored. This constant has the value 0. See section 1.2 of the W3C XML 1.0 Recommendation for details.

See Also: ERROR FATAL_ERROR getSeverity

Method Detail

getLinkedException

public Throwable getLinkedException()

Returns a Throwable related to the event. In most cases an exception causing the event.

getLocator

public ValidationEventLocator getLocator()

Returns a description of the location, where the event occurred.

getMessage

public String getMessage()

Returns a textual description of the event.

getSeverity

public int getSeverity()

Returns the events severity: Either of WARNING, ERROR, or FATAL_ERROR.

Returns: Returns the events severity.