eu.peppol.validation.commons.schematron.xslt
Class AbstractSchematronXSLTResource

java.lang.Object
  extended by eu.peppol.validation.commons.schematron.AbstractSchematronResource
      extended by eu.peppol.validation.commons.schematron.xslt.AbstractSchematronXSLTResource
All Implemented Interfaces:
com.phloc.commons.id.IHasID<String>, ISchematronResource
Direct Known Subclasses:
SchematronResourceSCH, SchematronResourceXSLT

public abstract class AbstractSchematronXSLTResource
extends AbstractSchematronResource

Abstract implementation of a Schematron resource that is based on XSLT transformations.

Author:
PEPPOL.AT, BRZ, Philip Helger

Constructor Summary
AbstractSchematronXSLTResource(com.phloc.commons.io.IReadableResource aSCHResource, ErrorListener aCustomErrorListener, URIResolver aCustomURIResolver, ISchematronXSLTProvider aXSLTProvider)
           
 
Method Summary
 Document applySchematronValidation(Source aXMLSource)
          Apply the schematron validation on the passed XML source and return an SVRL XML document.
 boolean isValidSchematron()
           
 String toString()
           
 
Methods inherited from class eu.peppol.validation.commons.schematron.AbstractSchematronResource
applySchematronValidation, getID, getResource
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Constructor Detail

AbstractSchematronXSLTResource

public AbstractSchematronXSLTResource(@Nonnull
                                      com.phloc.commons.io.IReadableResource aSCHResource,
                                      @Nullable
                                      ErrorListener aCustomErrorListener,
                                      @Nullable
                                      URIResolver aCustomURIResolver,
                                      @Nullable
                                      ISchematronXSLTProvider aXSLTProvider)
Method Detail

isValidSchematron

public final boolean isValidSchematron()
Returns:
true if this Schematron can be used to validate XML instances. If not, the Schematron is invalid and the log files must be investigated.

applySchematronValidation

@Nullable
public final Document applySchematronValidation(@Nonnull
                                                         Source aXMLSource)
                                         throws Exception
Description copied from interface: ISchematronResource
Apply the schematron validation on the passed XML source and return an SVRL XML document.

Parameters:
aXMLSource - The XML source to validate via Schematron. May not be null.
Returns:
The SVRL XML document containing the result. May be null when interpreting the Schematron failed.
Throws:
Exception - In case the transformation somehow goes wrong.
See Also:
on how to convert the document into a domain object

toString

public String toString()
Overrides:
toString in class AbstractSchematronResource


Copyright © 2011 PEPPOL project. All Rights Reserved.