Treeviz 0.37 2010-10-17

ch.randelshofer.tree.demo
Class XMLNode

java.lang.Object
  extended by ch.randelshofer.tree.demo.XMLNode
All Implemented Interfaces:
TreeNode

public class XMLNode
extends java.lang.Object
implements TreeNode

XMLNode.

Version:
1.0 23. Juni 2008 Created.
Author:
Werner Randelshofer

Constructor Summary
XMLNode()
          Creates a new instance.
 
Method Summary
 void accumulateWeights(NodeInfo info, TreePath2 path)
           
 void addChild(TreeNode child)
           
 java.util.List<TreeNode> children()
          Returns the children of this node in a List.
 boolean getAllowsChildren()
          Returns true, if this node can not have children.
 java.lang.String getAttribute(java.lang.String key)
           
 java.util.HashMap<java.lang.String,java.lang.String> getAttributes()
           
 long getCumulatedWeight()
           
 java.lang.String getName()
           
 void putAttribute(java.lang.String key, java.lang.String value)
           
 void setCumulatedWeight(long newValue)
           
 void setName(java.lang.String name)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XMLNode

public XMLNode()
Creates a new instance.

Method Detail

children

public java.util.List<TreeNode> children()
Description copied from interface: TreeNode
Returns the children of this node in a List. If this object does not have children, it returns an empty List.

Specified by:
children in interface TreeNode
Returns:
the children of this node

addChild

public void addChild(TreeNode child)

getAllowsChildren

public boolean getAllowsChildren()
Description copied from interface: TreeNode
Returns true, if this node can not have children. This is used to make a distinction between composite nodes which have no children, and leaf nodes which can have no children.

Specified by:
getAllowsChildren in interface TreeNode

setName

public void setName(java.lang.String name)

getName

public java.lang.String getName()

putAttribute

public void putAttribute(java.lang.String key,
                         java.lang.String value)

getAttribute

public java.lang.String getAttribute(java.lang.String key)

getAttributes

public java.util.HashMap<java.lang.String,java.lang.String> getAttributes()

getCumulatedWeight

public long getCumulatedWeight()

setCumulatedWeight

public void setCumulatedWeight(long newValue)

accumulateWeights

public void accumulateWeights(NodeInfo info,
                              TreePath2 path)

Copyright 2007-2008 (c) Werner Randelshofer.
All rights reserved.