Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.basex.gui.view
Class ViewData

    java.lang.Object
      org.basex.gui.view.ViewData

    public final class ViewData

extends java.lang.Object

This class assembles some database access methods which are used in the same way by different visualizations. If more specific database access is needed, it is advisable to directly work on the `Data` class.

Author:
  Workgroup DBIS, University of Konstanz 2005-09, ISC License, Christian Gruen

Method Summary
`static byte[]` | `content(Data data, int p, boolean s)` Returns the contents of the specified node.
`static boolean` | `isLeaf(GUIProp prop, Data d, int pre)` Checks if the specified node is a leaf node (text node or file element or file tag).
`static int` | `parent(Data data, int pre)` Returns the parent for the specified node.
`static byte[]` | `path(Data data, int pre)` Returns path for the specified pre value.
`static int` | `size(Data data, int pre)` Returns the size for the specified node.
`static byte[]` | `tag(GUIProp prop, Data data, int pre)` Returns the tag name of the specified node.

Methods inherited from class java.lang.Object
`equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Method Detail

### isLeaf

    public static boolean isLeaf(GUIProp prop,
                                 Data d,
                                 int pre)

  Checks if the specified node is a leaf node (text node or file element or file tag).

  Parameters:
    `prop` - gui properties
    `d` - data reference
    `pre` - pre value
  Returns:
    result of comparison

### path

    public static byte[] path(Data data,
                              int pre)

  Returns path for the specified pre value.

  Parameters:
    `data` - data reference
    `pre` - pre value
  Returns:
    current path

### content

    public static byte[] content(Data data,
                                 int p,
                                 boolean s)

  Returns the contents of the specified node.

  Parameters:
    `data` - data reference
    `p` - pre value
    `s` - if specified, a short representation is returned (no full text nodes, only attribute names)
  Returns:
    name

### tag

    public static byte[] tag(GUIProp prop,
                             Data data,
                             int pre)

  Returns the tag name of the specified node. Note that the pre value must reference an element node.

  Parameters:
    `prop` - gui properties
    `data` - data reference
    `pre` - pre value
  Returns:
    name

### parent

    public static int parent(Data data,
                             int pre)

  Returns the parent for the specified node.

  Parameters:
    `data` - data reference
    `pre` - child node
  Returns:
    parent node

### size

    public static int size(Data data,
                           int pre)

  Returns the size for the specified node.

  Parameters:
    `data` - data reference
    `pre` - child node
  Returns:
    parent node

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD