|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.cocoon.xml.dom.DOMBuilder | +--org.apache.cocoon.transformation.AbstractDOMTransformer
An Abstract DOM Transformer, for use when a transformer needs a DOM-based
view of the document.
Subclass this interface and implement transform(Document doc)
.
If you need a ComponentManager there is an instance variable
manager
for use.
Inner classes inherited from class org.apache.cocoon.xml.dom.DOMBuilder |
DOMBuilder.Listener |
Field Summary | |
protected org.xml.sax.ContentHandler |
contentHandler
The ContentHandler receiving SAX events. |
protected org.xml.sax.ext.LexicalHandler |
lexicalHandler
The LexicalHandler receiving SAX events. |
protected org.apache.avalon.framework.component.ComponentManager |
manager
A ComponentManager which is available for use. |
protected java.util.Map |
objectModel
The request object model |
protected org.apache.avalon.framework.parameters.Parameters |
parameters
Parameters in the sitemap |
protected SourceResolver |
resolver
The SAX entity resolver |
protected java.lang.String |
source
The URI requested |
Fields inherited from class org.apache.cocoon.xml.dom.DOMBuilder |
factory, listener, log |
Fields inherited from interface org.apache.cocoon.transformation.Transformer |
ROLE |
Constructor Summary | |
AbstractDOMTransformer()
|
Method Summary | |
void |
compose(org.apache.avalon.framework.component.ComponentManager manager)
Set the component manager. |
void |
dispose()
dispose |
void |
notify(org.w3c.dom.Document doc)
This method is called when the Document is finished. |
void |
recycle()
Recycle the component. |
void |
setConsumer(XMLConsumer consumer)
Set the XMLConsumer that will receive XML data.
|
void |
setContentHandler(org.xml.sax.ContentHandler handler)
Set the ContentHandler that will receive XML data.
|
void |
setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
Set the LexicalHandler that will receive XML data.
|
void |
setup(SourceResolver resolver,
java.util.Map objectModel,
java.lang.String src,
org.apache.avalon.framework.parameters.Parameters par)
Set the SourceResolver , objectModel Map ,
the source and sitemap Parameters used to process the request.
|
protected abstract org.w3c.dom.Document |
transform(org.w3c.dom.Document doc)
Transform the specified DOM, returning a new DOM to stream down the pipeline. |
Methods inherited from class org.apache.cocoon.xml.dom.DOMBuilder |
characters, comment, endCDATA, endDocument, endDTD, endElement, endEntity, endPrefixMapping, getDocument, ignorableWhitespace, processingInstruction, setDocumentLocator, setLogger, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
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 |
Field Detail |
protected SourceResolver resolver
protected java.util.Map objectModel
protected java.lang.String source
protected org.apache.avalon.framework.parameters.Parameters parameters
protected org.apache.avalon.framework.component.ComponentManager manager
ComponentManager
which is available for use.protected org.xml.sax.ContentHandler contentHandler
ContentHandler
receiving SAX events.protected org.xml.sax.ext.LexicalHandler lexicalHandler
LexicalHandler
receiving SAX events.Constructor Detail |
public AbstractDOMTransformer()
Method Detail |
public void compose(org.apache.avalon.framework.component.ComponentManager manager)
compose
in interface org.apache.avalon.framework.component.Composable
public void recycle()
recycle
in interface org.apache.avalon.excalibur.pool.Recyclable
public void setup(SourceResolver resolver, java.util.Map objectModel, java.lang.String src, org.apache.avalon.framework.parameters.Parameters par) throws ProcessingException, org.xml.sax.SAXException, java.io.IOException
SourceResolver
, objectModel Map
,
the source and sitemap Parameters
used to process the request.
If you wish to process the parameters, override this method, call
super()
and then add your code.setup
in interface SitemapModelComponent
public void notify(org.w3c.dom.Document doc) throws org.xml.sax.SAXException
notify
in interface DOMBuilder.Listener
notify
in class DOMBuilder
doc
- The DOM Document object representing this SAX streamDOMBuilder.Listener
protected abstract org.w3c.dom.Document transform(org.w3c.dom.Document doc)
doc
- The DOM Document representing the SAX streampublic void setConsumer(XMLConsumer consumer)
XMLConsumer
that will receive XML data.
setContentHandler(consumer)
and setLexicalHandler(consumer)
.setConsumer
in interface XMLProducer
public void setContentHandler(org.xml.sax.ContentHandler handler)
ContentHandler
that will receive XML data.
ContentHandler
instance
accessing the protected super.contentHandler
field.public void setLexicalHandler(org.xml.sax.ext.LexicalHandler handler)
LexicalHandler
that will receive XML data.
LexicalHandler
instance
accessing the protected super.lexicalHandler
field.java.lang.IllegalStateException
- If the LexicalHandler
or
the XMLConsumer
were
already set.public void dispose()
dispose
in interface org.apache.avalon.framework.activity.Disposable
|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |