Package org.dspace.app.cris.statistics.bean

Examples of org.dspace.app.cris.statistics.bean.BarrChartStatisticDatasBean


    private Integer relationObjectType;

    protected BarrChartStatisticDatasBean generateTotalView(String key1,
            String key2, String key3)
    {
        BarrChartStatisticDatasBean totalResolutBean = new BarrChartStatisticDatasBean(
                key1, key2, key3);
        totalResolutBean.setName(key2);
        totalResolutBean.setHits(1);
        SolrDocumentList sdl = (SolrDocumentList) solrResponse.getResponse()
                .get("response");
        totalResolutBean.setDataTable(new String[][] { new String[] { Long
                .toString(sdl.getNumFound()) } });
        return totalResolutBean;
    }
View Full Code Here


    }

    protected BarrChartStatisticDatasBean generateAllMonthsVeiw(String key1,
            String key2, String key3)
    {
        BarrChartStatisticDatasBean totalResolutBean = new BarrChartStatisticDatasBean(
                key1, key2, key3);
        totalResolutBean.setName(key2);
        totalResolutBean.setHits(1);
        try
        {
            FacetField times = solrResponse.getFacetDate("time");
            String[][] data = new String[times.getValues().size()][2];
            for (int i = 0; i < times.getValues().size(); i++)
            {
                data[i][0] = times.getValues().get(i).getName();
                data[i][1] = String
                        .valueOf(times.getValues().get(i).getCount());
            }
            totalResolutBean.setDataTable(data);
        }
        catch (Exception e)
        {
            log.warn(e.getMessage());
            totalResolutBean
                    .setDataTable(new String[][] { new String[] { _NotAvailable } });
        }
        return totalResolutBean;
    }
View Full Code Here

                generateAllMonthsVeiw(TOP, key2, _ALL_MONTHS));
    }

    private Object generateLastFiscalYearView(String key1, String key2)
    {
        BarrChartStatisticDatasBean totalResolutBean = new BarrChartStatisticDatasBean(
                key1, key2, _FISCALYEAR);
        totalResolutBean.setName(key2);
        totalResolutBean.setHits(1);
        List<Count> counts = solrResponse.getFacetField(_FISCALYEAR)
                .getValues();
        if (counts != null && counts.size() > 0)
            totalResolutBean
                    .setDataTable(new String[][] { new String[] { String
                            .valueOf(counts.get(counts.size() - 1).getCount()) } });
        else
            totalResolutBean
                    .setDataTable(new String[][] { new String[] { _NotAvailable } });
        return totalResolutBean;
    }
View Full Code Here

        return totalResolutBean;
    }

    private Object generateLastMonthView(String key1, String key2)
    {
        BarrChartStatisticDatasBean totalResolutBean = new BarrChartStatisticDatasBean(
                key1, key2, _LAST_MONTH);
        totalResolutBean.setName(key2);
        totalResolutBean.setHits(1);
        List<Count> counts = solrResponse.getFacetDate("time").getValues();
        if (counts != null && counts.size() > 0)
            totalResolutBean
                    .setDataTable(new String[][] { new String[] { String
                            .valueOf(counts.get(counts.size() - 1).getCount()) } });
        else
            totalResolutBean
                    .setDataTable(new String[][] { new String[] { _NotAvailable } });

        return totalResolutBean;
    }
View Full Code Here

TOP

Related Classes of org.dspace.app.cris.statistics.bean.BarrChartStatisticDatasBean

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.