Package org.dspace.app.statistics

Examples of org.dspace.app.statistics.ReportGenerator


        refreshParams(context);

        List<Object> stat = new ArrayList<Object>();
        File reportDir = new File(ConfigurationManager.getProperty("log.dir"));

        ReportGenerator rg = new ReportGenerator();
        // iterate through files in report directory and load each
        File[] reports = reportDir.listFiles();
        try {
            for (File report : reports) {
                Matcher genMatcher = analysisGeneralPattern.matcher(report.getName());
                Matcher monMatcher = analysisMonthlyPattern.matcher(report.getName());
                StatReport statReport = new StatReport();
                if (genMatcher.matches()) {
                    statReport.setType("general");
                    rg.processReport(context, statReport, report.getAbsolutePath());
                    stat.add(statReport);
                } else if (monMatcher.matches()) {
                    statReport.setType("monthly");
                    rg.processReport(context, statReport, report.getAbsolutePath());
                    stat.add(statReport);
                }
            }

            removeConn(context);
View Full Code Here

TOP

Related Classes of org.dspace.app.statistics.ReportGenerator

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.