if (itemInfos.size() == 0) { throw new NoItemsMatchException(); }
    public Map listIdentifiers(String from, String until, String set, String metadataPrefix)        throws OAIInternalServerError, NoSetHierarchyException, CannotDisseminateFormatException    {        // We can produce oai_dc and simple DC for all items, so just return IDs        Context context = null;        // Lists to put results in        List headers = new LinkedList();        List identifiers = new LinkedList();        try        {            context = new Context();            // Get the relevant OAIItemInfo objects to make headers            DSpaceObject scope = resolveSet(context, set);            List itemInfos = Harvest.harvest(context, scope, from, until,                false, true, true);            // No items, but we need to know containers and withdrawn items            // Build up lists of headers and identifiers            Iterator i = itemInfos.iterator();            while (i.hasNext())            {                HarvestedItemInfo itemInfo = (HarvestedItemInfo) i.next();                                String[] header = getRecordFactory().createHeader(itemInfo);                headers.add(header[0]);                identifiers.add(header[1]);            }        }        catch (SQLException se)        {            // Log the error            log.warn(LogManager.getHeader(context,                "database_error",                ""), se);            throw new OAIInternalServerError(se.toString());        }        finally        {            if (context != null)            {                context.abort();            }        }                // Put results in form needed to return        Map results = new HashMap();        results.put("headers", headers.iterator());        results.put("identifiers", identifiers.iterator());        return results;    }