|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.dspace.content.DSpaceObject
org.dspace.content.Bitstream
public class Bitstream
Class representing bitstreams stored in the DSpace system.
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.
| Method Summary | |
|---|---|
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 |
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()
|
| Methods inherited from class org.dspace.content.DSpaceObject |
|---|
addDetails, clearDetails, find, getAdminObject, getDetails, getTypeText |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Bitstream find(Context context,
int id)
throws SQLException
context - DSpace context objectid - ID of the bitstream
SQLException
public static Bitstream[] findAll(Context context)
throws SQLException
SQLExceptionpublic int getID()
getID in class DSpaceObjectpublic String getHandle()
DSpaceObjectnull
getHandle 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 format
SQLExceptionpublic 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
unknown
SQLException
public void update()
throws SQLException,
AuthorizeException
update in class DSpaceObjectSQLException
AuthorizeException
public InputStream retrieve()
throws IOException,
SQLException,
AuthorizeException
IOException
SQLException
AuthorizeException
public Bundle[] getBundles()
throws SQLException
Bundle s this bitstream appears in
SQLExceptionpublic 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 DSpaceObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||