Package org.xmlunit.validation
Class ValidationProblem
- java.lang.Object
-
- org.xmlunit.validation.ValidationProblem
-
public class ValidationProblem extends Object
A validation "problem" which may be an error or a warning.
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static classValidationProblem.ProblemTypeThe type of validation problem encountered.
-
Field Summary
Fields Modifier and Type Field Description static intUNKNOWNConstant used for unknown location information.
-
Constructor Summary
Constructors Constructor Description ValidationProblem(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 Instance Methods Concrete Methods Modifier and Type Method Description intgetColumn()The column where the problem occured orUNKNOWN.intgetLine()The line where the problem occured orUNKNOWN.StringgetMessage()The problem's message.ValidationProblem.ProblemTypegetType()Whether this is an error or a warning.StringtoString()
-
-
-
Field Detail
-
UNKNOWN
public static final int UNKNOWN
Constant used for unknown location information.- See Also:
- Constant Field Values
-
-
Constructor Detail
-
ValidationProblem
public ValidationProblem(String message, int line, int column, ValidationProblem.ProblemType type)
Creates a ValidationProblem for the given message and location of the given type.- Parameters:
message- the problem messageline- line where the problem occurscolumn- column where the problem occurstype- type of problem
-
-
Method Detail
-
getLine
public int getLine()
The line where the problem occured orUNKNOWN.- Returns:
- line where the problem occured
-
getColumn
public int getColumn()
The column where the problem occured orUNKNOWN.- Returns:
- column where the problem occured
-
getType
public ValidationProblem.ProblemType getType()
Whether this is an error or a warning.- Returns:
- type of problem
-
getMessage
public String getMessage()
The problem's message.- Returns:
- the problem's message
-
-