Class ValidationResultItem


  • public class ValidationResultItem
    extends Object
    Holds the data for a single validation warning or error.
    Author:
    Ionite
    • 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 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"
    • Method Detail

      • toJSON

        public org.json.simple.JSONObject toJSON()
        Serialize this validation result item to a JSONObject
        Returns:
        The JSONObject representing this validation result item