001: /*
002: * Copyright (c) 2004-2005, Hewlett-Packard Company and Massachusetts
003: * Institute of Technology. All rights reserved.
004: *
005: * Redistribution and use in source and binary forms, with or without
006: * modification, are permitted provided that the following conditions are
007: * met:
008: *
009: * - Redistributions of source code must retain the above copyright
010: * notice, this list of conditions and the following disclaimer.
011: *
012: * - Redistributions in binary form must reproduce the above copyright
013: * notice, this list of conditions and the following disclaimer in the
014: * documentation and/or other materials provided with the distribution.
015: *
016: * - Neither the name of the Hewlett-Packard Company nor the name of the
017: * Massachusetts Institute of Technology nor the names of their
018: * contributors may be used to endorse or promote products derived from
019: * this software without specific prior written permission.
020: *
021: * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
022: * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
023: * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
024: * A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT
025: * HOLDERS OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
026: * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
027: * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
028: * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND
029: * ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR
030: * TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE
031: * USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH
032: * DAMAGE.
033: */
034: package org.dspace.checker;
035:
036: import java.util.Date;
037:
038: /**
039: * <p>
040: * Represents a history record for the bitstream.
041: * </p>
042: *
043: * @author Jim Downing
044: * @author Grace Carpenter
045: * @author Nathan Sarr
046: *
047: */
048: public class ChecksumHistory {
049:
050: /** Unique bitstream id. */
051: private int bitstreamId;
052:
053: /** Date the process started. */
054: private Date processStartDate;
055:
056: /** Date the process ended. */
057: private Date processEndDate;
058:
059: /** The expected checksum. */
060: private String checksumExpected;
061:
062: /** The checksum calculated. */
063: private String checksumCalculated;
064:
065: /** The string result. */
066: private String result;
067:
068: public ChecksumHistory() {
069: ;
070: }
071:
072: /**
073: * Minimal Constructor.
074: *
075: * @param bitstreamId
076: * bitstream id in the database
077: */
078: public ChecksumHistory(int bitstreamId) {
079: this .bitstreamId = bitstreamId;
080: }
081:
082: /**
083: * * Full history info Constructor.
084: *
085: * @param bitstrmId
086: * bitstream Id.
087: * @param startDate
088: * process start date
089: * @param endDate
090: * process end date
091: * @param checksumExpted
092: * expected checksum
093: * @param checksumCalc
094: * calculated checksum
095: * @param inResult
096: * result information
097: */
098: public ChecksumHistory(int bitstrmId, Date startDate, Date endDate,
099: String checksumExpted, String checksumCalc, String inResult) {
100: this .bitstreamId = bitstrmId;
101: this .processStartDate = startDate;
102: this .processEndDate = endDate;
103: this .checksumExpected = checksumExpted;
104: this .checksumCalculated = checksumCalc;
105: this .result = inResult;
106: }
107:
108: /**
109: * @return Returns the bitstreamId.
110: */
111: public int getBitstreamId() {
112: return bitstreamId;
113: }
114:
115: /**
116: * @return Returns the checksumCalculated.
117: */
118: public String getChecksumCalculated() {
119: return checksumCalculated;
120: }
121:
122: /**
123: * Set the checksum calculated.
124: *
125: * @param checksumCalculated
126: * The checksumCalculated to set.
127: */
128: public void setChecksumCalculated(String checksumCalculated) {
129: this .checksumCalculated = checksumCalculated;
130: }
131:
132: /**
133: * Get the extpected checksum.
134: *
135: * @return Returns the checksumExpected.
136: */
137: public String getChecksumExpected() {
138: return checksumExpected;
139: }
140:
141: /**
142: * Set the expected checksum.
143: *
144: * @param checksumExpected
145: * The checksumExpected to set.
146: */
147: public void setChecksumExpected(String checksumExpected) {
148: this .checksumExpected = checksumExpected;
149: }
150:
151: /**
152: * Get the process end date. This is the date and time the processing ended.
153: *
154: * @return Returns the processEndDate.
155: */
156: public Date getProcessEndDate() {
157: return processEndDate;
158: }
159:
160: /**
161: * Set the process end date. This is the date and time the processing ended.
162: *
163: * @param processEndDate
164: * The processEndDate to set.
165: */
166: public void setProcessEndDate(Date processEndDate) {
167: this .processEndDate = processEndDate;
168: }
169:
170: /**
171: * Get the process start date. This is the date and time the processing
172: * started.
173: *
174: * @return Returns the processStartDate.
175: */
176: public Date getProcessStartDate() {
177: return processStartDate;
178: }
179:
180: /**
181: * Set the process start date. This is the date and time the processing
182: * started.
183: *
184: * @param processStartDate
185: * The processStartDate to set.
186: */
187: public void setProcessStartDate(Date processStartDate) {
188: this .processStartDate = processStartDate;
189: }
190:
191: /**
192: * Return the processing result.
193: *
194: * @return
195: */
196: public String getResult() {
197: return result;
198: }
199:
200: /**
201: * Set the checksum processing result.
202: *
203: * @param result
204: * The result to set.
205: */
206: public void setResult(String result) {
207: this.result = result;
208: }
209: }
|