| java.lang.Object org.apache.cocoon.components.validation.impl.AbstractValidator org.apache.cocoon.components.validation.impl.DefaultValidator
All known Subclasses: org.apache.cocoon.components.validation.impl.CachingValidator,
DefaultValidator | public class DefaultValidator extends AbstractValidator implements ServiceSelector,ThreadSafe,Contextualizable,Initializable,Disposable,Configurable(Code) | | The default implementation of the
Validator interface provides
core management for a number of
SchemaParser instances.
Given the simplicity of this implementation, only
SchemaParser s
implementing the
ThreadSafe interface can be managed, and they can be
accessed directly (via its name) through the methods specified by the
ServiceSelector interface.
That said, normally selection would occur using the methods declared by the
AbstractValidator class and implemented here.
|
configure | public void configure(Configuration conf) throws ConfigurationException(Code) | | Configure this instance.
|
contextualize | public void contextualize(Context context) throws ContextException(Code) | | Contextualize this instance.
|
dispose | public void dispose()(Code) | | Dispose of this instance.
All sub-components initialized previously will be disposed of when this
method is called.
|
initialize | public void initialize() throws Exception(Code) | | Initialize this instance.
|
isSelectable | public boolean isSelectable(Object selectionKey)(Code) | | Check whether a subcomponent (
SchemaParser ) associated with the
specified selection key (its configured "name") is selectable in
this
ServiceSelector instance.
|
lookupParserByGrammar | protected SchemaParser lookupParserByGrammar(String grammar)(Code) | | Attempt to acquire a
SchemaParser interface able to understand
the grammar language specified.
Parameters: grammar - the grammar language that must be understood by the returnedSchemaParser a SchemaParser instance or null if none was found ableto understand the specified grammar language. |
release | public void release(Object component)(Code) | | Release a subcomponent (
SchemaParser ) instance previously selected
from this
ServiceSelector instance.
|
releaseParser | protected void releaseParser(SchemaParser parser)(Code) | | Release a previously acquired
SchemaParser instance back to its
original component manager.
This method is supplied in case solid implementations of this class relied
on the
ServiceManager to manage
SchemaParser s instances.
Parameters: parser - the SchemaParser whose instance is to be released. |
select | public Object select(Object selectionKey) throws ServiceException(Code) | | Select a subcomponent (
SchemaParser ) associated with the specified
selection key (its configured "name").
|
Methods inherited from org.apache.cocoon.components.validation.impl.AbstractValidator | protected String detectGrammar(Source source) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public void dispose()(Code)(Java Doc) public void enableLogging(Logger logger)(Code)(Java Doc) protected Schema getSchema(SchemaParser parser, Source source, String grammar) throws IOException, SAXException(Code)(Java Doc) public ValidationHandler getValidationHandler(String uri) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public ValidationHandler getValidationHandler(String uri, String grammar) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public ValidationHandler getValidationHandler(String uri, ErrorHandler errorHandler) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public ValidationHandler getValidationHandler(String uri, String grammar, ErrorHandler errorHandler) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public ValidationHandler getValidationHandler(Source source) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public ValidationHandler getValidationHandler(Source source, String grammar) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public ValidationHandler getValidationHandler(Source source, ErrorHandler errorHandler) throws IOException, SAXException, ValidatorException(Code)(Java Doc) public ValidationHandler getValidationHandler(Source source, String grammar, ErrorHandler errorHandler) throws IOException, SAXException, ValidatorException(Code)(Java Doc) abstract protected SchemaParser lookupParserByGrammar(String grammar)(Code)(Java Doc) abstract protected SchemaParser lookupParserByName(String name)(Code)(Java Doc) abstract protected void releaseParser(SchemaParser parser)(Code)(Java Doc) public void service(ServiceManager manager) throws ServiceException(Code)(Java Doc)
|
|
|