IMPLTYPE - Implementation type@NotThreadSafe public abstract class AbstractSchematronXSLTBasedResource<IMPLTYPE extends AbstractSchematronXSLTBasedResource<IMPLTYPE>> extends AbstractSchematronResource implements ISchematronXSLTBasedResource, com.helger.commons.traits.IGenericImplTrait<IMPLTYPE>
AbstractSchematronResource.NodeAndBaseURI| Modifier and Type | Field and Description |
|---|---|
protected ErrorListener |
m_aCustomErrorListener |
protected com.helger.commons.collection.impl.ICommonsOrderedMap<String,Object> |
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(Node aXMLNode,
String sBaseURI)
Apply the Schematron validation on the passed DOM node and return an SVRL
XML DOM Document.
|
SchematronOutputType |
applySchematronValidationToSVRL(Node aXMLSource,
String sBaseURI)
Apply the Schematron validation on the passed DOM Node and return a
SchematronOutputType object. |
ErrorListener |
getErrorListener() |
com.helger.commons.collection.impl.ICommonsOrderedMap<String,Object> |
getParameters()
Deprecated.
|
com.helger.commons.state.EValidity |
getSchematronValidity(Node aXMLNode,
String sBaseURI)
A method to check if the passed DOM node matches the Schematron rules or
not.
|
URIResolver |
getURIResolver() |
abstract ISchematronXSLTBasedProvider |
getXSLTProvider() |
ISchematronXSLTValidator |
getXSLTValidator() |
boolean |
hasParameters()
Deprecated.
|
boolean |
isValidSchematron() |
com.helger.commons.collection.impl.ICommonsOrderedMap<String,Object> |
parameters() |
IMPLTYPE |
setEntityResolver(EntityResolver aEntityResolver)
Set the XML entity resolver to be used when reading the XML to be
validated.
|
IMPLTYPE |
setErrorListener(ErrorListener aCustomErrorListener) |
IMPLTYPE |
setParameters(Map<String,?> aCustomParameters)
Deprecated.
|
IMPLTYPE |
setURIResolver(URIResolver aCustomURIResolver)
Set the
URIResolver to be used for reading Schematron. |
IMPLTYPE |
setXSLTValidator(ISchematronXSLTValidator aXSLTValidator)
Set the XSLT validator to be used.
|
String |
toString() |
applySchematronValidation, applySchematronValidation, applySchematronValidationToSVRL, applySchematronValidationToSVRL, getAsNode, getAsNode, getEntityResolver, getID, getResource, getSchematronValidity, getSchematronValidity, internalCreateDOMReaderSettings, internalSetEntityResolver, isUseCache, setUseCacheclone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitsetAllowForeignElementsapplySchematronValidation, applySchematronValidation, applySchematronValidationToSVRL, applySchematronValidationToSVRL, getEntityResolver, getResource, getSchematronValidity, getSchematronValidity, isUseCache, setUseCacheprotected ErrorListener m_aCustomErrorListener
protected URIResolver m_aCustomURIResolver
public AbstractSchematronXSLTBasedResource(@Nonnull com.helger.commons.io.resource.IReadableResource aSCHResource)
@Nullable public ErrorListener getErrorListener()
getErrorListener in interface ISchematronXSLTBasedResourcenull.@Nonnull public final IMPLTYPE setErrorListener(@Nullable ErrorListener aCustomErrorListener)
setErrorListener in interface ISchematronXSLTBasedResourceaCustomErrorListener - Error listener to use.@Nullable public URIResolver getURIResolver()
getURIResolver in interface ISchematronXSLTBasedResourceURIResolver to be used for reading the Schematron. May
be null.@Nonnull public final IMPLTYPE setURIResolver(@Nullable URIResolver aCustomURIResolver)
ISchematronXSLTBasedResourceURIResolver to be used for reading Schematron.setURIResolver in interface ISchematronXSLTBasedResourceaCustomURIResolver - The URIResolver to use. May be null,@Nonnull @ReturnsMutableObject public final com.helger.commons.collection.impl.ICommonsOrderedMap<String,Object> parameters()
parameters in interface ISchematronXSLTBasedResourcenull.@Deprecated public boolean hasParameters()
@Nonnull @ReturnsMutableCopy @Deprecated public com.helger.commons.collection.impl.ICommonsOrderedMap<String,Object> getParameters()
@Nonnull @Deprecated public IMPLTYPE setParameters(@Nullable Map<String,?> aCustomParameters)
@Nonnull public final IMPLTYPE setEntityResolver(@Nullable EntityResolver aEntityResolver)
setEntityResolver in interface ISchematronXSLTBasedResourceaEntityResolver - The entity resolver to set. May be null.@Nullable public abstract ISchematronXSLTBasedProvider getXSLTProvider()
null.@Nonnull public ISchematronXSLTValidator getXSLTValidator()
getXSLTValidator in interface ISchematronXSLTBasedResourcenull.@Nonnull public final IMPLTYPE setXSLTValidator(@Nonnull ISchematronXSLTValidator aXSLTValidator)
ISchematronXSLTBasedResourcesetXSLTValidator in interface ISchematronXSLTBasedResourceaXSLTValidator - Validator instance to use. May not be null.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 Node aXMLNode, @Nullable String sBaseURI) throws Exception
ISchematronResourcegetSchematronValidity in interface ISchematronResourceaXMLNode - The source DOM node to validate against the Schematron. May not be
null.sBaseURI - The Base URI of the XML document to be validated. May 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 final Document applySchematronValidation(@Nonnull Node aXMLNode, @Nullable String sBaseURI) throws TransformerException
ISchematronResourceapplySchematronValidation in interface ISchematronResourceaXMLNode - The DOM node to be validated via Schematron. May not be
null.sBaseURI - The Base URI of the XML document to be validated. May be
null.null if the passed resource does not exist or the non-
null SVRL document otherwise.TransformerExceptionon how to convert the
document into a domain object@Nullable public SchematronOutputType applySchematronValidationToSVRL(@Nonnull Node aXMLSource, @Nullable String sBaseURI) throws Exception
ISchematronResourceSchematronOutputType object.applySchematronValidationToSVRL in interface ISchematronResourceaXMLSource - The DOM node to be validated via Schematron. May not be
null.sBaseURI - The Base URI of the XML document to be validated. May be
null.null
when interpreting the Schematron failed.Exception - In case the transformation somehow goes wrong.public String toString()
toString in class AbstractSchematronResourceCopyright © 2014–2019 Philip Helger. All rights reserved.