base.tree
Class JDOMAdapterNode

java.lang.Object
  extended by base.tree.JDOMAdapterNode

public class JDOMAdapterNode
extends java.lang.Object

Wraps an XML element. Will return find children of this element if any.

See Also:
http://java.sun.com/webservices/jaxp/dist/1.1/docs/tutorial/index.html

Field Summary
 org.jdom.Element node
          the Element encapsulated by this node
 
Constructor Summary
JDOMAdapterNode(org.jdom.Element node)
          Creates a new instance of the JDOMAdapterNode class
 
Method Summary
 JDOMAdapterNode child(int searchIndex)
          Returns an adapter node given a valid index found through the method: public int index(JDOMAdapterNode child)
 int childCount()
          Return the number of children for this element/node
 int index(JDOMAdapterNode child)
          Finds index of child in this node.
 java.lang.String toString()
          Tricky toString which allows for copying entire elements and their children from the xml viewer.
 java.lang.String toString(int r)
          used recursively to space the xml
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

node

public org.jdom.Element node
the Element encapsulated by this node

Constructor Detail

JDOMAdapterNode

public JDOMAdapterNode(org.jdom.Element node)
Creates a new instance of the JDOMAdapterNode class

Parameters:
Element - node
Method Detail

index

public int index(JDOMAdapterNode child)
Finds index of child in this node.

Parameters:
child - The child to look for
Returns:
index of child, -1 if not present (error)

child

public JDOMAdapterNode child(int searchIndex)
Returns an adapter node given a valid index found through the method: public int index(JDOMAdapterNode child)

Parameters:
searchIndex - find this by calling index(JDOMAdapterNode)
Returns:
the desired child

childCount

public int childCount()
Return the number of children for this element/node

Returns:
int number of children

toString

public java.lang.String toString()
Tricky toString which allows for copying entire elements and their children from the xml viewer.

Overrides:
toString in class java.lang.Object
Returns:
String

toString

public java.lang.String toString(int r)
used recursively to space the xml