Class SourceImpl

java.lang.Object
org.wikirate4j.entitities.CardImpl
org.wikirate4j.entitities.SourceImpl
All Implemented Interfaces:
Card, Source, SourceReference

public class SourceImpl extends CardImpl implements Source
Author:
Vasiliki Gkatziaki
  • Method Details

    • getTitle

      public String getTitle()
      Description copied from interface: Source
      Returns the title of the Source
      Specified by:
      getTitle in interface Source
      Returns:
      the source title
    • getFile

      public String getFile()
      Description copied from interface: Source
      Returns the URL of the Source file
      Specified by:
      getFile in interface Source
      Returns:
      the file url
    • getLink

      public String getLink()
      Description copied from interface: Source
      Returns the url of the original source
      Specified by:
      getLink in interface Source
      Returns:
      the url of the original source
    • getReportTypes

      public List<ReportType> getReportTypes()
      Specified by:
      getReportTypes in interface Source
    • getYears

      public List<Integer> getYears()
      Description copied from interface: Source
      Lists the years the source referred to.
      Specified by:
      getYears in interface Source
      Returns:
      a List of years
    • getDescription

      public String getDescription()
      Description copied from interface: Source
      A given description of the Source
      Specified by:
      getDescription in interface Source
      Returns:
      a description
    • getCompanies

      public List<String> getCompanies()
      Description copied from interface: Source
      A List of Companies the source is referred to.
      Specified by:
      getCompanies in interface Source
      Returns:
      a list of company names
    • getMetrics

      public List<String> getMetrics()
      Description copied from interface: Source
      A list of Metrics the source has answers
      Specified by:
      getMetrics in interface Source
      Returns:
      a list of metric names
    • getAnswers

      public List<String> getAnswers()
      Description copied from interface: Source
      A list of Answers the source is linked to
      Specified by:
      getAnswers in interface Source
      Returns:
      a list of answer names
    • asReference

      public String asReference()
      Specified by:
      asReference in interface SourceReference
    • 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