|
||||||||||
| 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 SOAPElementname - 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 Attribute
public SOAPElement addChildElement(Name name)
throws SOAPException
addChildElement in interface SOAPElementSOAPException
public SOAPElement addChildElement(SOAPElement soapElement)
throws SOAPException
addChildElement in interface SOAPElementSOAPExceptionpublic String getLocalName()
getLocalName in interface NodegetLocalName in class org.apache.axiom.om.impl.dom.NodeImplpublic String getNamespaceURI()
getNamespaceURI in interface NodegetNamespaceURI in class org.apache.axiom.om.impl.dom.NodeImplpublic String getPrefix()
getPrefix in interface NodegetPrefix in class org.apache.axiom.om.impl.dom.NodeImpl
public SOAPElement addChildElement(String localName,
String prefix,
String namespaceURI)
throws SOAPException
addChildElement in interface SOAPElementSOAPException
public SOAPElement addChildElement(String localName,
String prefix)
throws SOAPException
addChildElement in interface SOAPElementSOAPException
public SOAPElement addChildElement(String localName)
throws SOAPException
addChildElement in interface SOAPElementSOAPException
public SOAPElement addNamespaceDeclaration(String prefix,
String uri)
throws SOAPException
addNamespaceDeclaration in interface SOAPElementSOAPException
public SOAPElement addTextNode(String text)
throws SOAPException
Text object initialized with the given String and
adds it to this SOAPElement object.
addTextNode in interface SOAPElementtext - 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 SOAPElementpublic String getAttributeValue(Name name)
getAttributeValue in interface SOAPElementpublic Iterator getChildElements()
Text objects as well as SOAPElement objects.
getChildElements in interface SOAPElementText and SOAPElement contained within this
SOAPElement objectpublic Iterator getChildElements(Name name)
getChildElements in interface SOAPElementpublic Name getElementName()
getElementName in interface SOAPElementpublic String getEncodingStyle()
getEncodingStyle in interface SOAPElementpublic Iterator getNamespacePrefixes()
getNamespacePrefixes in interface SOAPElementpublic String getNamespaceURI(String prefix)
getNamespaceURI in interface SOAPElementpublic Iterator getVisibleNamespacePrefixes()
getVisibleNamespacePrefixes in interface SOAPElement
public SOAPElement addAttribute(QName qname,
String value)
throws SOAPException
addAttribute in interface SOAPElementSOAPException
public SOAPElement addChildElement(QName qname)
throws SOAPException
addChildElement in interface SOAPElementSOAPException
public QName createQName(String localName,
String prefix)
throws SOAPException
createQName in interface SOAPElementlocalName - - 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 SOAPElementpublic String getAttributeValue(QName qname)
getAttributeValue in interface SOAPElementpublic Iterator getChildElements(QName qname)
getChildElements in interface SOAPElementpublic QName getElementQName()
getElementQName in interface SOAPElementpublic boolean removeAttribute(QName qname)
removeAttribute in interface SOAPElement
public SOAPElement setElementQName(QName newName)
throws SOAPException
setElementQName in interface SOAPElementSOAPExceptionpublic boolean removeAttribute(Name name)
removeAttribute in interface SOAPElementpublic void removeContents()
removeContents in interface SOAPElementpublic boolean removeNamespaceDeclaration(String prefix)
removeNamespaceDeclaration in interface SOAPElement
public void setEncodingStyle(String encodingStyle)
throws SOAPException
setEncodingStyle in interface SOAPElementencodingStyle - - 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.
SOAPExceptionpublic void setParent(org.apache.axiom.om.OMContainer parentElement)
public String getAttribute(String name)
getAttribute in interface Elementpublic 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 Elementpublic NodeList getElementsByTagName(String name)
getElementsByTagName in interface Element
public NodeList getElementsByTagNameNS(String namespaceURI,
String localName)
getElementsByTagNameNS in interface Elementpublic String getTagName()
getTagName in interface Elementpublic 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 ElementDOMException
public Attr removeAttributeNode(Attr attr)
throws DOMException
removeAttributeNode in interface ElementDOMException
public void removeAttributeNS(String namespaceURI,
String localName)
throws DOMException
removeAttributeNS in interface ElementDOMException
public void setAttribute(String name,
String value)
throws DOMException
setAttribute in interface ElementDOMException
public Attr setAttributeNode(Attr attr)
throws DOMException
setAttributeNode in interface ElementDOMException
public Attr setAttributeNodeNS(Attr attr)
throws DOMException
setAttributeNodeNS in interface ElementDOMException
public void setAttributeNS(String namespaceURI,
String qualifiedName,
String value)
throws DOMException
setAttributeNS in interface ElementDOMExceptionpublic String getNodeName()
getNodeName in interface Nodepublic short getNodeType()
getNodeType in interface Nodepublic 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 NodeImplExSOAPElement 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
NodeImplExNode object to the given SOAPElement
object.
setParentElement in class NodeImplExparent - 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 Nodepublic String getValue()
Node object if a child
exists and its value is text.
getValue in class NodeImplExString 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 otherwise
public String getTextContent()
throws DOMException
getTextContent in interface NodegetTextContent in class org.apache.axiom.om.impl.dom.NodeImplDOMException
protected Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedExceptionpublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class org.apache.axiom.om.impl.dom.NodeImplpublic Node getLastChild()
getLastChild in interface NodegetLastChild in class org.apache.axiom.om.impl.dom.NodeImplNode.getLastChild()public Node getParentNode()
getParentNode in interface NodegetParentNode in class NodeImplExpublic Node getNextSibling()
getNextSibling in interface NodegetNextSibling in class org.apache.axiom.om.impl.dom.NodeImplpublic Node getPreviousSibling()
getPreviousSibling in interface NodegetPreviousSibling in class org.apache.axiom.om.impl.dom.NodeImplpublic NodeList getChildNodes()
getChildNodes in interface NodegetChildNodes in class org.apache.axiom.om.impl.dom.NodeImplpublic boolean hasChildNodes()
hasChildNodes in interface NodehasChildNodes in class org.apache.axiom.om.impl.dom.NodeImplpublic 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()
NodeImplExNode object from the tree. Once removed, this node can be garbage
collected if there are no application references to it.
detachNode in class NodeImplExpublic org.apache.axiom.om.OMNode detach()
detach in class NodeImplExpublic NamedNodeMap getAttributes()
getAttributes in interface NodegetAttributes in class org.apache.axiom.om.impl.dom.NodeImplElementImplpublic String toString()
toString in class Object
public Node removeChild(Node oldChild)
throws DOMException
removeChild in interface NoderemoveChild in class org.apache.axiom.om.impl.dom.NodeImplDOMException
public Node appendChild(Node child)
throws DOMException
appendChild in interface NodeappendChild in class org.apache.axiom.om.impl.dom.NodeImplDOMException
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 | |||||||||