|
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--org.apache.avalon.framework.logger.AbstractLoggable | +--org.apache.cocoon.xml.AbstractXMLProducer | +--org.apache.cocoon.xml.AbstractXMLPipe | +--org.apache.cocoon.xml.dom.DOMBuilder
The DOMBuilder
is a utility class that will generate a W3C
DOM Document from SAX events.
Inner 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 static javax.xml.transform.sax.SAXTransformerFactory |
factory
The transformer factory shared by all instances |
protected DOMBuilder.Listener |
listener
The listener |
protected org.w3c.dom.Node |
parentNode
The parentNode |
protected javax.xml.transform.dom.DOMResult |
result
The result |
Fields inherited from class org.apache.cocoon.xml.AbstractXMLProducer |
contentHandler, lexicalHandler, xmlConsumer |
Constructor Summary | |
DOMBuilder()
Construct a new instance of this TreeGenerator. |
|
DOMBuilder(DOMBuilder.Listener listener)
Construct a new instance of this TreeGenerator. |
|
DOMBuilder(DOMBuilder.Listener listener,
org.w3c.dom.Node parentNode)
Construct a new instance of this TreeGenerator. |
|
DOMBuilder(DOMFactory factory)
Deprecated. Use DOMBuilder() instead. |
|
DOMBuilder(DOMFactory factory,
DOMBuilder.Listener listener)
Deprecated. Use DOMBuilder(listener) instead. |
|
DOMBuilder(DOMFactory domFactory,
DOMBuilder.Listener listener,
org.w3c.dom.Node parentNode)
Deprecated. Use DOMBuilder(listener, parentNode) instead. |
|
DOMBuilder(org.w3c.dom.Node parentNode)
Constructs a new instance that appends nodes to the given parent node. Note : you cannot use a Listener |
Method Summary | |
void |
endDocument()
Receive notification of the beginning of a document. |
org.w3c.dom.Document |
getDocument()
Return the newly built Document. |
protected void |
notifyListener()
Receive notification of a successfully completed DOM tree generation. |
void |
recycle()
Recycling |
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.AbstractLoggable |
getLogger, setLogger, 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 javax.xml.transform.sax.SAXTransformerFactory factory
protected DOMBuilder.Listener listener
protected javax.xml.transform.dom.DOMResult result
protected org.w3c.dom.Node parentNode
Constructor Detail |
public DOMBuilder()
public DOMBuilder(DOMFactory factory)
public DOMBuilder(DOMBuilder.Listener listener)
public DOMBuilder(DOMFactory factory, DOMBuilder.Listener listener)
public DOMBuilder(DOMFactory domFactory, DOMBuilder.Listener listener, org.w3c.dom.Node parentNode)
public DOMBuilder(DOMBuilder.Listener listener, org.w3c.dom.Node parentNode)
public DOMBuilder(org.w3c.dom.Node parentNode)
Listener when appending to a
Node
, because the notification occurs at endDocument()
which does not happen here.
Method Detail
recycle
public void recycle()
- Recycling
- Overrides:
recycle
in class AbstractXMLProducer
getDocument
public org.w3c.dom.Document getDocument()
- Return the newly built Document.
endDocument
public void endDocument()
throws org.xml.sax.SAXException
- Receive notification of the beginning of a document.
- Overrides:
endDocument
in class AbstractXMLPipe
- Throws:
org.xml.sax.SAXException
- If this method was not called appropriately.
notifyListener
protected void notifyListener()
throws org.xml.sax.SAXException
- Receive notification of a successfully completed DOM tree generation.
Overview
Package
Class
Tree
Deprecated
Help
PREV CLASS
NEXT CLASS
FRAMES
NO FRAMES
SUMMARY: INNER | FIELD | CONSTR | METHOD
DETAIL: FIELD | CONSTR | METHOD
Copyright � 1999-2002 Apache Software Foundation. All Rights Reserved.