org.weborganic.schematron
Class SchematronResult

java.lang.Object
  extended by org.weborganic.schematron.SchematronResult

public final class SchematronResult
extends Object

Stores the results of the schematron validation.


Constructor Summary
SchematronResult(String systemID)
          Constructor of SchematronResult that accept the source file name (or systemID)
 
Method Summary
 String getFailedMessage()
          Return the failed assertion message only.
 String getSVRLAsString()
           
 String getSystemID()
           
 boolean isValid()
           
 void printAllMessage(PrintStream out)
          Print both failed assertion and successful report message to the console.
 void printFailedMessage(PrintStream out)
          Print the failed assertion messages only on the specified stream.
 void setSVRL(String svrl)
          Setter for SVRL content/file, also parse the SVRL content to extract the failed assertion and the successful report.
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchematronResult

public SchematronResult(String systemID)
Constructor of SchematronResult that accept the source file name (or systemID)

Parameters:
systemID - The system ID of the XML for which this result instance is built.
Method Detail

getSystemID

public String getSystemID()
Returns:
this object's systemID.

isValid

public boolean isValid()
Returns:
true if there's no failed assertion; false if there is failed assertion

setSVRL

public void setSVRL(String svrl)
             throws SchematronException
Setter for SVRL content/file, also parse the SVRL content to extract the failed assertion and the successful report.

Parameters:
svrl - The corresponding generated by SVRL.
Throws:
SchematronException - Should an error occur whilst parsing.

getSVRLAsString

public String getSVRLAsString()
Returns:
SVRL content as String representation.

printFailedMessage

public void printFailedMessage(PrintStream out)
Print the failed assertion messages only on the specified stream.

This method is used only when "failOnError" is set to true.

Parameters:
out - SchematronTask object for message logging

getFailedMessage

public String getFailedMessage()
Return the failed assertion message only.

This method is used for Pageseeder Schematron Validation error output.

Returns:
a concatenation of all failed messages.

printAllMessage

public void printAllMessage(PrintStream out)
Print both failed assertion and successful report message to the console.

Parameters:
task - SchematronTask object for message logging