@Immutable public class SchematronResourcePure extends AbstractSchematronResource
| Constructor and Description |
|---|
SchematronResourcePure(com.phloc.commons.io.IReadableResource aResource) |
SchematronResourcePure(com.phloc.commons.io.IReadableResource aResource,
PSBoundSchemaCacheKey aCacheKey) |
SchematronResourcePure(com.phloc.commons.io.IReadableResource aResource,
String sPhase,
IPSErrorHandler aErrorHandler) |
| Modifier and Type | Method and Description |
|---|---|
Document |
applySchematronValidation(com.phloc.commons.io.IReadableResource aXMLResource)
Apply the Schematron validation on the passed XML resource and return an
SVRL XML DOM Document.
|
SchematronOutputType |
applySchematronValidation(Node aNode)
The main method to convert a node to an SVRL document.
|
Document |
applySchematronValidation(Source aXMLSource)
Apply the Schematron validation on the passed XML source and return an SVRL
XML DOM Document.
|
SchematronOutputType |
applySchematronValidationToSVRL(com.phloc.commons.io.IReadableResource aXMLResource)
Apply the Schematron validation on the passed XML resource and return a
SchematronOutputType object. |
SchematronOutputType |
applySchematronValidationToSVRL(Source aXMLSource)
Apply the Schematron validation on the passed XML source and return a
SchematronOutputType object. |
static SchematronResourcePure |
fromClassPath(String sSCHPath)
Create a new
SchematronResourcePure from a Classpath Schematron
rules |
static SchematronResourcePure |
fromFile(File aSCHFile)
Create a new
SchematronResourcePure from file system Schematron
rules |
static SchematronResourcePure |
fromFile(String sSCHPath)
Create a new
SchematronResourcePure from file system Schematron
rules |
protected IPSBoundSchema |
getBoundSchema() |
com.phloc.commons.state.EValidity |
getSchematronValidity(com.phloc.commons.io.IReadableResource aXMLResource)
A method to check if the passed XML DOM node matches the Schematron rules
or not.
|
com.phloc.commons.state.EValidity |
getSchematronValidity(Source aXMLSource)
A method to check if the passed XML DOM node matches the Schematron rules
or not.
|
boolean |
isValidSchematron() |
getID, getResource, toStringpublic SchematronResourcePure(@Nonnull com.phloc.commons.io.IReadableResource aResource)
public SchematronResourcePure(@Nonnull com.phloc.commons.io.IReadableResource aResource, @Nullable String sPhase, @Nullable IPSErrorHandler aErrorHandler)
public SchematronResourcePure(@Nonnull com.phloc.commons.io.IReadableResource aResource, @Nonnull PSBoundSchemaCacheKey aCacheKey)
@Nonnull protected IPSBoundSchema getBoundSchema()
public 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 SchematronOutputType applySchematronValidation(@Nonnull Node aNode) throws SchematronException
aNode - The source node to be validated. May not be null.null.SchematronException - in case of a sever error validating the schema@Nonnull public com.phloc.commons.state.EValidity getSchematronValidity(@Nonnull com.phloc.commons.io.IReadableResource aXMLResource) throws Exception
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.phloc.commons.state.EValidity getSchematronValidity(@Nonnull Source aXMLSource) throws Exception
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.phloc.commons.io.IReadableResource aXMLResource) throws Exception
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 Source aXMLSource) throws Exception
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.on how to convert the document
into a domain object@Nullable public SchematronOutputType applySchematronValidationToSVRL(@Nonnull com.phloc.commons.io.IReadableResource aXMLResource) throws Exception
ISchematronResourceSchematronOutputType 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
ISchematronResourceSchematronOutputType 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.@Nonnull public static SchematronResourcePure fromClassPath(@Nonnull@Nonempty String sSCHPath)
SchematronResourcePure from a Classpath Schematron
rulessSCHPath - The classpath relative path to the Schematron rules.null.@Nonnull public static SchematronResourcePure fromFile(@Nonnull@Nonempty String sSCHPath)
SchematronResourcePure from file system Schematron
rulessSCHPath - The file system path to the Schematron rules.null.@Nonnull public static SchematronResourcePure fromFile(@Nonnull File aSCHFile)
SchematronResourcePure from file system Schematron
rulesaSCHFile - The file system path to the Schematron rules.null.Copyright © 2006–2014 phloc systems. All rights reserved.