Package org.dspace.app.statistics
Class HTMLReport
java.lang.Object
org.dspace.app.statistics.HTMLReport
- All Implemented Interfaces:
Report
This class provides HTML reports for the ReportGenerator class
- Author:
- Richard Jones
-
Constructor Summary
Constructors -
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 report block in HTML formatoutput the date range in the relevant format.floorInfo(int floor) output the floor information in HTML formatfooter()output the final footers for this fileheader()output any top headers that this page needsoutput any top headers that this page needs, and include a title argument (Title support currently not implemented)output the title in the relevant format.build the internal navigation for the reportrender()return a string containing the report as generated by this classsectionHeader(String title) output the section header in HTML formatvoidsetEndDate(LocalDate end) set the end date for the reportvoidsetMainTitle(String name, String serverName) set the main title for the reportvoidSet a non-default output file path.voidsetStartDate(LocalDate start) set the starting date for the reportstatBlock(Statistics content) output the report block based on the passed mapping, where the mapping should be "name of report element" to "value", where both sides of the mapping should be Strings.topLink()provide a link back to the top of the page
-
Constructor Details
-
HTMLReport
public HTMLReport()Output file path is set to${dspace.dir}/log/report.
-
-
Method Details
-
setOutput
Set a non-default output file path.- Parameters:
newOutput- new path to the report.
-
render
return a string containing the report as generated by this class -
topLink
provide a link back to the top of the page- Returns:
- a string containing the link text HTML formatted
-
addBlock
add a statistics block to the report to the class register -
setStartDate
set the starting date for the report- Specified by:
setStartDatein interfaceReport- Parameters:
start- the start date for the report
-
setEndDate
set the end date for the report- Specified by:
setEndDatein interfaceReport- Parameters:
end- the end date for the report
-
dateRange
output the date range in the relevant format. This requires that the date ranges have been set using setStartDate() and setEndDate() -
mainTitle
output the title in the relevant format. This requires that the title has been set with setMainTitle() -
setMainTitle
set the main title for the report- Specified by:
setMainTitlein interfaceReport- Parameters:
name- the name of the serviceserverName- the name of the server
-
header
output any top headers that this page needs -
header
output any top headers that this page needs, and include a title argument (Title support currently not implemented) -
sectionHeader
output the section header in HTML format- Specified by:
sectionHeaderin interfaceReport- Parameters:
title- the title of the section- Returns:
- a string containing the section title HTML formatted
-
statBlock
output the report block based on the passed mapping, where the mapping should be "name of report element" to "value", where both sides of the mapping should be Strings. This class also assumes that the reference is a linkable URL to the resource -
floorInfo
output the floor information in HTML format -
blockExplanation
output the explanation of the report block in HTML format- Specified by:
blockExplanationin interfaceReport- Parameters:
explanation- some text explaining the coming report block- Returns:
- a string containing an explanation HTML formatted
-