Examples of addValueToMatrix()


Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                        //Check if we also have a type present (if so this should be put into the query
                        if ("id".equals(secondDataSet.getFacetField()) && secondDataSet.getQueries().get(0).getDsoType() != -1)
                            facetQuery += " AND type:" + secondDataSet.getQueries().get(0).getDsoType();

                        //We got our query so now get the value
                        dataset.addValueToMatrix(j, i, facetResult.get(facetQuery));
                    }

                    /*
                    for (int j = 0; j < topCounts2.length; j++) {
                        ObjectCount count2 = topCounts2[j];
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                dataset = new Dataset(1, topCounts1.length);
                for (int i = 0; i < topCounts1.length; i++) {
                    ObjectCount count = topCounts1[i];
                    dataset.setColLabel(i, getResultName(count.getValue(), firsDataset, context));
                    dataset.setColLabelAttr(i, getAttributes(count.getValue(), firsDataset, context));
                    dataset.addValueToMatrix(0, i, count.getCount());
                }
            }

        }
        if(dataset != null){
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                        ObjectCount[] results = SolrLogger.queryFacetDate(query, filterQuery, dataSetQuery.getMax(), dateFacet.getDateType(), dateFacet.getStartDate(), dateFacet.getEndDate(), showTotal);
                        dataset = new Dataset(1, results.length);
                        //Now that we have our results put em in a matrix
                        for(int j = 0; j < results.length; j++){
                            dataset.setColLabel(j, results[j].getValue());
                            dataset.addValueToMatrix(0, j, results[j].getCount());
                        }
                        //TODO: change this !
                        //Now add the column label
                        dataset.setRowLabel(0, getResultName(dataSetQuery.getName(), dataSetQuery, context));
                        dataset.setRowLabelAttr(0, getAttributes(dataSetQuery.getName(), dataSetQuery, context));
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                            for (int k = 0; k < maxDateFacetCounts.length; k++) {
                                ObjectCount objectCount = maxDateFacetCounts[k];
                                //No need to add this many times
                                if(j == 0)
                                    dataset.setColLabel(k, objectCount.getValue());
                                dataset.addValueToMatrix(j, k, objectCount.getCount());
                            }
                        }
                        if(dataset != null && !(getDatasetGenerators().get(0) instanceof DatasetTimeGenerator)){
                            dataset.flipRowCols();
                        }
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                        dataset.setRowLabel(i, String.valueOf(i + 1));
                        String displayedValue = queryCount.getValue();
                        if(new DSpace().getConfigurationService().getPropertyAsType("usage-statistics.search.statistics.unescape.queries", Boolean.TRUE)){
                            displayedValue = displayedValue.replace("\\", "");
                        }
                        dataset.addValueToMatrix(i, 0, displayedValue);
                        dataset.addValueToMatrix(i, 1, queryCount.getCount());
                        if(typeGenerator.isPercentage()){
                            //Calculate our percentage from the total !
                            dataset.addValueToMatrix(i, 2, percentageFormat.format(((float) queryCount.getCount() / totalCount)));
                        }
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                        String displayedValue = queryCount.getValue();
                        if(new DSpace().getConfigurationService().getPropertyAsType("usage-statistics.search.statistics.unescape.queries", Boolean.TRUE)){
                            displayedValue = displayedValue.replace("\\", "");
                        }
                        dataset.addValueToMatrix(i, 0, displayedValue);
                        dataset.addValueToMatrix(i, 1, queryCount.getCount());
                        if(typeGenerator.isPercentage()){
                            //Calculate our percentage from the total !
                            dataset.addValueToMatrix(i, 2, percentageFormat.format(((float) queryCount.getCount() / totalCount)));
                        }
                        if(typeGenerator.isRetrievePageViews()){
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                        }
                        dataset.addValueToMatrix(i, 0, displayedValue);
                        dataset.addValueToMatrix(i, 1, queryCount.getCount());
                        if(typeGenerator.isPercentage()){
                            //Calculate our percentage from the total !
                            dataset.addValueToMatrix(i, 2, percentageFormat.format(((float) queryCount.getCount() / totalCount)));
                        }
                        if(typeGenerator.isRetrievePageViews()){
                            String queryString = ClientUtils.escapeQueryChars(queryCount.getValue());
                            if(queryString.equals("")){
                                queryString = "\"\"";
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                            if(queryString.equals("")){
                                queryString = "\"\"";
                            }

                            ObjectCount totalPageViews = getTotalPageViews("query:" + queryString, defaultFilterQuery);
                            dataset.addValueToMatrix(i, 3, pageViewFormat.format((float) totalPageViews.getCount() / queryCount.getCount()));
                        }
                    }
                }else
                if(typeGenerator.getMode() == DatasetSearchGenerator.Mode.SEARCH_OVERVIEW_TOTAL){
                    //Retrieve the total counts !
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                    dataset = new Dataset(1, 3);
                    dataset.setRowLabel(0, "");


                    dataset.setColLabel(0, "searches");
                    dataset.addValueToMatrix(0, 0, totalFiltered.getCount());
                    dataset.setColLabel(1, "percent-total");
                    //Ensure that we do NOT divide by 0
                    float percentTotal;
                    if(totalCount.getCount() == 0){
                        percentTotal = 0;
View Full Code Here

Examples of org.dspace.statistics.Dataset.addValueToMatrix()

                    }else{
                        percentTotal = (float) totalFiltered.getCount() / totalCount.getCount();
                    }


                    dataset.addValueToMatrix(0, 1, percentageFormat.format(percentTotal));
                    dataset.setColLabel(2, "views-search");
                    //Ensure that we do NOT divide by 0
                    float pageViews;
                    if(totalFiltered.getCount() == 0){
                        pageViews = 0;
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.