Provides classes and methods for browsing Items in DSpace by title, author, or date. The main class is Browse. Callers of the API use BrowseScope objects to describe the desired browse; the results are returned as BrowseInfo objects.
Browses only return archived Items; other Items (eg, those in the workflow system) are ignored.
An example use of the Browse API is shown below:
// Create or obtain a context object Context context; // Create a BrowseScope object within the context BrowseScope scope = new BrowseScope(context); // The browse is limited to the test collection Collection test; scope.setScope(test); // Set the focus scope.setFocus("Test Title"); // A maximum of 30 items will be returned scope.setTotal(30); // Up to 5 Items with titles before Test Title scope.setNumberBefore(5); BrowseInfo results = Browse.getItemsByTitle(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 ...
The Browse API uses database tables to index Items by title, author, date of issue and date of accession. When an Item is added to DSpace, modified, or removed from DSpace via the Content Management API, the indexes are automatically updated.
The mapping between the indexes and Dublin Core values is:
Index | Element | Qualifier |
---|---|---|
Title | title | none |
Author | contributor | (any) |
Date | date | issued |
You should not attempt to manipulate the tables which contain the items, metadata values, or indexes via direct database manipulation (eg, with SQL statements), because doing so incorrectly may corrupt the indexes. If the indexes somehow become corrupted, however, running the InitializeBrowse command-line tool will rebuild them:
java org.dspace.browse.InitializeBrowse
Note that the index-all command-line tool rebuilds both the Browse and Search indexes.