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
 void addBlock(Statistics stat)
          add a statistics block to the report to the class register
 String blockExplanation(String explanation)
          output the explanation of the stat block in the relevant format
 String dateRange()
          output the date range in the relevant format.
 String floorInfo(int floor)
          output the floor information in the relevant format
 String footer()
          output the final footers for this file
 String header()
          output any top headers that this page needs
 String header(String title)
          output any top headers that this page needs
 String mainTitle()
          output the title in the relevant format.
 String render()
          render the report
 String sectionHeader(String title)
          output the section header in the relevant format
 void setEndDate(Date end)
          set the end date for the report
 void setMainTitle(String name, String serverName)
          set the main title for the report
 void setStartDate(Date start)
          set the starting date for the report
 String statBlock(Statistics content)
          output the report block based on the passed statistics object array
 

Method Detail

header

String header()
output any top headers that this page needs

Returns:
a string containing the header for the report

header

String header(String title)
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

String sectionHeader(String title)
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

String statBlock(Statistics content)
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

String floorInfo(int floor)
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

String blockExplanation(String explanation)
output the explanation of the stat block in the relevant format

Parameters:
explanation - the explanatory or clarification text for the stats
Returns:
a string contianing the formatted explanation

footer

String footer()
output the final footers for this file

Returns:
a string containing the report footer

setMainTitle

void setMainTitle(String name,
                  String serverName)
set the main title for the report

Parameters:
name - the name of the service
serverName - the name of the server

addBlock

void addBlock(Statistics stat)
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

void setStartDate(Date start)
set the starting date for the report

Parameters:
start - the start date for the report

setEndDate

void setEndDate(Date end)
set the end date for the report

Parameters:
end - the end date for the report


Copyright © 2010 DuraSpace. All Rights Reserved.