com.sybase.uep.bobclient.data
Class SPTreeNode

java.lang.Object
  extended by com.sybase.uep.bobclient.data.SPTreeNode

public class SPTreeNode
extends java.lang.Object

The structure parameters are flatten in BOB, but Object API only accept the structured parameter value as a whole. So device need to pick up each scalar type value for the flatten parameters and construct a structured parameter type instance, then pass it to Object API. The SPTreeNode instance preserves the hierarchy of a structured parameter, device can construct a structured type instance based on this tree.

Author:
haowang

Constructor Summary
SPTreeNode()
          Constructor
SPTreeNode(java.lang.String name, SPMBOModel model, java.lang.Object metaData)
          Constructor
SPTreeNode(SubmitElement element)
          Constructor
 
Method Summary
 void addChild(SPTreeNode node)
          Add a child
 SPTreeNode findChild(java.lang.String name)
          Find child by name
 java.util.Vector getChildren()
          Returns the children
 java.lang.Object getMetaData()
          Get meta data
 java.lang.String getName()
          Gets the name
 SPTreeNode getParent()
          Get parent
 java.lang.Object getValue()
          Returns the value to parent.
 SubmitElement getValueElem()
          Get _valueElement
 void setMetaData(java.lang.Object metaData)
          Set meta data
 void setName(java.lang.String name)
          Set name
 void setParent(SPTreeNode parent)
          Set parent
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SPTreeNode

public SPTreeNode(SubmitElement element)
Constructor

Parameters:
element -

SPTreeNode

public SPTreeNode(java.lang.String name,
                  SPMBOModel model,
                  java.lang.Object metaData)
Constructor

Parameters:
name -
model -
metaData -

SPTreeNode

public SPTreeNode()
Constructor

Method Detail

getValue

public java.lang.Object getValue()
Returns the value to parent. If the node is a leaf node, return the submit value from its _element. Otherwise, construct a structure type instance and initialize its attribute according to children node.

Returns:

addChild

public void addChild(SPTreeNode node)
Add a child

Parameters:
node -

findChild

public SPTreeNode findChild(java.lang.String name)
Find child by name

Parameters:
name -
Returns:

getChildren

public java.util.Vector getChildren()
Returns the children

Returns:

getName

public java.lang.String getName()
Gets the name

Returns:

setName

public void setName(java.lang.String name)
Set name

Parameters:
name -

getMetaData

public java.lang.Object getMetaData()
Get meta data

Returns:

setMetaData

public void setMetaData(java.lang.Object metaData)
Set meta data

Parameters:
metaData -

getValueElem

public SubmitElement getValueElem()
Get _valueElement

Returns:

setParent

public void setParent(SPTreeNode parent)
Set parent

Parameters:
parent -

getParent

public SPTreeNode getParent()
Get parent

Returns: