@Entity public class Bitstream extends DSpaceObject implements DSpaceObjectLegacySupport
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.
id| Modifier | Constructor and Description |
|---|---|
protected |
Bitstream()
Protected constructor, create object using:
BitstreamService.create(Context, Bundle, InputStream)
or
BitstreamService.create(Context, InputStream) |
| Modifier and Type | Method and Description |
|---|---|
boolean |
equals(Object other)
Return
true if other is the same Bitstream
as this object, false otherwise |
protected BitstreamFormat |
getBitstreamFormat() |
List<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
|
Collection |
getCollection() |
Community |
getCommunity() |
String |
getDescription()
Get the description of this bitstream - optional free text, typically
provided by a user at submission time
|
BitstreamFormat |
getFormat(Context context)
Get the format of the bitstream
|
String |
getFormatDescription(Context context)
Get the description of the format - either the user's or the description
of the format defined by the system.
|
String |
getInternalId() |
Integer |
getLegacyId() |
String |
getName()
Get the name of this bitstream - typically the filename, without any path
information
|
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.
|
int |
hashCode() |
boolean |
isDeleted()
Bitstreams are only logically deleted (via a flag in the database).
|
void |
setChecksum(String checksum) |
void |
setChecksumAlgorithm(String checksumAlgorithm) |
void |
setDeleted(boolean deleted) |
void |
setDescription(Context context,
String n)
Set the description of the bitstream
|
void |
setFormat(Context context,
BitstreamFormat f)
Set the format of the bitstream.
|
void |
setInternalId(String internalId) |
void |
setName(Context context,
String n)
Set the name of the bitstream
|
void |
setSequenceID(int sid)
Set the sequence ID of this bitstream
|
void |
setSizeBytes(long sizeBytes) |
void |
setSource(Context context,
String n)
Set the source of the bitstream
|
void |
setStoreNumber(int storeNumber)
Set the asset store number where this bitstream is stored
|
void |
setUserFormatDescription(Context context,
String desc)
Set the user's format description.
|
addDetails, addHandle, addMetadata, clearDetails, clearModified, getDetails, getHandle, getHandles, getID, getMetadata, getResourcePolicies, isMetadataModified, isModified, removeMetadata, removeMetadata, setMetadata, setMetadataModified, setModifiedprotected Bitstream()
BitstreamService.create(Context, Bundle, InputStream)
or
BitstreamService.create(Context, InputStream)public int getSequenceID()
public void setSequenceID(int sid)
sid - the IDpublic String getName()
getName in class DSpaceObjectpublic void setName(Context context, String n) throws SQLException
context - contextn - the new name of the bitstreamSQLException - if database errorpublic String getSource()
public void setSource(Context context, String n) throws SQLException
context - contextn - the new source of the bitstreamSQLException - if database errorpublic String getDescription()
public void setDescription(Context context, String n) throws SQLException
context - contextn - the new description of the bitstreamSQLException - if database errorpublic String getChecksum()
public void setChecksum(String checksum)
public String getChecksumAlgorithm()
public void setChecksumAlgorithm(String checksumAlgorithm)
public long getSize()
public void setSizeBytes(long sizeBytes)
public String getUserFormatDescription()
protected BitstreamFormat getBitstreamFormat()
public BitstreamFormat getFormat(Context context) throws SQLException
context - contextSQLException - if database errorpublic boolean isDeleted()
throws SQLException
SQLException - if database errorpublic void setDeleted(boolean deleted)
public List<Bundle> getBundles() throws SQLException
Bundle s this bitstream appears inSQLException - if database errorpublic int getType()
getType in class DSpaceObjectpublic Collection getCollection()
public Community getCommunity()
public int getStoreNumber()
public void setStoreNumber(int storeNumber)
storeNumber - asset store number of the bitstreampublic String getInternalId()
public void setInternalId(String internalId)
public void setUserFormatDescription(Context context, String desc) throws SQLException
context - desc - the user's description of the formatSQLException - if database errorpublic String getFormatDescription(Context context) throws SQLException
context - contextSQLException - if database errorpublic void setFormat(Context context, BitstreamFormat f) throws SQLException
null sets the type
of this bitstream to "unknown".context - contextf - the format of this bitstream, or null for
unknownSQLException - if database errorpublic Integer getLegacyId()
getLegacyId in interface DSpaceObjectLegacySupportpublic boolean equals(Object other)
true if other is the same Bitstream
as this object, false otherwiseCopyright © 2016 DuraSpace. All rights reserved.