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.
allMetadataFields, metadataCache, modifiedMetadata, ourContext| 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
|
String |
getChecksum()
Get the checksum of the content of the bitstream, for integrity checking
|
String |
getChecksumAlgorithm()
Get the algorithm used to calculate the checksum
|
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
|
String |
getFormatDescription()
Get the description of the format - either the user's or the description
of the format defined by the system.
|
String |
getHandle()
Get the Handle of the object.
|
int |
getID()
Get the internal identifier of this bitstream
|
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
|
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
|
String |
getUserFormatDescription()
Get the user's format description.
|
boolean |
isRegisteredBitstream()
Determine if this bitstream is registered (available elsewhere on
filesystem than in assetstore).
|
InputStream |
retrieve()
Retrieve the contents of the bitstream
|
void |
setDescription(String n)
Set the description of the bitstream
|
void |
setFormat(BitstreamFormat f)
Set the format of the bitstream.
|
void |
setName(String n)
Set the name of the bitstream
|
void |
setSequenceID(int sid)
Set the sequence ID of this bitstream
|
void |
setSource(String n)
Set the source of the bitstream
|
void |
setUserFormatDescription(String desc)
Set the user's format description.
|
void |
update()
Update the bitstream metadata.
|
void |
updateLastModified() |
addDC, addDC, addDetails, addMetadata, addMetadata, addMetadata, addMetadata, clearDC, clearDetails, clearMetadata, find, getAdminObject, getAuthoritiesAndConfidences, getDC, getDetails, getElements, getElementsFilled, getIdentifiers, getMDValueByField, getMDValueByLegacyField, getMetadata, getMetadata, getMetadata, getMetadata, getMetadata, getMetadataByMetadataString, getMetadataField, getMetadataFirstValue, getTypeText, removeMetadataFromDatabase, replaceMetadataValue, resetIdentifiersCache, setMetadataSingleValue, updateMetadatapublic static Bitstream find(Context context, int id) throws SQLException
context - DSpace context objectid - ID of the bitstreamSQLExceptionpublic static Bitstream[] findAll(Context context) throws SQLException
SQLExceptionpublic int getID()
getID in class DSpaceObjectpublic String getHandle()
DSpaceObjectnullgetHandle in class DSpaceObjectnull if it doesn't have
onepublic int getSequenceID()
public void setSequenceID(int sid)
sid - the IDpublic String getName()
getName in class DSpaceObjectpublic void setName(String n)
n - the new name of the bitstreampublic String getSource()
public void setSource(String n)
n - the new source of the bitstreampublic String getDescription()
public void setDescription(String n)
n - the new description of the bitstreampublic String getChecksum()
public String getChecksumAlgorithm()
public long getSize()
public void setUserFormatDescription(String desc) throws SQLException
desc - the user's description of the formatSQLExceptionpublic String getUserFormatDescription()
public String getFormatDescription()
public BitstreamFormat getFormat()
public void setFormat(BitstreamFormat f) throws SQLException
null sets the type
of this bitstream to "unknown".f - the format of this bitstream, or null for
unknownSQLExceptionpublic void update()
throws SQLException,
AuthorizeException
update in class DSpaceObjectSQLExceptionAuthorizeExceptionpublic InputStream retrieve() throws IOException, SQLException, AuthorizeException
IOExceptionSQLExceptionAuthorizeExceptionpublic Bundle[] getBundles() throws SQLException
Bundle s this bitstream appears inSQLExceptionpublic int getType()
getType in class DSpaceObjectpublic boolean isRegisteredBitstream()
public int getStoreNumber()
public DSpaceObject getParentObject() throws SQLException
getParentObject in class DSpaceObjectSQLExceptionpublic void updateLastModified()
updateLastModified in class DSpaceObjectCopyright © 2014 DuraSpace. All Rights Reserved.