com.ibm.websphere.sib.wsn
Class ElementAndText
- java.lang.Object
-
- com.ibm.websphere.sib.wsn.ElementAndText
-
public class ElementAndText extends java.lang.Object
This class encapsulates an XML element surrounded by text. It represents the content of a complexType with a structure similar to the following:<xsd:complexType . . . mixed="true"> <xsd:sequence> <xsd:any minOccurs="0" maxOccurs="1" /> </xsd:sequence> </xsd:complexType>
-
-
Field Summary
Fields Modifier and Type Field and Description protected javax.xml.soap.SOAPElement
element
The elementprotected java.lang.String
textAfterElement
Any text appearing after the elementprotected java.lang.String
textBeforeElement
Any text appearing before the element
-
Constructor Summary
Constructors Constructor and Description ElementAndText(java.lang.String textBeforeElement, javax.xml.soap.SOAPElement element, java.lang.String textAfterElement)
Create a new instance from the specified text values and element
-
Method Summary
Methods Modifier and Type Method and Description javax.xml.soap.SOAPElement
getElement()
Get the element valuejava.lang.String
getTextAfterElement()
Get the value of any text appearing after the element.java.lang.String
getTextBeforeElement()
Get the value of any text appearing before the element.void
setElement(javax.xml.soap.SOAPElement element)
Set the elementvoid
setTextAfterElement(java.lang.String text)
Set the text appearing after the elementvoid
setTextBeforeElement(java.lang.String text)
Set the text appearing before the element
-
-
-
Field Detail
-
textBeforeElement
protected java.lang.String textBeforeElement
Any text appearing before the element
-
textAfterElement
protected java.lang.String textAfterElement
Any text appearing after the element
-
element
protected javax.xml.soap.SOAPElement element
The element
-
-
Constructor Detail
-
ElementAndText
public ElementAndText(java.lang.String textBeforeElement, javax.xml.soap.SOAPElement element, java.lang.String textAfterElement)
Create a new instance from the specified text values and element- Parameters:
textBeforeElement
- Text to appear before the element. Use a null value to indicate no text.element
- The elementtextAfterElement
- Text to appear after the element. Use a null value to indicate no text.
-
-
Method Detail
-
getTextBeforeElement
public java.lang.String getTextBeforeElement()
Get the value of any text appearing before the element.- Returns:
- The text or null if no such text exists
-
setTextBeforeElement
public void setTextBeforeElement(java.lang.String text)
Set the text appearing before the element- Parameters:
text
- The text before the element
-
getElement
public javax.xml.soap.SOAPElement getElement()
Get the element value- Returns:
- The element value or null if no element has been set
-
setElement
public void setElement(javax.xml.soap.SOAPElement element)
Set the element- Parameters:
element
- The element
-
getTextAfterElement
public java.lang.String getTextAfterElement()
Get the value of any text appearing after the element.- Returns:
- The text or null if no such text exists
-
setTextAfterElement
public void setTextAfterElement(java.lang.String text)
Set the text appearing after the element- Parameters:
text
- The text after the element
-
-