|
||||||||||
| 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.Bundle
public class Bundle
Class representing bundles of bitstreams stored in the DSpace system
The corresponding Bitstream objects are loaded into memory. At present, there
is no metadata associated with bundles - they are simple containers. Thus,
the update method doesn't do much yet. Creating, adding or
removing bitstreams has instant effect in the database.
| Method Summary | |
|---|---|
void |
addBitstream(Bitstream b)
Add an existing bitstream to this bundle |
Bitstream |
createBitstream(InputStream is)
Create a new bitstream in this bundle. |
static Bundle |
find(Context context,
int id)
Get a bundle from the database. |
Bitstream |
getBitstreamByName(String name)
|
Bitstream[] |
getBitstreams()
Get the bitstreams in this bundle |
String |
getHandle()
Get the Handle of the object. |
int |
getID()
Get the internal identifier of this bundle |
Item[] |
getItems()
Get the items this bundle appears in |
String |
getName()
Get the name of the bundle |
int |
getPrimaryBitstreamID()
Get the primary bitstream ID of the bundle |
int |
getType()
return type found in Constants |
Bitstream |
registerBitstream(int assetstore,
String bitstreamPath)
Create a new bitstream in this bundle. |
void |
removeBitstream(Bitstream b)
Remove a bitstream from this bundle - the bitstream is only deleted if this was the last reference to it |
void |
setName(String name)
Set the name of the bundle |
void |
setPrimaryBitstreamID(int bitstreamID)
Set the primary bitstream ID of the bundle |
void |
unsetPrimaryBitstreamID()
Unset the primary bitstream ID of the bundle |
void |
update()
Update the bundle metadata |
| Methods inherited from class org.dspace.content.DSpaceObject |
|---|
addDetails, clearDetails, find, getDetails |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static Bundle find(Context context,
int id)
throws SQLException
context - DSpace context objectid - ID of the bundle
SQLExceptionpublic int getID()
getID in class DSpaceObjectpublic String getName()
getName in class DSpaceObjectpublic void setName(String name)
name - string name of the bundle (ORIGINAL, TEXT, THUMBNAIL) are the
values currently usedpublic int getPrimaryBitstreamID()
public void setPrimaryBitstreamID(int bitstreamID)
bitstreamID - int ID of primary bitstream (e.g. index html file)public void unsetPrimaryBitstreamID()
public String getHandle()
DSpaceObjectnull
getHandle in class DSpaceObjectnull if it doesn't have
onepublic Bitstream getBitstreamByName(String name)
name - name of the bitstream you're looking for
public Bitstream[] getBitstreams()
public Item[] getItems()
throws SQLException
Item s this bundle appears in
SQLException
public Bitstream createBitstream(InputStream is)
throws AuthorizeException,
IOException,
SQLException
is - the stream to read the new bitstream from
AuthorizeException
IOException
SQLException
public Bitstream registerBitstream(int assetstore,
String bitstreamPath)
throws AuthorizeException,
IOException,
SQLException
assetstore - corresponds to an assetstore in dspace.cfgbitstreamPath - the path and filename relative to the assetstore
IOException
SQLException
AuthorizeException
public void addBitstream(Bitstream b)
throws SQLException,
AuthorizeException
b - the bitstream to add
SQLException
AuthorizeException
public void removeBitstream(Bitstream b)
throws AuthorizeException,
SQLException,
IOException
If the bitstream in question is the primary bitstream recorded for the
bundle the primary bitstream field is unset in order to free the
bitstream from the foreign key constraint so that the
cleanup process can run normally.
b - the bitstream to remove
AuthorizeException
SQLException
IOException
public void update()
throws SQLException,
AuthorizeException
SQLException
AuthorizeExceptionpublic int getType()
getType in class DSpaceObject
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||