org.apache.axis2.om.impl.dom
Class DocumentImpl

java.lang.Object
  extended byorg.apache.axis2.om.impl.dom.NodeImpl
      extended byorg.apache.axis2.om.impl.dom.ChildNode
          extended byorg.apache.axis2.om.impl.dom.ParentNode
              extended byorg.apache.axis2.om.impl.dom.DocumentImpl
All Implemented Interfaces:
Cloneable, Document, Node, NodeList, org.apache.ws.commons.om.OMContainer, org.apache.ws.commons.om.impl.OMContainerEx, org.apache.ws.commons.om.OMDocument, org.apache.ws.commons.om.OMNode, org.apache.ws.commons.om.impl.OMNodeEx
Direct Known Subclasses:
SOAPMessageImpl

public class DocumentImpl
extends ParentNode
implements Document, org.apache.ws.commons.om.OMDocument


Field Summary
protected  ElementImpl documentElement
           
protected  Hashtable identifiers
           
 
Fields inherited from class org.apache.axis2.om.impl.dom.ParentNode
firstChild, lastChild
 
Fields inherited from class org.apache.axis2.om.impl.dom.ChildNode
nextSibling, parentNode, previousSibling
 
Fields inherited from class org.apache.axis2.om.impl.dom.NodeImpl
builder, done, factory, FIRSTCHILD, flags, nodeType, NORMALIZED, OWNED, ownerNode, READONLY, SPECIFIED
 
Fields inherited from interface org.w3c.dom.Node
ATTRIBUTE_NODE, CDATA_SECTION_NODE, COMMENT_NODE, DOCUMENT_FRAGMENT_NODE, DOCUMENT_NODE, DOCUMENT_TYPE_NODE, ELEMENT_NODE, ENTITY_NODE, ENTITY_REFERENCE_NODE, NOTATION_NODE, PROCESSING_INSTRUCTION_NODE, TEXT_NODE
 
Fields inherited from interface org.apache.ws.commons.om.OMDocument
XML_10, XML_11
 
Fields inherited from interface org.apache.ws.commons.om.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Constructor Summary
DocumentImpl(DocumentImpl ownerDocument, org.apache.ws.commons.om.OMFactory factory)
           
DocumentImpl(org.apache.ws.commons.om.OMFactory factory)
           
DocumentImpl(org.apache.ws.commons.om.OMXMLParserWrapper parserWrapper, org.apache.ws.commons.om.OMFactory factory)
           
 
Method Summary
 Node adoptNode(Node arg0)
           
protected  void checkQName(String prefix, String local)
          Borrowed from the Xerces impl.
 Attr createAttribute(String name)
           
 Attr createAttributeNS(String namespaceURI, String qualifiedName)
           
 CDATASection createCDATASection(String arg0)
           
 Comment createComment(String data)
           
 DocumentFragment createDocumentFragment()
           
 Element createElement(String tagName)
           
 Element createElementNS(String ns, String qualifiedName)
           
 EntityReference createEntityReference(String arg0)
           
 ProcessingInstruction createProcessingInstruction(String arg0, String arg1)
           
 Text createTextNode(String value)
           
 String getCharsetEncoding()
           
 DocumentType getDoctype()
           
 Element getDocumentElement()
          Returns the document element.
 String getDocumentURI()
           
 DOMConfiguration getDomConfig()
           
 Element getElementById(String arg0)
           
 NodeList getElementsByTagName(String arg0)
           
 NodeList getElementsByTagNameNS(String arg0, String arg1)
           
 DOMImplementation getImplementation()
           
 String getInputEncoding()
           
 org.apache.ws.commons.om.OMNode getNextOMSibling()
          Default behavior returns null, overriden in ChildNode.
 Node getNextSibling()
          Returns the next child of this node's parent, or null if none.
 String getNodeName()
           
 short getNodeType()
           
 org.apache.ws.commons.om.OMElement getOMDocumentElement()
          Returns the document element.
 org.apache.ws.commons.om.OMContainer getParent()
           
 org.apache.ws.commons.om.OMNode getPreviousOMSibling()
          Default behavior returns null, overriden in ChildNode.
 Node getPreviousSibling()
          Returns the previous child of this node's parent, or null if none.
 boolean getStrictErrorChecking()
           
 int getType()
           
 String getXmlEncoding()
           
 boolean getXmlStandalone()
           
 String getXmlVersion()
           
 String getXMLVersion()
           
 Node importNode(Node importedNode, boolean deep)
           
 String isStandalone()
           
 void normalizeDocument()
           
 Node renameNode(Node arg0, String arg1, String arg2)
           
 void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
           
 void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput, boolean includeXMLDeclaration)
           
 void serialize(OutputStream output, org.apache.ws.commons.om.OMOutputFormat format)
           
 void serialize(XMLStreamWriter xmlWriter)
           
 void serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
           
 void serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput, boolean includeXMLDeclaration)
           
 void serializeAndConsume(OutputStream output, org.apache.ws.commons.om.OMOutputFormat format)
           
 void serializeAndConsume(XMLStreamWriter xmlWriter)
           
 void setCharsetEncoding(String charsetEncoding)
           
 void setDocumentURI(String arg0)
           
 void setNextOMSibling(org.apache.ws.commons.om.OMNode node)
           
 void setOMDocumentElement(org.apache.ws.commons.om.OMElement rootElement)
           
 void setParent(org.apache.ws.commons.om.OMContainer element)
           
 void setPreviousOMSibling(org.apache.ws.commons.om.OMNode node)
           
 void setStandalone(String isStandalone)
           
 void setStrictErrorChecking(boolean arg0)
           
 void setType(int nodeType)
           
 void setXmlStandalone(boolean arg0)
           
 void setXmlVersion(String arg0)
           
 void setXMLVersion(String version)
           
 
Methods inherited from class org.apache.axis2.om.impl.dom.ParentNode
addChild, buildNext, cloneNode, getChildNodes, getChildren, getChildrenWithName, getFirstChild, getFirstChildWithName, getFirstOMChild, getLastChild, hasChildNodes, insertBefore, removeChild, replaceChild, setFirstChild
 
Methods inherited from class org.apache.axis2.om.impl.dom.ChildNode
detach, discard, getParentNode, insertSiblingAfter, insertSiblingBefore
 
Methods inherited from class org.apache.axis2.om.impl.dom.NodeImpl
appendChild, build, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLength, getLocalName, getNamespaceURI, getNodeValue, getOMFactory, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeWithCache, setComplete, setNodeValue, setOwnerDocument, setPrefix, setTextContent, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, cloneNode, getAttributes, getChildNodes, getFirstChild, getLastChild, getLocalName, getNamespaceURI, getNodeValue, getOwnerDocument, getParentNode, getPrefix, hasAttributes, hasChildNodes, insertBefore, isSupported, normalize, removeChild, replaceChild, setNodeValue, setPrefix
 
Methods inherited from interface org.apache.ws.commons.om.OMDocument
getOMFactory, serialize, serializeAndConsume
 
Methods inherited from interface org.apache.ws.commons.om.OMContainer
addChild, buildNext, getChildren, getChildrenWithName, getFirstChildWithName, getFirstOMChild, isComplete
 
Methods inherited from interface org.apache.ws.commons.om.impl.OMContainerEx
setComplete
 

Field Detail

identifiers

protected Hashtable identifiers

documentElement

protected ElementImpl documentElement
Constructor Detail

DocumentImpl

public DocumentImpl(DocumentImpl ownerDocument,
                    org.apache.ws.commons.om.OMFactory factory)
Parameters:
ownerDocument -

DocumentImpl

public DocumentImpl(org.apache.ws.commons.om.OMXMLParserWrapper parserWrapper,
                    org.apache.ws.commons.om.OMFactory factory)

DocumentImpl

public DocumentImpl(org.apache.ws.commons.om.OMFactory factory)
Method Detail

setType

public void setType(int nodeType)
             throws org.apache.ws.commons.om.OMException
Specified by:
setType in interface org.apache.ws.commons.om.impl.OMNodeEx
Throws:
org.apache.ws.commons.om.OMException

getType

public int getType()
            throws org.apache.ws.commons.om.OMException
Specified by:
getType in interface org.apache.ws.commons.om.OMNode
Throws:
org.apache.ws.commons.om.OMException

serialize

public void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
               throws XMLStreamException
Specified by:
serialize in interface org.apache.ws.commons.om.impl.OMNodeEx
Throws:
XMLStreamException

getNextOMSibling

public org.apache.ws.commons.om.OMNode getNextOMSibling()
                                                 throws org.apache.ws.commons.om.OMException
Description copied from class: NodeImpl
Default behavior returns null, overriden in ChildNode.

Specified by:
getNextOMSibling in interface org.apache.ws.commons.om.OMNode
Overrides:
getNextOMSibling in class ChildNode
Throws:
org.apache.ws.commons.om.OMException

getNextSibling

public Node getNextSibling()
Description copied from class: NodeImpl
Returns the next child of this node's parent, or null if none.

Specified by:
getNextSibling in interface Node
Overrides:
getNextSibling in class ChildNode

getParent

public org.apache.ws.commons.om.OMContainer getParent()
                                               throws org.apache.ws.commons.om.OMException
Specified by:
getParent in interface org.apache.ws.commons.om.OMNode
Overrides:
getParent in class ChildNode
Throws:
org.apache.ws.commons.om.OMException

getPreviousOMSibling

public org.apache.ws.commons.om.OMNode getPreviousOMSibling()
Description copied from class: NodeImpl
Default behavior returns null, overriden in ChildNode.

Specified by:
getPreviousOMSibling in interface org.apache.ws.commons.om.OMNode
Overrides:
getPreviousOMSibling in class ChildNode

getPreviousSibling

public Node getPreviousSibling()
Description copied from class: NodeImpl
Returns the previous child of this node's parent, or null if none.

Specified by:
getPreviousSibling in interface Node
Overrides:
getPreviousSibling in class ChildNode

setNextOMSibling

public void setNextOMSibling(org.apache.ws.commons.om.OMNode node)
Specified by:
setNextOMSibling in interface org.apache.ws.commons.om.impl.OMNodeEx
Overrides:
setNextOMSibling in class ChildNode

setParent

public void setParent(org.apache.ws.commons.om.OMContainer element)
Specified by:
setParent in interface org.apache.ws.commons.om.impl.OMNodeEx
Overrides:
setParent in class ChildNode

setPreviousOMSibling

public void setPreviousOMSibling(org.apache.ws.commons.om.OMNode node)
Specified by:
setPreviousOMSibling in interface org.apache.ws.commons.om.impl.OMNodeEx
Overrides:
setPreviousOMSibling in class ChildNode

getNodeName

public String getNodeName()
Specified by:
getNodeName in interface Node

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface Node

createAttribute

public Attr createAttribute(String name)
                     throws DOMException
Specified by:
createAttribute in interface Document
Throws:
DOMException

createAttributeNS

public Attr createAttributeNS(String namespaceURI,
                              String qualifiedName)
                       throws DOMException
Specified by:
createAttributeNS in interface Document
Throws:
DOMException

createCDATASection

public CDATASection createCDATASection(String arg0)
                                throws DOMException
Specified by:
createCDATASection in interface Document
Throws:
DOMException

createComment

public Comment createComment(String data)
Specified by:
createComment in interface Document

createDocumentFragment

public DocumentFragment createDocumentFragment()
Specified by:
createDocumentFragment in interface Document

createElement

public Element createElement(String tagName)
                      throws DOMException
Specified by:
createElement in interface Document
Throws:
DOMException

createElementNS

public Element createElementNS(String ns,
                               String qualifiedName)
                        throws DOMException
Specified by:
createElementNS in interface Document
Throws:
DOMException

createEntityReference

public EntityReference createEntityReference(String arg0)
                                      throws DOMException
Specified by:
createEntityReference in interface Document
Throws:
DOMException

createProcessingInstruction

public ProcessingInstruction createProcessingInstruction(String arg0,
                                                         String arg1)
                                                  throws DOMException
Specified by:
createProcessingInstruction in interface Document
Throws:
DOMException

createTextNode

public Text createTextNode(String value)
Specified by:
createTextNode in interface Document

getDoctype

public DocumentType getDoctype()
Specified by:
getDoctype in interface Document

getElementById

public Element getElementById(String arg0)
Specified by:
getElementById in interface Document

getElementsByTagName

public NodeList getElementsByTagName(String arg0)
Specified by:
getElementsByTagName in interface Document

getElementsByTagNameNS

public NodeList getElementsByTagNameNS(String arg0,
                                       String arg1)
Specified by:
getElementsByTagNameNS in interface Document

getImplementation

public DOMImplementation getImplementation()
Specified by:
getImplementation in interface Document

importNode

public Node importNode(Node importedNode,
                       boolean deep)
                throws DOMException
Specified by:
importNode in interface Document
Throws:
DOMException

serialize

public void serialize(XMLStreamWriter xmlWriter)
               throws XMLStreamException
Specified by:
serialize in interface org.apache.ws.commons.om.OMNode
Overrides:
serialize in class NodeImpl
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput)
                         throws XMLStreamException
Specified by:
serializeAndConsume in interface org.apache.ws.commons.om.impl.OMNodeEx
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(XMLStreamWriter xmlWriter)
                         throws XMLStreamException
Specified by:
serializeAndConsume in interface org.apache.ws.commons.om.OMNode
Overrides:
serializeAndConsume in class NodeImpl
Throws:
XMLStreamException

getCharsetEncoding

public String getCharsetEncoding()
Specified by:
getCharsetEncoding in interface org.apache.ws.commons.om.OMDocument

getXMLVersion

public String getXMLVersion()
Specified by:
getXMLVersion in interface org.apache.ws.commons.om.OMDocument

isStandalone

public String isStandalone()
Specified by:
isStandalone in interface org.apache.ws.commons.om.OMDocument

serialize

public void serialize(org.apache.ws.commons.om.impl.OMOutputImpl omOutput,
                      boolean includeXMLDeclaration)
               throws XMLStreamException
Throws:
XMLStreamException

serializeAndConsume

public void serializeAndConsume(org.apache.ws.commons.om.impl.OMOutputImpl omOutput,
                                boolean includeXMLDeclaration)
                         throws XMLStreamException
Throws:
XMLStreamException

setCharsetEncoding

public void setCharsetEncoding(String charsetEncoding)
Specified by:
setCharsetEncoding in interface org.apache.ws.commons.om.OMDocument

setOMDocumentElement

public void setOMDocumentElement(org.apache.ws.commons.om.OMElement rootElement)
Specified by:
setOMDocumentElement in interface org.apache.ws.commons.om.OMDocument

setStandalone

public void setStandalone(String isStandalone)
Specified by:
setStandalone in interface org.apache.ws.commons.om.OMDocument

serializeAndConsume

public void serializeAndConsume(OutputStream output,
                                org.apache.ws.commons.om.OMOutputFormat format)
                         throws XMLStreamException
Specified by:
serializeAndConsume in interface org.apache.ws.commons.om.OMDocument
Overrides:
serializeAndConsume in class NodeImpl
Throws:
XMLStreamException

serialize

public void serialize(OutputStream output,
                      org.apache.ws.commons.om.OMOutputFormat format)
               throws XMLStreamException
Specified by:
serialize in interface org.apache.ws.commons.om.OMDocument
Overrides:
serialize in class NodeImpl
Throws:
XMLStreamException

setXMLVersion

public void setXMLVersion(String version)
Specified by:
setXMLVersion in interface org.apache.ws.commons.om.OMDocument

getOMDocumentElement

public org.apache.ws.commons.om.OMElement getOMDocumentElement()
Returns the document element.

Specified by:
getOMDocumentElement in interface org.apache.ws.commons.om.OMDocument
See Also:
OMDocument.getOMDocumentElement()

getDocumentElement

public Element getDocumentElement()
Returns the document element.

Specified by:
getDocumentElement in interface Document
See Also:
Document.getDocumentElement()

checkQName

protected final void checkQName(String prefix,
                                String local)
Borrowed from the Xerces impl. Checks if the given qualified name is legal with respect to the version of XML to which this document must conform.

Parameters:
prefix - prefix of qualified name
local - local part of qualified name

adoptNode

public Node adoptNode(Node arg0)
               throws DOMException
Throws:
DOMException

getDocumentURI

public String getDocumentURI()

getDomConfig

public DOMConfiguration getDomConfig()

getInputEncoding

public String getInputEncoding()

getStrictErrorChecking

public boolean getStrictErrorChecking()

getXmlEncoding

public String getXmlEncoding()

getXmlStandalone

public boolean getXmlStandalone()

getXmlVersion

public String getXmlVersion()

normalizeDocument

public void normalizeDocument()

renameNode

public Node renameNode(Node arg0,
                       String arg1,
                       String arg2)
                throws DOMException
Throws:
DOMException

setDocumentURI

public void setDocumentURI(String arg0)

setStrictErrorChecking

public void setStrictErrorChecking(boolean arg0)

setXmlStandalone

public void setXmlStandalone(boolean arg0)
                      throws DOMException
Throws:
DOMException

setXmlVersion

public void setXmlVersion(String arg0)
                   throws DOMException
Throws:
DOMException