java.lang.Object
org.gcube.informationsystem.resourceregistry.statistics.ContextStatistics
All Implemented Interfaces:
org.gcube.common.health.api.Statistics

public class ContextStatistics extends Object implements org.gcube.common.health.api.Statistics
The contexts group of the public statistics: the Context tree.
Author:
Luca Frosini (ISTI - CNR)
  • Constructor Details

    • ContextStatistics

      public ContextStatistics()
  • Method Details

    • id

      public String id()
      Specified by:
      id in interface org.gcube.common.health.api.Statistics
    • title

      public String title()
      Specified by:
      title in interface org.gcube.common.health.api.Statistics
    • description

      public String description()
      Specified by:
      description in interface org.gcube.common.health.api.Statistics
    • depthOf

      public static int depthOf(String path)
      The depth of a Context in the tree: 1 for a root.
      Parameters:
      path - the path of the Context
      Returns:
      its depth
    • liveDepths

      public static Map<String,Integer> liveDepths() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      The live Contexts, keyed by UUID, with their depth.
      Returns:
      the depth of each live Context
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException - if the Contexts cannot be read
    • compute

      public List<org.gcube.common.health.api.Figure> compute() throws org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException
      Specified by:
      compute in interface org.gcube.common.health.api.Statistics
      Throws:
      org.gcube.informationsystem.resourceregistry.api.exceptions.ResourceRegistryException