Package org.dspace.browse
Provides classes and methods for browsing Items in DSpace by whatever is specified in the configuration. The standard method by which you would perform a browse is as follows:
- Create a BrowserScope object. This object holds all of the parameters of your browse request
- Pass the BrowserScope object into the BrowseEngine object. This object should be invoked through either the browse() method or the browseMini() method
- The BrowseEngine will pass back a BrowseInfo object which contains all the relevant details of your request
Browses only return archived Items; other Items (e.g. those in the workflow system) are ignored.
Using the Browse API
An example use of the Browse API is shown below:
// Create or obtain a context object
Context context = new Context();
// Create a BrowseScope object within the context
BrowserScope scope = new BrowserScope(context);
// The browse is limited to the test collection
Collection test = Collection.find(context, someID);
scope.setBrowseContainer(test);
// Set the focus
scope.setFocus("Test Title");
// A maximum of 30 items will be returned
scope.setResultsPerPage(30);
// set ordering to DESC
scope.setOrder("DESC");
// now execute the browse
BrowseEngine be = new BrowseEngine();
BrowseInfo results = be.browse(scope);
In this case, the results might be Items with titles like:
Tehran, City of the Ages Ten Little Indians Tenchi Universe Tension Tennessee Williams Test Title (the focus) Thematic Alignment Thesis and Antithesis ...
Browse Indexes
The Browse API uses database tables to index Items based on the supplied configuration. When an Item is added to DSpace, modified or removed via the Content Management API, the indexes are automatically updated.
To rebuild the database tables for the browse (on configuration change), or to re-index just the contents of the existing tables, use the following commands from IndexBrowse:
A complete rebuild of the database and the indices:
[dspace]/dsrun org.dspace.browse.IndexBrowse -f -r
A complete re-index of the archive contents:
[dspace]/dsrun org.dspace.browse.IndexBrowse -i
-
ClassDescriptionInterface for any class wishing to interact with the Browse storage layer for Read Only operations.Factory class to generate DAOs based on the configurationThis class does most of the actual grunt work of preparing a browse result.Just a quick BrowseException class to give us the relevant data typeThis class holds all the information about a specifically configured BrowseIndex.The results of a Browse, including all the contextual information about the query, as well as the results and associated information to create pageable navigation.Utility class to provide a wrapper for the various output possibilities from the IndexBrowse class.A class which represents the initial request to the browse system.Class to represent the configuration of the cross-linking between browse pages (for example, between the author name in one full listing to the author's list of publications).Interface for data access of cached community and collection item count informationDiscovery (Solr) driver implementing ItemCountDAO interface to look up item count information in communities and collections.This class provides a standard interface to all item counting operations for communities and collections.Class to mediate with the item list configurationMakes a sort string that is Locale dependent.