showtree

Synopsis

void showtree()
void showtree(int level)
void showtree(string node)
void showtree(string node, int level)
void showtree(eset contain)
void showtree(eset contain, int level)

Description

The showtree command allows you to explore the containment structure of the landscape with a varying degree of detail. In its first, most basic form, showtree will display the entire containment tree of the landscape. Additional information that the landscape contains (all attributes and relations other than contain) will also be displayed for every entity in the tree.

The showtree command displays quite an abundance of information and its output is usually too big to comprehend for any but the smallest landscape. For that reason, showtree has a number of parameters that allow the user to prune the output or restrict what output is shown. The parameters work as follows:

  • int level - when specified, level indicates how many levels of the tree to display. The root of the tree is considered to be level 0, the children of the root - level 1 and so on. Therefore, if a display level of 2 is specified, only the root, the root's children and grandchildren will be shown.
  • string node - when specified, the node is treated as the root of the tree. By default, the root of the contain relation (which can be found with the command "dom contain - rng contain" is taken to be the root of the tree.
  • eset contain - by default, showtree assumes that the containment information is stored in the relation called contain. This parameter allows the user to override this default and use alternative containment information.

These parameters can be combined as specified in the synopsis section above.

Restrictions. When an explicit root of the containment tree to be shown is not explicitly specified with the string node parameter, showtree computes the root itself; in this case the containment relation must have only one root (i.e. it must be a tree and not a forest), otherwise the command will fail. Showtree ignores entities that are parts of containment loops; thus, if the containment structure has loops within it, only branches without loops will be shown.

See also

show showedge showpath