Package org.dspace.app.statistics
Class StatisticsLoader
java.lang.Object
org.dspace.app.statistics.StatisticsLoader
Helper class for loading the analysis / report files from the reports directory
-
Method Summary
Modifier and TypeMethodDescriptionstatic FilegetAnalysisFor(String date) Get the analysis file for a given date.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.static FileGet the current general analysis file.static FileGet the current general report file.static LocalDate[]Get an array of the dates of the analysis files.static LocalDate[]Get an array of the dates of the report files.static FilegetReportFor(String date) Get the report file for a given date.protected static LocalDate[]sortDatesDescending(LocalDate[] dates) Sort the date array in descending (reverse chronological) order.
-
Method Details
-
getMonthlyReportDates
Get an array of the dates of the report files.- Returns:
- array of dates
-
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
Sort the date array in descending (reverse chronological) order.- Parameters:
dates- array of dates- Returns:
- sorted dates.
-
getAnalysisFor
Get the analysis file for a given date.- Parameters:
date- date- Returns:
- File
-
getReportFor
Get the report file for a given date.- Parameters:
date- date- Returns:
- File
-
getGeneralAnalysis
Get the current general analysis file.- Returns:
- File
-
getGeneralReport
Get the current general report file.- Returns:
- File
-