Search in sources :

Example 6 with StatisticsSummary

use of org.orcid.jaxb.model.statistics.StatisticsSummary in project ORCID-Source by ORCID.

the class StatisticsController method getStatistics.

@RequestMapping
public ModelAndView getStatistics() {
    ModelAndView mav = new ModelAndView("statistics");
    Map<String, Long> statisticsMap = null;
    StatisticsSummary statisticsSummary = statisticsCacheManager.retrieve();
    if (statisticsSummary != null) {
        statisticsMap = statisticsSummary.getStatistics();
        mav.addObject("statistics_date", formatStatisticsDate(statisticsSummary.getDate()));
    }
    if (statisticsMap == null) {
        statisticsMap = new HashMap<String, Long>();
    }
    mav.addObject("statistics", statisticsMap);
    return mav;
}
Also used : StatisticsSummary(org.orcid.jaxb.model.statistics.StatisticsSummary) ModelAndView(org.springframework.web.servlet.ModelAndView) RequestMapping(org.springframework.web.bind.annotation.RequestMapping)

Aggregations

StatisticsSummary (org.orcid.jaxb.model.statistics.StatisticsSummary)6 NumberFormat (java.text.NumberFormat)1 Date (java.util.Date)1 TreeMap (java.util.TreeMap)1 Element (net.sf.ehcache.Element)1 Test (org.junit.Test)1 StatsTimelineList (org.orcid.api.common.writer.stats.StatsTimelineList)1 AccessControl (org.orcid.core.security.visibility.aop.AccessControl)1 StatisticsTimeline (org.orcid.jaxb.model.statistics.StatisticsTimeline)1 StatisticKeyEntity (org.orcid.statistics.jpa.entities.StatisticKeyEntity)1 StatisticValuesEntity (org.orcid.statistics.jpa.entities.StatisticValuesEntity)1 RequestMapping (org.springframework.web.bind.annotation.RequestMapping)1 ModelAndView (org.springframework.web.servlet.ModelAndView)1