Class DailySessionUsageStatistics

java.lang.Object
io.goobi.viewer.model.statistics.usage.DailySessionUsageStatistics

@Entity public class DailySessionUsageStatistics extends Object
Persistence class holding the usage statistics for a single day in the form of a list of SessionUsageStatistics.
Author:
Florian Alpers
  • Constructor Details

    • DailySessionUsageStatistics

      public DailySessionUsageStatistics(LocalDate date, String viewer)
      Parameters:
      date - the date these statistics were recorded
      viewer - the name of the viewer instance
    • DailySessionUsageStatistics

      public DailySessionUsageStatistics()
    • DailySessionUsageStatistics

      public DailySessionUsageStatistics(DailySessionUsageStatistics orig)
      Parameters:
      orig - the instance to copy
  • Method Details

    • getSession

      public SessionUsageStatistics getSession(String sessionId)
      Parameters:
      sessionId - the HTTP session ID to look up
      Returns:
      SessionUsageStatistics
    • addSession

      public void addSession(SessionUsageStatistics session)
      Parameters:
      session - the session statistics to add
    • getId

      public Long getId()
    • getDate

      public LocalDate getDate()
    • getViewerInstance

      public String getViewerInstance()
    • getTotalRequestCount

      public long getTotalRequestCount(RequestType type, String pi)
      Parameters:
      type - request type to count
      pi - persistent identifier of the record to filter by
      Returns:
      the total number of requests of the given type for the given record PI across all sessions on this day
    • getTotalRequestCount

      public long getTotalRequestCount(RequestType type)
      Parameters:
      type - request type to count
      Returns:
      the total number of requests of the given type across all sessions and records on this day
    • getTotalRequestCount

      public long getTotalRequestCount(RequestType type, List<String> identifiersToInclude)
      Parameters:
      type - request type to count
      identifiersToInclude - only count requests for these record identifiers
      Returns:
      the total number of requests of the given type for the given record identifiers across all sessions on this day
    • getUniqueRequestCount

      public long getUniqueRequestCount(RequestType type)
      Parameters:
      type - request type to count
      Returns:
      the number of unique records requested with the given type across all sessions on this day
    • getUniqueRequestCount

      public long getUniqueRequestCount(RequestType type, String pi)
      Parameters:
      type - request type to count
      pi - persistent identifier of the record to filter by
      Returns:
      the number of sessions on this day that issued at least one request of the given type for the given record PI
    • getUniqueRequestCount

      public long getUniqueRequestCount(RequestType type, List<String> includedIdentifiers)
      Parameters:
      type - request type to count
      includedIdentifiers - only count sessions that requested any of these identifiers
      Returns:
      the number of sessions on this day that issued at least one request of the given type for any of the given record identifiers
    • getRecordIdentifier

      public List<String> getRecordIdentifier()
      Returns:
      List
    • toString

      public String toString()
      Overrides:
      toString in class Object