I am encountering an error in DSpace 3 and DSpace 4 code when I attempt to
harvest a collection containing a withdrawn item.

I have started my investigation, and I am curious to understand the
intention of this query

https://github.com/DSpace/DSpace/blob/dspace-4_x/dspace-oai/src/main/java/org/dspace/xoai/data/DSpaceItemDatabaseRepository.java#L227-L231


Can you explain the purpose of the following test of withdrawn=TRUE?

    public ListItemIdentifiersResult getItemIdentifiers(
            List<Filter> filters, int offset, int length)
    {
        List<Object> parameters = new ArrayList<Object>();
        List<Object> countParameters = new ArrayList<Object>();
        String query = "SELECT i.* FROM item i ";
        String countQuery = "SELECT COUNT(*) as count FROM item i";
        List<String> whereCond = new ArrayList<String>();
        for (Filter filter : filters)
        {
            if (filter.getFilter() instanceof DSpaceFilter)
            {
                DSpaceFilter dspaceFilter = (DSpaceFilter)
filter.getFilter();
                DatabaseFilterResult result =
dspaceFilter.getWhere(_context);
                if (result.hasResult())
                {
                    if (filter.getScope() == FilterScope.MetadataFormat)
                        whereCond.add("(i.withdrawn=TRUE OR ("
                                + result.getWhere() + "))");
                    else
                        whereCond.add("(" + result.getWhere() + ")");
                    parameters.addAll(result.getParameters());
                    countParameters.addAll(result.getParameters());
                }
            }
        }


-- 
Terry Brady
Applications Programmer Analyst
Georgetown University Library Information Technology
https://www.library.georgetown.edu/lit/code
425-298-5498
------------------------------------------------------------------------------
Comprehensive Server Monitoring with Site24x7.
Monitor 10 servers for $9/Month.
Get alerted through email, SMS, voice calls or mobile push notifications.
Take corrective actions from your mobile device.
http://p.sf.net/sfu/Zoho
_______________________________________________
DSpace-tech mailing list
DSpace-tech@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/dspace-tech
List Etiquette: https://wiki.duraspace.org/display/DSPACE/Mailing+List+Etiquette

Reply via email to