1 34 package org.dspace.checker; 35 36 45 public final class DSpaceBitstreamInfo 46 { 47 48 private int bitstreamId; 49 50 51 private String bitstreamFormat; 52 53 54 private String name; 55 56 57 private int size; 58 59 60 private String storedChecksum; 61 62 63 private String checksumAlgorithm; 64 65 66 private String userFormatDescription; 67 68 69 private String source; 70 71 72 private String internalId; 73 74 75 private boolean deleted; 76 77 78 private int storeNumber; 79 80 83 private DSpaceBitstreamInfo() 84 { 85 ; 86 } 87 88 94 public DSpaceBitstreamInfo(int bid) 95 { 96 deleted = false; 97 storeNumber = -1; 98 size = -1; 99 bitstreamFormat = null; 100 userFormatDescription = null; 101 internalId = null; 102 source = null; 103 checksumAlgorithm = null; 104 storedChecksum = null; 105 name = null; 106 this.bitstreamId = bid; 107 } 108 109 137 public DSpaceBitstreamInfo(boolean del, int storeNo, int sz, 138 String bitstrmFmt, int bitstrmId, String usrFmtDesc, 139 String intrnlId, String src, String chksumAlgorthm, String chksum, 140 String nm, String desc) 141 { 142 this.deleted = del; 143 this.storeNumber = storeNo; 144 this.size = sz; 145 this.bitstreamFormat = bitstrmFmt; 146 this.bitstreamId = bitstrmId; 147 this.userFormatDescription = usrFmtDesc; 148 this.internalId = intrnlId; 149 this.source = src; 150 this.checksumAlgorithm = chksumAlgorthm; 151 this.storedChecksum = chksum; 152 this.name = nm; 153 } 154 155 160 public boolean getDeleted() 161 { 162 return deleted; 163 } 164 165 171 public void setDeleted(boolean deleted) 172 { 173 this.deleted = deleted; 174 } 175 176 181 public int getStoreNumber() 182 { 183 return storeNumber; 184 } 185 186 192 public void setStoreNumber(int storeNumber) 193 { 194 this.storeNumber = storeNumber; 195 } 196 197 202 public int getSize() 203 { 204 return size; 205 } 206 207 213 public void setSize(int size) 214 { 215 this.size = size; 216 } 217 218 223 public String getBitstreamFormatId() 224 { 225 return bitstreamFormat; 226 } 227 228 234 public void setBitstreamFormatId(String bitstrmFmt) 235 { 236 this.bitstreamFormat = bitstrmFmt; 237 } 238 239 244 public int getBitstreamId() 245 { 246 return bitstreamId; 247 } 248 249 254 public String getUserFormatDescription() 255 { 256 return userFormatDescription; 257 } 258 259 265 public void setUserFormatDescription(String userFormatDescription) 266 { 267 this.userFormatDescription = userFormatDescription; 268 } 269 270 275 public String getInternalId() 276 { 277 return internalId; 278 } 279 280 286 public void setInternalId(String internalId) 287 { 288 this.internalId = internalId; 289 } 290 291 296 public String getSource() 297 { 298 return source; 299 } 300 301 307 public void setSource(String source) 308 { 309 this.source = source; 310 } 311 312 317 public String getChecksumAlgorithm() 318 { 319 return checksumAlgorithm; 320 } 321 322 328 public void setChecksumAlgorithm(String checksumAlgorithm) 329 { 330 this.checksumAlgorithm = checksumAlgorithm; 331 } 332 333 338 public String getStoredChecksum() 339 { 340 return storedChecksum; 341 } 342 343 349 public void setStoredChecksum(String checksum) 350 { 351 this.storedChecksum = checksum; 352 } 353 354 359 public String getName() 360 { 361 return name; 362 } 363 364 370 public void getName(String nm) 371 { 372 this.name = nm; 373 } 374 375 381 public void setName(String name) 382 { 383 this.name = name; 384 } 385 386 391 public boolean equals(Object o) 392 { 393 if (this == o) 394 { 395 return true; 396 } 397 398 if (!(o instanceof DSpaceBitstreamInfo)) 399 { 400 return false; 401 } 402 403 DSpaceBitstreamInfo other = (DSpaceBitstreamInfo) o; 404 405 return (this.bitstreamId == other.bitstreamId); 406 } 407 408 413 public int hashCode() 414 { 415 return bitstreamId; 416 } 417 418 423 public String toString() 424 { 425 return new StringBuffer ("DSpace Bitstream Information for id ").append( 426 bitstreamId).toString(); 427 } 428 } 429 | Popular Tags |