Package org.dspace.content
Class Bundle
java.lang.Object
org.dspace.content.DSpaceObject
org.dspace.content.Bundle
- All Implemented Interfaces:
Serializable,DSpaceObjectLegacySupport,ReloadableEntity<UUID>
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.
- Version:
- $Revision$
- Author:
- Robert Tansley
- See Also:
-
Field Summary
FieldsFields inherited from class org.dspace.content.DSpaceObject
id, predefinedUUID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedBundle()Protected constructor, create object using:BundleService.create(Context, Item, String) -
Method Summary
Modifier and TypeMethodDescriptionvoidClear the list of bitstream of this bundlebooleanGet a copy of the bitstream list of this bundle Note that this is a copy and if you wish to manipulate the bitstream list, you should use , orgetItems()Get the items this bundle appears ingetName()Get the name of the bundleGet the primary bitstream ID of the bundleintgetType()return type found in ConstantsinthashCode()voidremoveBitstream(Bitstream bitstream) Remove the given bitstream from this bundles bitstream listvoidSet the name of the bundlevoidsetPrimaryBitstreamID(Bitstream bitstream) Set the primary bitstream ID of the bundlevoidUnset the primary bitstream ID of the bundleMethods inherited from class org.dspace.content.DSpaceObject
addDetails, addHandle, addMetadata, clearDetails, clearModified, getDetails, getHandle, getHandles, getID, getMetadata, getPredefinedUUID, getResourcePolicies, isMetadataModified, isModified, removeMetadata, removeMetadata, setMetadata, setMetadataModified, setModified
-
Field Details
-
bundleService
-
-
Constructor Details
-
Bundle
protected Bundle()Protected constructor, create object using:BundleService.create(Context, Item, String)
-
-
Method Details
-
getLegacyId
- Specified by:
getLegacyIdin interfaceDSpaceObjectLegacySupport- Returns:
- the old integer based legacy identifier
-
getName
Get the name of the bundle- Specified by:
getNamein classDSpaceObject- Returns:
- name of the bundle (ORIGINAL, TEXT, THUMBNAIL) or NULL if not set
-
setName
Set the name of the bundle- Parameters:
context- contextname- string name of the bundle (ORIGINAL, TEXT, THUMBNAIL) are the values currently used- Throws:
SQLException- if database error
-
getPrimaryBitstream
Get the primary bitstream ID of the bundle- Returns:
- primary bitstream ID or -1 if not set
-
setPrimaryBitstreamID
Set the primary bitstream ID of the bundle- Parameters:
bitstream- primary bitstream (e.g. index html file)
-
unsetPrimaryBitstreamID
public void unsetPrimaryBitstreamID()Unset the primary bitstream ID of the bundle -
getBitstreams
Get a copy of the bitstream list of this bundle Note that this is a copy and if you wish to manipulate the bitstream list, you should use , or- Returns:
- the bitstreams
-
clearBitstreams
public void clearBitstreams()Clear the list of bitstream of this bundle -
removeBitstream
Remove the given bitstream from this bundles bitstream list- Parameters:
bitstream- The bitstream to remove
-
getItems
Get the items this bundle appears in- Returns:
- array of
Items this bundle appears in
-
equals
-
hashCode
public int hashCode() -
getType
public int getType()return type found in Constants- Specified by:
getTypein classDSpaceObject- Returns:
- bundle type
-