Package org.dspace.browse

Examples of org.dspace.browse.BrowserScope


            {
                log.debug("work on " + tempName.getName() + " with identifier "
                        + tempName.getPersistentIdentifier() + " (" + count
                        + " of " + names.size() + ")");
                // set up a BrowseScope and start loading the values into it
                BrowserScope scope = new BrowserScope(context);
                scope.setBrowseIndex(bi);
                // scope.setOrder(order);
                scope.setFilterValue(tempName.getName());
                // scope.setFilterValueLang(valueLang);
                // scope.setJumpToItem(focus);
                // scope.setJumpToValue(valueFocus);
                // scope.setJumpToValueLang(valueFocusLang);
                // scope.setStartsWith(startsWith);
                // scope.setOffset(offset);
                scope.setResultsPerPage(Integer.MAX_VALUE);
                // scope.setSortBy(sortBy);
                scope.setBrowseLevel(1);
                // scope.setEtAl(etAl);

                BrowseInfo binfo = be.browse(scope);
                log.debug("Find " + binfo.getResultCount()
                        + "item(s) in browsing...");
View Full Code Here


            {
                log.info("work on " + tempName.getName() + " with identifier "
                        + tempName.getPersistentIdentifier() + " (" + count
                        + " of " + names.size() + ")");
                // set up a BrowseScope and start loading the values into it
                BrowserScope scope = new BrowserScope(context);
                scope.setBrowseIndex(bi);
                // scope.setOrder(order);
                scope.setFilterValue(tempName.getName());
                // scope.setFilterValueLang(valueLang);
                // scope.setJumpToItem(focus);
                // scope.setJumpToValue(valueFocus);
                // scope.setJumpToValueLang(valueFocusLang);
                // scope.setStartsWith(startsWith);
                // scope.setOffset(offset);
                scope.setResultsPerPage(Integer.MAX_VALUE);
                // scope.setSortBy(sortBy);
                scope.setBrowseLevel(1);
                // scope.setEtAl(etAl);

                BrowseInfo binfo = be.browse(scope);
                log.info("Find " + binfo.getResultCount()
                        + "item(s) in browsing...");
View Full Code Here

                BrowseEngine be = new BrowseEngine(dspaceContext);

                String authKey = ResearcherPageUtils.getPersistentIdentifier(rp);

                // set up a BrowseScope and start loading the values into it
                BrowserScope scope = new BrowserScope(dspaceContext);
                scope.setBrowseIndex(bi);
                // scope.setOrder(order);
                scope.setFilterValue(authKey);
                scope.setAuthorityValue(authKey);
                scope.setResultsPerPage(Integer.MAX_VALUE);
                scope.setBrowseLevel(1);

                BrowseInfo binfo = be.browse(scope);
                log.debug("Find " + binfo.getResultCount()
                        + "item(s) for the reseracher " + authKey);
                items = binfo.getItemResults(dspaceContext);
View Full Code Here

                        .getPersistentIdentifier(rp);
                log.debug("work on " + rp.getFullName() + "[staffno "
                        + rp.getSourceID() + "] with identifier " + authKey
                        + " (" + count + " of " + rps.size() + ")");
                // set up a BrowseScope and start loading the values into it
                BrowserScope scope = new BrowserScope(context);
                scope.setBrowseIndex(bi);
                // scope.setOrder(order);
                scope.setFilterValue(authKey);
                scope.setAuthorityValue(authKey);
                scope.setResultsPerPage(Integer.MAX_VALUE);
                scope.setBrowseLevel(1);

                BrowseInfo binfo = be.browse(scope);
                log.debug("Find " + binfo.getResultCount()
                        + "item(s) for the reseracher " + authKey);
                Item[] items = binfo.getItemResults(context);
View Full Code Here

                ",level=" + level + ",etal=" + etAl;

            log.info(LogManager.getHeader(context, "browse", arguments));

            // set up a BrowseScope and start loading the values into it
            BrowserScope scope = new BrowserScope(context);
            scope.setBrowseIndex(bi);
            scope.setOrder(order);
            scope.setFilterValue(value != null?value:authority);
            scope.setFilterValueLang(valueLang);
            scope.setJumpToItem(focus);
            scope.setJumpToValue(valueFocus);
            scope.setJumpToValueLang(valueFocusLang);
            scope.setStartsWith(startsWith);
            scope.setOffset(offset);
            scope.setResultsPerPage(resultsperpage);
            scope.setSortBy(sortBy);
            scope.setBrowseLevel(level);
            scope.setEtAl(etAl);
            scope.setAuthorityValue(authority);

            // assign the scope of either Community or Collection if necessary
            if (community != null)
            {
                scope.setBrowseContainer(community);
            }
            else if (collection != null)
            {
                scope.setBrowseContainer(collection);
            }

            // For second level browses on metadata indexes, we need to adjust the default sorting
            if (bi != null && bi.isMetadataIndex() && scope.isSecondLevel() && scope.getSortBy() <= 0)
            {
                scope.setSortBy(1);
            }

            return scope;
        }
        catch (SortException se)
View Full Code Here

        params.month = request.getParameter(BrowseParams.MONTH);
        params.year = request.getParameter(BrowseParams.YEAR);
        params.etAl = RequestUtils.getIntParameter(request, BrowseParams.ETAL);

        params.scope = new BrowserScope(context);

        // Are we in a community or collection?
        DSpaceObject dso = HandleUtil.obtainHandle(objectModel);
        if (dso instanceof Community)
            params.scope.setCommunity((Community) dso);
View Full Code Here

            AuthorizeException
    {
        try
        {
            // all browse requests currently come to GET.
            BrowserScope scope = getBrowserScopeForRequest(context, request, response);
   
            // Check that we are doing an item browse
            if (scope.getBrowseIndex() == null || scope.getBrowseIndex().isItemIndex())
            {
                // And override the index in the scope with the withdrawn items
                scope.setBrowseIndex(BrowseIndex.getWithdrawnBrowseIndex());
            }
            else
            {
                showError(context, request, response);
            }
View Full Code Here

    {
        if (recentSubmissionItems != null)
                return recentSubmissionItems;

        String source = ConfigurationManager.getProperty("recent.submissions.sort-option");
        BrowserScope scope = new BrowserScope(context);
        if (dso instanceof Collection)
                scope.setCollection((Collection) dso);
        else if (dso instanceof Community)
                scope.setCommunity((Community) dso);
        scope.setResultsPerPage(itemCount);

        // FIXME Exception handling
        try
        {
            scope.setBrowseIndex(BrowseIndex.getItemBrowseIndex());
            for (SortOption so : SortOption.getSortOptions())
            {
                if (so.getName().equals(source))
                {
                    scope.setSortBy(so.getNumber());
                    scope.setOrder(SortOption.DESCENDING);
                }
            }

            BrowseEngine be = new BrowseEngine(context);
            this.recentSubmissionItems = be.browseMini(scope).getItemResults(context);
View Full Code Here

        if (recentSubmittedItems != null)
            return recentSubmittedItems;

        String source = ConfigurationManager.getProperty("recent.submissions.sort-option");
        int numRecentSubmissions = ConfigurationManager.getIntProperty("recent.submissions.count", RECENT_SUBMISSIONS);
        BrowserScope scope = new BrowserScope(context);
        scope.setCommunity(community);
        scope.setResultsPerPage(numRecentSubmissions);
       
        // FIXME Exception Handling
        try
        {
          scope.setBrowseIndex(BrowseIndex.getItemBrowseIndex());
            for (SortOption so : SortOption.getSortOptions())
            {
                if (so.getName().equals(source))
                {
                    scope.setSortBy(so.getNumber());
                  scope.setOrder(SortOption.DESCENDING);
                }
            }

          BrowseEngine be = new BrowseEngine(context);
          this.recentSubmittedItems = be.browse(scope).getResults();
View Full Code Here

        if (bix == null)
        {
          throw new IOException("There is no browse index with the name: " + idx);
        }
       
        BrowserScope scope = new BrowserScope(context);
        scope.setBrowseIndex(bix);
                if (dso != null)
                    scope.setBrowseContainer(dso);

            for (SortOption so : SortOption.getSortOptions())
            {
                if (so.getName().equals(idx))
                    scope.setSortBy(so.getNumber());
            }
            scope.setOrder(SortOption.DESCENDING);
        scope.setResultsPerPage(itemCount);
       
            // gather & add items to the feed.
        BrowseEngine be = new BrowseEngine(context);
        BrowseInfo bi = be.browseMini(scope);
        Item[] results = bi.getItemResults(context);
View Full Code Here

TOP

Related Classes of org.dspace.browse.BrowserScope

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.