public class SOAPContentElement extends SOAPElementImpl implements SOAPContentAccess
The SOAPContentElement has three content representations, which may not exist in parallel. The getter and setter of the content properties perform the conversions.
+---------+ +-------------+ +-------------+ | Object | <-----> | XMLFragment | <-----> | DOMTree | +---------+ +-------------+ +-------------+The idea is, that handlers can work with both the object and the dom view of this SOAPElement. Note that transitions may be expensive.
ObjectContent,
XMLContent,
DOMContent| Modifier and Type | Field and Description |
|---|---|
static QName |
GENERIC_PARAM_NAME |
static QName |
GENERIC_RETURN_NAME |
protected SOAPContent |
soapContent |
domNode, soapParentATTRIBUTE_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| Constructor and Description |
|---|
SOAPContentElement(Name name)
Construct a SOAPContentElement
|
SOAPContentElement(QName qname) |
SOAPContentElement(SOAPElementImpl element) |
| Modifier and Type | Method and Description |
|---|---|
void |
accept(SAAJVisitor visitor) |
SOAPElement |
addAttribute(Name name,
String value)
Adds an attribute with the specified name and value to this SOAPElement object.
|
SOAPElement |
addChildElement(Name name)
Creates a new SOAPElement object initialized with the given Name object and adds the new element to this SOAPElement object.
|
SOAPElement |
addChildElement(SOAPElement child)
Add a SOAPElement as a child of this SOAPElement instance.
|
SOAPElement |
addChildElement(String name)
Creates a new SOAPElement object initialized with the specified local name and adds the new element to this SOAPElement object.
|
SOAPElement |
addChildElement(String localName,
String prefix)
Creates a new SOAPElement object initialized with the specified local name and prefix and adds the new element to this SOAPElement object.
|
SOAPElement |
addChildElement(String localName,
String prefix,
String uri)
Creates a new SOAPElement object initialized with the specified local name, prefix, and URI and adds the new element to this SOAPElement object.
|
SOAPElement |
addNamespaceDeclaration(String prefix,
String nsURI)
Adds a namespace declaration with the specified prefix and URI to this SOAPElement object.
|
SOAPElement |
addTextNode(String value)
Creates a new Text object initialized with the given String and adds it to this SOAPElement object.
|
Node |
appendChild(Node newChild) |
Node |
cloneNode(boolean deep) |
Iterator<Name> |
getAllAttributes()
Returns an Iterator over all of the attribute Name objects in this SOAPElement object.
|
String |
getAttribute(String name) |
Attr |
getAttributeNode(String name) |
Attr |
getAttributeNodeNS(String namespaceURI,
String localName) |
String |
getAttributeNS(String namespaceURI,
String localName) |
NamedNodeMap |
getAttributes() |
String |
getAttributeValue(Name name)
Returns the value of the attribute with the specified name.
|
Iterator<Node> |
getChildElements()
Returns an Iterator over all the immediate child Nodes of this element.
|
Iterator<SOAPElement> |
getChildElements(Name name)
Returns an Iterator over all the immediate child Nodes of this element with the specified name.
|
NodeList |
getChildNodes() |
Name |
getElementName()
Returns the name of this SOAPElement object.
|
NodeList |
getElementsByTagName(String name) |
NodeList |
getElementsByTagNameNS(String namespaceURI,
String localName) |
String |
getEncodingStyle()
Returns the encoding style for this SOAPElement object.
|
Node |
getFirstChild() |
Class |
getJavaType() |
Node |
getLastChild() |
Iterator<String> |
getNamespacePrefixes()
Returns an Iterator over the namespace prefix Strings declared by this element.
|
String |
getNamespaceURI(String prefix)
Returns the URI of the namespace that has the given prefix.
|
Node |
getNextSibling() |
Object |
getObjectValue() |
ParameterMetaData |
getParamMetaData() |
Node |
getPreviousSibling() |
TypeInfo |
getSchemaTypeInfo() |
String |
getTagName() |
String |
getValue()
Returns the value of this node if this is a Text node or the value of the immediate child of this node otherwise.
|
Iterator<String> |
getVisibleNamespacePrefixes()
Returns an Iterator over the namespace prefix Strings visible to this element.
|
XMLFragment |
getXMLFragment()
Get the payload as source.
|
QName |
getXmlType() |
boolean |
hasAttribute(String name) |
boolean |
hasAttributeNS(String namespaceURI,
String localName) |
boolean |
hasAttributes() |
boolean |
hasChildNodes() |
boolean |
removeAttribute(Name name)
Removes the attribute with the specified name.
|
void |
removeAttribute(String name) |
Attr |
removeAttributeNode(Attr oldAttr) |
void |
removeAttributeNS(String namespaceURI,
String localName) |
Node |
removeChild(Node oldChild) |
void |
removeContents()
Detaches all children of this SOAPElement.
|
boolean |
removeNamespaceDeclaration(String prefix)
Removes the namespace declaration corresponding to the given prefix.
|
Node |
replaceChild(Node newChild,
Node oldChild) |
void |
setAttribute(String name,
String value) |
Attr |
setAttributeNode(Attr newAttr) |
Attr |
setAttributeNodeNS(Attr newAttr) |
void |
setAttributeNS(String namespaceURI,
String qualifiedName,
String value) |
void |
setIdAttribute(String name,
boolean isId) |
void |
setIdAttributeNode(Attr idAttr,
boolean isId) |
void |
setIdAttributeNS(String namespaceURI,
String localName,
boolean isId) |
void |
setObjectValue(Object objValue) |
void |
setParamMetaData(ParameterMetaData paramMetaData) |
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.
|
void |
setXMLFragment(XMLFragment xmlFragment) |
protected SOAPContent.State |
transitionTo(SOAPContent.State nextState) |
void |
writeElement(Writer writer)
The default implementation uses a DOMWriter.
|
addAttribute, addChildElement, createQName, getAllAttributesAsQNames, getAttributeValue, getChildElements, getElementQName, getFirstChildElementByLocalName, getSOAPEnvelope, removeAttribute, setElementQName, setElementQNameInternal, setEncodingStyle, setPrefix, writeElementContentcompareDocumentPosition, detachNode, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentElement, getParentNode, getPrefix, getTextContent, getUserData, hashCode, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, recycleNode, setNodeValue, setParentElement, setTextContent, setUserData, toStringclone, equals, finalize, getClass, notify, notifyAll, wait, wait, waitdetachNode, getParentElement, recycleNode, setParentElementcompareDocumentPosition, getBaseURI, getFeature, getLocalName, getNamespaceURI, getNodeName, getNodeType, getNodeValue, getOwnerDocument, getParentNode, getPrefix, getTextContent, getUserData, insertBefore, isDefaultNamespace, isEqualNode, isSameNode, isSupported, lookupNamespaceURI, lookupPrefix, normalize, setNodeValue, setTextContent, setUserDatapublic static final QName GENERIC_PARAM_NAME
public static final QName GENERIC_RETURN_NAME
protected SOAPContent soapContent
public SOAPContentElement(Name name)
public SOAPContentElement(QName qname)
public SOAPContentElement(SOAPElementImpl element)
public ParameterMetaData getParamMetaData()
public void setParamMetaData(ParameterMetaData paramMetaData)
public QName getXmlType()
public Class getJavaType()
protected SOAPContent.State transitionTo(SOAPContent.State nextState)
public XMLFragment getXMLFragment()
getXMLFragment in interface SOAPContentAccesspublic void setXMLFragment(XMLFragment xmlFragment)
setXMLFragment in interface SOAPContentAccesspublic Object getObjectValue()
getObjectValue in interface SOAPContentAccesspublic void setObjectValue(Object objValue)
setObjectValue in interface SOAPContentAccesspublic SOAPElement addChildElement(SOAPElement child) throws SOAPException
SOAPElementImpladdChildElement in interface SOAPElementaddChildElement in class SOAPElementImplchild - the SOAPElement to be added as a new childSOAPException - if there was an error in adding this element as a childpublic SOAPElement addChildElement(String localName, String prefix) throws SOAPException
SOAPElementImpladdChildElement in interface SOAPElementaddChildElement in class SOAPElementImpllocalName - a String giving the local name for the new elementprefix - a String giving the namespace prefix for the new elementSOAPException - if there is an error in creating the SOAPElement objectpublic SOAPElement addChildElement(String localName, String prefix, String uri) throws SOAPException
SOAPElementImpladdChildElement in interface SOAPElementaddChildElement in class SOAPElementImpllocalName - a String giving the local name for the new elementprefix - a String giving the namespace prefix for the new elementuri - a String giving the URI of the namespace to which the new element belongsSOAPException - if there is an error in creating the SOAPElement objectpublic SOAPElement addChildElement(Name name) throws SOAPException
SOAPElementImpladdChildElement in interface SOAPElementaddChildElement in class SOAPElementImplname - a Name object with the XML name for the new elementSOAPException - if there is an error in creating the SOAPElement objectpublic SOAPElement addChildElement(String name) throws SOAPException
SOAPElementImpladdChildElement in interface SOAPElementaddChildElement in class SOAPElementImplname - a String giving the local name for the elementSOAPException - if there is an error in creating the SOAPElement objectpublic SOAPElement addTextNode(String value) throws SOAPException
SOAPElementImpladdTextNode in interface SOAPElementaddTextNode in class SOAPElementImplvalue - a String object with the textual content to be addedSOAPException - if there is an error in creating the new Text object
or if it is not legal to attach it as a child to this SOAPElementpublic Iterator<Node> getChildElements()
SOAPElementImplgetChildElements in interface SOAPElementgetChildElements in class SOAPElementImplpublic Iterator<SOAPElement> getChildElements(Name name)
SOAPElementImplgetChildElements in interface SOAPElementgetChildElements in class SOAPElementImplname - a Name object with the name of the child elements to be returnedpublic void removeContents()
SOAPElementImplremoveContents in interface SOAPElementremoveContents in class SOAPElementImplpublic Iterator<Name> getAllAttributes()
SOAPElementImplgetAllAttributes in interface SOAPElementgetAllAttributes in class SOAPElementImplpublic String getAttribute(String name)
getAttribute in interface ElementgetAttribute in class SOAPElementImplpublic Attr getAttributeNode(String name)
getAttributeNode in interface ElementgetAttributeNode in class SOAPElementImplpublic Attr getAttributeNodeNS(String namespaceURI, String localName)
getAttributeNodeNS in interface ElementgetAttributeNodeNS in class SOAPElementImplpublic String getAttributeNS(String namespaceURI, String localName)
getAttributeNS in interface ElementgetAttributeNS in class SOAPElementImplpublic String getAttributeValue(Name name)
SOAPElementImplgetAttributeValue in interface SOAPElementgetAttributeValue in class SOAPElementImplname - a Name object with the name of the attributepublic SOAPElement addAttribute(Name name, String value) throws SOAPException
SOAPElementImpladdAttribute in interface SOAPElementaddAttribute in class SOAPElementImplname - a Name object with the name of the attributevalue - a String giving the value of the attributeSOAPException - if there is an error in creating the Attributepublic SOAPElement addNamespaceDeclaration(String prefix, String nsURI)
SOAPElementImpladdNamespaceDeclaration in interface SOAPElementaddNamespaceDeclaration in class SOAPElementImplprefix - a String giving the prefix of the namespacensURI - a String giving the uri of the namespacepublic Name getElementName()
SOAPElementImplgetElementName in interface SOAPElementgetElementName in class SOAPElementImplpublic NodeList getElementsByTagName(String name)
getElementsByTagName in interface ElementgetElementsByTagName in class SOAPElementImplpublic NodeList getElementsByTagNameNS(String namespaceURI, String localName)
getElementsByTagNameNS in interface ElementgetElementsByTagNameNS in class SOAPElementImplpublic String getEncodingStyle()
SOAPElementImplgetEncodingStyle in interface SOAPElementgetEncodingStyle in class SOAPElementImplpublic Iterator<String> getNamespacePrefixes()
SOAPElementImplgetNamespacePrefixes in interface SOAPElementgetNamespacePrefixes in class SOAPElementImplpublic String getNamespaceURI(String prefix)
SOAPElementImplgetNamespaceURI in interface SOAPElementgetNamespaceURI in class SOAPElementImplprefix - a String giving the prefix of the namespace for which to searchpublic TypeInfo getSchemaTypeInfo()
getSchemaTypeInfo in interface ElementgetSchemaTypeInfo in class SOAPElementImplpublic String getTagName()
getTagName in interface ElementgetTagName in class SOAPElementImplpublic Iterator<String> getVisibleNamespacePrefixes()
SOAPElementImplgetVisibleNamespacePrefixes in interface SOAPElementgetVisibleNamespacePrefixes in class SOAPElementImplpublic boolean hasAttribute(String name)
hasAttribute in interface ElementhasAttribute in class SOAPElementImplpublic boolean hasAttributeNS(String namespaceURI, String localName)
hasAttributeNS in interface ElementhasAttributeNS in class SOAPElementImplpublic boolean removeAttribute(Name name)
SOAPElementImplremoveAttribute in interface SOAPElementremoveAttribute in class SOAPElementImplname - the Name object with the name of the attribute to be removedpublic void removeAttribute(String name) throws DOMException
removeAttribute in interface ElementremoveAttribute in class SOAPElementImplDOMExceptionpublic Attr removeAttributeNode(Attr oldAttr) throws DOMException
removeAttributeNode in interface ElementremoveAttributeNode in class SOAPElementImplDOMExceptionpublic void removeAttributeNS(String namespaceURI, String localName) throws DOMException
removeAttributeNS in interface ElementremoveAttributeNS in class SOAPElementImplDOMExceptionpublic boolean removeNamespaceDeclaration(String prefix)
SOAPElementImplremoveNamespaceDeclaration in interface SOAPElementremoveNamespaceDeclaration in class SOAPElementImplprefix - a String giving the prefix for which to searchpublic void setAttribute(String name, String value) throws DOMException
setAttribute in interface ElementsetAttribute in class SOAPElementImplDOMExceptionpublic Attr setAttributeNode(Attr newAttr) throws DOMException
setAttributeNode in interface ElementsetAttributeNode in class SOAPElementImplDOMExceptionpublic Attr setAttributeNodeNS(Attr newAttr) throws DOMException
setAttributeNodeNS in interface ElementsetAttributeNodeNS in class SOAPElementImplDOMExceptionpublic void setAttributeNS(String namespaceURI, String qualifiedName, String value) throws DOMException
setAttributeNS in interface ElementsetAttributeNS in class SOAPElementImplDOMExceptionpublic void setIdAttribute(String name, boolean isId) throws DOMException
setIdAttribute in interface ElementsetIdAttribute in class SOAPElementImplDOMExceptionpublic void setIdAttributeNode(Attr idAttr, boolean isId) throws DOMException
setIdAttributeNode in interface ElementsetIdAttributeNode in class SOAPElementImplDOMExceptionpublic void setIdAttributeNS(String namespaceURI, String localName, boolean isId) throws DOMException
setIdAttributeNS in interface ElementsetIdAttributeNS in class SOAPElementImplDOMExceptionpublic Node appendChild(Node newChild) throws DOMException
appendChild in interface NodeappendChild in class NodeImplDOMExceptionpublic Node cloneNode(boolean deep)
public NodeList getChildNodes()
getChildNodes in interface NodegetChildNodes in class NodeImplpublic Node getFirstChild()
getFirstChild in interface NodegetFirstChild in class NodeImplpublic Node getLastChild()
getLastChild in interface NodegetLastChild in class NodeImplpublic String getValue()
NodeImplpublic boolean hasChildNodes()
hasChildNodes in interface NodehasChildNodes in class NodeImplpublic Node removeChild(Node oldChild) throws DOMException
removeChild in interface NoderemoveChild in class NodeImplDOMExceptionpublic Node replaceChild(Node newChild, Node oldChild) throws DOMException
replaceChild in interface NodereplaceChild in class NodeImplDOMExceptionpublic void setValue(String value)
NodeImplpublic NamedNodeMap getAttributes()
getAttributes in interface NodegetAttributes in class NodeImplpublic boolean hasAttributes()
hasAttributes in interface NodehasAttributes in class NodeImplpublic Node getPreviousSibling()
getPreviousSibling in interface NodegetPreviousSibling in class NodeImplpublic Node getNextSibling()
getNextSibling in interface NodegetNextSibling in class NodeImplpublic void writeElement(Writer writer) throws IOException
SOAPElementImplwriteElement in class SOAPElementImplIOExceptionpublic void accept(SAAJVisitor visitor)
Copyright © 2013 JBoss, by Red Hat. All Rights Reserved.