NoItemsMatchException, CannotDisseminateFormatException
NoItemsMatchException, CannotDisseminateFormatException, BadArgumentException
    public Map listIdentifiers(String from, String until, String set, String metadataPrefix)        throws OAIInternalServerError, NoSetHierarchyException,            NoItemsMatchException, CannotDisseminateFormatException    {        log.info(LogManager.getHeader(null,            "oai_request",            "verb=listIdentifiers,from=" + (from == null ? "null" : from) +            ",until=" + (until == null ? "null" : until) +            ",set=" + (set == null ? "null" : set) +            ",metadataPrefix=" + (metadataPrefix == null ? "null" : metadataPrefix)));        // 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,                0, 0, // Everything for now                false, true, true);            // No Item objects, but we need to know containers and withdrawn items            if (itemInfos.size() == 0)            {                log.info(LogManager.getHeader(null,                    "oai_error",                    "no_items_match"));                throw new NoItemsMatchException();            }                        // 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;    }