Package net.ionite.docval.validation
Class ValidationResultItem
java.lang.Object
net.ionite.docval.validation.ValidationResultItem
Holds the data for a single validation warning or error.
- Author:
- Ionite
-
Field Summary
Modifier and TypeFieldDescriptionThe column in the source document where the test failed.The line in the source document where the test failed.The location of the warning or error, e.g.The message of the warning or errorThe failed test, can be an XPath expression or a general String, such as "XML Schema" -
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionorg.json.simple.JSONObject
toJSON()
Serialize this validation result item to a JSONObject
-
Field Details
-
message
The message of the warning or error -
location
The location of the warning or error, e.g. an XPath, can be null if now known or not relevant -
line
The line in the source document where the test failed. Can be null if the line is not known -
column
The column in the source document where the test failed. Can be null if the column is not known -
test
The failed test, can be an XPath expression or a general String, such as "XML Schema"
-
-
Constructor Details
-
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"
-
-
Method Details
-
toJSON
public org.json.simple.JSONObject toJSON()Serialize this validation result item to a JSONObject- Returns:
- The JSONObject representing this validation result item
-