org.apache.axiom.om.impl.dom
Class DocumentImpl
java.lang.Object
org.apache.axiom.om.impl.dom.NodeImpl
org.apache.axiom.om.impl.dom.ChildNode
org.apache.axiom.om.impl.dom.ParentNode
org.apache.axiom.om.impl.dom.DocumentImpl
- All Implemented Interfaces:
- java.lang.Cloneable, org.w3c.dom.Document, org.w3c.dom.Node, org.w3c.dom.NodeList, org.apache.axiom.om.OMContainer, org.apache.axiom.om.impl.OMContainerEx, org.apache.axiom.om.OMDocument, org.apache.axiom.om.OMNode, org.apache.axiom.om.impl.OMNodeEx
- Direct Known Subclasses:
- SOAPMessageImpl
- public class DocumentImpl
- extends ParentNode
- implements org.w3c.dom.Document, org.apache.axiom.om.OMDocument
| 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.axiom.om.OMDocument |
XML_10, XML_11 |
| Fields inherited from interface org.apache.axiom.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.axiom.om.OMFactory factory)
|
DocumentImpl(org.apache.axiom.om.OMFactory factory)
|
DocumentImpl(org.apache.axiom.om.OMXMLParserWrapper parserWrapper,
org.apache.axiom.om.OMFactory factory)
|
|
Method Summary |
protected void |
addIdAttr(org.w3c.dom.Attr attr)
|
org.w3c.dom.Node |
adoptNode(org.w3c.dom.Node node)
|
void |
build()
Builds next element. |
protected void |
checkQName(java.lang.String prefix,
java.lang.String local)
Borrowed from the Xerces impl. |
org.w3c.dom.Attr |
createAttribute(java.lang.String name)
|
org.w3c.dom.Attr |
createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
|
org.w3c.dom.CDATASection |
createCDATASection(java.lang.String arg0)
|
org.w3c.dom.Comment |
createComment(java.lang.String data)
|
org.w3c.dom.DocumentFragment |
createDocumentFragment()
|
org.w3c.dom.Element |
createElement(java.lang.String tagName)
|
org.w3c.dom.Element |
createElementNS(java.lang.String ns,
java.lang.String qualifiedName)
|
org.w3c.dom.EntityReference |
createEntityReference(java.lang.String arg0)
|
org.w3c.dom.ProcessingInstruction |
createProcessingInstruction(java.lang.String arg0,
java.lang.String arg1)
|
org.w3c.dom.Text |
createTextNode(java.lang.String value)
|
java.lang.String |
getCharsetEncoding()
|
org.w3c.dom.DocumentType |
getDoctype()
|
org.w3c.dom.Element |
getDocumentElement()
Returns the document element. |
java.lang.String |
getDocumentURI()
|
org.w3c.dom.DOMConfiguration |
getDomConfig()
|
org.w3c.dom.Element |
getElementById(java.lang.String elementId)
|
org.w3c.dom.NodeList |
getElementsByTagName(java.lang.String arg0)
|
org.w3c.dom.NodeList |
getElementsByTagNameNS(java.lang.String arg0,
java.lang.String arg1)
|
org.w3c.dom.DOMImplementation |
getImplementation()
|
java.lang.String |
getInputEncoding()
|
org.apache.axiom.om.OMNode |
getNextOMSibling()
Default behavior returns null, overriden in ChildNode. |
org.w3c.dom.Node |
getNextSibling()
Returns the next child of this node's parent, or null if none. |
java.lang.String |
getNodeName()
|
short |
getNodeType()
|
org.apache.axiom.om.OMElement |
getOMDocumentElement()
Returns the document element. |
org.apache.axiom.om.OMContainer |
getParent()
|
org.apache.axiom.om.OMNode |
getPreviousOMSibling()
Default behavior returns null, overriden in ChildNode. |
org.w3c.dom.Node |
getPreviousSibling()
Returns the previous child of this node's parent, or null if none. |
boolean |
getStrictErrorChecking()
|
int |
getType()
|
java.lang.String |
getXmlEncoding()
|
boolean |
getXmlStandalone()
|
java.lang.String |
getXmlVersion()
|
java.lang.String |
getXMLVersion()
|
org.w3c.dom.Node |
importNode(org.w3c.dom.Node importedNode,
boolean deep)
|
void |
internalSerialize(javax.xml.stream.XMLStreamWriter writer)
|
void |
internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter writer)
|
java.lang.String |
isStandalone()
|
void |
normalizeDocument()
|
protected void |
removeIdAttr(org.w3c.dom.Attr attr)
|
org.w3c.dom.Node |
renameNode(org.w3c.dom.Node arg0,
java.lang.String arg1,
java.lang.String arg2)
|
void |
serialize(java.io.OutputStream output,
org.apache.axiom.om.OMOutputFormat format)
|
void |
serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
|
void |
serializeAndConsume(java.io.OutputStream output,
org.apache.axiom.om.OMOutputFormat format)
|
void |
serializeAndConsume(javax.xml.stream.XMLStreamWriter xmlWriter)
|
void |
setCharsetEncoding(java.lang.String charsetEncoding)
|
void |
setDocumentURI(java.lang.String arg0)
|
void |
setNextOMSibling(org.apache.axiom.om.OMNode node)
|
void |
setOMDocumentElement(org.apache.axiom.om.OMElement rootElement)
|
void |
setParent(org.apache.axiom.om.OMContainer element)
|
void |
setPreviousOMSibling(org.apache.axiom.om.OMNode node)
|
void |
setStandalone(java.lang.String isStandalone)
|
void |
setStrictErrorChecking(boolean arg0)
|
void |
setType(int nodeType)
|
void |
setXmlStandalone(boolean arg0)
|
void |
setXmlVersion(java.lang.String arg0)
|
void |
setXMLVersion(java.lang.String version)
|
| Methods inherited from class org.apache.axiom.om.impl.dom.ParentNode |
addChild, buildNext, cloneNode, getChildNodes, getChildren, getChildrenWithName, getFirstChild, getFirstChildWithName, getFirstOMChild, getLastChild, hasChildNodes, importNode, insertBefore, removeChild, replaceChild, setFirstChild |
| Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
appendChild, buildWithAttachments, compareDocumentPosition, getAttributes, getBaseURI, getFeature, getLength, getLocalName, getNamespaceURI, getNodeValue, getOMFactory, getOwnerDocument, getPrefix, getTextContent, getUserData, hasAttributes, internalSerializeWithCache, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, 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.axiom.om.OMDocument |
getOMFactory, serialize, serializeAndConsume |
| Methods inherited from interface org.apache.axiom.om.OMContainer |
addChild, buildNext, getChildren, getChildrenWithName, getFirstChildWithName, getFirstOMChild, isComplete |
| Methods inherited from interface org.apache.axiom.om.impl.OMContainerEx |
setComplete |
documentElement
protected ElementImpl documentElement
identifiers
protected java.util.Hashtable identifiers
DocumentImpl
public DocumentImpl(DocumentImpl ownerDocument,
org.apache.axiom.om.OMFactory factory)
- Parameters:
ownerDocument -
DocumentImpl
public DocumentImpl(org.apache.axiom.om.OMXMLParserWrapper parserWrapper,
org.apache.axiom.om.OMFactory factory)
DocumentImpl
public DocumentImpl(org.apache.axiom.om.OMFactory factory)
setType
public void setType(int nodeType)
throws org.apache.axiom.om.OMException
- Specified by:
setType in interface org.apache.axiom.om.impl.OMNodeEx
- Throws:
org.apache.axiom.om.OMException
getType
public int getType()
throws org.apache.axiom.om.OMException
- Specified by:
getType in interface org.apache.axiom.om.OMNode
- Throws:
org.apache.axiom.om.OMException
internalSerialize
public void internalSerialize(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
- Specified by:
internalSerialize in interface org.apache.axiom.om.impl.OMNodeEx
- Throws:
javax.xml.stream.XMLStreamException
getNextOMSibling
public org.apache.axiom.om.OMNode getNextOMSibling()
throws org.apache.axiom.om.OMException
- Description copied from class:
NodeImpl
- Default behavior returns null, overriden in ChildNode.
- Specified by:
getNextOMSibling in interface org.apache.axiom.om.OMNode- Overrides:
getNextOMSibling in class ChildNode
- Throws:
org.apache.axiom.om.OMException
getNextSibling
public org.w3c.dom.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 org.w3c.dom.Node- Overrides:
getNextSibling in class ChildNode
getParent
public org.apache.axiom.om.OMContainer getParent()
throws org.apache.axiom.om.OMException
- Specified by:
getParent in interface org.apache.axiom.om.OMNode- Overrides:
getParent in class ChildNode
- Throws:
org.apache.axiom.om.OMException
getPreviousOMSibling
public org.apache.axiom.om.OMNode getPreviousOMSibling()
- Description copied from class:
NodeImpl
- Default behavior returns null, overriden in ChildNode.
- Specified by:
getPreviousOMSibling in interface org.apache.axiom.om.OMNode- Overrides:
getPreviousOMSibling in class ChildNode
getPreviousSibling
public org.w3c.dom.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 org.w3c.dom.Node- Overrides:
getPreviousSibling in class ChildNode
setNextOMSibling
public void setNextOMSibling(org.apache.axiom.om.OMNode node)
- Specified by:
setNextOMSibling in interface org.apache.axiom.om.impl.OMNodeEx- Overrides:
setNextOMSibling in class ChildNode
setParent
public void setParent(org.apache.axiom.om.OMContainer element)
- Specified by:
setParent in interface org.apache.axiom.om.impl.OMNodeEx- Overrides:
setParent in class ChildNode
setPreviousOMSibling
public void setPreviousOMSibling(org.apache.axiom.om.OMNode node)
- Specified by:
setPreviousOMSibling in interface org.apache.axiom.om.impl.OMNodeEx- Overrides:
setPreviousOMSibling in class ChildNode
getNodeName
public java.lang.String getNodeName()
- Specified by:
getNodeName in interface org.w3c.dom.Node
getNodeType
public short getNodeType()
- Specified by:
getNodeType in interface org.w3c.dom.Node
createAttribute
public org.w3c.dom.Attr createAttribute(java.lang.String name)
throws org.w3c.dom.DOMException
- Specified by:
createAttribute in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
createAttributeNS
public org.w3c.dom.Attr createAttributeNS(java.lang.String namespaceURI,
java.lang.String qualifiedName)
throws org.w3c.dom.DOMException
- Specified by:
createAttributeNS in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
createCDATASection
public org.w3c.dom.CDATASection createCDATASection(java.lang.String arg0)
throws org.w3c.dom.DOMException
- Specified by:
createCDATASection in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
createComment
public org.w3c.dom.Comment createComment(java.lang.String data)
- Specified by:
createComment in interface org.w3c.dom.Document
createDocumentFragment
public org.w3c.dom.DocumentFragment createDocumentFragment()
- Specified by:
createDocumentFragment in interface org.w3c.dom.Document
createElement
public org.w3c.dom.Element createElement(java.lang.String tagName)
throws org.w3c.dom.DOMException
- Specified by:
createElement in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
createElementNS
public org.w3c.dom.Element createElementNS(java.lang.String ns,
java.lang.String qualifiedName)
throws org.w3c.dom.DOMException
- Specified by:
createElementNS in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
createEntityReference
public org.w3c.dom.EntityReference createEntityReference(java.lang.String arg0)
throws org.w3c.dom.DOMException
- Specified by:
createEntityReference in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
createProcessingInstruction
public org.w3c.dom.ProcessingInstruction createProcessingInstruction(java.lang.String arg0,
java.lang.String arg1)
throws org.w3c.dom.DOMException
- Specified by:
createProcessingInstruction in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
createTextNode
public org.w3c.dom.Text createTextNode(java.lang.String value)
- Specified by:
createTextNode in interface org.w3c.dom.Document
getDoctype
public org.w3c.dom.DocumentType getDoctype()
- Specified by:
getDoctype in interface org.w3c.dom.Document
getElementById
public org.w3c.dom.Element getElementById(java.lang.String elementId)
- Specified by:
getElementById in interface org.w3c.dom.Document
getElementsByTagName
public org.w3c.dom.NodeList getElementsByTagName(java.lang.String arg0)
- Specified by:
getElementsByTagName in interface org.w3c.dom.Document
getElementsByTagNameNS
public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String arg0,
java.lang.String arg1)
- Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Document
getImplementation
public org.w3c.dom.DOMImplementation getImplementation()
- Specified by:
getImplementation in interface org.w3c.dom.Document
importNode
public org.w3c.dom.Node importNode(org.w3c.dom.Node importedNode,
boolean deep)
throws org.w3c.dom.DOMException
- Specified by:
importNode in interface org.w3c.dom.Document
- Throws:
org.w3c.dom.DOMException
serialize
public void serialize(javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException
- Specified by:
serialize in interface org.apache.axiom.om.OMNode- Overrides:
serialize in class NodeImpl
- Throws:
javax.xml.stream.XMLStreamException
internalSerializeAndConsume
public void internalSerializeAndConsume(javax.xml.stream.XMLStreamWriter writer)
throws javax.xml.stream.XMLStreamException
- Specified by:
internalSerializeAndConsume in interface org.apache.axiom.om.impl.OMNodeEx
- Throws:
javax.xml.stream.XMLStreamException
serializeAndConsume
public void serializeAndConsume(javax.xml.stream.XMLStreamWriter xmlWriter)
throws javax.xml.stream.XMLStreamException
- Specified by:
serializeAndConsume in interface org.apache.axiom.om.OMNode- Overrides:
serializeAndConsume in class NodeImpl
- Throws:
javax.xml.stream.XMLStreamException
getCharsetEncoding
public java.lang.String getCharsetEncoding()
- Specified by:
getCharsetEncoding in interface org.apache.axiom.om.OMDocument
getXMLVersion
public java.lang.String getXMLVersion()
- Specified by:
getXMLVersion in interface org.apache.axiom.om.OMDocument
isStandalone
public java.lang.String isStandalone()
- Specified by:
isStandalone in interface org.apache.axiom.om.OMDocument
setCharsetEncoding
public void setCharsetEncoding(java.lang.String charsetEncoding)
- Specified by:
setCharsetEncoding in interface org.apache.axiom.om.OMDocument
setOMDocumentElement
public void setOMDocumentElement(org.apache.axiom.om.OMElement rootElement)
- Specified by:
setOMDocumentElement in interface org.apache.axiom.om.OMDocument
setStandalone
public void setStandalone(java.lang.String isStandalone)
- Specified by:
setStandalone in interface org.apache.axiom.om.OMDocument
serializeAndConsume
public void serializeAndConsume(java.io.OutputStream output,
org.apache.axiom.om.OMOutputFormat format)
throws javax.xml.stream.XMLStreamException
- Specified by:
serializeAndConsume in interface org.apache.axiom.om.OMDocument- Overrides:
serializeAndConsume in class NodeImpl
- Throws:
javax.xml.stream.XMLStreamException
serialize
public void serialize(java.io.OutputStream output,
org.apache.axiom.om.OMOutputFormat format)
throws javax.xml.stream.XMLStreamException
- Specified by:
serialize in interface org.apache.axiom.om.OMDocument- Overrides:
serialize in class NodeImpl
- Throws:
javax.xml.stream.XMLStreamException
setXMLVersion
public void setXMLVersion(java.lang.String version)
- Specified by:
setXMLVersion in interface org.apache.axiom.om.OMDocument
getOMDocumentElement
public org.apache.axiom.om.OMElement getOMDocumentElement()
- Returns the document element.
- Specified by:
getOMDocumentElement in interface org.apache.axiom.om.OMDocument
- See Also:
OMDocument.getOMDocumentElement()
getDocumentElement
public org.w3c.dom.Element getDocumentElement()
- Returns the document element.
- Specified by:
getDocumentElement in interface org.w3c.dom.Document
- See Also:
Document.getDocumentElement()
checkQName
protected final void checkQName(java.lang.String prefix,
java.lang.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 namelocal - local part of qualified name
build
public void build()
- Description copied from class:
NodeImpl
- Builds next element.
- Specified by:
build in interface org.apache.axiom.om.OMNode- Overrides:
build in class NodeImpl
addIdAttr
protected void addIdAttr(org.w3c.dom.Attr attr)
removeIdAttr
protected void removeIdAttr(org.w3c.dom.Attr attr)
adoptNode
public org.w3c.dom.Node adoptNode(org.w3c.dom.Node node)
throws org.w3c.dom.DOMException
- Throws:
org.w3c.dom.DOMException
getDocumentURI
public java.lang.String getDocumentURI()
getDomConfig
public org.w3c.dom.DOMConfiguration getDomConfig()
getInputEncoding
public java.lang.String getInputEncoding()
getStrictErrorChecking
public boolean getStrictErrorChecking()
getXmlEncoding
public java.lang.String getXmlEncoding()
getXmlStandalone
public boolean getXmlStandalone()
getXmlVersion
public java.lang.String getXmlVersion()
normalizeDocument
public void normalizeDocument()
renameNode
public org.w3c.dom.Node renameNode(org.w3c.dom.Node arg0,
java.lang.String arg1,
java.lang.String arg2)
throws org.w3c.dom.DOMException
- Throws:
org.w3c.dom.DOMException
setDocumentURI
public void setDocumentURI(java.lang.String arg0)
setStrictErrorChecking
public void setStrictErrorChecking(boolean arg0)
setXmlStandalone
public void setXmlStandalone(boolean arg0)
throws org.w3c.dom.DOMException
- Throws:
org.w3c.dom.DOMException
setXmlVersion
public void setXmlVersion(java.lang.String arg0)
throws org.w3c.dom.DOMException
- Throws:
org.w3c.dom.DOMException
Copyright © 2004-2007 Apache Software Foundation. All Rights Reserved.