Package org.dspace.xoai.filter.results

Examples of org.dspace.xoai.filter.results.DatabaseFilterResult


        if (setSpec.startsWith("col_"))
        {
            try
            {
                DSpaceObject dso = handleResolver.resolve(setSpec.replace("col_", ""));
                return new DatabaseFilterResult(
                        "EXISTS (SELECT tmp.* FROM collection2item tmp WHERE tmp.resource_id=i.item_id AND collection_id = ?)",
                        dso.getID());
            }
            catch (Exception ex)
            {
                log.error(ex.getMessage(), ex);
            }
        }
        else if (setSpec.startsWith("com_"))
        {
            try
            {
                DSpaceObject dso = handleResolver.resolve(setSpec.replace("com_", ""));
                List<Integer> list = collectionsService.getAllSubCollections(dso.getID());
                String subCollections = StringUtils.join(list.iterator(), ",");
                return new DatabaseFilterResult(
                        "EXISTS (SELECT tmp.* FROM collection2item tmp WHERE tmp.resource_id=i.item_id AND collection_id IN ("
                                + subCollections + "))");
            }
            catch (Exception e)
            {
                log.error(e.getMessage(), e);
            }
        }
        return new DatabaseFilterResult();
    }
View Full Code Here

TOP

Related Classes of org.dspace.xoai.filter.results.DatabaseFilterResult

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.