schematron
Class Result

java.lang.Object
  |
  +--schematron.Result

public class Result
extends java.lang.Object

An object representing the result of a Schematron based validation.

A schematron.Result object can only be retrieved by a call to validate on a Validator object.

Version:
0.1
Author:
Anna Hovhannisian, Oliver Becker

Field Summary
private  org.w3c.dom.Element root
          The root element of the constructed result DOM tree.
 
Constructor Summary
(package private) Result(javax.xml.transform.Result result)
          Constructs a new Result object - only accessible for classes inside of the schematron package.
 
Method Summary
 org.w3c.dom.NodeList getAllAssertMsgs()
          Get a node list of all assert messages.
 org.w3c.dom.NodeList getAllMsgForElement(java.lang.String name)
          Get a node list of all messages (asserts and reports) for a given input element name.
 org.w3c.dom.NodeList getAllReportMsgs()
          Get a node list of all report messages.
 java.lang.String getResultAsText()
          Returns the XML representation of the validation result.
 boolean isBlank()
          Check if the validation succeeded without assert or report messages.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

root

private org.w3c.dom.Element root
The root element of the constructed result DOM tree.
Constructor Detail

Result

Result(javax.xml.transform.Result result)
Constructs a new Result object - only accessible for classes inside of the schematron package. Only a Validator object should construct new Result objects.
Method Detail

getAllMsgForElement

public org.w3c.dom.NodeList getAllMsgForElement(java.lang.String name)
Get a node list of all messages (asserts and reports) for a given input element name.
Parameters:
name - name of the requested element
Returns:
node list containing the messages for this element

getAllReportMsgs

public org.w3c.dom.NodeList getAllReportMsgs()
Get a node list of all report messages.
Returns:
node list of all <REPORT> nodes

getAllAssertMsgs

public org.w3c.dom.NodeList getAllAssertMsgs()
Get a node list of all assert messages.
Returns:
List of all <ASSERT> nodes

isBlank

public boolean isBlank()
Check if the validation succeeded without assert or report messages.
Returns:
true, if the validation was successful, false otherwise.

getResultAsText

public java.lang.String getResultAsText()
                                 throws javax.xml.transform.TransformerException,
                                        javax.xml.transform.TransformerConfigurationException,
                                        javax.xml.parsers.ParserConfigurationException
Returns the XML representation of the validation result. This is for debugging purposes only.