Class DiscoverResultItemIterator

java.lang.Object
org.dspace.discovery.DiscoverResultIterator<Item,UUID>
org.dspace.discovery.DiscoverResultItemIterator
All Implemented Interfaces:
Iterator<Item>

public class DiscoverResultItemIterator extends DiscoverResultIterator<Item,UUID>
An iterator for discovering and iterating over DSpace items from the search index. This class extends DiscoverResultIterator and provides the logic to handle different types of indexable objects and retrieve the corresponding DSpace items.

It supports the following indexable object types:

Throws an IllegalStateException if the object type is not recognized.

Author:
Luca Giamminonni (luca.giamminonni at 4science.it)
  • Constructor Details

    • DiscoverResultItemIterator

      public DiscoverResultItemIterator(Context context, DiscoverQuery discoverQuery)
      Constructs an iterator for discovering items based on the given context and query.
      Parameters:
      context - the DSpace context
      discoverQuery - the discovery query
    • DiscoverResultItemIterator

      public DiscoverResultItemIterator(Context context, DiscoverQuery discoverQuery, boolean uncacheEntities)
      Constructs an iterator with the option to uncache entities.
      Parameters:
      context - the DSpace context
      discoverQuery - the discovery query
      uncacheEntities - whether to uncache entities after iteration
    • DiscoverResultItemIterator

      public DiscoverResultItemIterator(Context context, IndexableObject<?,?> scopeObject, DiscoverQuery discoverQuery)
      Constructs an iterator within a specific scope object.
      Parameters:
      context - the DSpace context
      scopeObject - the scope object
      discoverQuery - the discovery query
    • DiscoverResultItemIterator

      public DiscoverResultItemIterator(Context context, DiscoverQuery discoverQuery, int maxResults)
      Constructs an iterator with a limit on the maximum number of results.
      Parameters:
      context - the DSpace context
      discoverQuery - the discovery query
      maxResults - the maximum number of results to return
    • DiscoverResultItemIterator

      public DiscoverResultItemIterator(Context context, IndexableObject<?,?> scopeObject, DiscoverQuery discoverQuery, int maxResults)
      Constructs an iterator with a scope object and a limit on the maximum number of results.
      Parameters:
      context - the DSpace context
      scopeObject - the scope object
      discoverQuery - the discovery query
      maxResults - the maximum number of results to return
  • Method Details