Class StatisticsBSAdapter

java.lang.Object
org.dspace.statistics.content.StatisticsBSAdapter

public class StatisticsBSAdapter extends Object
Class that will hold the data needed to show statistics in the browse and search pages.
Author:
Kevin Van de Velde (kevin at atmire dot com)
  • Field Details

    • displayItemViews

      protected boolean displayItemViews
    • displayBitstreamViews

      protected boolean displayBitstreamViews
    • displayTotalViews

      protected boolean displayTotalViews
    • filters

      protected List<StatisticsFilter> filters
    • ITEM_VISITS

      public static final int ITEM_VISITS
      visitType is ITEM
      See Also:
    • BITSTREAM_VISITS

      public static final int BITSTREAM_VISITS
      visitType is BITSTREAM
      See Also:
    • TOTAL_VISITS

      public static final int TOTAL_VISITS
      visitType is TOTAL
      See Also:
    • solrLoggerService

      protected final SolrLoggerService solrLoggerService
  • Constructor Details

    • StatisticsBSAdapter

      public StatisticsBSAdapter()
  • Method Details

    • getNumberOfVisits

      public long getNumberOfVisits(int visitType, Item item) throws org.apache.solr.client.solrj.SolrServerException, IOException
      Returns the number of visits for the item. Depending on the visitType it can either be item, bitstream, total, ...
      Parameters:
      visitType - the type of visits we want, from the item, bitstream, total
      item - the item from which we need our visits
      Returns:
      the number of visits
      Throws:
      org.apache.solr.client.solrj.SolrServerException - Exception from the Solr server to the solrj Java client.
      IOException - passed through.
    • isDisplayTotalViews

      public boolean isDisplayTotalViews()
    • setDisplayTotalViews

      public void setDisplayTotalViews(boolean displayTotalViews)
    • isDisplayItemViews

      public boolean isDisplayItemViews()
    • setDisplayItemViews

      public void setDisplayItemViews(boolean displayItemViews)
    • isDisplayBitstreamViews

      public boolean isDisplayBitstreamViews()
    • setDisplayBitstreamViews

      public void setDisplayBitstreamViews(boolean displayBitstreamViews)
    • getFilters

      public List<StatisticsFilter> getFilters()
    • addFilter

      public void addFilter(StatisticsFilter filter)
    • setFilters

      public void setFilters(List<StatisticsFilter> filters)