Through a combination of database tables and collmgr field configuration, dynamic browsing is available through the DLXS middleware. When the proper CGI-based URL is received, the middleware checks for certain metadata in the database tables, packages some of it in XML, uses some of it, as is in its stored format of XML, and lets XSLT format the results. At run time, no XPAT queries are needed, only MySQL queries are run against the item browse tables in the dlxs database.
After the tables are prepared, that is, populated with item metadata through the $DLXSROOT/bin/browse/updatebrowsedb.pl script (aka "database populator"), configuration for the behavior of dynamic browsing is accomplished by modifying certain collmgr fields.
Provisions will soon be made for creating static HTML browse pages with the database populator script.
There are three tables in the dlxs database that are specifically used for dynamic browsing in the middleware:
The ItemColl table holds, for each item/document and collection combination, one row containing the following columns:
The ItemBrowse table holds, for each item/document's browseable field (e.g., author, title, etc.):
The ItemBrowseCounts table holds, for each collection, a list of rows containing:
The main fields in the collmgr that need to be set properly are:
See Configure the collmgr fields below for more information.
Start collmgr and change the following fields:
browse.html
that page will be served but only if browsefields is empty. Fallback is applied to select the correct browse.html
file for collection-specific customization. This supports static browse pages. If browse.html
is not present a dynamic browse page will be served based on data from the browse database. When a dynamic browse page is served the browsenav field value is consulted and must be defined. browseupdatemodule: specifies the name of the browse update Perl module that will be used by the updatebrowsedb.pl script to populate the database. This value is analogous to the appmodule and subclassmodule fields. (This field exists as of Release 12a; it supersedes a Perl configuration hash used in Release 12.)
The module files are located in DLXSROOT/bin/browse. If a dynamic browse page is to be served this field must have a value. Specialized behavior can be obtained by subclassing the browse update modules. The currently available browse update module values are as follows:
To initially populate or to update the item browse tables, there is a script called updatebrowsedb.pl which is located in $DLXSROOT/bin/browse. Running this program will populate or update the rows necessary in each of the three ItemBrowse related tables. These tables will be queried when the user requests browsing from the middleware.
However, please note: unless you are making changes to or need to debug updatebrowsedb.pl, you should use the "wrapper" shell script provided in the same subdirectory. This wrapper is called ub and was written to ensure that updatebrowsedb.pl
$DLXSROOT/bin/browse/ub -C class -c collection [ -r row [ -h host ] ] [ -f ] [ -p ]
If, for any reason, you must override the assumptions made by the "wrapper" script, you can always run the updatebrowsedb.pl directly by entering:
$DLXSROOT/bin/browse/updatebrowsedb.pl class=AAA c=BBB host=CCC row=DDD
where AAA is either "text" or "image";; BBB is the collection id of the collection you want to create browsing for; CCC is the name of the host on which resides the XPAT index for the collection (this is not relevant to ImageClass, which uses MySQL for all queries); and DDD is key to the row in the database you wish to use (production, dlxsadm, or an individual developer's id). For example, you may want to point the script at new or test data on a machine that is different from your production machine. You could accomplish this by changing the host or devhost field for the collection in the collmgr. NOTE: If DLPS_DEV is set when you invoke updatebrowsedb.pl (without the wrapper ub), the devhost field will be used; otherwise, the host field will be used.