use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.
the class TextReport method getResultSet.
private ResultSet getResultSet() throws IOException {
// get the data
retrieveParamsFromServlet("dqf");
if (parameters.get("h0") == null)
parameters.put("h0", "Project/Task");
ResultSet tableData = ResultSet.get(getDataRepository(), parameters, getPrefix(), getPSPProperties());
if (parameters.get("transpose") != null)
tableData = tableData.transpose();
return tableData;
}
use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.
the class TextReport method writeContents.
@Override
protected void writeContents() throws IOException {
ResultSet resultSet = getResultSet();
String format = getParameter(FORMAT_PARAM);
if (FORMAT_XML.equals(format))
writeXml(resultSet);
else
// default
writeHtml(resultSet);
}
use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.
the class StudataExporter method writeContents.
protected void writeContents() throws IOException {
StudataExporterPrefs prefs = new StudataExporterPrefs();
if (parameters.containsKey("exportPrefs") || !prefs.isValid()) {
prefs.writeForm(out, parameters);
return;
}
List projectPaths = getProjectPaths();
ResultSet data = ResultSet.get(getDataRepository(), parameters, "/To Date/PSP/All", getPSPProperties());
adjustDataAndPaths(projectPaths, data);
String studentName = getOwner();
String forStudent = "";
if (studentName != null)
forStudent = " for " + HTMLUtils.escapeEntities(studentName);
if (projectPaths.isEmpty()) {
out.print("<html><head>");
out.print("<title>No Student Data Found" + forStudent + "</title>");
out.print("</head><body>\n");
out.print("<h1>No Student Data Found" + forStudent + "</h1>\n");
out.print("No student data was found to export" + forStudent + ". Possible reasons:<ul>\n");
out.print("<li>The student has not logged time to any of their " + "PSP assignments.</li>\n");
out.print("<li>The student has edited their hierarchy, and their " + "PSP program assignments are not located underneath " + HTMLUtils.escapeEntities(getPrefix()) + "</li>\n");
out.print("</ul></body></html>\n");
} else if (performExport(prefs, projectPaths, data)) {
out.print("<html><head>");
out.print("<title>Exported Student Data" + forStudent + "</title>");
out.print("</head><body>\n");
out.print("<h1>Exported Student Data" + forStudent + "</h1>\n");
out.print(prefs.getHeaderMessage());
out.print("<ul>\n");
for (Iterator i = projectPaths.iterator(); i.hasNext(); ) {
String path = (String) i.next();
out.print("<li>" + HTMLUtils.escapeEntities(path) + "</li>\n");
}
out.print("</ul>\n");
out.print(prefs.getFooterMessage());
out.print("<hr><p><a href='studata?exportPrefs'>Export " + "options...</a></p>");
out.print("</body></html>\n");
}
}
use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.
the class PlanAnalysisPage method getActualSize.
@//
Chart(//
id = "size", //
type = "line", //
params = "units", titleKey = "Plan.Size_Title_FMT")
public ResultSet getActualSize(ChartData chartData) {
String units = chartData.chartArgs[0];
ResultSet data = chartData.getEnactmentResultSet(1);
data.setColName(1, units);
for (int row = data.numRows(); row > 0; row--) {
Enactment e = (Enactment) data.getRowObj(row);
data.setData(row, 1, num(e.actualSize(units)));
}
return data;
}
use of net.sourceforge.processdash.data.util.ResultSet in project processdash by dtuma.
the class PlanAnalysisPage method getEstErrorScatterChart.
@//
Chart(//
id = "estErrScatter", //
type = "estErrorScatter", //
params = "units", titleKey = "EstErrorScatterChart.Title", format = "skipUnitsCol=t")
public ResultSet getEstErrorScatterChart(ChartData chartData) {
ResultSet data = chartData.getEnactmentResultSet(//
"Plan.Size_Scatter_Plan_FMT", //
"Plan.Size_Scatter_Actual_FMT", //
"EstErrorScatterChart.Size_Est_Error", //
"Plan.Time_Scatter_Plan", //
"Plan.Time_Scatter_Actual", "EstErrorScatterChart.Time_Est_Error");
data.setFormat(3, "100%");
data.setFormat(6, "100%");
String units = chartData.chartArgs[0];
for (int row = data.numRows(); row > 0; row--) {
Enactment e = (Enactment) data.getRowObj(row);
double planSize = chartData.histData.getSize(e, units, false);
double actualSize = e.actualSize(units);
double sizeErr = (actualSize - planSize) / planSize;
data.setData(row, 1, num(planSize));
data.setData(row, 2, num(actualSize));
data.setData(row, 3, num(sizeErr));
double planTime = chartData.histData.getTime(e, null, false);
double actualTime = e.actualTime();
double timeErr = (actualTime - planTime) / planTime;
data.setData(row, 4, num(planTime / 60));
data.setData(row, 5, num(actualTime / 60));
data.setData(row, 6, num(timeErr));
}
return data;
}
Aggregations