Overview and Design

Nameresolver2 was developed in conjunction with the move away from broker20 and Bibliographic Class in DLPS. Instead of what old nameresolver offered-- a method for creating short URLs using xpat searches-- we developed a MySQL database that would store all the URLs and avoid using xpat. It also avoided the need for creating Bibliographic Class metadata in order to gather the long URLs that would be made into short URLs, which old nameresolver needed and new nameresolver2 does not. New nameresolver2 acts very similarly to idresolver, so we'll compare the differences below.

idresolver vs. nameresolver2 (idresolver-nr)

The idresolver is a simple mechanism for resolving a unique ID to a URL. The DLXS Classes can use it to, for example, link digital object identifiers in an Electronic Finding Aid to the actual digital object in another class.

idresolver There is always just one URL for each ID in the database.
nameresolver2 Records are keyed on id / collection pairs so more than one URL for a given ID can exist.

idresolver A URL (marked up in XML) for an ID is returned (see example below).
nameresolver2 If a single entry for an ID is found, the user is redirected to that URL.
nameresolver2 If more than one entry for an ID is found, the user is prompted with links to the item in different collections.

idresolver example:

    <ITEM MTIME="2008-07-24 16:28:00">

Nameresolver2 Usage

Table structure:

Database: dlxs
Table name: nameresolver

id coll url modified (auto- generated)
0599998.0001.001 alajournals;idno=0599998.0001.001 2008-01-15 09:54:32
0599998 alajournals;idno=0599998 2008-01-15 09:54:32
BAD1447.0002.001 genpub;idno=BAD1447.0002.001 2008-01-15 10:01:30
BAD1447.0002.001 micounty;idno=BAD1447.0002.001 2008-01-15 10:04:00

Long ID vs. Short ID

The nameresolver table contains the full or long ID for a particular record as well as a short ID. For our naming conventions, a long ID points to an individual record. It has the format 0599998.0001.002. The first part (0599998) represents the title. The second part is the volume (0001) and the third is the issue (002). This naming convention is useful for multi-volume works but it is not required for nameresolver2. If your IDs do not take this format, only the full ID will be used.

Browser Display

Location and Modification

The nameresolver2 files are stored at $DLXSROOT/bin/n/nameresolver. Files of interest are:

Populating the Database

The script stored at $DLXSROOT/bin/n/nameresolver has a well-documented usage message. If you run -h, you will see a list of available options. There are several ways to update nameresolver2.