1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23 package org.archive.util;
24
25 import java.io.IOException;
26 import java.io.PrintWriter;
27
28 /***
29 * @author stack
30 * @version $Date: 2006-09-20 22:40:21 +0000 (Wed, 20 Sep 2006) $, $Revision: 4644 $
31 */
32 public interface Reporter {
33 /***
34 * Get an array of report names offered by this Reporter.
35 * A name in brackets indicates a free-form String,
36 * in accordance with the informal description inside
37 * the brackets, may yield a useful report.
38 *
39 * @return String array of report names, empty if there is only
40 * one report type
41 */
42 public String[] getReports();
43
44 /***
45 * Make a report of the given name to the passed-in Writer,
46 * If null, give the default report.
47 *
48 * @param writer to receive report
49 */
50 public void reportTo(String name, PrintWriter writer);
51
52 /***
53 * Make a default report to the passed-in Writer. Should
54 * be equivalent to reportTo(null, writer)
55 *
56 * @param writer to receive report
57 */
58 public void reportTo(PrintWriter writer) throws IOException;
59
60 /***
61 * Make a single-line summary report to the passed-in writer
62 *
63 * @param writer to receive report
64 */
65 public void singleLineReportTo(PrintWriter writer) throws IOException;
66
67 /***
68 * Return a short single-line summary report as a String.
69 *
70 * @return String single-line summary report
71 */
72 public String singleLineReport();
73
74 /***
75 * Return a legend for the single-line summary report as a String.
76 *
77 * @return String single-line summary legend
78 */
79 public String singleLineLegend();
80 }