Class ViewData

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

public final class ViewData extends 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:
BaseX Team 2005-21, BSD License, Christian Gruen
  • Method Summary

    Modifier and Type
    Method
    Description
    static boolean
    leaf(GUIOptions opts, Data data, int pre)
    Checks if the specified node is a text node.
    static byte[]
    namedText(GUIOptions opts, Data data, int pre)
    Returns the name of the specified node or a standard text representation.
    static int
    nameID(Data data)
    Returns the name id of the specified node.
    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 int
    sizeID(Data data)
    Returns the size id of the specified node.
    static byte[]
    text(Data data, int pre)
    Returns textual contents for the specified node.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Method Details

    • leaf

      public static boolean leaf(GUIOptions opts, Data data, int pre)
      Checks if the specified node is a text node.
      Parameters:
      opts - gui options
      data - data reference
      pre - pre value
      Returns:
      result of check
    • 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
    • text

      public static byte[] text(Data data, int pre)
      Returns textual contents for the specified node.
      Parameters:
      data - data reference
      pre - pre value
      Returns:
      text
    • namedText

      public static byte[] namedText(GUIOptions opts, Data data, int pre)
      Returns the name of the specified node or a standard text representation.
      Parameters:
      opts - gui options
      data - data reference
      pre - pre value
      Returns:
      name
    • nameID

      public static int nameID(Data data)
      Returns the name id of the specified node.
      Parameters:
      data - data reference
      Returns:
      name id
    • sizeID

      public static int sizeID(Data data)
      Returns the size id of the specified node.
      Parameters:
      data - data reference
      Returns:
      name id
    • 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