next up previous 194
Next: About this document ...
Up: Reference Section
Previous: Reference Section


treeview - Display a hierarchical structure graphically or textually

Description:
Treeview is a utility for viewing hierarchical data structures such as Starlink NDF and HDS files, XML documents, jar files, directory structures, and other items. In normal use it displays a graphical user interface which initially shows a set of top-level nodes, each of which can be 'opened' to see the structure inside, or 'selected' to display more detail in various formats depending on the nature of the item being examined. An intuitive point and click interface is used, and detailed help is available from within the tool if required. If the '-text' flag is used, a textual view of the object is printed to standard output instead.

Items to be viewed are given on the command line. These will often be filenames, but in general they represent a set of strings which the utility will try to turn into 'nodes' - it will try one node type after another until it succeeds. If it cannot make any kind of node it will fail with an error message. The order of preference in which it tries to construct nodes from strings on the command line can be altered using flags if required, but by default it is:

  • NDF structure

  • WCS component of an NDF

  • HDS object

  • XML document

  • zip/jar file

  • FITS file

  • normal file


The HDS-like nodes can be given as container file names or HDS paths (so that the .sdf extension may be included or omitted).

Flags are provided to modify the order of construction if required. When interpreting the commmand line arguments, treeview keeps an ordered list of node types, which starts off as above. If a flag specifying one of the node types is encountered, the corresponding type is brought to the head of the list, and if the '-strict' flag is encountered the list is cleared. The order in which the flags and item strings are encountered on the line is significant. In this way it is possible to specify exactly what kind of node you would like to make from a given string. Modifying the node type preference list is not often necessary, but it can be useful in the case of name clashes or to view an item of one sort in its aspect as another.


Usage:
treeview [flags] item [item ...]

Parameters:

item [item ...]
One or more items must be named on the command line. These will often be filenames, but in general they represent a set of strings which the utility will try to turn into 'nodes' for display. If one item is given it will be opened so that its children are visible in the GUI, but if more than one are given they will initially be displayed closed. If any of the items listed does not exist (i.e. cannot be made into a node), then treeview will exit with an error message.
-text
If this flag is specified, instead of starting a graphical interface, a fully expanded view of the item(s) named on the command line is printed to standard output. Since all nodes are recursively expanded, the amount of output may be quite large.
-split(x|y|0)
These flags control the initial orientation of the tree and detail viewing panels in the GUI. Specifying '-splitx' (the default) causes the tree and detail display panels to appear beside each other. Specifying '-splity' causes the detail panel to appear below the tree panel. Specifying '-split0' displays only the tree panel. The orientation can be changed while the GUI is running using toolbar buttons.
-help
Supplying -help (or any unrecognised flag) will display a short usage message.
-debug
This flag is intended for debugging and not recommended for general use. It generates verbose output about attempts made to construct nodes from strings.
-strict
Clears the node type list. To make sense, it must be followed by at least one of the node type specific flags.
-ary
Adds ARY to the head of the node type list. Subsequent items will by preference be turned into ARY data structure nodes if possible.
-file
Adds File to the head of the node type list. Subsequent items will by preference be turned into ordinary file or directory nodes if possible.
-fit
Adds FITS to the head of the node type list. Subsequent items will by preference be turned into FITS file nodes if possible.
-ndf
Adds NDF to the head of the node type list. Subsequent items will by preference be turned into NDF structure nodes if possible.
-hds
Adds HDS to the head of the node type list. Subsequent items will by preference be turned into HDS object nodes if possible.
-wcs
Adds WCS to the head of the node type list. Subsequent items will by preference be turned into World Coordinate System description nodes if possible.
-xml
Adds XML to the head of the node type list. Subsequent items will by preference be turned into XML document nodes if possible.
-zip
Adds Zip to the head of the node type list. Subsequent items will by preference be turned into ZIP file nodes if possible.

Examples:

treeview *.sdf
This will bring up a GUI displaying all the HDS data files in the current directory.
treeview -text ngc1038.more
This will write to the screen a fully expanded view of the .MORE component (the extensions) of an NDF in the file ngc1038.sdf.
treeview -split0 jpackage.jar
This displays the jar archive 'jpackage.jar' in a window which has a tree display but no detail display panel.
treeview myndf.wcs -hds myndf.wcs
This examines the WCS component of the named NDF twice, first in the default way, and then looking at it preferentially as an HDS object. The first node displayed will be as a WCS frameset, and the second one will be as the HDS array of character data which encodes the WCS information in the NDF data structure.



next up previous 194
Next: About this document ...
Up: Reference Section
Previous: Reference Section

TREEVIEW - Hierarchical data viewer
Starlink User Note 244
Mark Taylor
30 October 2001
E-mail:ussc@star.rl.ac.uk

Copyright © 2001 Council for the Central Laboratory of the Research Councils