@Entity public class Item extends DSpaceObject implements DSpaceObjectLegacySupport
This class holds in memory the item Dublin Core metadata, the bundles in the
item, and the bitstreams in those bundles. When modifying the item, if you
modify the Dublin Core or the "in archive" flag, you must call
update for the changes to be written to the database.
Creating, adding or removing bundles or bitstreams has immediate effect in
the database.
| Modifier and Type | Field and Description |
|---|---|
static String |
ANY
Wild card for Dublin Core metadata qualifiers/languages
|
id| Modifier | Constructor and Description |
|---|---|
protected |
Item()
Protected constructor, create object using:
ItemService.create(Context, WorkspaceItem) |
| Modifier and Type | Method and Description |
|---|---|
void |
clearCollections() |
boolean |
equals(Object obj)
Return
true if other is the same Item as
this object, false otherwise |
List<Bundle> |
getBundles()
Get the bundles in this item.
|
List<Bundle> |
getBundles(String name)
Get the bundles matching a bundle name (name corresponds roughly to type)
|
List<Collection> |
getCollections()
Get the collections this item is in.
|
ItemService |
getItemService() |
Date |
getLastModified()
Get the date the item was last modified, or the current date if
last_modified is null
|
Integer |
getLegacyId() |
String |
getName() |
Collection |
getOwningCollection()
Get the owning Collection for the item
|
EPerson |
getSubmitter()
Get the e-person that originally submitted this item
|
Collection |
getTemplateItemOf() |
int |
getType()
return type found in Constants
|
int |
hashCode() |
boolean |
isArchived()
Find out if the item is part of the main archive
|
boolean |
isDiscoverable()
Find out if the item is discoverable
|
boolean |
isWithdrawn()
Find out if the item has been withdrawn
|
void |
setArchived(boolean isArchived)
Set the "is_archived" flag.
|
void |
setDiscoverable(boolean discoverable)
Set the "discoverable" flag.
|
void |
setLastModified(Date lastModified) |
void |
setOwningCollection(Collection c)
Set the owning Collection for the item
|
void |
setSubmitter(EPerson sub)
Set the e-person that originally submitted this item.
|
addDetails, addHandle, addMetadata, clearDetails, clearModified, getDetails, getHandle, getHandles, getID, getMetadata, getResourcePolicies, isMetadataModified, isModified, removeMetadata, removeMetadata, setMetadata, setMetadataModified, setModifiedpublic static final String ANY
protected Item()
ItemService.create(Context, WorkspaceItem)public boolean isArchived()
public boolean isWithdrawn()
public boolean isDiscoverable()
public Date getLastModified()
public void setLastModified(Date lastModified)
public void setArchived(boolean isArchived)
WorkflowItem.archive() should set this.isArchived - new value for the flagpublic void setDiscoverable(boolean discoverable)
discoverable - new value for the flagpublic void setOwningCollection(Collection c)
c - Collectionpublic Collection getOwningCollection()
public EPerson getSubmitter()
public void setSubmitter(EPerson sub)
update must be called to write the change to the
database.sub - the submitterpublic List<Collection> getCollections()
public void clearCollections()
public Collection getTemplateItemOf()
public List<Bundle> getBundles()
public List<Bundle> getBundles(String name)
name - name of bundle (ORIGINAL/TEXT/THUMBNAIL)public boolean equals(Object obj)
true if other is the same Item as
this object, false otherwisepublic int getType()
getType in class DSpaceObjectpublic String getName()
getName in class DSpaceObjectpublic Integer getLegacyId()
getLegacyId in interface DSpaceObjectLegacySupportpublic ItemService getItemService()
Copyright © 2022 LYRASIS. All rights reserved.