Class MetricConfigurationsReader

java.lang.Object
es.uam.eps.ir.relison.grid.ConfigurationsReader
es.uam.eps.ir.relison.grid.sna.MetricConfigurationsReader

public class MetricConfigurationsReader
extends ConfigurationsReader
Class for reading social network analysis metrics. For each metric, a list of parameter configurations is read.
File format:
metrics:
metric_name:
type: value
params:
- param1: ...
param2: ...
- param1: ...
...
See Also:
ConfigurationsReader
  • Field Summary

    Fields 
    Modifier and Type Field Description
    private static java.lang.String METRICS
    Identifier for the metrics.
    private java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​Configurations>> metricsGrid
    A map containing the different configurations for each metric.
    private static java.lang.String PARAMS
    Identifier for the metric type.
    private static java.lang.String TYPE
    Identifier for the metric type.
  • Constructor Summary

    Constructors 
    Constructor Description
    MetricConfigurationsReader()
    Constructor.
  • Method Summary

    Modifier and Type Method Description
    Configurations getConfigurations​(java.lang.String metric, java.lang.String type)
    Once the metrics have been read, it obtains the grid for a single one.
    java.util.Set<java.lang.String> getMetrics​(java.lang.String type)
    Once the metrics have been read, it obtains the set of metrics of a given type which have been retrieved from the file.
    void read​(java.util.Map<java.lang.String,​java.lang.Object> map)
    It reads the YAML document containing the data.
    private void readMetric​(java.util.Map.Entry<java.lang.String,​java.lang.Object> element)
    Reads the grid for a single metric.

    Methods inherited from class es.uam.eps.ir.relison.grid.ConfigurationsReader

    readConfigurationGrid

    Methods inherited from class java.lang.Object

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

    • METRICS

      private static final java.lang.String METRICS
      Identifier for the metrics.
      See Also:
      Constant Field Values
    • TYPE

      private static final java.lang.String TYPE
      Identifier for the metric type.
      See Also:
      Constant Field Values
    • PARAMS

      private static final java.lang.String PARAMS
      Identifier for the metric type.
      See Also:
      Constant Field Values
    • metricsGrid

      private final java.util.Map<java.lang.String,​java.util.Map<java.lang.String,​Configurations>> metricsGrid
      A map containing the different configurations for each metric. It is indexed by the name of the metric.
  • Constructor Details

  • Method Details

    • read

      public void read​(java.util.Map<java.lang.String,​java.lang.Object> map)
      It reads the YAML document containing the data.
      Parameters:
      map - map containing the configurations for the metrics.
    • readMetric

      private void readMetric​(java.util.Map.Entry<java.lang.String,​java.lang.Object> element)
      Reads the grid for a single metric.
      Parameters:
      element - the YAML element containing the information about the metric.
    • getMetrics

      public java.util.Set<java.lang.String> getMetrics​(java.lang.String type)
      Once the metrics have been read, it obtains the set of metrics of a given type which have been retrieved from the file.
      Parameters:
      type - the type of metric.
      Returns:
      the set of metrics of the given metric which have been retrieved.
    • getConfigurations

      public Configurations getConfigurations​(java.lang.String metric, java.lang.String type)
      Once the metrics have been read, it obtains the grid for a single one.
      Parameters:
      metric - the name of the metric.
      type - the type of metric.
      Returns:
      the set of metrics of the given metric which have been retrieved.