Package org.dspace.app.statistics
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 Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static FilegetAnalysisFor(String date)Get the analysis file for a given date.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.static FilegetGeneralAnalysis()Get the current general analysis file.static FilegetGeneralReport()Get the current general report file.static Date[]getMonthlyAnalysisDates()Get an array of the dates of the analysis files.static Date[]getMonthlyReportDates()Get an array of the dates of the report files.static FilegetReportFor(String date)Get the report file for a given date.protected static Date[]sortDatesDescending(Date[] dates)Sort the date array in descending (reverse chronological) order.
-
-
-
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
-
-