Package net.ionite.docval.validation
Class ValidationResultItem
- java.lang.Object
-
- net.ionite.docval.validation.ValidationResultItem
-
public class ValidationResultItem extends Object
Holds the data for a single validation warning or error.- Author:
- Ionite
-
-
Field Summary
Fields Modifier and Type Field Description Integer
column
The column in the source document where the test failed.Integer
line
The line in the source document where the test failed.String
location
The location of the warning or error, e.g.String
message
The message of the warning or errorString
test
The failed test, can be an XPath expression or a general String, such as "XML Schema"
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description org.json.simple.JSONObject
toJSON()
Serialize this validation result item to a JSONObject
-
-
-
Field Detail
-
message
public String message
The message of the warning or error
-
location
public String location
The location of the warning or error, e.g. an XPath, can be null if now known or not relevant
-
line
public Integer line
The line in the source document where the test failed. Can be null if the line is not known
-
column
public Integer column
The column in the source document where the test failed. Can be null if the column is not known
-
test
public String test
The failed test, can be an XPath expression or a general String, such as "XML Schema"
-
-
Constructor Detail
-
ValidationResultItem
public ValidationResultItem(String message, String location, Integer line, Integer column, String test)
Constructor for the validation result item- Parameters:
message
- The message of the warning or errorlocation
- The location of the warning or error, e.g. an XPath, can be null if now known or not relevantline
- The line in the source document where the test failed. Can be null if the line is not knowncolumn
- The column in the source document where the test failed. Can be null if the column is not knowntest
- The failed test, can be an XPath expression or a general String, such as "XML Schema"
-
-