eu.peppol.validation.commons.schematron.svrl
Class SVRLWriter

java.lang.Object
  extended by eu.peppol.validation.commons.schematron.svrl.SVRLWriter

@Immutable
public final class SVRLWriter
extends Object

This is the XML writer for Schematron SVRL documents. It reads SchematronOutputType elements and converts them to W3C nodes. The writing itself is done with JAXB.

Author:
PEPPOL.AT, BRZ, Philip Helger

Method Summary
static Document createXML(SchematronOutputType aSchematronOutput)
          Convert the passed schematron output element into an W3C Document node.
static String createXMLString(SchematronOutputType aSchematronOutput)
          Utility method to directly convert the passed SVRL domain object to an XML string.
static com.phloc.commons.state.ESuccess writeSVRL(SchematronOutputType aSchematronOutput, Result aResult)
          Convert the passed schematron output element into an W3C Document node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

writeSVRL

@Nonnull
public static com.phloc.commons.state.ESuccess writeSVRL(@Nonnull
                                                                 SchematronOutputType aSchematronOutput,
                                                                 @Nonnull
                                                                 Result aResult)
Convert the passed schematron output element into an W3C Document node.

Parameters:
aSchematronOutput - The schematron output to be converted. May not be null.
Returns:
ESuccess

createXML

@Nullable
public static Document createXML(@Nonnull
                                          SchematronOutputType aSchematronOutput)
Convert the passed schematron output element into an W3C Document node.

Parameters:
aSchematronOutput - The schematron output to be converted. May not be null.
Returns:
null if conversion failed.

createXMLString

@Nullable
public static String createXMLString(@Nonnull
                                              SchematronOutputType aSchematronOutput)
Utility method to directly convert the passed SVRL domain object to an XML string.

Parameters:
aSchematronOutput - The SVRL domain object to be converted. May not be null.
Returns:
null if the passed domain object could not be converted because of validation errors.


Copyright © 2011 PEPPOL project. All Rights Reserved.