|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objecthourparser.Report
public class Report
Formats the data of persons to HTML format.
Field Summary | |
---|---|
private HashMap<String,Vector<Double>> |
codeHours
How many hours of each work code has made per week. |
private String |
footer
|
private String |
header
|
static int |
INDEX_PAGE_NUMBER
Index of the index page for getPage() and getPageName() . |
private Vector<Double>[] |
personHours
How many hours each person has made per week. |
private Person[] |
persons
The Persons who are included in this report. |
private Vector<Date> |
weeks
The beginnings of each week. |
Constructor Summary | |
---|---|
Report(Person[] persons)
Creates a report from an array of Persons. |
|
Report(Vector<Person> persons)
Creates a report from a Vector of Persons. |
Method Summary | |
---|---|
String |
getFooter()
|
String |
getHeader()
|
private String |
getIndexPage()
Returns the HTML code for the page with the hours listed by person and week. |
private String |
getIndexPageName()
Returns the file name for the index page. |
String |
getPage(int page)
Returns the HTML code for the given page. |
String |
getPageName(int page)
Returns the file name for the given page. |
int |
getPages()
Returns how many pages this report will generate. |
private String |
getPersonPage(int person)
Returns the HTML code for a person's summary page. |
private String |
getSummaryPage()
Returns the HTML code for the page with the hours listed by code and week. |
private void |
process()
Collects the data from the persons and saves it for later use in the reports. |
private void |
processWeek(Date weekStart,
Date weekEnd)
Collects the data from the persons for one week and saves it for later use in the reports. |
void |
setFooter(String footer)
|
void |
setHeader(String header)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final int INDEX_PAGE_NUMBER
getPage()
and getPageName()
.
private final Person[] persons
private final Vector<Double>[] personHours
personHours[personsIndex].get(weeksIndex)
.
private final HashMap<String,Vector<Double>> codeHours
codeHours.get(code).get(weeksIndex)
.
private final Vector<Date> weeks
private String header
private String footer
Constructor Detail |
---|
public Report(Vector<Person> persons)
persons
- persons to be included in the report; must be at least one.public Report(Person[] persons)
persons
- persons to be included in the report; must be at least one.Method Detail |
---|
private void process()
private void processWeek(Date weekStart, Date weekEnd)
weekStart
- the beginning of the week, must this week's first day at 00:00:00.weekEnd
- the end of the week, must be next week's first day at 00:00:00.public int getPages()
public String getPage(int page)
page
- index of the page, from 0
to getPages()-1
.
public String getPageName(int page)
page
- index of the page, from 0
to getPages()-1
.
private String getIndexPageName()
private String getIndexPage()
private String getSummaryPage()
private String getPersonPage(int person)
person
- index of the person
public String getHeader()
public void setHeader(String header)
public String getFooter()
public void setFooter(String footer)
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |