org.eclipse.datatools.enablement.oda.xml.util.ui
Class ATreeNode

java.lang.Object
  extended by org.eclipse.datatools.enablement.oda.xml.util.ui.ATreeNode

public class ATreeNode
extends java.lang.Object

The instance of this class is used as tree node of the xml schema tree that is passed to gui.


Field Summary
static int ATTRIBUTE_TYPE
           
static int ELEMENT_TYPE
           
static int OTHER_TYPE
           
 
Constructor Summary
ATreeNode(org.apache.xerces.impl.xs.XSElementDecl element)
           
 
Method Summary
 void addChild(java.lang.Object child)
          Add a child to the tree node.
 java.lang.Object[] getChildren()
          Return the children of tree node.
 java.lang.String getDataType()
          Return the data type of tree node.
 ATreeNode getParent()
          Return the parent of tree node.
 int getType()
          Return the type of tree node.
 java.lang.Object getValue()
          Return the value of tree node.
 void setDataType(java.lang.String type)
          Set the data type of tree node ( either attribute or element)
 void setParent(ATreeNode parent)
          Set the parent of the tree node.
 void setType(int type)
          Set the type of tree node ( either attribute or element)
 void setValue(java.lang.Object value)
          Set the value to be held by this tree node.
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

ELEMENT_TYPE

public static final int ELEMENT_TYPE
See Also:
Constant Field Values

ATTRIBUTE_TYPE

public static final int ATTRIBUTE_TYPE
See Also:
Constant Field Values

OTHER_TYPE

public static final int OTHER_TYPE
See Also:
Constant Field Values
Constructor Detail

ATreeNode

public ATreeNode(org.apache.xerces.impl.xs.XSElementDecl element)
          throws OdaException
Parameters:
element -
Throws:
OdaException
Method Detail

getValue

public java.lang.Object getValue()
Return the value of tree node.

Returns:

getChildren

public java.lang.Object[] getChildren()
                               throws OdaException
Return the children of tree node.

Returns:
Throws:
OdaException

getParent

public ATreeNode getParent()
Return the parent of tree node.

Returns:

setValue

public void setValue(java.lang.Object value)
Set the value to be held by this tree node.

Parameters:
value -

addChild

public void addChild(java.lang.Object child)
Add a child to the tree node.

Parameters:
child -

setParent

public void setParent(ATreeNode parent)
Set the parent of the tree node.

Parameters:
parent -

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

getType

public int getType()
Return the type of tree node.

Returns:

setType

public void setType(int type)
Set the type of tree node ( either attribute or element)

Parameters:
type -

getDataType

public java.lang.String getDataType()
                             throws OdaException
Return the data type of tree node. The data type is the complex type that defined in an xsd file.

Returns:
Throws:
OdaException

setDataType

public void setDataType(java.lang.String type)
                 throws OdaException
Set the data type of tree node ( either attribute or element)

Parameters:
type -
Throws:
OdaException