|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.avalon.framework.logger.AbstractLogEnabled
org.apache.cocoon.xml.AbstractXMLProducer
org.apache.cocoon.xml.AbstractXMLPipe
org.apache.cocoon.transformation.AbstractTransformer
org.apache.cocoon.transformation.ValidatingTransformer
public class ValidatingTransformer
The ValidatingTransformer
provides a very simple Transformer
validating documents while being processed in a Cocoon pipeline.
The only defined (but not required) configuration for this component is
<grammar>...string...</grammar>
indicating the default grammar language of the schemas to use.
This configuration parameter can be overridden by specifying the
grammar
parameter when using this Transformer
in a
pipeline.
If no grammar is specified (either as a configuration, or a parameter) this
transformer will instruct the Validator
to try and guess the grammar
of the schema being parsed.
Field Summary |
---|
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Fields inherited from interface org.apache.cocoon.transformation.Transformer |
---|
ROLE |
Constructor Summary | |
---|---|
ValidatingTransformer()
Create a new ValidatingTransformer instance. |
Method Summary | |
---|---|
void |
configure(Configuration configuration)
Configure this component instance. |
void |
dispose()
Dispose of this component instance releasing all previously acquired required instances back to the ServiceManager . |
Serializable |
getKey()
Return the unique key to associated with the schema being processed in the scope of the request being processed for caching. |
SourceValidity |
getValidity()
Return the SourceValidity associated with the schema currently
being processed in the scope of the request being processed. |
void |
recycle()
Recycle this component instance at the end of request processing. |
void |
service(ServiceManager manager)
Contextualize this component instance specifying its associated ServiceManager instance. |
void |
setConsumer(XMLConsumer consumer)
Specify the XMLConsumer receiving SAX events emitted by this
Transformer instance in the scope of a request. |
void |
setup(SourceResolver resolver,
Map objectModel,
String source,
Parameters parameters)
Contextualize this component in the scope of a pipeline when a request is processed. |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
---|
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
setContentHandler, setLexicalHandler |
Methods inherited from class org.apache.avalon.framework.logger.AbstractLogEnabled |
---|
enableLogging, getLogger, setupLogger, setupLogger, setupLogger |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.xml.sax.ContentHandler |
---|
characters, endDocument, endElement, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startDocument, startElement, startPrefixMapping |
Methods inherited from interface org.xml.sax.ext.LexicalHandler |
---|
comment, endCDATA, endDTD, endEntity, startCDATA, startDTD, startEntity |
Constructor Detail |
---|
public ValidatingTransformer()
Create a new ValidatingTransformer
instance.
Method Detail |
---|
public void service(ServiceManager manager) throws ServiceException
Contextualize this component instance specifying its associated
ServiceManager
instance.
service
in interface Serviceable
manager
- the ServiceManager
to associate with this component.
ServiceException
- if a dependancy of this could not be resolved.public void configure(Configuration configuration) throws ConfigurationException
Configure this component instance.
The only defined (but not required) configuration for this component is
<grammar>...string...</grammar>
indicating the default grammar used by this transformer used for parsing
schemas.
configure
in interface Configurable
configuration
- a Configuration
instance for this component.
ConfigurationException
- never thrown.public void dispose()
Dispose of this component instance releasing all previously acquired
required instances back to the ServiceManager
.
dispose
in interface Disposable
public void setup(SourceResolver resolver, Map objectModel, String source, Parameters parameters) throws ProcessingException, SAXException, IOException
Contextualize this component in the scope of a pipeline when a request is processed.
setup
in interface SitemapModelComponent
resolver
- the SourceResolver
contextualized in this request.objectModel
- unused.source
- the source URI of the schema to validate against.parameters
- unused.
ProcessingException
SAXException
IOException
public void setConsumer(XMLConsumer consumer)
Specify the XMLConsumer
receiving SAX events emitted by this
Transformer
instance in the scope of a request.
setConsumer
in interface XMLProducer
setConsumer
in class AbstractXMLProducer
consumer
- the XMLConsumer
to send SAX events to.public Serializable getKey()
Return the unique key to associated with the schema being processed in the scope of the request being processed for caching.
getKey
in interface CacheableProcessingComponent
String
representing the unique key for the schema.public SourceValidity getValidity()
Return the SourceValidity
associated with the schema currently
being processed in the scope of the request being processed.
getValidity
in interface CacheableProcessingComponent
SourceValidity
instance.public void recycle()
Recycle this component instance at the end of request processing.
recycle
in interface Recyclable
recycle
in class AbstractXMLProducer
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |