|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.axiom.om.impl.dom.NodeImpl
org.apache.axis2.saaj.NodeImplEx
org.apache.axis2.saaj.SOAPElementImpl
public class SOAPElementImpl
Field Summary | |
---|---|
protected org.apache.axiom.om.impl.dom.ElementImpl |
element
Using a delegate because we can't extend from org.apache.axiom.om.impl.dom.ElementImpl since this class must extend SNodeImpl |
Fields inherited from class org.apache.axis2.saaj.NodeImplEx |
---|
parentElement |
Fields inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
---|
builder, done, factory, FIRSTCHILD, flags, HAS_PARENT, SPECIFIED |
Constructor Summary | |
---|---|
SOAPElementImpl(org.apache.axiom.om.impl.dom.ElementImpl element)
|
Method Summary | |
---|---|
SOAPElement |
addAttribute(Name name,
String value)
Adds an attribute with the specified name and value to this SOAPElement object. |
SOAPElement |
addAttribute(QName qname,
String value)
|
SOAPElement |
addChildElement(Name name)
|
SOAPElement |
addChildElement(QName qname)
|
SOAPElement |
addChildElement(SOAPElement soapElement)
|
SOAPElement |
addChildElement(String localName)
|
SOAPElement |
addChildElement(String localName,
String prefix)
|
SOAPElement |
addChildElement(String localName,
String prefix,
String namespaceURI)
|
SOAPElement |
addNamespaceDeclaration(String prefix,
String uri)
|
SOAPElement |
addTextNode(String text)
Creates a new Text object initialized with the given String and
adds it to this SOAPElement object. |
Node |
appendChild(Node child)
|
protected Element |
appendElement(org.apache.axiom.om.impl.dom.ElementImpl child)
|
protected Text |
appendText(Text child)
|
protected Object |
clone()
|
protected void |
copyContents(SOAPElementImpl childEle,
Node child)
|
QName |
createQName(String localName,
String prefix)
Creates a QName whose namespace URI is the one associated with the parameter, prefix, in the context of this SOAPElement. |
org.apache.axiom.om.OMNode |
detach()
|
void |
detachNode()
Removes this Node object from the tree. |
void |
discard()
|
Iterator |
getAllAttributes()
Returns an iterator over all of the attribute names in this SOAPElement object. |
Iterator |
getAllAttributesAsQNames()
|
String |
getAttribute(String name)
|
Attr |
getAttributeNode(String name)
|
Attr |
getAttributeNodeNS(String namespaceURI,
String localName)
|
String |
getAttributeNS(String namespaceURI,
String localName)
|
NamedNodeMap |
getAttributes()
Returns the collection of attributes associated with this node, or null if none. |
String |
getAttributeValue(Name name)
|
String |
getAttributeValue(QName qname)
|
Iterator |
getChildElements()
Returns an iterator over all the immediate content of this element. |
Iterator |
getChildElements(Name name)
|
Iterator |
getChildElements(QName qname)
|
NodeList |
getChildNodes()
|
org.apache.axiom.om.impl.dom.ElementImpl |
getElement()
|
Name |
getElementName()
|
QName |
getElementQName()
|
NodeList |
getElementsByTagName(String name)
|
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName)
|
String |
getEncodingStyle()
|
Node |
getFirstChild()
|
Node |
getLastChild()
Method getLastChild |
String |
getLocalName()
|
Iterator |
getNamespacePrefixes()
|
String |
getNamespaceURI()
|
String |
getNamespaceURI(String prefix)
|
Node |
getNextSibling()
dom Node method |
String |
getNodeName()
|
short |
getNodeType()
|
Document |
getOwnerDocument()
Find the Document that this Node belongs to (the document in whose context the Node was created). |
SOAPElement |
getParentElement()
Returns the parent element of this Node object. |
Node |
getParentNode()
|
String |
getPrefix()
|
Node |
getPreviousSibling()
|
String |
getTagName()
|
String |
getTextContent()
|
String |
getValue()
Returns the the value of the immediate child of this Node object if a child
exists and its value is text. |
Iterator |
getVisibleNamespacePrefixes()
|
boolean |
hasAttribute(String name)
|
boolean |
hasAttributeNS(String namespaceURI,
String localName)
|
boolean |
hasChildNodes()
|
void |
internalSerialize(XMLStreamWriter writer,
boolean cache)
|
boolean |
removeAttribute(Name name)
|
boolean |
removeAttribute(QName qname)
|
void |
removeAttribute(String name)
|
Attr |
removeAttributeNode(Attr attr)
|
void |
removeAttributeNS(String namespaceURI,
String localName)
|
Node |
removeChild(Node oldChild)
|
void |
removeContents()
|
boolean |
removeNamespaceDeclaration(String prefix)
|
void |
setAttribute(String name,
String value)
|
Attr |
setAttributeNode(Attr attr)
|
Attr |
setAttributeNodeNS(Attr attr)
|
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
|
SOAPElement |
setElementQName(QName newName)
|
void |
setEncodingStyle(String encodingStyle)
Sets the encoding style for this SOAPElement object to one specified. |
void |
setParent(org.apache.axiom.om.OMContainer parentElement)
|
void |
setParentElement(SOAPElement parent)
Sets the parent of this Node object to the given SOAPElement
object. |
void |
setValue(String value)
If this is a Text node then this method will set its value, otherwise it sets the value of the immediate (Text) child of this node. |
String |
toString()
|
Methods inherited from class org.apache.axis2.saaj.NodeImplEx |
---|
getParent, getSchemaTypeInfo, getType, recycleNode, setIdAttribute, setIdAttributeNode, setIdAttributeNS, setType |
Methods inherited from class org.apache.axiom.om.impl.dom.NodeImpl |
---|
cloneNode, compareDocumentPosition, getBaseURI, getFeature, getLength, getNodeValue, getOMFactory, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, item, lookupNamespaceURI, lookupPrefix, normalize, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Methods inherited from class java.lang.Object |
---|
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface javax.xml.soap.Node |
---|
recycleNode |
Methods inherited from interface org.w3c.dom.Element |
---|
getSchemaTypeInfo, setIdAttribute, setIdAttributeNode, setIdAttributeNS |
Methods inherited from interface org.w3c.dom.Node |
---|
cloneNode, compareDocumentPosition, getBaseURI, getFeature, getNodeValue, getUserData, hasAttributes, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, replaceChild, setNodeValue, setPrefix, setTextContent, setUserData |
Field Detail |
---|
protected org.apache.axiom.om.impl.dom.ElementImpl element
Constructor Detail |
---|
public SOAPElementImpl(org.apache.axiom.om.impl.dom.ElementImpl element)
Method Detail |
---|
public void discard() throws org.apache.axiom.om.OMException
org.apache.axiom.om.OMException
public void internalSerialize(XMLStreamWriter writer, boolean cache) throws XMLStreamException
XMLStreamException
public SOAPElement addAttribute(Name name, String value) throws SOAPException
SOAPElement
object.
addAttribute
in interface SOAPElement
name
- a Name
object with the name of the attributevalue
- a String
giving the value of the attribute
SOAPElement
object into which the attribute was inserted
SOAPException
- if there is an error in creating the Attributepublic SOAPElement addChildElement(Name name) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(SOAPElement soapElement) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public String getLocalName()
getLocalName
in interface Node
getLocalName
in class org.apache.axiom.om.impl.dom.NodeImpl
public String getNamespaceURI()
getNamespaceURI
in interface Node
getNamespaceURI
in class org.apache.axiom.om.impl.dom.NodeImpl
public String getPrefix()
getPrefix
in interface Node
getPrefix
in class org.apache.axiom.om.impl.dom.NodeImpl
public SOAPElement addChildElement(String localName, String prefix, String namespaceURI) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(String localName, String prefix) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(String localName) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public SOAPElement addNamespaceDeclaration(String prefix, String uri) throws SOAPException
addNamespaceDeclaration
in interface SOAPElement
SOAPException
public SOAPElement addTextNode(String text) throws SOAPException
Text
object initialized with the given String
and
adds it to this SOAPElement
object.
addTextNode
in interface SOAPElement
text
- a String
object with the textual content to be added
SOAPElement
object into which the new Text
object was
inserted
SOAPException
- if there is an error in creating the new Text
objectpublic Iterator getAllAttributes()
SOAPElement
object.
The iterator can be used to get the attribute names, which can then be passed to the method
getAttributeValue
to retrieve the value of each attribute.
getAllAttributes
in interface SOAPElement
public String getAttributeValue(Name name)
getAttributeValue
in interface SOAPElement
public Iterator getChildElements()
Text
objects as well as SOAPElement
objects.
getChildElements
in interface SOAPElement
Text
and SOAPElement
contained within this
SOAPElement
objectpublic Iterator getChildElements(Name name)
getChildElements
in interface SOAPElement
public Name getElementName()
getElementName
in interface SOAPElement
public String getEncodingStyle()
getEncodingStyle
in interface SOAPElement
public Iterator getNamespacePrefixes()
getNamespacePrefixes
in interface SOAPElement
public String getNamespaceURI(String prefix)
getNamespaceURI
in interface SOAPElement
public Iterator getVisibleNamespacePrefixes()
getVisibleNamespacePrefixes
in interface SOAPElement
public SOAPElement addAttribute(QName qname, String value) throws SOAPException
addAttribute
in interface SOAPElement
SOAPException
public SOAPElement addChildElement(QName qname) throws SOAPException
addChildElement
in interface SOAPElement
SOAPException
public QName createQName(String localName, String prefix) throws SOAPException
createQName
in interface SOAPElement
localName
- - a String containing the local part of the name. prefix - a String
containing the prefix for the name.
SOAPException
- - if the QName cannot be created.public Iterator getAllAttributesAsQNames()
getAllAttributesAsQNames
in interface SOAPElement
public String getAttributeValue(QName qname)
getAttributeValue
in interface SOAPElement
public Iterator getChildElements(QName qname)
getChildElements
in interface SOAPElement
public QName getElementQName()
getElementQName
in interface SOAPElement
public boolean removeAttribute(QName qname)
removeAttribute
in interface SOAPElement
public SOAPElement setElementQName(QName newName) throws SOAPException
setElementQName
in interface SOAPElement
SOAPException
public boolean removeAttribute(Name name)
removeAttribute
in interface SOAPElement
public void removeContents()
removeContents
in interface SOAPElement
public boolean removeNamespaceDeclaration(String prefix)
removeNamespaceDeclaration
in interface SOAPElement
public void setEncodingStyle(String encodingStyle) throws SOAPException
setEncodingStyle
in interface SOAPElement
encodingStyle
- - a String giving the encoding style
IllegalArgumentException
- - if there was a problem in the encoding style being set. SOAPException - if setting
the encodingStyle is invalid for this SOAPElement.
SOAPException
public void setParent(org.apache.axiom.om.OMContainer parentElement)
public String getAttribute(String name)
getAttribute
in interface Element
public Attr getAttributeNode(String name)
getAttributeNode
in interface Element
public Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS
in interface Element
public String getAttributeNS(String namespaceURI, String localName)
getAttributeNS
in interface Element
public NodeList getElementsByTagName(String name)
getElementsByTagName
in interface Element
public NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS
in interface Element
public String getTagName()
getTagName
in interface Element
public boolean hasAttribute(String name)
hasAttribute
in interface Element
public boolean hasAttributeNS(String namespaceURI, String localName)
hasAttributeNS
in interface Element
public void removeAttribute(String name) throws DOMException
removeAttribute
in interface Element
DOMException
public Attr removeAttributeNode(Attr attr) throws DOMException
removeAttributeNode
in interface Element
DOMException
public void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS
in interface Element
DOMException
public void setAttribute(String name, String value) throws DOMException
setAttribute
in interface Element
DOMException
public Attr setAttributeNode(Attr attr) throws DOMException
setAttributeNode
in interface Element
DOMException
public Attr setAttributeNodeNS(Attr attr) throws DOMException
setAttributeNodeNS
in interface Element
DOMException
public void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS
in interface Element
DOMException
public String getNodeName()
getNodeName
in interface Node
public short getNodeType()
getNodeType
in interface Node
public org.apache.axiom.om.impl.dom.ElementImpl getElement()
public SOAPElement getParentElement()
Node
object. This method can throw an
UnsupportedOperationException
if the tree is not kept in memory.
getParentElement
in class NodeImplEx
SOAPElement
object that is the parent of this Node
object or null
if this Node
object is root
UnsupportedOperationException
- if the whole tree is not kept in memorysetParentElement(javax.xml.soap.SOAPElement)
public void setParentElement(SOAPElement parent) throws SOAPException
NodeImplEx
Node
object to the given SOAPElement
object.
setParentElement
in class NodeImplEx
parent
- the SOAPElement
object to be set as the parent of this
Node
object
SOAPException
- if there is a problem in setting the parent to the given elementgetParentElement()
public Document getOwnerDocument()
getOwnerDocument
in interface Node
public String getValue()
Node
object if a child
exists and its value is text.
getValue
in class NodeImplEx
String
with the text of the immediate child of this Node
object if (1) there is a child and (2) the child is a Text
object;
null
otherwisepublic String getTextContent() throws DOMException
getTextContent
in interface Node
getTextContent
in class org.apache.axiom.om.impl.dom.NodeImpl
DOMException
protected Object clone() throws CloneNotSupportedException
clone
in class Object
CloneNotSupportedException
public Node getFirstChild()
getFirstChild
in interface Node
getFirstChild
in class org.apache.axiom.om.impl.dom.NodeImpl
public Node getLastChild()
getLastChild
in interface Node
getLastChild
in class org.apache.axiom.om.impl.dom.NodeImpl
Node.getLastChild()
public Node getParentNode()
getParentNode
in interface Node
getParentNode
in class NodeImplEx
public Node getNextSibling()
getNextSibling
in interface Node
getNextSibling
in class org.apache.axiom.om.impl.dom.NodeImpl
public Node getPreviousSibling()
getPreviousSibling
in interface Node
getPreviousSibling
in class org.apache.axiom.om.impl.dom.NodeImpl
public NodeList getChildNodes()
getChildNodes
in interface Node
getChildNodes
in class org.apache.axiom.om.impl.dom.NodeImpl
public boolean hasChildNodes()
hasChildNodes
in interface Node
hasChildNodes
in class org.apache.axiom.om.impl.dom.NodeImpl
public void setValue(String value)
value
- the text to set
IllegalStateException
- if the node is not a Text node and either has more than one
child node or has a child node that is not a Text nodepublic void detachNode()
NodeImplEx
Node
object from the tree. Once removed, this node can be garbage
collected if there are no application references to it.
detachNode
in class NodeImplEx
public org.apache.axiom.om.OMNode detach()
detach
in class NodeImplEx
public NamedNodeMap getAttributes()
getAttributes
in interface Node
getAttributes
in class org.apache.axiom.om.impl.dom.NodeImpl
ElementImpl
public String toString()
toString
in class Object
public Node removeChild(Node oldChild) throws DOMException
removeChild
in interface Node
removeChild
in class org.apache.axiom.om.impl.dom.NodeImpl
DOMException
public Node appendChild(Node child) throws DOMException
appendChild
in interface Node
appendChild
in class org.apache.axiom.om.impl.dom.NodeImpl
DOMException
protected Text appendText(Text child) throws SOAPException
SOAPException
protected Element appendElement(org.apache.axiom.om.impl.dom.ElementImpl child) throws SOAPException
SOAPException
protected void copyContents(SOAPElementImpl childEle, Node child) throws SOAPException
SOAPException
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |