com.ibm.workflow.upes
Class ContainerElement

java.lang.Object
  |
  +--com.ibm.workflow.upes.ContainerElement

public class ContainerElement
extends java.lang.Object

The ContainerElement class is a simple representation of MQSeries Workflow container elements. It has the ability to navigate through a TXElement based 'XML parse tree' and to get the container element information out of an XML container representation. On the other side it provides an interface to access its value or its subelements. It also provides an interface to generate an XML representation of itself. A container element either contains a value represented as string or a Vector of subelements. I.e. at least one of both fields (_Value and _Children is always null).


Field Summary
private  java.util.Vector _Children
          _Children is the Vector containing the sub container elements of the given container element.
private  java.lang.String _Name
          _Name is the Name of the container element.
private  java.lang.String _Value
          _Value is the string representation of the container elements value.
 
Constructor Summary
ContainerElement(java.lang.String name)
          Constructor which set the name of the container element.
 
Method Summary
 void AddChild(ContainerElement c)
          AddChild is the method to add a sub container element to the given element.
 java.lang.String AsXMLString(java.lang.String indention, boolean withTags)
          AsXMLString returns an XML representation of the given container element, taking the indention in consideration.
 ContainerElement GetChildNamed(java.lang.String name)
          GetChildNamed returns the first sub container element which has the given name.
 java.util.Vector GetChildren()
          GetChildren getter of _Children, the vector of sub container elements.
 java.lang.String GetName()
          GetValue getter of _Value.
 ContainerElement GetUserData()
           
 java.lang.String GetValue()
          GetValue getter of _Value.
 void RemoveChild(ContainerElement c)
          RemoveChild is the method to delete a container element from the given elements' children.
 void SetValue(java.lang.String value)
          SetValue setter of _Value.
 
Methods inherited from class java.lang.Object
, clone, equals, finalize, getClass, hashCode, notify, notifyAll, registerNatives, toString, wait, wait, wait
 

Field Detail

_Name

private java.lang.String _Name
_Name is the Name of the container element. Every element has a name. This name is use as and retrieved from the XML tag name.
See Also:
String, GetName()

_Value

private java.lang.String _Value
_Value is the string representation of the container elements value. A container element either contains a value represented as string or a Vector of subelements. I.e. at least one of both fields (_Value and _Children is always null).
See Also:
String, GetValue(), SetValue(java.lang.String)

_Children

private java.util.Vector _Children
_Children is the Vector containing the sub container elements of the given container element. A container element either contains a value represented as string or a Vector of subelements. I.e. at least one of both fields (_Value and _Children is always null).
See Also:
Vector, GetChildren(), AddChild(com.ibm.workflow.upes.ContainerElement)
Constructor Detail

ContainerElement

public ContainerElement(java.lang.String name)
Constructor which set the name of the container element.
Method Detail

AddChild

public void AddChild(ContainerElement c)
AddChild is the method to add a sub container element to the given element. It simply appends the handed over container element.

RemoveChild

public void RemoveChild(ContainerElement c)
RemoveChild is the method to delete a container element from the given elements' children. If the container element c was not a child nothing happens.

AsXMLString

public java.lang.String AsXMLString(java.lang.String indention,
                                    boolean withTags)
AsXMLString returns an XML representation of the given container element, taking the indention in consideration. Optionally it is possible to suppress the output of tags (this is used for root elements of containers because they have only subelements and the root element itself is not expressed with tags in the XML output.
Returns:
XML representation of the given container element

GetChildNamed

public ContainerElement GetChildNamed(java.lang.String name)
GetChildNamed returns the first sub container element which has the given name.
Returns:
the first sub container element which has the given name.

null if there is no sub container element with the given name.


SetValue

public void SetValue(java.lang.String value)
SetValue setter of _Value. _Children are set to null because _Value and _Children exclude each other.

GetValue

public java.lang.String GetValue()
GetValue getter of _Value. returns the content of _Value.
Returns:
the content of _Value.

GetChildren

public java.util.Vector GetChildren()
GetChildren getter of _Children, the vector of sub container elements.
Returns:
the content of _Children, the vector of sub container elements.

GetName

public java.lang.String GetName()
GetValue getter of _Value. returns the content of _Value.
Returns:
the content of _Value.

GetUserData

public ContainerElement GetUserData()