ItemIterator items = getItems();
ItemIterator items = getAllItems();
    void delete() throws SQLException, AuthorizeException, IOException    {        log.info(LogManager.getHeader(ourContext, "delete_collection",                "collection_id=" + getID()));        // remove from index        DSIndexer.unIndexContent(ourContext, this);        // Remove from cache        ourContext.removeCached(this, getID());        HistoryManager.saveHistory(ourContext, this, HistoryManager.REMOVE,                ourContext.getCurrentUser(), ourContext.getExtraLogInfo());        // remove subscriptions - hmm, should this be in Subscription.java?        DatabaseManager.updateQuery(ourContext,                "DELETE FROM subscription WHERE collection_id= ? ",                 getID());        // Remove items        ItemIterator items = getItems();        while (items.hasNext())        {            Item item = items.next();                        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++)                {                    collections[i].removeItem(item);                }                                }             // the item was only mapped to this collection, so just remove it            else            {                removeItem(item);            }        }        // Delete bitstream logo        setLogo(null);        // Remove all authorization policies        AuthorizeManager.removeAllPolicies(ourContext, this);        // Remove any WorkflowItems        WorkflowItem[] wfarray = WorkflowItem                .findByCollection(ourContext, this);        for (int x = 0; x < wfarray.length; x++)        {            // remove the workflowitem first, then the item            Item myItem = wfarray[x].getItem();            wfarray[x].deleteWrapper();            myItem.delete();        }        // Remove any WorkspaceItems        WorkspaceItem[] wsarray = WorkspaceItem.findByCollection(ourContext,                this);        for (int x = 0; x < wsarray.length; x++)        {            wsarray[x].deleteAll();        }        // Delete collection row        DatabaseManager.delete(ourContext, collectionRow);        // Remove any workflow groups - must happen after deleting collection        Group g = null;        g = getWorkflowGroup(1);        if (g != null)        {            g.delete();        }        g = getWorkflowGroup(2);        if (g != null)        {            g.delete();        }        g = getWorkflowGroup(3);        if (g != null)        {            g.delete();        }        // Remove default administrators group        g = getAdministrators();        if (g != null)        {            g.delete();        }        // Remove default submitters group        g = getSubmitters();        if (g != null)        {            g.delete();        }    }