Package org.jibx.binding.model
Class ValidationProblem
- java.lang.Object
-
- org.jibx.binding.model.ValidationProblem
-
public class ValidationProblem extends java.lang.Object
Problem reported by model validation. Provides the details for a specific problem item.- Version:
- 1.0
- Author:
- Dennis M. Sosnoski
-
-
Field Summary
Fields Modifier and Type Field Description static int
ERROR_LEVEL
static int
FATAL_LEVEL
private java.lang.Object
m_component
Component that reported problem.private java.lang.String
m_message
Supplied problem description message.private int
m_severity
Problem severity level.static int
WARNING_LEVEL
-
Constructor Summary
Constructors Constructor Description 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
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description 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.
-
-
-
Field Detail
-
WARNING_LEVEL
public static final int WARNING_LEVEL
- See Also:
- Constant Field Values
-
ERROR_LEVEL
public static final int ERROR_LEVEL
- See Also:
- Constant Field Values
-
FATAL_LEVEL
public static final int FATAL_LEVEL
- See Also:
- Constant Field Values
-
m_severity
private final int m_severity
Problem severity level.
-
m_message
private final java.lang.String m_message
Supplied problem description message.
-
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 problemmsg
- problem descriptionobj
- source object for validation error (may benull
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 descriptionobj
- 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:
- 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
-
-