-
Notifications
You must be signed in to change notification settings - Fork 24
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #987 from SamanwaySadhu/I978_update_resultFiles_wi…
…th_new_rules I978: Update generated results file according to new WF honor degrees proposed by Bill
- Loading branch information
Showing
128 changed files
with
4,087 additions
and
5,056 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,65 @@ | ||
// Copyright (C) 1989-2024 PC2 Development Team: John Clevenger, Douglas Lane, Samir Ashoo, and Troy Boudreau. | ||
package edu.csus.ecs.pc2.core.report; | ||
|
||
import java.io.PrintWriter; | ||
|
||
import edu.csus.ecs.pc2.core.log.Log; | ||
import edu.csus.ecs.pc2.core.model.Filter; | ||
import edu.csus.ecs.pc2.exports.ccs.ResultsFile; | ||
|
||
public class ResultsCSVReport extends AbstractReport { | ||
|
||
/** | ||
* Generates the results.csv report | ||
* | ||
* @author Samanway Sadhu | ||
*/ | ||
private static final long serialVersionUID = -6988627277661871941L; | ||
|
||
private ResultsFile resultsFile = new ResultsFile(); | ||
|
||
@Override | ||
public String getReportTitle() { | ||
return "results.csv report"; | ||
} | ||
|
||
@Override | ||
public String[] createReport(Filter filter) { | ||
return resultsFile.createCSVFileLines(getContest()); | ||
} | ||
|
||
@Override | ||
public String getPluginTitle() { | ||
return "results.csv"; | ||
} | ||
|
||
public void writeReport(PrintWriter printWriter) { | ||
|
||
printWriter.println(); | ||
|
||
try { | ||
|
||
printHeader(printWriter); | ||
|
||
try { | ||
|
||
String[] lines = resultsFile.createCSVFileLines(getContest()); | ||
|
||
for (String line : lines) { | ||
printWriter.println(line); | ||
} | ||
} catch (Exception e) { | ||
printWriter.println("Exception in report: " + e.getMessage()); | ||
e.printStackTrace(printWriter); | ||
} | ||
|
||
printFooter(printWriter); | ||
|
||
printWriter.close(); | ||
printWriter = null; | ||
|
||
} catch (Exception e) { | ||
log.log(Log.INFO, "Exception writing report", e); | ||
} | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.