Package org.xmlunit.validation
Class ValidationProblem
- java.lang.Object
-
- org.xmlunit.validation.ValidationProblem
-
public class ValidationProblem extends java.lang.Object
A validation "problem" which may be an error or a warning.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
ValidationProblem.ProblemType
The type of validation problem encountered.
-
Constructor Summary
Constructors Constructor Description ValidationProblem(java.lang.String message, int line, int column, ValidationProblem.ProblemType type)
Creates a ValidationProblem for the given message and location of the given type.
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) static ValidationProblem
fromException(org.xml.sax.SAXParseException e, ValidationProblem.ProblemType type)
int
getColumn()
The column where the problem occured orUNKNOWN
.int
getLine()
The line where the problem occured orUNKNOWN
.java.lang.String
getMessage()
The problem's message.ValidationProblem.ProblemType
getType()
Whether this is an error or a warning.java.lang.String
toString()
-
-
-
Field Detail
-
UNKNOWN
public static final int UNKNOWN
Constant used for unknown location information.- See Also:
- Constant Field Values
-
line
private final int line
-
column
private final int column
-
type
private final ValidationProblem.ProblemType type
-
message
private final java.lang.String message
-
-
Constructor Detail
-
ValidationProblem
public ValidationProblem(java.lang.String message, int line, int column, ValidationProblem.ProblemType type)
Creates a ValidationProblem for the given message and location of the given type.
-
-
Method Detail
-
getLine
public int getLine()
The line where the problem occured orUNKNOWN
.
-
getColumn
public int getColumn()
The column where the problem occured orUNKNOWN
.
-
getType
public ValidationProblem.ProblemType getType()
Whether this is an error or a warning.
-
getMessage
public java.lang.String getMessage()
The problem's message.
-
toString
public java.lang.String toString()
- Overrides:
toString
in classjava.lang.Object
-
fromException
static ValidationProblem fromException(org.xml.sax.SAXParseException e, ValidationProblem.ProblemType type)
-
-