Class SvrlReport

java.lang.Object
ddf.services.schematron.SvrlReport
All Implemented Interfaces:
SchematronReport

public class SvrlReport extends Object implements SchematronReport
Schematron Validation Report Language (SVRL) formatted report of output from Schematron validation.
Author:
rodgersh
  • Constructor Details

    • SvrlReport

      public SvrlReport(DOMResult result)
      Parameters:
      result - DOM-formatted results from Schematron validation
    • SvrlReport

      public SvrlReport()
  • Method Details

    • isValid

      public boolean isValid(boolean suppressWarnings)
      Returns true if Schematron report is valid, false otherwise. The input document is considered to be valid if it has no failed assertions for errors and no failed reports for errors. If the suppressWarnings argument is true, then Schematron warnings are also included in the document's validity assessment.
      Specified by:
      isValid in interface SchematronReport
      Parameters:
      suppressWarnings - do not include Schematron warnings in determining validity
      Returns:
      true if no assert or report error messages found in SVRL report, false otherwise
    • getAllAssertMessages

      public NodeList getAllAssertMessages()
      Retrieve all assertion messages, warnings and errors, from the SVRL report.
      Specified by:
      getAllAssertMessages in interface SchematronReport
      Returns:
      list of XML Nodes for all assert nodes
    • getAllAssertMessages

      public List<Node> getAllAssertMessages(String type)
      Retrieve only the specified type of assertion messages (warnings or errors) from the SVRL report.
      Returns:
      list of XML Nodes for all assert nodes of specified type
    • getAllReportMessages

      public NodeList getAllReportMessages()
      Retrieve all report messages, warnings and errors, from the SVRL report.
      Specified by:
      getAllReportMessages in interface SchematronReport
      Returns:
      list of XML Nodes for all report nodes
    • getAllReportMessages

      public List<Node> getAllReportMessages(String type)
      Retrieve only the specified type of report messages (warnings or errors) from the SVRL report.
      Returns:
      list of XML Nodes for all report nodes
    • getErrors

      public List<String> getErrors()
      Get a list of all of the assertion and report error messages from the SVRL report.
      Specified by:
      getErrors in interface SchematronReport
      Returns:
      list of error strings
    • getWarnings

      public List<String> getWarnings()
      Get a list of all of the assertion and report warning messages from the SVRL report.
      Specified by:
      getWarnings in interface SchematronReport
      Returns:
      list of warning strings
    • getReportAsText

      public String getReportAsText() throws TransformerException
      Retrieve the entire SVRL report as an XML-formatted string.
      Specified by:
      getReportAsText in interface SchematronReport
      Returns:
      XML-formatted string representation of SVRL report
      Throws:
      TransformerException
    • isEmpty

      public boolean isEmpty()
      Description copied from interface: SchematronReport
      If the Schematron report is uninitialized
      Specified by:
      isEmpty in interface SchematronReport
      Returns:
      True is the report is uninitialized.