Package org.dspace.content
Class Collection
java.lang.Object
org.dspace.content.DSpaceObject
org.dspace.content.CacheableDSpaceObject
org.dspace.content.Collection
- All Implemented Interfaces:
Serializable,DSpaceObjectLegacySupport,ReloadableEntity<UUID>
Class representing a collection.
The collection's metadata (name, introductory text etc), workflow groups, and
default group of submitters are loaded into memory. Changes to metadata are
not written to the database until update is called. If you
create or remove a workflow group, the change is only reflected in the
database after calling update. The default group of
submitters is slightly different - creating or removing this has instant
effect.
- Author:
- Robert Tansley
- See Also:
-
Field Summary
Fields inherited from class org.dspace.content.DSpaceObject
id, predefinedUUID -
Constructor Summary
ConstructorsModifierConstructorDescriptionprotectedProtected constructor, create object using:CollectionService.create(Context, Community)orCollectionService.create(Context, Community, String)protectedCollection(UUID uuid) Takes a pre-determined UUID to be passed to the object to allow for the restoration of previously defined UUID's. -
Method Summary
Modifier and TypeMethodDescriptionbooleanReturntrueifotheris the same Collection as this object,falseotherwiseGet the default group of administrators, if there is one.Get the communities this collection appears inGet the license that users must grant before submitting to this collection.getLogo()Get the logo for the collection.getName()Get the default group of submitters, if there is one.Get the template item for this collection.intgetType()return type found in ConstantsgetWorkflowStep1(Context context) getWorkflowStep2(Context context) getWorkflowStep3(Context context) inthashCode()voidsetLicense(Context context, String license) Set the license for this collection.protected voidvoidsetWorkflowGroup(Context context, int step, Group g) Methods 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
-
Constructor Details
-
Collection
protected Collection()Protected constructor, create object using:CollectionService.create(Context, Community)orCollectionService.create(Context, Community, String) -
Collection
Takes a pre-determined UUID to be passed to the object to allow for the restoration of previously defined UUID's.- Parameters:
uuid- Takes a uuid to be passed to the Pre-Defined UUID Generator
-
-
Method Details
-
getName
- Specified by:
getNamein classDSpaceObject
-
getLogo
Get the logo for the collection.nullis returned if the collection does not have a logo.- Returns:
- the logo of the collection, or
null
-
setLogo
-
getSubmitters
Get the default group of submitters, if there is one. Note that the authorization system may allow others to submit to the collection, so this is not necessarily a definitive list of potential submitters.The default group of submitters for collection 100 is the one called
collection_100_submit.- Returns:
- the default group of submitters, or
nullif there is no default group.
-
getAdministrators
Get the default group of administrators, if there is one. Note that the authorization system may allow others to be administrators for the collection.The default group of administrators for collection 100 is the one called
collection_100_admin.- Returns:
- group of administrators, or
nullif there is no default group.
-
getWorkflowStep1
-
getWorkflowStep2
-
getWorkflowStep3
-
getLicenseCollection
Get the license that users must grant before submitting to this collection.- Returns:
- the license for this collection. Never null.
-
setLicense
Set the license for this collection. Passing innullmeans that the site-wide default will be used.- Parameters:
context- contextlicense- the license, ornull- Throws:
SQLException- if database error
-
getTemplateItem
Get the template item for this collection.nullis returned if the collection does not have a template. Submission mechanisms may copy this template to provide a convenient starting point for a submission.- Returns:
- the item template, or
null - Throws:
SQLException- if database error
-
getCommunities
Get the communities this collection appears in- Returns:
- array of
Communityobjects - Throws:
SQLException- if database error
-
equals
Returntrueifotheris the same Collection as this object,falseotherwise -
hashCode
public int hashCode() -
getType
public int getType()return type found in Constants- Specified by:
getTypein classDSpaceObject- Returns:
- int Constants.COLLECTION
-
setWorkflowGroup
public void setWorkflowGroup(Context context, int step, Group g) throws SQLException, AuthorizeException - Throws:
SQLExceptionAuthorizeException
-
getLegacyId
- Specified by:
getLegacyIdin interfaceDSpaceObjectLegacySupport- Returns:
- the old integer based legacy identifier
-