org.dspace.checker
Class BitstreamInfo

java.lang.Object
  extended by org.dspace.checker.BitstreamInfo

public final class BitstreamInfo
extends Object

Value Object that holds bitstream information that will be used for checksum processing.

Author:
Jim Downing, Grace Carpenter, Nathan Sarr

Constructor Summary
BitstreamInfo(boolean del, int storeNo, long sz, String bitstrmFmt, int bitstrmId, String usrFmtDesc, String intrnlId, String src, String chksumAlgorthm, String chksum, String nm, Date procEndDate, boolean toBeProc, Date procStartDate)
          Complete constructor.
BitstreamInfo(int bid)
          Minimal constructor.
 
Method Summary
 boolean equals(Object o)
          Identity entirely dependent upon bitstreamId.
 String getBitstreamFormatId()
          Get the Bitstream Format id.
 boolean getBitstreamFound()
          bitstreamFound accessor.
 int getBitstreamId()
          Get the Bitstream id.
 String getCalculatedChecksum()
          calculatedChecksum accessor.
 String getChecksumAlgorithm()
          Get the checksum algorithm.
 String getChecksumCheckResult()
          Gets checksumCheckResult.
 boolean getDeleted()
          Get the deleted flag.
 boolean getInfoFound()
          infoFound accessor.
 String getInternalId()
          Get the Internal Id.
 String getName()
          Get the name of the bitstream.
 Date getProcessEndDate()
          The date and time this bitstream is finished being processed.
 Date getProcessStartDate()
          The start date and time this bitstream is being processed.
 long getSize()
          Get the size.
 String getSource()
          Get the source.
 String getStoredChecksum()
          Get the checksum.
 int getStoreNumber()
          Get the bitstream store number.
 boolean getToBeProcessed()
          Gets toBeProcessed.
 String getUserFormatDescription()
          Get the user format description.
 int hashCode()
          HashCode method uses bitstreamId as hashing function.
 void setBitstreamFormatId(String bitstrmFmt)
          Set the Bitstream Format id.
 void setBitstreamFound(boolean found)
          sets bitstreamFound.
 void setCalculatedChecksum(String calculatedChecksum)
          calculatedChecksum accessor.
 void setChecksumAlgorithm(String checksumAlgorithm)
          Set the checksum algorithm.
 void setChecksumCheckResult(String resultCode)
          Sets checksumCheckResult.
 void setDeleted(boolean deleted)
          Set the deleted flag.
 void setInfoFound(boolean found)
          infoFound accessor.
 void setInternalId(String internalId)
          Set the Internal Id.
 void setName(String nm)
          Set the name of the bitstream.
 void setProcessEndDate(Date endDate)
          The date and time this bitstream is finished being processed.
 void setProcessStartDate(Date startDate)
          The date and time the processing started for this bitstream.
 void setSize(int size)
          Set the size.
 void setSource(String source)
          Set the source.
 void setStoredChecksum(String checksum)
          Set the checksum.
 void setStoreNumber(int storeNumber)
          Set the store number.
 void setToBeProcessed(boolean toBeProcessed)
          Sets toBeProcessed.
 void setUserFormatDescription(String userFormatDescription)
          Set the user format description.
 String toString()
          Describes this BitstreamInfo.
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

BitstreamInfo

public BitstreamInfo(int bid)
Minimal constructor.

Parameters:
bid - Bitstream identifier

BitstreamInfo

public BitstreamInfo(boolean del,
                     int storeNo,
                     long sz,
                     String bitstrmFmt,
                     int bitstrmId,
                     String usrFmtDesc,
                     String intrnlId,
                     String src,
                     String chksumAlgorthm,
                     String chksum,
                     String nm,
                     Date procEndDate,
                     boolean toBeProc,
                     Date procStartDate)
Complete constructor.

Parameters:
del - Deleted
storeNo - Bitstream storeNumber
sz - Bitstream size
bitstrmFmt - Bitstream format
bitstrmId - Bitstream id
usrFmtDesc - Bitstream format description
intrnlId - Bitstream DSpace internal id
src - Bitstream source
chksumAlgorthm - Algorithm used to check bitstream
chksum - Hash digest obtained
nm - Name of bitstream
procEndDate - When the last bitstream check finished.
toBeProc - Whether the bitstream will be checked or skipped
procStartDate - When the last bitstream check started.
Method Detail

getDeleted

public boolean getDeleted()
Get the deleted flag.

Returns:
true if the bitstream has been deleted

setDeleted

public void setDeleted(boolean deleted)
Set the deleted flag.

Parameters:
deleted - deleted flag

getStoreNumber

public int getStoreNumber()
Get the bitstream store number.

Returns:
int

setStoreNumber

public void setStoreNumber(int storeNumber)
Set the store number.

Parameters:
storeNumber - the store number

getSize

public long getSize()
Get the size.

Returns:
int

setSize

public void setSize(int size)
Set the size.

Parameters:
size - the bitstream size

getBitstreamFormatId

public String getBitstreamFormatId()
Get the Bitstream Format id.

Returns:
int

setBitstreamFormatId

public void setBitstreamFormatId(String bitstrmFmt)
Set the Bitstream Format id.

Parameters:
bitstrmFmt - id of the bitstream format

getBitstreamId

public int getBitstreamId()
Get the Bitstream id.

Returns:
int

getUserFormatDescription

public String getUserFormatDescription()
Get the user format description.

Returns:
String

setUserFormatDescription

public void setUserFormatDescription(String userFormatDescription)
Set the user format description.

Parameters:
userFormatDescription - the userFormatDescription

getInternalId

public String getInternalId()
Get the Internal Id.

Returns:
String

setInternalId

public void setInternalId(String internalId)
Set the Internal Id.

Parameters:
internalId - the DSpace internal sequence id for the bitstream.

getSource

public String getSource()
Get the source.

Returns:
String

setSource

public void setSource(String source)
Set the source.

Parameters:
source - The bitstream source.

getChecksumAlgorithm

public String getChecksumAlgorithm()
Get the checksum algorithm.

Returns:
String

setChecksumAlgorithm

public void setChecksumAlgorithm(String checksumAlgorithm)
Set the checksum algorithm.

Parameters:
checksumAlgorithm - the algorithm used for checking this bitstream

getStoredChecksum

public String getStoredChecksum()
Get the checksum.

Returns:
String

setStoredChecksum

public void setStoredChecksum(String checksum)
Set the checksum.

Parameters:
checksum - The last stored checksum for this bitstream.

getName

public String getName()
Get the name of the bitstream.

Returns:
String

setName

public void setName(String nm)
Set the name of the bitstream.

Parameters:
nm - The name of this bitstream.

getCalculatedChecksum

public String getCalculatedChecksum()
calculatedChecksum accessor.

Returns:
Returns the calculatedChecksum.

setCalculatedChecksum

public void setCalculatedChecksum(String calculatedChecksum)
calculatedChecksum accessor.

Parameters:
calculatedChecksum - The calculatedChecksum to set.

getInfoFound

public boolean getInfoFound()
infoFound accessor.

Returns:
Returns infoFound.

setInfoFound

public void setInfoFound(boolean found)
infoFound accessor.

Parameters:
found - sets infoFound.

getBitstreamFound

public boolean getBitstreamFound()
bitstreamFound accessor.

Returns:
Returns bitstreamFound.

setBitstreamFound

public void setBitstreamFound(boolean found)
sets bitstreamFound.

Parameters:
found - value of bitstreamFound to set.

equals

public boolean equals(Object o)
Identity entirely dependent upon bitstreamId.

Overrides:
equals in class Object
See Also:
Object.equals(java.lang.Object)

hashCode

public int hashCode()
HashCode method uses bitstreamId as hashing function.

Overrides:
hashCode in class Object
See Also:
Object.hashCode()

toString

public String toString()
Describes this BitstreamInfo.

Overrides:
toString in class Object
See Also:
Object.toString()

setToBeProcessed

public void setToBeProcessed(boolean toBeProcessed)
Sets toBeProcessed.

Parameters:
toBeProcessed - flag from most_recent_checksum table

getToBeProcessed

public boolean getToBeProcessed()
Gets toBeProcessed.

Returns:
value of toBeProcessed flag (from most_recent_checksum table)

getChecksumCheckResult

public String getChecksumCheckResult()
Gets checksumCheckResult.

Returns:
result code for comparison of previous and current checksums

setChecksumCheckResult

public void setChecksumCheckResult(String resultCode)
Sets checksumCheckResult.

Parameters:
resultCode - for comparison of previous and current checksums

getProcessStartDate

public Date getProcessStartDate()
The start date and time this bitstream is being processed.

Returns:
date

setProcessStartDate

public void setProcessStartDate(Date startDate)
The date and time the processing started for this bitstream.

Parameters:
startDate - date to set.

getProcessEndDate

public Date getProcessEndDate()
The date and time this bitstream is finished being processed.

Returns:
date

setProcessEndDate

public void setProcessEndDate(Date endDate)
The date and time this bitstream is finished being processed.

Parameters:
endDate - the date to set.


Copyright © 2010 DuraSpace. All Rights Reserved.