Package org.dspace.browse

Examples of org.dspace.browse.BrowseEngine


        try
        {
            BrowseIndex bi = BrowseIndex
                    .getBrowseIndex(researcherPotentialMatchLookupBrowserIndex);
            // now start up a browse engine and get it to do the work for us
            BrowseEngine be = new BrowseEngine(context);
            int count = 1;

            for (NameResearcherPage tempName : names)
            {
                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...");
                for (BrowseItem bitem : binfo.getBrowseItemResults())
                {
                    if (!invalidIds.contains(bitem.getID()))
View Full Code Here


            List<MetadataField> fieldsWithAuthoritySupport = metadataFieldWithAuthorityRP(context);
           
            BrowseIndex bi = BrowseIndex
                    .getBrowseIndex(researcherPotentialMatchLookupBrowserIndex);
            // now start up a browse engine and get it to do the work for us
            BrowseEngine be = new BrowseEngine(context);
            int count = 1;
            for (NameResearcherPage tempName : names)
            {
                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...");
                bindItemsToRP(relationPreferenceService, context,
                        fieldsWithAuthoritySupport, tempName,
                        binfo.getItemResults(context));
View Full Code Here

                log.info("Use browse indexing");

                BrowseIndex bi = BrowseIndex.getBrowseIndex(plugInBrowserIndex);
                // now start up a browse engine and get it to do the work for us
                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);
               
                if (!silent && rp != null)
View Full Code Here

        {
            context = new Context();
            context.setIgnoreAuthorization(true);
            BrowseIndex bi = BrowseIndex.getBrowseIndex(plugInBrowserIndex);
            // now start up a browse engine and get it to do the work for us
            BrowseEngine be = new BrowseEngine(context);
           
            // we need to assure that the right names will be present in the browse
            IndexBrowse ib = new IndexBrowse(context);
            int count = 1;
            for (ResearcherPage rp : rps)
            {
                String authKey = ResearcherPageUtils
                        .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);
                for (Item item : items)
                {
View Full Code Here

        try
        {
            BrowseIndex bi = scope.getBrowseIndex();

            // now start up a browse engine and get it to do the work for us
            BrowseEngine be = new BrowseEngine(context);
            BrowseInfo binfo = be.browse(scope);
           
            request.setAttribute("browse.info", binfo);

            if (AuthorizeManager.isAdmin(context))
            {
View Full Code Here

        BrowseParams params = getUserParams();

        try
        {
            // Create a new browse engine, and perform the browse
            BrowseEngine be = new BrowseEngine(context);
            this.browseInfo = be.browse(params.scope);

            // figure out the setting for author list truncation
            if (params.etAl < 0)
            {
                // there is no limit, or the UI says to use the default
View Full Code Here

                    scope.setSortBy(so.getNumber());
                    scope.setOrder(SortOption.DESCENDING);
                }
            }

            BrowseEngine be = new BrowseEngine(context);
            this.recentSubmissionItems = be.browseMini(scope).getItemResults(context);

            // filter out Items taht are not world-readable
            if (!includeRestrictedItems)
            {
                List<Item> result = new ArrayList<Item>();
View Full Code Here

                    scope.setSortBy(so.getNumber());
                  scope.setOrder(SortOption.DESCENDING);
                }
            }

          BrowseEngine be = new BrowseEngine(context);
          this.recentSubmittedItems = be.browse(scope).getResults();
        }
        catch (SortException se)
        {
            log.error("Caught SortException", se);
        }
View Full Code Here

            }
            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);

            if (includeAll)
            {
                return results;
View Full Code Here

      // get our configuration
      String source = ConfigurationManager.getProperty("recent.submissions.sort-option");
      String count = ConfigurationManager.getProperty("recent.submissions.count");
     
      // prep our engine and scope
      BrowseEngine be = new BrowseEngine(context);
      BrowserScope bs = new BrowserScope(context);
      BrowseIndex bi = BrowseIndex.getItemBrowseIndex();
     
      // fill in the scope with the relevant gubbins
      bs.setBrowseIndex(bi);
      bs.setOrder(SortOption.DESCENDING);
      bs.setResultsPerPage(Integer.parseInt(count));
      bs.setBrowseContainer(dso);
            for (SortOption so : SortOption.getSortOptions())
            {
                if (so.getName().equals(source))
                    bs.setSortBy(so.getNumber());
            }
     
      BrowseInfo results = be.browseMini(bs);
     
      Item[] items = results.getItemResults(context);
     
      RecentSubmissions rs = new RecentSubmissions(items);
     
View Full Code Here

TOP

Related Classes of org.dspace.browse.BrowseEngine

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.