Package org.dspace.app.statistics
Interface Report
- All Known Implementing Classes:
HTMLReport
public interface Report
Sn interface to a generic report generating
class, and to provide the polymorphism necessary to allow the report
generator to generate any number of different formats of report
Note: This used to be an abstract class, but has been made an interface as there wasn't
any logic contained within it. It's also been made public, so that you can create a Report
type without monkeying about in the statistics package.
- Author:
- Richard Jones
-
Method Summary
Modifier and TypeMethodDescriptionvoidaddBlock(Statistics stat) add a statistics block to the report to the class registerblockExplanation(String explanation) output the explanation of the stat block in the relevant formatoutput the date range in the relevant format.floorInfo(int floor) output the floor information in the relevant formatfooter()output the final footers for this fileheader()output any top headers that this page needsoutput any top headers that this page needsoutput the title in the relevant format.render()render the reportsectionHeader(String title) output the section header in the relevant formatvoidsetEndDate(LocalDate end) set the end date for the reportvoidsetMainTitle(String name, String serverName) set the main title for the reportvoidsetStartDate(LocalDate start) set the starting date for the reportstatBlock(Statistics content) output the report block based on the passed statistics object array
-
Method Details
-
header
String header()output any top headers that this page needs- Returns:
- a string containing the header for the report
-
header
output any top headers that this page needs- Parameters:
title- the title of the report, useful for email subjects or HTML headers- Returns:
- a string containing the header for the report
-
mainTitle
String mainTitle()output the title in the relevant format. This requires that the title has been set with setMainTitle()- Returns:
- a string containing the title of the report
-
dateRange
String dateRange()output the date range in the relevant format. This requires that the date ranges have been set using setStartDate() and setEndDate()- Returns:
- a string containing date range information
-
sectionHeader
output the section header in the relevant format- Parameters:
title- the title of the current section header- Returns:
- a string containing the formatted section header
-
statBlock
output the report block based on the passed statistics object array- Parameters:
content- a statistics object to form the basis of the displayed stat block- Returns:
- a string containing the formatted statistics block
-
floorInfo
output the floor information in the relevant format- Parameters:
floor- the floor value for the statistics block- Returns:
- a string containing the formatted floor information
-
blockExplanation
output the explanation of the stat block in the relevant format- Parameters:
explanation- the explanatory or clarification text for the stats- Returns:
- a string containing the formatted explanation
-
setMainTitle
set the main title for the report- Parameters:
name- the name of the serviceserverName- the name of the server
-
addBlock
add a statistics block to the report to the class register- Parameters:
stat- the statistics object to be added to the report
-
render
String render()render the report- Returns:
- a string containing the full content of the report
-
setStartDate
set the starting date for the report- Parameters:
start- the start date for the report
-
setEndDate
set the end date for the report- Parameters:
end- the end date for the report
-