Class StatisticsLoader


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

      • getMonthlyReportDates

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

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

        protected static Date[] 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 Date[] sortDatesDescending​(Date[] 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