IMPLTYPE
- Implementation type@NotThreadSafe public abstract class AbstractSchematronXSLTBasedResource<IMPLTYPE extends AbstractSchematronXSLTBasedResource<IMPLTYPE>> extends AbstractSchematronResource
Modifier and Type | Field and Description |
---|---|
protected ErrorListener |
m_aCustomErrorListener |
protected Map<String,?> |
m_aCustomParameters |
protected URIResolver |
m_aCustomURIResolver |
Constructor and Description |
---|
AbstractSchematronXSLTBasedResource(com.helger.commons.io.resource.IReadableResource aSCHResource) |
Modifier and Type | Method and Description |
---|---|
Document |
applySchematronValidation(com.helger.commons.io.IHasInputStream aXMLResource)
Apply the Schematron validation on the passed XML resource and return an
SVRL XML DOM Document.
|
Document |
applySchematronValidation(Node aXMLResource) |
Document |
applySchematronValidation(Source aXMLSource)
Apply the Schematron validation on the passed XML source and return an SVRL
XML DOM Document.
|
SchematronOutputType |
applySchematronValidationToSVRL(com.helger.commons.io.IHasInputStream aXMLResource)
Apply the Schematron validation on the passed XML resource and return a
SchematronOutputType object. |
SchematronOutputType |
applySchematronValidationToSVRL(Node aXMLSource) |
SchematronOutputType |
applySchematronValidationToSVRL(Source aXMLSource)
Apply the Schematron validation on the passed XML source and return a
SchematronOutputType object. |
ErrorListener |
getErrorListener() |
Map<String,?> |
getParameters() |
com.helger.commons.state.EValidity |
getSchematronValidity(com.helger.commons.io.IHasInputStream aXMLResource)
A method to check if the passed XML DOM node matches the Schematron rules
or not.
|
com.helger.commons.state.EValidity |
getSchematronValidity(Source aXMLSource)
A method to check if the passed XML DOM node matches the Schematron rules
or not.
|
URIResolver |
getURIResolver() |
abstract ISchematronXSLTBasedProvider |
getXSLTProvider() |
ISchematronXSLTValidator |
getXSLTValidator() |
boolean |
hasParameters() |
boolean |
isValidSchematron() |
IMPLTYPE |
setErrorListener(ErrorListener aCustomErrorListener) |
IMPLTYPE |
setParameters(Map<String,?> aCustomParameters) |
IMPLTYPE |
setURIResolver(URIResolver aCustomURIResolver) |
IMPLTYPE |
setXSLTValidator(ISchematronXSLTValidator aXSLTValidator) |
protected IMPLTYPE |
thisAsT() |
String |
toString() |
getID, getResource
protected ErrorListener m_aCustomErrorListener
protected URIResolver m_aCustomURIResolver
public AbstractSchematronXSLTBasedResource(@Nonnull com.helger.commons.io.resource.IReadableResource aSCHResource)
@Nullable public ErrorListener getErrorListener()
@Nonnull public IMPLTYPE setErrorListener(@Nullable ErrorListener aCustomErrorListener)
@Nullable public URIResolver getURIResolver()
@Nonnull public IMPLTYPE setURIResolver(@Nullable URIResolver aCustomURIResolver)
public boolean hasParameters()
@Nullable public abstract ISchematronXSLTBasedProvider getXSLTProvider()
null
.@Nonnull public ISchematronXSLTValidator getXSLTValidator()
null
.@Nonnull public IMPLTYPE setXSLTValidator(@Nonnull ISchematronXSLTValidator aXSLTValidator)
public final boolean isValidSchematron()
true
if this Schematron can be used to validate XML
instances. If not, the Schematron is invalid and the log files must
be investigated.@Nonnull public com.helger.commons.state.EValidity getSchematronValidity(@Nonnull com.helger.commons.io.IHasInputStream aXMLResource) throws Exception
ISchematronResource
aXMLResource
- The source XML to read and validate against the Schematron. May not
be null
.EValidity.VALID
if the document is valid,
EValidity.INVALID
if it is invalid.Exception
- in case of a sever error validating the schema@Nonnull public com.helger.commons.state.EValidity getSchematronValidity(@Nonnull Source aXMLSource) throws Exception
ISchematronResource
aXMLSource
- The source XML to be validated against the Schematron. May not be
null
.EValidity.VALID
if the document is valid,
EValidity.INVALID
if it is invalid.Exception
- in case of a sever error validating the schema@Nullable public Document applySchematronValidation(@Nonnull com.helger.commons.io.IHasInputStream aXMLResource) throws Exception
ISchematronResource
aXMLResource
- The XML resource to validate via Schematron. May not be
null
.null
if the passed resource does not exist or the non-
null
SVRL document otherwise.Exception
- In case the transformation somehow goes wrong.on how to convert the document
into a domain object
@Nullable public Document applySchematronValidation(@Nonnull Node aXMLResource) throws Exception
Exception
@Nullable public final Document applySchematronValidation(@Nonnull Source aXMLSource) throws TransformerException
ISchematronResource
aXMLSource
- The XML source to validate via Schematron. May not be
null
.null
when interpreting the Schematron failed.TransformerException
on how to convert the document
into a domain object
@Nullable public SchematronOutputType applySchematronValidationToSVRL(@Nonnull com.helger.commons.io.IHasInputStream aXMLResource) throws Exception
ISchematronResource
SchematronOutputType
object.aXMLResource
- The XML resource to validate via Schematron. May not be
null
.null
when interpreting the Schematron failed.Exception
- In case the transformation somehow goes wrong.@Nullable public SchematronOutputType applySchematronValidationToSVRL(@Nonnull Source aXMLSource) throws Exception
ISchematronResource
SchematronOutputType
object.aXMLSource
- The XML source to validate via Schematron. May not be
null
.null
when interpreting the Schematron failed.Exception
- In case the transformation somehow goes wrong.@Nullable public SchematronOutputType applySchematronValidationToSVRL(@Nonnull Node aXMLSource) throws Exception
Exception
public String toString()
toString
in class AbstractSchematronResource
Copyright © 2014–2015 Philip Helger. All rights reserved.