org.jibx.v2
Class ValidationProblem

java.lang.Object
  extended by org.jibx.v2.ValidationProblem

public class ValidationProblem
extends java.lang.Object

Problem reported by validation. Provides the details for a specific problem item.

Author:
Dennis M. Sosnoski

Field Summary
static int ERROR_LEVEL
           
static int FATAL_LEVEL
           
private  java.lang.Object m_component
          Component that reported problem.
private  java.lang.String m_description
          Description of problem found.
private  int m_severity
          Problem severity level.
static int UNIMPLEMENTED_LEVEL
           
static int WARNING_LEVEL
           
 
Constructor Summary
ValidationProblem(int level, java.lang.String msg, java.lang.Object obj)
          Full constructor.
ValidationProblem(java.lang.String msg, java.lang.Object obj)
          Constructor using default (error) severity level.
 
Method Summary
static java.lang.String componentDescription(java.lang.Object obj)
          Create description text for a component of a binding definition.
 java.lang.Object getComponent()
          Get the main binding definition item for the problem.
 java.lang.String getDescription()
          Get problem description.
 int getSeverity()
          Get problem severity level.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

FATAL_LEVEL

public static final int FATAL_LEVEL
See Also:
Constant Field Values

ERROR_LEVEL

public static final int ERROR_LEVEL
See Also:
Constant Field Values

WARNING_LEVEL

public static final int WARNING_LEVEL
See Also:
Constant Field Values

UNIMPLEMENTED_LEVEL

public static final int UNIMPLEMENTED_LEVEL
See Also:
Constant Field Values

m_severity

private final int m_severity
Problem severity level.


m_description

private final java.lang.String m_description
Description of problem found.


m_component

private final java.lang.Object m_component
Component that reported problem.

Constructor Detail

ValidationProblem

ValidationProblem(int level,
                  java.lang.String msg,
                  java.lang.Object obj)
Full constructor.

Parameters:
level - severity level of problem
msg - problem description
obj - source object for validation error (may be null if not specific to a particular component)

ValidationProblem

ValidationProblem(java.lang.String msg,
                  java.lang.Object obj)
Constructor using default (error) severity level.

Parameters:
msg - problem description
obj - source object for validation error
Method Detail

componentDescription

public static java.lang.String componentDescription(java.lang.Object obj)
Create description text for a component of a binding definition.

Parameters:
obj - binding definition component
Returns:
component description

getComponent

public java.lang.Object getComponent()
Get the main binding definition item for the problem.

Returns:
element or attribute at root of problem

getDescription

public java.lang.String getDescription()
Get problem description.

Returns:
problem description

getSeverity

public int getSeverity()
Get problem severity level.

Returns:
severity level for problem


Project Web Site