|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.weborganic.schematron.ValidatorFactory
public final class ValidatorFactory
A ValidatorFactory instance can be used to create a Validator object.
Nested Class Summary | |
---|---|
static class |
ValidatorFactory.QueryBinding
|
Constructor Summary | |
---|---|
ValidatorFactory()
Constructs a new factory using the default preprocessor. |
|
ValidatorFactory(Source preprocessor)
Constructs a new factory object using the specified preprocessor. |
|
ValidatorFactory(ValidatorFactory.QueryBinding binding,
String formatter)
Constructs a new ValidatorFactory object using the specified preprocessor. |
Method Summary | |
---|---|
ErrorListener |
getErrorListener()
Get the error event handler for this factory. |
Object |
getParameter(String name)
Returns the parameters value for hte specified name. |
Validator |
newValidator(File schema)
Process the specified schema into a Validator object. |
Validator |
newValidator(Source schema)
Process the specified schema into a Validator object. |
void |
setDebugMode(boolean debugMode)
If debug mode is set to true, then preprocessing stylesheet will be outputted in file debug.xslt This has to be called before newValidator() to take effect. |
void |
setErrorListener(ErrorListener listener)
Set the error event listener for the ValidatorFactory, which is used for the processing of the Schematron schema, not for the Schematron validation itself. |
void |
setParameter(String name,
Object value)
Add a parameter to be sent to the preprocessor. |
void |
setResolver(Class<URIResolver> resolver)
Set the class name of the resolver to use, overriding built-in Apache resolver |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ValidatorFactory()
public ValidatorFactory(Source preprocessor)
preprocessor
- The preprocessor which generates the validating stylesheet.
NullPointerException
- If preprocessor is null
.public ValidatorFactory(ValidatorFactory.QueryBinding binding, String formatter)
Actually, this is not necessary.
Future versions may remove this so that only the SVRL is output.
preprocessor
- The preprocessor which generates the validating stylesheet.
IllegalArgumentException
- If preprocessor is null
.Method Detail |
---|
public void setErrorListener(ErrorListener listener)
listener
- The error listener.
IllegalArgumentException
- If listener is null
.public ErrorListener getErrorListener()
null
.public void setParameter(String name, Object value)
name
- The name of the parameter.value
- The value object.Transformer.setParameter(String, Object)
public Object getParameter(String name)
nameThe
- name of the parameter.
null
if the parameter was not specified.public void setDebugMode(boolean debugMode)
newValidator()
to take effect.
public void setResolver(Class<URIResolver> resolver)
public Validator newValidator(File schema) throws SchematronException
schema
- The Schematron schema to use.
TransformerExceptionShould
- an exception be while attempting to instantiate a validator.
SchematronException
public Validator newValidator(Source schema) throws SchematronException
schema
- The Schematron schema to use.
SchematronException
- Will wrap any exception occurring while attempting to instantiate a validator.
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |