mirror of
https://github.com/DSpace/DSpace.git
synced 2025-10-10 19:43:10 +00:00
This is a merge back to trunk of Graham Triggs work to port Configurable Browse to Manakin from the sandbox.
grahamtriggs | 2007-08-01 11:55:51 -0400 Added IBM ICU dependency First attempt at integrating the configurable browse patch First attempt at integrating the UI changes for Configurable Browse Configurable browse patch - web.xml Java code modifications from Configurable Browse patch JSP changes from the Configurable Browse patch Removed browse changes that should have been committed to the browse branch Documentation, config and scripts for configurable browse Re-adding Configurable Browse changes following merge Messages for the configurable browse Fixed use of DCDate for i18n patch First attempt to make xmlui compatible with the new BrowseIndex, although not fully use the configuration First attempt to make xmlui compatible with new Browse API. Browse basically works, but it's more costly than needs be (unnecessary Item.find()), and only works if you use the default Browse configuration. Fixed problem with second level browse (items for author / subject) Updates xmlui components to handle BrowseItem DSOs, ArtifactBrowser now passes these directly. r407@libaxis1: grahamtriggs | 2007-08-06 09:14:05 -0400 Minor fixes to make class easier to use Fix to only display sort by options on a second level browse Updates the ArtifactBrowser, to replace all browse functionality with entirely customisable browse code Update the browse index creation on fresh_install Fixed problem with indexing non-archived items Added caching support (key generation / validity) Moved internal class to bottom of file Browse code changes git-svn-id: http://scm.dspace.org/svn/repo/trunk@2116 9c30dcfa-912a-0410-8fc2-9e0234be79fd
This commit is contained in:
@@ -52,7 +52,8 @@ import org.apache.log4j.Logger;
|
||||
import org.dspace.authorize.AuthorizeException;
|
||||
import org.dspace.authorize.AuthorizeManager;
|
||||
import org.dspace.authorize.ResourcePolicy;
|
||||
import org.dspace.browse.Browse;
|
||||
import org.dspace.browse.BrowseException;
|
||||
import org.dspace.browse.IndexBrowse;
|
||||
import org.dspace.core.ConfigurationManager;
|
||||
import org.dspace.core.Constants;
|
||||
import org.dspace.core.Context;
|
||||
@@ -987,31 +988,41 @@ public class Collection extends DSpaceObject
|
||||
// Remove items
|
||||
ItemIterator items = getAllItems();
|
||||
|
||||
while (items.hasNext())
|
||||
try
|
||||
{
|
||||
Item item = items.next();
|
||||
|
||||
if (item.isOwningCollection(this))
|
||||
{
|
||||
int itemId = item.getID();
|
||||
// the collection to be deletd is the owning collection, thus remove
|
||||
// the item from all collections it belongs to
|
||||
Collection[] collections = item.getCollections();
|
||||
for (int i=0; i< collections.length; i++)
|
||||
{
|
||||
//notify Browse of removing item.
|
||||
Browse.itemRemoved(ourContext, itemId);
|
||||
collections[i].removeItem(item);
|
||||
}
|
||||
|
||||
}
|
||||
// the item was only mapped to this collection, so just remove it
|
||||
else
|
||||
{
|
||||
//notify Browse of removing item mapping.
|
||||
Browse.itemChanged(ourContext, item);
|
||||
removeItem(item);
|
||||
}
|
||||
while (items.hasNext())
|
||||
{
|
||||
Item item = items.next();
|
||||
IndexBrowse ib = new IndexBrowse(ourContext);
|
||||
|
||||
if (item.isOwningCollection(this))
|
||||
{
|
||||
// the collection to be deletd is the owning collection, thus remove
|
||||
// the item from all collections it belongs to
|
||||
Collection[] collections = item.getCollections();
|
||||
for (int i=0; i< collections.length; i++)
|
||||
{
|
||||
//notify Browse of removing item.
|
||||
ib.itemRemoved(item);
|
||||
// Browse.itemRemoved(ourContext, itemId);
|
||||
collections[i].removeItem(item);
|
||||
}
|
||||
|
||||
}
|
||||
// the item was only mapped to this collection, so just remove it
|
||||
else
|
||||
{
|
||||
//notify Browse of removing item mapping.
|
||||
ib.indexItem(item);
|
||||
// Browse.itemChanged(ourContext, item);
|
||||
removeItem(item);
|
||||
}
|
||||
}
|
||||
}
|
||||
catch (BrowseException e)
|
||||
{
|
||||
log.error("caught exception: ", e);
|
||||
throw new IOException(e.getMessage());
|
||||
}
|
||||
|
||||
// Delete bitstream logo
|
||||
|
Reference in New Issue
Block a user