Class MetricImpl

java.lang.Object
org.wikirate4j.entitities.CardImpl
org.wikirate4j.entitities.MetricImpl
All Implemented Interfaces:
Card, Metric

public class MetricImpl extends CardImpl implements Metric
Author:
Vasiliki Gkatziaki
  • Method Details

    • raw_json

      public org.json.JSONObject raw_json()
      Specified by:
      raw_json in interface Card
      Overrides:
      raw_json in class CardImpl
      Returns:
      the raw json of the card as returned by the request (if it was retrieved by a request, otherwise it is null) Note: the raw_json is usually more verbose
    • getMetricDesigner

      public String getMetricDesigner()
      Description copied from interface: Metric
      Each metric has a designer, individuals or organizations are the most common designers of metrics on Wikirate
      Specified by:
      getMetricDesigner in interface Metric
      Returns:
      the name of the metric designer
    • getMetricName

      public String getMetricName()
      Description copied from interface: Metric
      Each metric has a name which represents a shorter version of the questioned asked.
      Specified by:
      getMetricName in interface Metric
      Returns:
      the name of the metric
    • getMetricType

      public MetricType getMetricType()
      Description copied from interface: Metric
      There are different metric types. All the different options of a metric type can be found in enum class MetricType
      Specified by:
      getMetricType in interface Metric
      Returns:
      the metric type of the metric
    • getQuestion

      public String getQuestion()
      Description copied from interface: Metric
      Returns the question linked to the metric
      Specified by:
      getQuestion in interface Metric
      Returns:
      the question
    • getAbout

      public String getAbout()
      Description copied from interface: Metric
      Returns some more details about the metric (why this metric is important and how it is/can be used)
      Specified by:
      getAbout in interface Metric
      Returns:
      a string
    • getMethodology

      public String getMethodology()
      Description copied from interface: Metric
      Description about how to research the answer
      Specified by:
      getMethodology in interface Metric
      Returns:
      a string
    • getValueType

      public ValueType getValueType()
      Description copied from interface: Metric
      There are different value types allowed on metrics. All the different options of a value type can be found in the enum class ValueType
      Specified by:
      getValueType in interface Metric
      Returns:
      ValueType
    • getValueOptions

      public List<String> getValueOptions()
      Description copied from interface: Metric
      In case of a category on a multicategory value type, a list of value options is also defined.
      Specified by:
      getValueOptions in interface Metric
      Returns:
      a list of the value options
    • getReportType

      public ReportType getReportType()
      Description copied from interface: Metric
      Report Type where the answers of the metric can be found in.
      Specified by:
      getReportType in interface Metric
      Returns:
      ReportType
    • getAssessmentType

      public AssessmentType getAssessmentType()
      Description copied from interface: Metric
      Assessment type is applied on researched metrics, the research can either Community Assessed (anyone can research answers) or Steward Assessed (only stewards can research answers)
      Specified by:
      getAssessmentType in interface Metric
      Returns:
      AssessmentType
    • getUnit

      public String getUnit()
      Description copied from interface: Metric
      In case of Number value type a unit might also be defined.
      Specified by:
      getUnit in interface Metric
      Returns:
      the unit of the value
    • getRange

      public String getRange()
      Description copied from interface: Metric
      In case of Number value type a range of values might also be defined (e.g. 0-100)
      Specified by:
      getRange in interface Metric
      Returns:
    • getTopics

      public List<WikirateTopic> getTopics()
      Description copied from interface: Metric
      A list of topics under Wikirate ESG Topic framework related to the metric
      Specified by:
      getTopics in interface Metric
      Returns:
      list of topic names
    • getTopicFrameworks

      public List<String> getTopicFrameworks()
      Description copied from interface: Metric
      A list of topics under other frameworks (e.g. GRI Standards, ESRS Standards etc) related to the metric
      Specified by:
      getTopicFrameworks in interface Metric
      Returns:
      list of topic names
    • getFormula

      public String getFormula()
      Description copied from interface: Metric
      In case of a Formula metric type a formula is also defined in coffescript
      Specified by:
      getFormula in interface Metric
      Returns:
      the formula in coffescript
    • getVariables

      public List<String> getVariables()
      Description copied from interface: Metric
      In case of a Formula metric type a number of variables are defined and used in the coffescript formula.
      Specified by:
      getVariables in interface Metric
      Returns:
      a list of variables used on the formula
    • getNumberOfAnswers

      public Integer getNumberOfAnswers()
      Description copied from interface: Metric
      Number of answers this metric has.
      Specified by:
      getNumberOfAnswers in interface Metric
      Returns:
      the number of answers
    • getNumberOfBookmarkers

      public Integer getNumberOfBookmarkers()
      Description copied from interface: Metric
      Number of users that bookmarked the metric
      Specified by:
      getNumberOfBookmarkers in interface Metric
      Returns:
      the number of bookmarkers
    • getNumberOfDatasets

      public Integer getNumberOfDatasets()
      Description copied from interface: Metric
      Number of datasets the metric is included in
      Specified by:
      getNumberOfDatasets in interface Metric
      Returns:
      number of datasets
    • getNumberOfCompanies

      public Integer getNumberOfCompanies()
      Description copied from interface: Metric
      Number of companies answer the question (metric)
      Specified by:
      getNumberOfCompanies in interface Metric
      Returns:
      number of companies
    • getCalculations

      public List<String> getCalculations()
      Description copied from interface: Metric
      List of metric names the metric is used for additional calculations
      Specified by:
      getCalculations in interface Metric
      Returns:
      list of metric names
    • getAnswersURL

      public String getAnswersURL()
      Description copied from interface: Metric
      The URL the user can find the answers of the metric
      Specified by:
      getAnswersURL in interface Metric
      Returns:
      the answers url
    • toJson

      public org.json.JSONObject toJson()
      Specified by:
      toJson in interface Card
      Overrides:
      toJson in class CardImpl
      Returns:
      the object as json
    • toString

      public String toString()
      Overrides:
      toString in class Object