public class Bitstream extends DSpaceObject
When modifying the bitstream metadata, changes are not reflected in the
database until update is called. Note that you cannot alter
the contents of a bitstream; you need to create a new bitstream.
| Modifier and Type | Method and Description |
|---|---|
static Bitstream |
find(Context context,
int id)
Get a bitstream from the database.
|
static Bitstream[] |
findAll(Context context) |
Bundle[] |
getBundles()
Get the bundles this bitstream appears in
|
java.lang.String |
getChecksum()
Get the checksum of the content of the bitstream, for integrity checking
|
java.lang.String |
getChecksumAlgorithm()
Get the algorithm used to calculate the checksum
|
java.lang.String |
getDescription()
Get the description of this bitstream - optional free text, typically
provided by a user at submission time
|
BitstreamFormat |
getFormat()
Get the format of the bitstream
|
java.lang.String |
getFormatDescription()
Get the description of the format - either the user's or the description
of the format defined by the system.
|
java.lang.String |
getHandle()
Get the Handle of the object.
|
int |
getID()
Get the internal identifier of this bitstream
|
java.lang.String |
getName()
Get the name of this bitstream - typically the filename, without any path
information
|
DSpaceObject |
getParentObject()
Get the parent object of a bitstream.
|
int |
getSequenceID()
Get the sequence ID of this bitstream
|
long |
getSize()
Get the size of the bitstream
|
java.lang.String |
getSource()
Get the source of this bitstream - typically the filename with path
information (if originally provided) or the name of the tool that
generated this bitstream
|
int |
getStoreNumber()
Get the asset store number where this bitstream is stored
|
int |
getType()
return type found in Constants
|
java.lang.String |
getUserFormatDescription()
Get the user's format description.
|
boolean |
isRegisteredBitstream()
Determine if this bitstream is registered (available elsewhere on
filesystem than in assetstore).
|
java.io.InputStream |
retrieve()
Retrieve the contents of the bitstream
|
void |
setDescription(java.lang.String n)
Set the description of the bitstream
|
void |
setFormat(BitstreamFormat f)
Set the format of the bitstream.
|
void |
setName(java.lang.String n)
Set the name of the bitstream
|
void |
setSequenceID(int sid)
Set the sequence ID of this bitstream
|
void |
setSource(java.lang.String n)
Set the source of the bitstream
|
void |
setUserFormatDescription(java.lang.String desc)
Set the user's format description.
|
void |
update()
Update the bitstream metadata.
|
void |
updateLastModified() |
addDetails, clearDetails, find, getAdminObject, getDetails, getTypeTextpublic static Bitstream find(Context context, int id) throws java.sql.SQLException
context - DSpace context objectid - ID of the bitstreamjava.sql.SQLExceptionpublic static Bitstream[] findAll(Context context) throws java.sql.SQLException
java.sql.SQLExceptionpublic int getID()
getID in class DSpaceObjectpublic java.lang.String getHandle()
DSpaceObjectnullgetHandle in class DSpaceObjectnull if it doesn't have
onepublic int getSequenceID()
public void setSequenceID(int sid)
sid - the IDpublic java.lang.String getName()
getName in class DSpaceObjectpublic void setName(java.lang.String n)
n - the new name of the bitstreampublic java.lang.String getSource()
public void setSource(java.lang.String n)
n - the new source of the bitstreampublic java.lang.String getDescription()
public void setDescription(java.lang.String n)
n - the new description of the bitstreampublic java.lang.String getChecksum()
public java.lang.String getChecksumAlgorithm()
public long getSize()
public void setUserFormatDescription(java.lang.String desc)
throws java.sql.SQLException
desc - the user's description of the formatjava.sql.SQLExceptionpublic java.lang.String getUserFormatDescription()
public java.lang.String getFormatDescription()
public BitstreamFormat getFormat()
public void setFormat(BitstreamFormat f) throws java.sql.SQLException
null sets the type
of this bitstream to "unknown".f - the format of this bitstream, or null for
unknownjava.sql.SQLExceptionpublic void update()
throws java.sql.SQLException,
AuthorizeException
update in class DSpaceObjectjava.sql.SQLExceptionAuthorizeExceptionpublic java.io.InputStream retrieve()
throws java.io.IOException,
java.sql.SQLException,
AuthorizeException
java.io.IOExceptionjava.sql.SQLExceptionAuthorizeExceptionpublic Bundle[] getBundles() throws java.sql.SQLException
Bundle s this bitstream appears injava.sql.SQLExceptionpublic int getType()
getType in class DSpaceObjectpublic boolean isRegisteredBitstream()
public int getStoreNumber()
public DSpaceObject getParentObject() throws java.sql.SQLException
getParentObject in class DSpaceObjectjava.sql.SQLExceptionpublic void updateLastModified()
updateLastModified in class DSpaceObjectCopyright © 2018 DuraSpace. All Rights Reserved.