org.dspace.app.statistics
Class StatisticsLoader

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

public class StatisticsLoader
extends Object

Helper class for loading the analysis / report files from the reports directory


Constructor Summary
StatisticsLoader()
           
 
Method Summary
static File getAnalysisFor(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 File getGeneralAnalysis()
          Get the current general analysis file.
static File getGeneralReport()
          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 File getReportFor(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.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

StatisticsLoader

public StatisticsLoader()
Method Detail

getMonthlyReportDates

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


getMonthlyAnalysisDates

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


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 -

sortDatesDescending

protected static Date[] sortDatesDescending(Date[] dates)
Sort the date array in descending (reverse chronological) order.

Parameters:
dates -
Returns:
sorted dates.

getAnalysisFor

public static File getAnalysisFor(String date)
Get the analysis file for a given date.

Parameters:
date -

getReportFor

public static File getReportFor(String date)
Get the report file for a given date.

Parameters:
date -

getGeneralAnalysis

public static File getGeneralAnalysis()
Get the current general analysis file.


getGeneralReport

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



Copyright © 2012 DuraSpace. All Rights Reserved.