Package org.dspace.discovery.DiscoverResult

Examples of org.dspace.discovery.DiscoverResult.FacetResult


        List<String[]> result = new ArrayList<String[]>();
        if (ascending)
        {
            for (int i = start; i < (start + max) && i < count; i++)
            {
                FacetResult c = facet.get(i);
                String freq = showFrequencies ? String.valueOf(c.getCount())
                        : "";
                result.add(new String[] { c.getDisplayedValue(),
                        c.getAuthorityKey(), freq });
            }
        }
        else
        {
            for (int i = count - start - 1; i >= count - (start + max)
                    && i >= 0; i--)
            {
                FacetResult c = facet.get(i);
                String freq = showFrequencies ? String.valueOf(c.getCount())
                        : "";
                result.add(new String[] { c.getDisplayedValue(),
                        c.getAuthorityKey(), freq });
            }
        }

        return result;
    }
View Full Code Here


        public int compare(Object o1, Object o2)
        {
            String s1 = "", s2 = "";
            if (o1 instanceof FacetResult && o2 instanceof String)
            {
                FacetResult c = (FacetResult) o1;
                s1 = c.getSortValue();
                s2 = (String) o2;
            }
            else if (o2 instanceof FacetResult && o1 instanceof String)
            {
                FacetResult c = (FacetResult) o2;
                s1 = (String) o1;
                s2 = c.getSortValue();
            }
            // both object are FacetResult so they are already sorted
            return s1.compareTo(s2);
        }
View Full Code Here

TOP

Related Classes of org.dspace.discovery.DiscoverResult.FacetResult

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.