KickJava   Java API By Example, From Geeks To Geeks.

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


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.util.Date JavaDoc;
37
38 /**
39  * <p>
40  * Represents a history record for the bitstream.
41  * </p>
42  *
43  * @author Jim Downing
44  * @author Grace Carpenter
45  * @author Nathan Sarr
46  *
47  */

48 public class ChecksumHistory
49 {
50
51     /** Unique bitstream id. */
52     private int bitstreamId;
53
54     /** Date the process started. */
55     private Date JavaDoc processStartDate;
56
57     /** Date the process ended. */
58     private Date JavaDoc processEndDate;
59
60     /** The expected checksum. */
61     private String JavaDoc checksumExpected;
62
63     /** The checksum calculated. */
64     private String JavaDoc checksumCalculated;
65
66     /** The string result. */
67     private String JavaDoc result;
68
69     public ChecksumHistory()
70     {
71         ;
72     }
73
74     /**
75      * Minimal Constructor.
76      *
77      * @param bitstreamId
78      * bitstream id in the database
79      */

80     public ChecksumHistory(int bitstreamId)
81     {
82         this.bitstreamId = bitstreamId;
83     }
84
85     /**
86      * * Full history info Constructor.
87      *
88      * @param bitstrmId
89      * bitstream Id.
90      * @param startDate
91      * process start date
92      * @param endDate
93      * process end date
94      * @param checksumExpted
95      * expected checksum
96      * @param checksumCalc
97      * calculated checksum
98      * @param inResult
99      * result information
100      */

101     public ChecksumHistory(int bitstrmId, Date JavaDoc startDate, Date JavaDoc endDate,
102             String JavaDoc checksumExpted, String JavaDoc checksumCalc, String JavaDoc inResult)
103     {
104         this.bitstreamId = bitstrmId;
105         this.processStartDate = startDate;
106         this.processEndDate = endDate;
107         this.checksumExpected = checksumExpted;
108         this.checksumCalculated = checksumCalc;
109         this.result = inResult;
110     }
111
112     /**
113      * @return Returns the bitstreamId.
114      */

115     public int getBitstreamId()
116     {
117         return bitstreamId;
118     }
119
120     /**
121      * @return Returns the checksumCalculated.
122      */

123     public String JavaDoc getChecksumCalculated()
124     {
125         return checksumCalculated;
126     }
127
128     /**
129      * Set the checksum calculated.
130      *
131      * @param checksumCalculated
132      * The checksumCalculated to set.
133      */

134     public void setChecksumCalculated(String JavaDoc checksumCalculated)
135     {
136         this.checksumCalculated = checksumCalculated;
137     }
138
139     /**
140      * Get the extpected checksum.
141      *
142      * @return Returns the checksumExpected.
143      */

144     public String JavaDoc getChecksumExpected()
145     {
146         return checksumExpected;
147     }
148
149     /**
150      * Set the expected checksum.
151      *
152      * @param checksumExpected
153      * The checksumExpected to set.
154      */

155     public void setChecksumExpected(String JavaDoc checksumExpected)
156     {
157         this.checksumExpected = checksumExpected;
158     }
159
160     /**
161      * Get the process end date. This is the date and time the processing ended.
162      *
163      * @return Returns the processEndDate.
164      */

165     public Date JavaDoc getProcessEndDate()
166     {
167         return processEndDate;
168     }
169
170     /**
171      * Set the process end date. This is the date and time the processing ended.
172      *
173      * @param processEndDate
174      * The processEndDate to set.
175      */

176     public void setProcessEndDate(Date JavaDoc processEndDate)
177     {
178         this.processEndDate = processEndDate;
179     }
180
181     /**
182      * Get the process start date. This is the date and time the processing
183      * started.
184      *
185      * @return Returns the processStartDate.
186      */

187     public Date JavaDoc getProcessStartDate()
188     {
189         return processStartDate;
190     }
191
192     /**
193      * Set the process start date. This is the date and time the processing
194      * started.
195      *
196      * @param processStartDate
197      * The processStartDate to set.
198      */

199     public void setProcessStartDate(Date JavaDoc processStartDate)
200     {
201         this.processStartDate = processStartDate;
202     }
203
204     /**
205      * Return the processing result.
206      *
207      * @return
208      */

209     public String JavaDoc getResult()
210     {
211         return result;
212     }
213
214     /**
215      * Set the checksum processing result.
216      *
217      * @param result
218      * The result to set.
219      */

220     public void setResult(String JavaDoc result)
221     {
222         this.result = result;
223     }
224 }
225
Popular Tags