uk.co.lakesidetech.spxforms.validation.schematron
Class SchematronValidator
java.lang.Object
uk.co.lakesidetech.spxforms.validation.schematron.SchematronValidator
- All Implemented Interfaces:
- org.springframework.validation.Validator
- public class SchematronValidator
- extends java.lang.Object
- implements org.springframework.validation.Validator
BBB element is missing.
BBB element is present.
AAA misses attribute name.
AAA contains attribute name.
BBB element is present.
AAA contains attribute name.
BBB element is missing.
AAA misses attribute name.
- Author:
- Stuart Eccles
Method Summary |
java.io.File |
getSchematronFileToUse()
|
protected void |
runSchematronPattern(org.apache.commons.jxpath.JXPathContext patternCtxt,
org.apache.commons.jxpath.JXPathContext objCtxt,
org.springframework.validation.Errors errors)
|
protected void |
runSchematronRule(org.apache.commons.jxpath.JXPathContext ruleCtxt,
org.apache.commons.jxpath.JXPathContext objCtxt,
org.springframework.validation.Errors errors)
|
void |
setSchematronFile(java.io.File schematronFile)
|
void |
setSchematronResource(org.springframework.core.io.Resource schematronResource)
|
boolean |
supports(java.lang.Class clazz)
|
void |
validate(java.lang.Object object,
org.springframework.validation.Errors errors)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
SchematronValidator
public SchematronValidator()
setSchematronResource
public void setSchematronResource(org.springframework.core.io.Resource schematronResource)
- Parameters:
schematronResource
- The schematronResource to set.
setSchematronFile
public void setSchematronFile(java.io.File schematronFile)
- Parameters:
schematronFile
- The schematronFile to set.
getSchematronFileToUse
public java.io.File getSchematronFileToUse()
throws java.io.IOException
- Throws:
java.io.IOException
supports
public boolean supports(java.lang.Class clazz)
- Specified by:
supports
in interface org.springframework.validation.Validator
validate
public void validate(java.lang.Object object,
org.springframework.validation.Errors errors)
- Specified by:
validate
in interface org.springframework.validation.Validator
runSchematronPattern
protected void runSchematronPattern(org.apache.commons.jxpath.JXPathContext patternCtxt,
org.apache.commons.jxpath.JXPathContext objCtxt,
org.springframework.validation.Errors errors)
runSchematronRule
protected void runSchematronRule(org.apache.commons.jxpath.JXPathContext ruleCtxt,
org.apache.commons.jxpath.JXPathContext objCtxt,
org.springframework.validation.Errors errors)