Class StatisticsSummary
java.lang.Object
io.goobi.viewer.model.statistics.usage.StatisticsSummary
Summary of request counts for a certain date range. Used for delivering record counts to users
- Author:
- florian
-
Constructor Summary
ConstructorsConstructorDescriptionStatisticsSummary(DailySessionUsageStatistics dailyStats) Constructor to create an instance from aDailySessionUsageStatisticsobjectStatisticsSummary(DailySessionUsageStatistics dailyStats, List<String> includedIdentifiers) Constructor to create an instance from aDailySessionUsageStatisticsobject filtered by a list of record identifiersDefault constructor -
Method Summary
Modifier and TypeMethodDescriptionadd(StatisticsSummary other) Create a new summary with the sum of request counts from this and another summarystatic StatisticsSummaryempty()Create an empty summarygetLastRecordedDate(RequestType... types) Get the last date for which requests have been recordedlonggetTotalRequests(RequestType... types) Get the total amount for requests for a givenRequestTypegetTypes()Get the request counts sorted byRequestTypelonggetUniqueRequests(RequestType... types) Get the number of unique request for a givenRequestTypebooleanisEmpty()booleanisOlderThan(long num, TemporalUnit unit) booleanisOlderThan(long num, TemporalUnit unit, Temporal currentTime) void
-
Constructor Details
-
StatisticsSummary
public StatisticsSummary() -
StatisticsSummary
Default constructor- Parameters:
types- Request counts sorted byRequestType
-
StatisticsSummary
Constructor to create an instance from aDailySessionUsageStatisticsobject- Parameters:
dailyStats- TheDailySessionUsageStatisticsfrom which to retrieve the request counts
-
StatisticsSummary
Constructor to create an instance from aDailySessionUsageStatisticsobject filtered by a list of record identifiers- Parameters:
dailyStats- TheDailySessionUsageStatisticsfrom which to retrieve the request countsincludedIdentifiers- A list of record identifiers for which to count the requests. If empty, all requests will be counted
-
-
Method Details
-
empty
Create an empty summary- Returns:
- an empty
StatisticsSummary
-
getTypes
Get the request counts sorted byRequestType- Returns:
- a
Map
-
add
Create a new summary with the sum of request counts from this and another summary- Parameters:
other- the otherSummaryStatisticsto add to this one- Returns:
- the sum of
SummaryStatistics
-
getTotalRequests
Get the total amount for requests for a givenRequestType- Parameters:
types- theRequestTypes to count- Returns:
- number of requests
-
getUniqueRequests
Get the number of unique request for a givenRequestType- Parameters:
types- theRequestTypes to count- Returns:
- number of unique requests
-
getLastRecordedDate
Get the last date for which requests have been recorded- Parameters:
types- theRequestTypeto check- Returns:
LocalDate
-
getAsCsv
-
calculateStartDate
-
calculateEndDate
-
isEmpty
public boolean isEmpty() -
setInformation
-
getInformation
-
isOlderThan
-
isOlderThan
-
getCreationTime
-