java.lang.Object
org.gcube.informationsystem.resourceregistry.statistics.DepthLabels

public class DepthLabels extends Object
The labels of each depth of the Context tree in the public statistics, as configured in the database of the registry (StatisticsConfigurationStore): the long one where Contexts are counted by depth, the short one where a value is given per depth. A depth with no short label takes the long one, and one with no label at all is shown as depth N.
Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • DepthLabels

      public DepthLabels() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Reads the labels configured now.
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the configuration cannot be read
  • Method Details

    • label

      public String label(int depth)
      Parameters:
      depth - a depth of the tree, 1 for a Root
      Returns:
      its long label
    • shortLabel

      public String shortLabel(int depth)
      Parameters:
      depth - a depth of the tree, 1 for a Root
      Returns:
      its short label, or the long one when it has none