org.dspace.app.statistics
Class HTMLReport

java.lang.Object
  extended by org.dspace.app.statistics.HTMLReport
All Implemented Interfaces:
Report

public class HTMLReport
extends Object
implements Report

This class provides HTML reports for the ReportGenerator class

Author:
Richard Jones

Constructor Summary
HTMLReport()
           
 
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 report block in HTML format
 String dateRange()
          output the date range in the relevant format.
 String floorInfo(int floor)
          output the floor information in HTML 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, and include a title argument (Title support currently not implemented)
 void HTMLReport()
          constructor for HTML reporting
 String mainTitle()
          output the title in the relevant format.
 String navigation()
          build the internal navigation for the report
 String render()
          return a string containing the report as generated by this class
 String sectionHeader(String title)
          output the section header in HTML 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 setOutput(String newOutput)
           
 void setStartDate(Date start)
          set the starting date for the report
 String statBlock(Statistics content)
          output the report block based on the passed mapping, where the mapping sould be "name of report element" => "value", where both sides of the mapping should be Strings.
 String topLink()
          provide a link back to the top of the page
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

HTMLReport

public HTMLReport()
Method Detail

HTMLReport

public void HTMLReport()
constructor for HTML reporting


setOutput

public void setOutput(String newOutput)

render

public String render()
return a string containing the report as generated by this class

Specified by:
render in interface Report
Returns:
the HTML report

topLink

public String topLink()
provide a link back to the top of the page

Returns:
a string containing the link text HTML formatted

navigation

public String navigation()
build the internal navigation for the report

Returns:
an HTML string providing internal page navigation

addBlock

public void addBlock(Statistics stat)
add a statistics block to the report to the class register

Specified by:
addBlock in interface Report
Parameters:
stat - the statistics object to be added to the report

setStartDate

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

Specified by:
setStartDate in interface Report
Parameters:
start - the start date for the report

setEndDate

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

Specified by:
setEndDate in interface Report
Parameters:
end - the end date for the report

dateRange

public String dateRange()
output the date range in the relevant format. This requires that the date ranges have been set using setStartDate() and setEndDate()

Specified by:
dateRange in interface Report
Returns:
a string containing date range information

mainTitle

public String mainTitle()
output the title in the relevant format. This requires that the title has been set with setMainTitle()

Specified by:
mainTitle in interface Report
Returns:
a string containing the title of the report

setMainTitle

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

Specified by:
setMainTitle in interface Report
Parameters:
name - the name of the service
serverName - the name of the server

header

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

Specified by:
header in interface Report
Returns:
a string containing the header for the report

header

public String header(String title)
output any top headers that this page needs, and include a title argument (Title support currently not implemented)

Specified by:
header in interface Report
Parameters:
title - the title of the item being headered
Returns:
a string containing the header for the report

sectionHeader

public String sectionHeader(String title)
output the section header in HTML format

Specified by:
sectionHeader in interface Report
Parameters:
title - the title of the section
Returns:
a string containing the section title HTML formatted

statBlock

public String statBlock(Statistics content)
output the report block based on the passed mapping, where the mapping sould be "name of report element" => "value", where both sides of the mapping should be Strings. This class also assumes that the reference is a linkable URL to the resource

Specified by:
statBlock in interface Report
Parameters:
content - the statistic object array to be displayed
Returns:
a string containing the statistics block HTML formatted

floorInfo

public String floorInfo(int floor)
output the floor information in HTML format

Specified by:
floorInfo in interface Report
Parameters:
floor - the floor number for the section being displayed
Returns:
a string containing floor information HTML formatted

blockExplanation

public String blockExplanation(String explanation)
output the explanation of the report block in HTML format

Specified by:
blockExplanation in interface Report
Parameters:
explanation - some text explaining the coming report block
Returns:
a string containing an explanaton HTML formatted

footer

public String footer()
output the final footers for this file

Specified by:
footer in interface Report
Returns:
a string containing the report footer


Copyright © 2010 DuraSpace. All Rights Reserved.