IMPLTYPE - Implementation type@NotThreadSafe public abstract class AbstractSchematronXSLTBasedResource<IMPLTYPE extends AbstractSchematronXSLTBasedResource<IMPLTYPE>> extends AbstractSchematronResource implements com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>
| Modifier and Type | Field and Description |
|---|---|
protected ErrorListener |
m_aCustomErrorListener |
protected com.helger.commons.collection.ext.ICommonsOrderedMap<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() |
com.helger.commons.collection.ext.ICommonsOrderedMap<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) |
String |
toString() |
getID, getResourceprotected ErrorListener m_aCustomErrorListener
protected URIResolver m_aCustomURIResolver
protected com.helger.commons.collection.ext.ICommonsOrderedMap<String,?> m_aCustomParameters
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()
@Nonnull @ReturnsMutableCopy public com.helger.commons.collection.ext.ICommonsOrderedMap<String,?> getParameters()
@Nullable public abstract ISchematronXSLTBasedProvider getXSLTProvider()
null.@Nonnull public ISchematronXSLTValidator getXSLTValidator()
null.@Nonnull public IMPLTYPE setXSLTValidator(@Nonnull ISchematronXSLTValidator aXSLTValidator)
public final boolean isValidSchematron()
isValidSchematron in interface ISchematronResourcetrue 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
ISchematronResourcegetSchematronValidity in interface ISchematronResourceaXMLResource - 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
ISchematronResourcegetSchematronValidity in interface ISchematronResourceaXMLSource - 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
ISchematronResourceapplySchematronValidation in interface ISchematronResourceaXMLResource - 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
ISchematronResourceapplySchematronValidation in interface ISchematronResourceaXMLSource - The XML source to validate via Schematron. May not be
null.null when interpreting the Schematron failed.TransformerExceptionon how to convert the document
into a domain object@Nullable public SchematronOutputType applySchematronValidationToSVRL(@Nonnull com.helger.commons.io.IHasInputStream aXMLResource) throws Exception
ISchematronResourceSchematronOutputType object.applySchematronValidationToSVRL in interface ISchematronResourceaXMLResource - 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
ISchematronResourceSchematronOutputType object.applySchematronValidationToSVRL in interface ISchematronResourceaXMLSource - 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
Exceptionpublic String toString()
toString in class AbstractSchematronResourceCopyright © 2014–2016 Philip Helger. All rights reserved.