KickJava   Java API By Example, From Geeks To Geeks.

Java > Open Source Codes > org > dspace > checker > SimpleReporter


1 /*
2  * Copyright (c) 2004-2005, Hewlett-Packard Company and Massachusetts
3  * Institute of Technology. All rights reserved.
4  *
5  * Redistribution and use in source and binary forms, with or without
6  * modification, are permitted provided that the following conditions are
7  * met:
8  *
9  * - Redistributions of source code must retain the above copyright
10  * notice, this list of conditions and the following disclaimer.
11  *
12  * - Redistributions in binary form must reproduce the above copyright
13  * notice, this list of conditions and the following disclaimer in the
14  * documentation and/or other materials provided with the distribution.
15  *
16  * - Neither the name of the Hewlett-Packard Company nor the name of the
17  * Massachusetts Institute of Technology nor the names of their
18  * contributors may be used to endorse or promote products derived from
19  * this software without specific prior written permission.
20  *
21  * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
22  * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
23  * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
24  * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
25  * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
26  * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
27  * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
28  * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
29  * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
30  * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
31  * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
32  * DAMAGE.
33  */

34 package org.dspace.checker;
35
36 import java.io.IOException JavaDoc;
37 import java.io.OutputStreamWriter JavaDoc;
38 import java.util.Date JavaDoc;
39
40 /**
41  *
42  * Simple Reporting Class which can return several different reports.
43  *
44  * @author Jim Downing
45  * @author Grace Carpenter
46  * @author Nathan Sarr
47  *
48  */

49 public interface SimpleReporter
50 {
51     /**
52      * Returns the bitstreams set found to be deleted for the specified date
53      * range.
54      *
55      * @param startDate
56      * the start date range
57      * @param endDate
58      * the end date range
59      * @param osw
60      * the output stream writer to write to
61      *
62      * @return number of bitstreams found
63      *
64      * @throws IOException
65      * if io error occurs
66      */

67     public int getDeletedBitstreamReport(Date JavaDoc startDate, Date JavaDoc endDate,
68             OutputStreamWriter JavaDoc osw) throws IOException JavaDoc;
69
70     /**
71      * The a report of bitstreams found where the checksum has been changed
72      * since the last check for the specified date range.
73      *
74      * @param startDate
75      * the start date range.
76      * @param endDate
77      * then end date range.
78      * @param osw
79      * the output stream writer to write to
80      *
81      * @return number of bitstreams found
82      *
83      * @throws IOException
84      * if io error occurs
85      */

86     public int getChangedChecksumReport(Date JavaDoc startDate, Date JavaDoc endDate,
87             OutputStreamWriter JavaDoc osw) throws IOException JavaDoc;
88
89     /**
90      * The report of bitstreams for the specified date range where it was
91      * determined the bitstreams can no longer be found.
92      *
93      * @param startDate
94      * the start date range.
95      * @param endDate
96      * the end date range.
97      * @param osw
98      * the output stream writer to write to
99      *
100      * @return number of bitstreams found
101      *
102      * @throws IOException
103      * if io error occurs
104      */

105     public int getBitstreamNotFoundReport(Date JavaDoc startDate, Date JavaDoc endDate,
106             OutputStreamWriter JavaDoc osw) throws IOException JavaDoc;
107
108     /**
109      * The bitstreams that were set to not be processed report for the specified
110      * date range.
111      *
112      * @param startDate
113      * the start date range.
114      * @param endDate
115      * the end date range.
116      * @param osw
117      * the output stream writer to write to
118      *
119      * @throws IOException
120      * if io error occurs
121      *
122      */

123     public int getNotToBeProcessedReport(Date JavaDoc startDate, Date JavaDoc endDate,
124             OutputStreamWriter JavaDoc osw) throws IOException JavaDoc;
125
126     /**
127      * The bitstreams that are not known to the checksum checker. This means
128      * they are in the bitstream table but not in the most recent checksum table
129      *
130      * @param osw
131      * the output stream writer to write to
132      *
133      * @return number of bitstreams found
134      *
135      * @throws IOException
136      * if io error occurs
137      *
138      */

139     public int getUncheckedBitstreamsReport(OutputStreamWriter JavaDoc osw)
140             throws IOException JavaDoc;
141 }
142
Popular Tags