Package ddf.services.schematron
Class SvrlReport
java.lang.Object
ddf.services.schematron.SvrlReport
- All Implemented Interfaces:
SchematronReport
Schematron Validation Report Language (SVRL) formatted report of output from Schematron
validation.
- Author:
- rodgersh
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionRetrieve all assertion messages, warnings and errors, from the SVRL report.getAllAssertMessages(String type) Retrieve only the specified type of assertion messages (warnings or errors) from the SVRL report.Retrieve all report messages, warnings and errors, from the SVRL report.getAllReportMessages(String type) Retrieve only the specified type of report messages (warnings or errors) from the SVRL report.Get a list of all of the assertion and report error messages from the SVRL report.Retrieve the entire SVRL report as an XML-formatted string.Get a list of all of the assertion and report warning messages from the SVRL report.booleanisEmpty()If the Schematron report is uninitializedbooleanisValid(boolean suppressWarnings) Returns true if Schematron report is valid, false otherwise.
-
Constructor Details
-
SvrlReport
- 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:
isValidin interfaceSchematronReport- 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
Retrieve all assertion messages, warnings and errors, from the SVRL report.- Specified by:
getAllAssertMessagesin interfaceSchematronReport- Returns:
- list of XML Nodes for all assert nodes
-
getAllAssertMessages
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
Retrieve all report messages, warnings and errors, from the SVRL report.- Specified by:
getAllReportMessagesin interfaceSchematronReport- Returns:
- list of XML Nodes for all report nodes
-
getAllReportMessages
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
Get a list of all of the assertion and report error messages from the SVRL report.- Specified by:
getErrorsin interfaceSchematronReport- Returns:
- list of error strings
-
getWarnings
Get a list of all of the assertion and report warning messages from the SVRL report.- Specified by:
getWarningsin interfaceSchematronReport- Returns:
- list of warning strings
-
getReportAsText
Retrieve the entire SVRL report as an XML-formatted string.- Specified by:
getReportAsTextin interfaceSchematronReport- Returns:
- XML-formatted string representation of SVRL report
- Throws:
TransformerException
-
isEmpty
public boolean isEmpty()Description copied from interface:SchematronReportIf the Schematron report is uninitialized- Specified by:
isEmptyin interfaceSchematronReport- Returns:
- True is the report is uninitialized.
-