Class StatisticsLoader

java.lang.Object
org.dspace.app.statistics.StatisticsLoader

public class StatisticsLoader extends Object
Helper class for loading the analysis / report files from the reports directory
  • Method Details

    • getMonthlyReportDates

      public static LocalDate[] getMonthlyReportDates()
      Get an array of the dates of the report files.
      Returns:
      array of dates
    • getMonthlyAnalysisDates

      public static LocalDate[] getMonthlyAnalysisDates()
      Get an array of the dates of the analysis files.
      Returns:
      array of dates
    • getDatesFromMap

      protected static LocalDate[] getDatesFromMap(Map<String,org.dspace.app.statistics.StatisticsLoader.StatsFile> monthlyMap)
      Convert the formatted dates that are the keys of the map into a date array.
      Parameters:
      monthlyMap - map
      Returns:
      array of dates
    • sortDatesDescending

      protected static LocalDate[] sortDatesDescending(LocalDate[] dates)
      Sort the date array in descending (reverse chronological) order.
      Parameters:
      dates - array of dates
      Returns:
      sorted dates.
    • getAnalysisFor

      public static File getAnalysisFor(String date)
      Get the analysis file for a given date.
      Parameters:
      date - date
      Returns:
      File
    • getReportFor

      public static File getReportFor(String date)
      Get the report file for a given date.
      Parameters:
      date - date
      Returns:
      File
    • getGeneralAnalysis

      public static File getGeneralAnalysis()
      Get the current general analysis file.
      Returns:
      File
    • getGeneralReport

      public static File getGeneralReport()
      Get the current general report file.
      Returns:
      File