uk.ac.starlink.treeview
Class TreeWriter

java.lang.Object
  extended by uk.ac.starlink.treeview.TreeWriter

public class TreeWriter
extends Object

Generates a textual representation of a tree of DataNodes.

Version:
$Id$
Author:
Mark Taylor (Starlink)

Constructor Summary
TreeWriter()
          Construct a TreeWriter which writes to standard output, without paths.
TreeWriter(PrintStream stream, boolean showPath)
          Construct a TreeWriter which writes to a given stream, optionally recording the full path of each node.
 
Method Summary
 void write(uk.ac.starlink.datanode.nodes.DataNode node)
          Write a textual representation of the given node.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TreeWriter

public TreeWriter(PrintStream stream,
                  boolean showPath)
Construct a TreeWriter which writes to a given stream, optionally recording the full path of each node.

Parameters:
stream - the PrintStream to which the tree will be written.
showPath - whether the path of each node is to be appended to the output

TreeWriter

public TreeWriter()
Construct a TreeWriter which writes to standard output, without paths.

Method Detail

write

public void write(uk.ac.starlink.datanode.nodes.DataNode node)
Write a textual representation of the given node.

Parameters:
node - a DataNode representing the top of the tree to write. The node itself will not be written.


Copyright © 2002-2017 CCLRC: Council for the Central Laboratory of the Research Councils. All Rights Reserved.