| 10 |
|
public class ReportMaker { |
| 11 |
|
|
| 12 |
|
// Constructor. This takes the database Statement. |
| 13 |
< |
public ReportMaker(Statement stmt, String dateDir, long startTime, long endTime) { |
| 13 |
> |
public ReportMaker(Statement stmt, String webDir, String dateDir, long startTime, long endTime) { |
| 14 |
|
_stmt = stmt; |
| 15 |
+ |
_webDir = webDir; |
| 16 |
|
_dateDir = dateDir; |
| 17 |
|
_startTime = startTime; |
| 18 |
|
_endTime = endTime; |
| 97 |
|
} |
| 98 |
|
BufferedImage img = chart.drawChart(plotData, SHTMLLayout.CHART_WIDTH, SHTMLLayout.CHART_HEIGHT, 24, 10, maxY); |
| 99 |
|
IscreamChartWriter imgWriter = new IscreamChartWriter(); |
| 100 |
< |
imgWriter.writeChart(img, _dateDir + "_" + machine + "_" + reportField + ".gif"); |
| 100 |
> |
IscreamFilePlacer placer = new IscreamFilePlacer(_webDir); |
| 101 |
> |
File destination = placer.makeDirs(_dateDir, machine, reportField); |
| 102 |
> |
imgWriter.writeChart(img, new File(destination, "chart.gif")); |
| 103 |
|
System.out.println("[DEBUG]Point count: " + plotData.countPoints()); |
| 104 |
|
} |
| 105 |
|
|
| 106 |
|
} |
| 107 |
|
|
| 108 |
|
private Statement _stmt = null; |
| 109 |
+ |
private String _webDir; |
| 110 |
|
private String _dateDir; |
| 111 |
|
private long _startTime; |
| 112 |
|
private long _endTime; |