org.apache.axiom.om.impl.dom
Class ElementImpl

java.lang.Object
  extended by org.apache.axiom.om.impl.dom.NodeImpl
      extended by org.apache.axiom.om.impl.dom.ChildNode
          extended by org.apache.axiom.om.impl.dom.ParentNode
              extended by org.apache.axiom.om.impl.dom.ElementImpl
All Implemented Interfaces:
java.lang.Cloneable, OMContainerEx, OMNodeEx, OMConstants, OMContainer, OMElement, OMNode, OMSerializable, org.w3c.dom.Element, org.w3c.dom.Node, org.w3c.dom.NodeList
Direct Known Subclasses:
SOAPElement, SOAPHeaderBlockImpl

public class ElementImpl
extends ParentNode
implements org.w3c.dom.Element, OMElement, OMConstants

Implementation of the org.w3c.dom.Element and org.apache.axiom.om.Element interfaces.


Field Summary
protected  java.lang.String localName
           
protected  OMNamespace namespace
           
 
Fields inherited from class org.apache.axiom.om.impl.dom.ParentNode
firstChild, lastChild
 
Fields inherited from class org.apache.axiom.om.impl.dom.ChildNode
nextSibling, parentNode, previousSibling
 
Fields inherited from class org.apache.axiom.om.impl.dom.NodeImpl
builder, done, factory, FIRSTCHILD, flags, 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_POSITION_CONTAINED_BY, DOCUMENT_POSITION_CONTAINS, DOCUMENT_POSITION_DISCONNECTED, DOCUMENT_POSITION_FOLLOWING, DOCUMENT_POSITION_IMPLEMENTATION_SPECIFIC, DOCUMENT_POSITION_PRECEDING, 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.OMNode
CDATA_SECTION_NODE, COMMENT_NODE, DTD_NODE, ELEMENT_NODE, ENTITY_REFERENCE_NODE, PI_NODE, SPACE_NODE, TEXT_NODE
 
Fields inherited from interface org.apache.axiom.om.OMConstants
ARRAY_ITEM_LOCALNAME, ARRAY_ITEM_NS_PREFIX, ARRAY_ITEM_NSURI, ARRAY_ITEM_QNAME, DATA_HANDLER, DEFAULT_CHAR_SET_ENCODING, DEFAULT_DEFAULT_NAMESPACE, DEFAULT_XML_VERSION, IS_BINARY, IS_DATA_HANDLERS_AWARE, PULL_TYPE_BUILDER, PUSH_TYPE_BUILDER, XMLATTRTYPE_CDATA, XMLATTRTYPE_ENTITIES, XMLATTRTYPE_ENTITY, XMLATTRTYPE_ID, XMLATTRTYPE_IDREF, XMLATTRTYPE_IDREFS, XMLATTRTYPE_NMTOKEN, XMLATTRTYPE_NMTOKENS, XMLATTRTYPE_NOTATION, XMLNS_NS_PREFIX, XMLNS_NS_URI, XMLNS_PREFIX, XMLNS_URI
 
Constructor Summary
ElementImpl(DocumentImpl ownerDocument, java.lang.String tagName, NamespaceImpl ns, OMFactory factory)
          Creates a new element with the namespace.
ElementImpl(DocumentImpl ownerDocument, java.lang.String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory)
           
ElementImpl(DocumentImpl ownerDocument, java.lang.String tagName, OMFactory factory)
           
ElementImpl(OMFactory factory)
           
ElementImpl(ParentNode parentNode, java.lang.String tagName, NamespaceImpl ns, OMFactory factory)
           
ElementImpl(ParentNode parentNode, java.lang.String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory)
           
ElementImpl(java.lang.String tagName, NamespaceImpl ns, OMXMLParserWrapper builder, OMFactory factory)
           
 
Method Summary
 OMAttribute addAttribute(OMAttribute attr)
           
 OMAttribute addAttribute(java.lang.String localName, java.lang.String value, OMNamespace ns)
           
 void buildWithAttachments()
          Parses this node and builds the object structure in memory.
 org.w3c.dom.Node cloneNode(boolean deep)
           
 OMElement cloneOMElement()
          Creates a clone which belongs to a new document.
 OMNamespace declareDefaultNamespace(java.lang.String uri)
          We use "" to store the default namespace of this element.
 OMNamespace declareNamespace(OMNamespace namespace)
          Allows overriding an existing declaration if the same prefix was used.
 OMNamespace declareNamespace(java.lang.String uri, java.lang.String prefix)
          Allows overriding an existing declaration if the same prefix was used.
 void discard()
           
 OMNamespace findNamespace(java.lang.String uri, java.lang.String prefix)
           
 OMNamespace findNamespaceURI(java.lang.String prefix)
           
 java.util.Iterator getAllAttributes()
           
 java.util.Iterator getAllDeclaredNamespaces()
           
 OMAttribute getAttribute(javax.xml.namespace.QName qname)
          Returns a named attribute if present.
 java.lang.String getAttribute(java.lang.String name)
          Looks in the local list of attributes and returns if found.
 org.w3c.dom.Attr getAttributeNode(java.lang.String name)
          Retrieves an attribute node by name.
 org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI, java.lang.String localName)
          Retrieves an attribute node by local name and namespace URI.
 java.lang.String getAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
          Retrieves an attribute value by local name and namespace URI.
 org.w3c.dom.NamedNodeMap getAttributes()
          Returns the set of attributes of this node and the namespace declarations available.
 java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
          Returns a named attribute's value, if present.
 java.util.Iterator getChildElements()
           
 OMNamespace getDefaultNamespace()
           
 org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
           
 org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI, java.lang.String localName)
           
 OMElement getFirstElement()
          Returns the first Element node.
 int getLineNumber()
           
 java.lang.String getLocalName()
          Returns the local name of this element node
 OMNamespace getNamespace()
          Returns the namespace of this element.
 java.lang.String getNamespaceURI()
          Returns the value of the namespace URI.
 java.lang.String getNamespaceURI(java.lang.String prefix)
          Returns the namespace uri, given the prefix.
 OMNode getNextOMSibling()
          Default behavior returns null, overriden in ChildNode.
 java.lang.String getNodeName()
           
 short getNodeType()
           
 java.lang.String getPrefix()
          Returns the namespace prefix of this element node
 javax.xml.namespace.QName getQName()
          Returns the QName of this element.
 org.w3c.dom.TypeInfo getSchemaTypeInfo()
           
 java.lang.String getTagName()
           
 java.lang.String getText()
          Gets all the text children and concatinates them to a single string.
 javax.xml.namespace.QName getTextAsQName()
           
 java.lang.String getTrimmedText()
           
 int getType()
           
 boolean hasAttribute(java.lang.String name)
           
 boolean hasAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
          Returns whether the given attribute is available or not.
 boolean hasAttributes()
          Returns whether this element contains any attribute or not.
 void internalSerialize(javax.xml.stream.XMLStreamWriter writer, boolean cache)
           
 void removeAttribute(OMAttribute attr)
          Removes an attribute from the element.
 void removeAttribute(java.lang.String name)
          Removes an attribute by name.
 org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
          Removes the specified attribute node.
 void removeAttributeNS(java.lang.String namespaceURI, java.lang.String localName)
           
 boolean removeNamespace(java.lang.String prefix)
          Removes a declared namespace given its prefix.
 javax.xml.namespace.QName resolveQName(java.lang.String qname)
           
 void setAttribute(java.lang.String name, java.lang.String value)
           
 org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attr)
          Adds a new attribute node.
 org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
           
 void setAttributeNS(java.lang.String namespaceURI, java.lang.String qualifiedName, java.lang.String value)
          Adds a new attribute.
 void setBuilder(OMXMLParserWrapper wrapper)
          Sets the OM builder.
 void setIdAttribute(java.lang.String name, boolean isId)
           
 void setIdAttributeNode(org.w3c.dom.Attr idAttr, boolean isId)
           
 void setIdAttributeNS(java.lang.String namespaceURI, java.lang.String localName, boolean isId)
           
 void setLineNumber(int lineNumber)
           
 void setLocalName(java.lang.String localName)
          Sets the local name.
 void setNamespace(OMNamespace namespace)
          Sets the namespace.
 void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace)
           
protected  void setOwnerDocument(DocumentImpl document)
          Sets the owner document.
 void setText(javax.xml.namespace.QName text)
           
 void setText(java.lang.String text)
          Creates a text node with the given value and adds it to the element.
 void setType(int nodeType)
           
 java.lang.String toString()
          Overridden toString() for ease of debugging.
 java.lang.String toStringWithConsume()
           
 
Methods inherited from class org.apache.axiom.om.impl.dom.ParentNode
addChild, buildNext, getBuilder, getChildNodes, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChild, getFirstChildWithName, getFirstOMChild, getFirstOMChildIfAvailable, getLastChild, getTextContent, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching, hasChildNodes, importNode, insertBefore, removeChild, replaceChild, setFirstChild, setLastChild, setTextContent
 
Methods inherited from class org.apache.axiom.om.impl.dom.ChildNode
detach, getNextOMSiblingIfAvailable, getNextSibling, getParent, getParentNode, getPreviousOMSibling, getPreviousSibling, insertSiblingAfter, insertSiblingBefore, setNextOMSibling, setParent, setPreviousOMSibling
 
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl
appendChild, build, close, compareDocumentPosition, getBaseURI, getFeature, getLength, getNodeValue, getOMFactory, getOwnerDocument, getUserData, internalSerialize, internalSerializeAndConsume, isComplete, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, serialize, serialize, serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setComplete, setNodeValue, setPrefix, setUserData
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface org.w3c.dom.Node
appendChild, compareDocumentPosition, getBaseURI, getChildNodes, getFeature, getFirstChild, getLastChild, getNextSibling, getNodeValue, getOwnerDocument, getParentNode, getPreviousSibling, getTextContent, getUserData, hasChildNodes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, removeChild, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData
 
Methods inherited from interface org.apache.axiom.om.OMElement
serialize, serialize, serialize, serialize, serializeAndConsume, serializeAndConsume, serializeAndConsume, serializeAndConsume, setFirstChild
 
Methods inherited from interface org.apache.axiom.om.OMNode
detach, getParent, getPreviousOMSibling, insertSiblingAfter, insertSiblingBefore
 
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.OMContainer
addChild, buildNext, getBuilder, getChildren, getChildrenWithLocalName, getChildrenWithName, getChildrenWithNamespaceURI, getFirstChildWithName, getFirstOMChild, getXMLStreamReader, getXMLStreamReader, getXMLStreamReaderWithoutCaching
 
Methods inherited from interface org.apache.axiom.om.OMSerializable
build, close, getOMFactory, isComplete, serialize, serialize, serializeAndConsume
 
Methods inherited from interface org.apache.axiom.om.impl.OMContainerEx
setComplete
 

Field Detail

namespace

protected OMNamespace namespace

localName

protected java.lang.String localName
Constructor Detail

ElementImpl

public ElementImpl(DocumentImpl ownerDocument,
                   java.lang.String tagName,
                   OMFactory factory)
Parameters:
ownerDocument - ownerDocument
tagName - tagName
factory - OMFactory

ElementImpl

public ElementImpl(DocumentImpl ownerDocument,
                   java.lang.String tagName,
                   NamespaceImpl ns,
                   OMFactory factory)
Creates a new element with the namespace.

Parameters:
ownerDocument -
tagName -
ns -
factory -

ElementImpl

public ElementImpl(DocumentImpl ownerDocument,
                   java.lang.String tagName,
                   NamespaceImpl ns,
                   OMXMLParserWrapper builder,
                   OMFactory factory)

ElementImpl

public ElementImpl(ParentNode parentNode,
                   java.lang.String tagName,
                   NamespaceImpl ns,
                   OMFactory factory)

ElementImpl

public ElementImpl(ParentNode parentNode,
                   java.lang.String tagName,
                   NamespaceImpl ns,
                   OMXMLParserWrapper builder,
                   OMFactory factory)

ElementImpl

public ElementImpl(java.lang.String tagName,
                   NamespaceImpl ns,
                   OMXMLParserWrapper builder,
                   OMFactory factory)

ElementImpl

public ElementImpl(OMFactory factory)
Method Detail

getNodeType

public short getNodeType()
Specified by:
getNodeType in interface org.w3c.dom.Node

getNodeName

public java.lang.String getNodeName()
Specified by:
getNodeName in interface org.w3c.dom.Node

getNamespaceURI

public java.lang.String getNamespaceURI()
Returns the value of the namespace URI.

Specified by:
getNamespaceURI in interface OMElement
Specified by:
getNamespaceURI in interface org.w3c.dom.Node
Overrides:
getNamespaceURI in class NodeImpl

getType

public int getType()
            throws OMException
Specified by:
getType in interface OMNode
Throws:
OMException

setType

public void setType(int nodeType)
             throws OMException
Specified by:
setType in interface OMNodeEx
Throws:
OMException

getTagName

public java.lang.String getTagName()
Specified by:
getTagName in interface org.w3c.dom.Element

removeAttribute

public void removeAttribute(java.lang.String name)
                     throws org.w3c.dom.DOMException
Removes an attribute by name.

Specified by:
removeAttribute in interface org.w3c.dom.Element
Parameters:
name - The name of the attribute to remove
Throws:
org.w3c.dom.DOMException
See Also:
Element.removeAttribute(String)

removeAttributeNS

public void removeAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
                       throws org.w3c.dom.DOMException
Specified by:
removeAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

removeAttributeNode

public org.w3c.dom.Attr removeAttributeNode(org.w3c.dom.Attr oldAttr)
                                     throws org.w3c.dom.DOMException
Removes the specified attribute node.

Specified by:
removeAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException
See Also:
Element.removeAttributeNode(org.w3c.dom.Attr)

hasAttribute

public boolean hasAttribute(java.lang.String name)
Specified by:
hasAttribute in interface org.w3c.dom.Element

hasAttributeNS

public boolean hasAttributeNS(java.lang.String namespaceURI,
                              java.lang.String localName)
Returns whether the given attribute is available or not.

Specified by:
hasAttributeNS in interface org.w3c.dom.Element
See Also:
Element.hasAttributeNS(String, String)

getAttribute

public java.lang.String getAttribute(java.lang.String name)
Looks in the local list of attributes and returns if found. If the local list is null, returns "".

Specified by:
getAttribute in interface org.w3c.dom.Element
See Also:
Element.getAttribute(String)

getAttributeNode

public org.w3c.dom.Attr getAttributeNode(java.lang.String name)
Retrieves an attribute node by name.

Specified by:
getAttributeNode in interface org.w3c.dom.Element
See Also:
Element.getAttributeNode(String)

getAttributeNS

public java.lang.String getAttributeNS(java.lang.String namespaceURI,
                                       java.lang.String localName)
Retrieves an attribute value by local name and namespace URI.

Specified by:
getAttributeNS in interface org.w3c.dom.Element
See Also:
Element.getAttributeNS(String, String)

getAttributeNodeNS

public org.w3c.dom.Attr getAttributeNodeNS(java.lang.String namespaceURI,
                                           java.lang.String localName)
Retrieves an attribute node by local name and namespace URI.

Specified by:
getAttributeNodeNS in interface org.w3c.dom.Element
See Also:
Element.getAttributeNodeNS(String, String)

setAttributeNode

public org.w3c.dom.Attr setAttributeNode(org.w3c.dom.Attr attr)
                                  throws org.w3c.dom.DOMException
Adds a new attribute node.

Specified by:
setAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException
See Also:
Element.setAttributeNode(org.w3c.dom.Attr)

setAttribute

public void setAttribute(java.lang.String name,
                         java.lang.String value)
                  throws org.w3c.dom.DOMException
Specified by:
setAttribute in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNodeNS

public org.w3c.dom.Attr setAttributeNodeNS(org.w3c.dom.Attr attr)
                                    throws org.w3c.dom.DOMException
Specified by:
setAttributeNodeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setAttributeNS

public void setAttributeNS(java.lang.String namespaceURI,
                           java.lang.String qualifiedName,
                           java.lang.String value)
                    throws org.w3c.dom.DOMException
Adds a new attribute.

Specified by:
setAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException
See Also:
Element.setAttributeNS(String, String, String)

hasAttributes

public boolean hasAttributes()
Returns whether this element contains any attribute or not.

Specified by:
hasAttributes in interface org.w3c.dom.Node
Overrides:
hasAttributes in class NodeImpl

getElementsByTagNameNS

public org.w3c.dom.NodeList getElementsByTagNameNS(java.lang.String namespaceURI,
                                                   java.lang.String localName)
Specified by:
getElementsByTagNameNS in interface org.w3c.dom.Element

getElementsByTagName

public org.w3c.dom.NodeList getElementsByTagName(java.lang.String name)
Specified by:
getElementsByTagName in interface org.w3c.dom.Element

addAttribute

public OMAttribute addAttribute(OMAttribute attr)
Specified by:
addAttribute in interface OMElement
See Also:
(org.apache.axiom.om.OMAttribute)

addAttribute

public OMAttribute addAttribute(java.lang.String localName,
                                java.lang.String value,
                                OMNamespace ns)
Specified by:
addAttribute in interface OMElement

declareNamespace

public OMNamespace declareNamespace(OMNamespace namespace)
Allows overriding an existing declaration if the same prefix was used.

Specified by:
declareNamespace in interface OMElement
See Also:
(org.apache.axiom.om.OMNamespace)

declareNamespace

public OMNamespace declareNamespace(java.lang.String uri,
                                    java.lang.String prefix)
Allows overriding an existing declaration if the same prefix was used.

Specified by:
declareNamespace in interface OMElement
See Also:
OMElement.declareNamespace(String, String)

declareDefaultNamespace

public OMNamespace declareDefaultNamespace(java.lang.String uri)
We use "" to store the default namespace of this element. As one can see user can not give "" as the prefix, when he declare a usual namespace.

Specified by:
declareDefaultNamespace in interface OMElement
Parameters:
uri -

getDefaultNamespace

public OMNamespace getDefaultNamespace()
Specified by:
getDefaultNamespace in interface OMElement

findNamespace

public OMNamespace findNamespace(java.lang.String uri,
                                 java.lang.String prefix)
Specified by:
findNamespace in interface OMElement
See Also:
OMElement.findNamespace(String, String)

findNamespaceURI

public OMNamespace findNamespaceURI(java.lang.String prefix)
Specified by:
findNamespaceURI in interface OMElement

getAttribute

public OMAttribute getAttribute(javax.xml.namespace.QName qname)
Returns a named attribute if present.

Specified by:
getAttribute in interface OMElement
See Also:
(javax.xml.namespace.QName)

getAttributeValue

public java.lang.String getAttributeValue(javax.xml.namespace.QName qname)
Returns a named attribute's value, if present.

Specified by:
getAttributeValue in interface OMElement
Parameters:
qname - the qualified name to search for
Returns:
Returns a String containing the attribute value, or null.

getFirstElement

public OMElement getFirstElement()
Returns the first Element node.

Specified by:
getFirstElement in interface OMElement
See Also:
OMElement.getFirstElement()

getNamespace

public OMNamespace getNamespace()
Returns the namespace of this element.

Specified by:
getNamespace in interface OMElement
See Also:
OMElement.getNamespace()

getQName

public javax.xml.namespace.QName getQName()
Returns the QName of this element.

Specified by:
getQName in interface OMElement
See Also:
OMElement.getQName()

getText

public java.lang.String getText()
Gets all the text children and concatinates them to a single string.

Specified by:
getText in interface OMElement
See Also:
OMElement.getText()

getTextAsQName

public javax.xml.namespace.QName getTextAsQName()
Specified by:
getTextAsQName in interface OMElement

getTrimmedText

public java.lang.String getTrimmedText()

removeAttribute

public void removeAttribute(OMAttribute attr)
Removes an attribute from the element.

Specified by:
removeAttribute in interface OMElement
See Also:
(org.apache.axiom.om.OMAttribute)

setBuilder

public void setBuilder(OMXMLParserWrapper wrapper)
Sets the OM builder.

Specified by:
setBuilder in interface OMElement
See Also:
(org.apache.axiom.om.OMXMLParserWrapper)

setLocalName

public void setLocalName(java.lang.String localName)
Sets the local name.

Specified by:
setLocalName in interface OMElement
See Also:
OMElement.setLocalName(String)

setNamespace

public void setNamespace(OMNamespace namespace)
Sets the namespace.

Specified by:
setNamespace in interface OMElement
See Also:
(org.apache.axiom.om.OMNamespace)

setNamespaceWithNoFindInCurrentScope

public void setNamespaceWithNoFindInCurrentScope(OMNamespace namespace)
Specified by:
setNamespaceWithNoFindInCurrentScope in interface OMElement

setText

public void setText(java.lang.String text)
Creates a text node with the given value and adds it to the element.

Specified by:
setText in interface OMElement
See Also:
OMElement.setText(String)

setText

public void setText(javax.xml.namespace.QName text)
Specified by:
setText in interface OMElement

internalSerialize

public void internalSerialize(javax.xml.stream.XMLStreamWriter writer,
                              boolean cache)
                       throws javax.xml.stream.XMLStreamException
Specified by:
internalSerialize in interface OMNodeEx
Throws:
javax.xml.stream.XMLStreamException

toStringWithConsume

public java.lang.String toStringWithConsume()
                                     throws javax.xml.stream.XMLStreamException
Specified by:
toStringWithConsume in interface OMElement
Throws:
javax.xml.stream.XMLStreamException

toString

public java.lang.String toString()
Overridden toString() for ease of debugging.

Specified by:
toString in interface OMElement
Overrides:
toString in class java.lang.Object
See Also:
Object.toString()

getChildElements

public java.util.Iterator getChildElements()
Specified by:
getChildElements in interface OMElement

getAllDeclaredNamespaces

public java.util.Iterator getAllDeclaredNamespaces()
                                            throws OMException
Specified by:
getAllDeclaredNamespaces in interface OMElement
Throws:
OMException
See Also:
OMElement.getAllDeclaredNamespaces()

getAllAttributes

public java.util.Iterator getAllAttributes()
Specified by:
getAllAttributes in interface OMElement
See Also:
OMElement.getAllAttributes()

getLocalName

public java.lang.String getLocalName()
Returns the local name of this element node

Specified by:
getLocalName in interface OMElement
Specified by:
getLocalName in interface org.w3c.dom.Node
Overrides:
getLocalName in class NodeImpl
See Also:
Node.getLocalName()

getPrefix

public java.lang.String getPrefix()
Returns the namespace prefix of this element node

Specified by:
getPrefix in interface org.w3c.dom.Node
Overrides:
getPrefix in class NodeImpl
See Also:
Node.getPrefix()

setOwnerDocument

protected void setOwnerDocument(DocumentImpl document)
Description copied from class: NodeImpl
Sets the owner document.

Overrides:
setOwnerDocument in class NodeImpl
See Also:
(org.apache.axiom.om.impl.dom.DocumentImpl)

resolveQName

public javax.xml.namespace.QName resolveQName(java.lang.String qname)
Specified by:
resolveQName in interface OMElement

cloneOMElement

public OMElement cloneOMElement()
Creates a clone which belongs to a new document.

Specified by:
cloneOMElement in interface OMElement
See Also:
OMElement.cloneOMElement()

setLineNumber

public void setLineNumber(int lineNumber)
Specified by:
setLineNumber in interface OMElement

getLineNumber

public int getLineNumber()
Specified by:
getLineNumber in interface OMElement

cloneNode

public org.w3c.dom.Node cloneNode(boolean deep)
Specified by:
cloneNode in interface org.w3c.dom.Node
Overrides:
cloneNode in class ParentNode

getAttributes

public org.w3c.dom.NamedNodeMap getAttributes()
Returns the set of attributes of this node and the namespace declarations available.

Specified by:
getAttributes in interface org.w3c.dom.Node
Overrides:
getAttributes in class NodeImpl
See Also:
ElementImpl

getNamespaceURI

public java.lang.String getNamespaceURI(java.lang.String prefix)
Returns the namespace uri, given the prefix. If it is not found at this element, searches the parent.

Parameters:
prefix -
Returns:
Returns namespace.

removeNamespace

public boolean removeNamespace(java.lang.String prefix)
Removes a declared namespace given its prefix.

Parameters:
prefix -
Returns:
Returns whether the namespace relevant to the given prefix was removed or not

getNextOMSibling

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

Specified by:
getNextOMSibling in interface OMNode
Overrides:
getNextOMSibling in class ChildNode
Throws:
OMException

discard

public void discard()
             throws OMException
Specified by:
discard in interface OMNode
Overrides:
discard in class ChildNode
Throws:
OMException

setIdAttribute

public void setIdAttribute(java.lang.String name,
                           boolean isId)
                    throws org.w3c.dom.DOMException
Specified by:
setIdAttribute in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setIdAttributeNS

public void setIdAttributeNS(java.lang.String namespaceURI,
                             java.lang.String localName,
                             boolean isId)
                      throws org.w3c.dom.DOMException
Specified by:
setIdAttributeNS in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

setIdAttributeNode

public void setIdAttributeNode(org.w3c.dom.Attr idAttr,
                               boolean isId)
                        throws org.w3c.dom.DOMException
Specified by:
setIdAttributeNode in interface org.w3c.dom.Element
Throws:
org.w3c.dom.DOMException

getSchemaTypeInfo

public org.w3c.dom.TypeInfo getSchemaTypeInfo()
Specified by:
getSchemaTypeInfo in interface org.w3c.dom.Element

buildWithAttachments

public void buildWithAttachments()
Description copied from class: NodeImpl
Parses this node and builds the object structure in memory. AXIOM supports two levels of deffered building. First is deffered building of AXIOM using StAX. Second level is the deffered building of attachments. AXIOM reads in the attachements from the stream only when user asks by calling getDataHandler(). build() method builds the OM without the attachments. buildAll() builds the OM together with attachement data. This becomes handy when user wants to free the input stream.

Specified by:
buildWithAttachments in interface OMNode
Overrides:
buildWithAttachments in class NodeImpl


Copyright © 2004-2011 The Apache Software Foundation. All Rights Reserved.