|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.apache.avalon.framework.logger.AbstractLogEnabled org.apache.cocoon.xml.AbstractXMLProducer org.apache.cocoon.xml.AbstractXMLPipe org.apache.cocoon.xml.dom.DOMBuilder
public class DOMBuilder
The DOMBuilder
is a utility class that will generate a W3C
DOM Document from SAX events.
Nested Class Summary | |
---|---|
static interface |
DOMBuilder.Listener
The Listener interface must be implemented by those objects willing to be notified of a successful DOM tree generation. |
Field Summary | |
---|---|
protected SAXTransformerFactory |
factory
The transformer factory |
protected static SAXTransformerFactory |
FACTORY
The default transformer factory shared by all instances |
protected DOMBuilder.Listener |
listener
The listener |
protected Node |
parentNode
The parentNode |
protected DOMResult |
result
The result |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
contentHandler, EMPTY_CONTENT_HANDLER, lexicalHandler, xmlConsumer |
Constructor Summary | |
---|---|
DOMBuilder()
Construct a new instance of this DOMBuilder. |
|
DOMBuilder(DOMBuilder.Listener listener)
Construct a new instance of this DOMBuilder. |
|
DOMBuilder(DOMBuilder.Listener listener,
Node parentNode)
Construct a new instance of this DOMBuilder. |
|
DOMBuilder(DOMFactory factory)
Deprecated. Use DOMBuilder() instead. |
|
DOMBuilder(DOMFactory factory,
DOMBuilder.Listener listener)
Deprecated. Use DOMBuilder(listener) instead. |
|
DOMBuilder(DOMFactory domFactory,
DOMBuilder.Listener listener,
Node parentNode)
Deprecated. Use DOMBuilder(listener, parentNode) instead. |
|
DOMBuilder(Node parentNode)
Constructs a new instance that appends nodes to the given parent node. |
|
DOMBuilder(SAXTransformerFactory factory)
Construct a new instance of this DOMBuilder. |
|
DOMBuilder(SAXTransformerFactory factory,
DOMBuilder.Listener listener,
Node parentNode)
Construct a new instance of this DOMBuilder. |
Method Summary | |
---|---|
void |
endDocument()
Receive notification of the end of a document. |
Document |
getDocument()
Return the newly built Document. |
protected void |
notifyListener()
Receive notification of a successfully completed DOM tree generation. |
void |
recycle()
Recycle this builder, prepare for re-use. |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLPipe |
---|
characters, comment, endCDATA, endDTD, endElement, endEntity, endPrefixMapping, ignorableWhitespace, processingInstruction, setDocumentLocator, skippedEntity, startCDATA, startDocument, startDTD, startElement, startEntity, startPrefixMapping |
Methods inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
---|
setConsumer, 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.apache.cocoon.xml.XMLProducer |
---|
setConsumer |
Field Detail |
---|
protected static final SAXTransformerFactory FACTORY
protected SAXTransformerFactory factory
protected DOMBuilder.Listener listener
protected DOMResult result
protected Node parentNode
Constructor Detail |
---|
public DOMBuilder()
public DOMBuilder(SAXTransformerFactory factory)
public DOMBuilder(DOMFactory factory)
public DOMBuilder(DOMBuilder.Listener listener)
public DOMBuilder(DOMFactory factory, DOMBuilder.Listener listener)
public DOMBuilder(DOMFactory domFactory, DOMBuilder.Listener listener, Node parentNode)
public DOMBuilder(Node parentNode)
Listener when appending to a
Node
, because the notification occurs at endDocument()
which does not happen here.
public DOMBuilder(DOMBuilder.Listener listener, Node parentNode)
public DOMBuilder(SAXTransformerFactory factory, DOMBuilder.Listener listener, Node parentNode)
Method Detail |
---|
public void recycle()
recycle
in interface Recyclable
recycle
in class AbstractXMLProducer
public Document getDocument()
public void endDocument() throws SAXException
endDocument
in interface ContentHandler
endDocument
in class AbstractXMLPipe
SAXException
- If this method was not called appropriately.protected void notifyListener() throws SAXException
SAXException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |