org.dom4j.tree

Class AbstractDocument

public abstract class AbstractDocument extends AbstractBranch implements Document

AbstractDocument is an abstract base class for tree implementors to use for implementation inheritence.

Version: $Revision: 1.33 $

Author: James Strachan

Field Summary
protected Stringencoding
The encoding of this document as stated in the XML declaration
Constructor Summary
AbstractDocument()
Method Summary
voidaccept(Visitor visitor)

accept method is the Visitor Pattern method.

voidadd(Element element)
DocumentaddComment(String comment)
ElementaddElement(String name)
ElementaddElement(String qualifiedName, String namespaceURI)
ElementaddElement(QName qName)
DocumentaddProcessingInstruction(String target, String data)
DocumentaddProcessingInstruction(String target, Map data)
StringasXML()
NodeasXPathResult(Element parent)
protected voidcheckAddElementAllowed(Element element)
protected voidchildAdded(Node node)
protected voidchildRemoved(Node node)
DocumentgetDocument()
shortgetNodeType()
StringgetPath(Element context)
StringgetStringValue()
StringgetUniquePath(Element context)
StringgetXMLEncoding()
voidnormalize()
booleanremove(Element element)
protected abstract voidrootElementAdded(Element rootElement)
Called to set the root element variable
voidsetRootElement(Element rootElement)
voidsetXMLEncoding(String enc)
StringtoString()
voidwrite(Writer out)

Field Detail

encoding

protected String encoding
The encoding of this document as stated in the XML declaration

Constructor Detail

AbstractDocument

public AbstractDocument()

Method Detail

accept

public void accept(Visitor visitor)

accept method is the Visitor Pattern method.

Parameters: visitor Visitor is the visitor.

add

public void add(Element element)

addComment

public Document addComment(String comment)

addElement

public Element addElement(String name)

addElement

public Element addElement(String qualifiedName, String namespaceURI)

addElement

public Element addElement(QName qName)

addProcessingInstruction

public Document addProcessingInstruction(String target, String data)

addProcessingInstruction

public Document addProcessingInstruction(String target, Map data)

asXML

public String asXML()

asXPathResult

public Node asXPathResult(Element parent)

checkAddElementAllowed

protected void checkAddElementAllowed(Element element)

childAdded

protected void childAdded(Node node)

childRemoved

protected void childRemoved(Node node)

getDocument

public Document getDocument()

getNodeType

public short getNodeType()

getPath

public String getPath(Element context)

getStringValue

public String getStringValue()

getUniquePath

public String getUniquePath(Element context)

getXMLEncoding

public String getXMLEncoding()

normalize

public void normalize()

remove

public boolean remove(Element element)

rootElementAdded

protected abstract void rootElementAdded(Element rootElement)
Called to set the root element variable

Parameters: rootElement DOCUMENT ME!

setRootElement

public void setRootElement(Element rootElement)

setXMLEncoding

public void setXMLEncoding(String enc)

toString

public String toString()

write

public void write(Writer out)
Copyright B) 2005 MetaStuff Ltd. All Rights Reserved. Hosted by

SourceForge