Class 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 Detail

      • displayItemViews

        protected boolean displayItemViews
      • displayBitstreamViews

        protected boolean displayBitstreamViews
      • displayTotalViews

        protected boolean displayTotalViews
      • BITSTREAM_VISITS

        public static final int BITSTREAM_VISITS
        visitType is BITSTREAM
        See Also:
        Constant Field Values
    • Constructor Detail

      • StatisticsBSAdapter

        public StatisticsBSAdapter()
    • Method Detail

      • 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)