UNCAP: Technical Documentation

Table of Contents

1 Description

The UNCAP codebase supports both the archives and manuscripts finding aids database of the Special Collections Research Center and the UNCAP digital collection (which includes some SCRC finding aids). This document pertains to the latter.

2 Location

Front end: quarto:/disk/1/websites/uncap/index.php
Back end: marklogic:/opt/MarkLogic/uncap

3 Port

8011

4 Loading data

4.1 For the manuscripts and finding aids database

4.2 For UNCAP

First copy Northwestern's data into /data/web/ead/nwu.

Next run index.sh in /data/web/ead/nwu2. This will filter the data from the former into the latter, stripping the namespace and rendering the eadid into a simple element via index.php, which it invokes:

(... php -f index.php ../nwu/$f > $f\)

<?php

// attribute goes to text node.
// throw away namespace.

$xml = new DOMDocument();
$xml->load($argv[1]);

$xp = new DOMXPath($xml);
$xp->registerNamespace('e', 'urn:isbn:1-931666-22-9');
$nl = $xp->query('//e:eadid');
foreach ($nl as $n) {
        while ($n->attributes->length > 0) {
                if ($n->attributes->item(0)->name == 'identifier') {
                        $n->nodeValue = $n->attributes->item(0)->value;
                }
                $n->removeAttribute($n->attributes->item(0)->name);
        }
}

echo preg_replace('/<ead [^>]*>/', '<ead>', $xml->saveXML());

?>

4.2.1 UChicago

uncap/admin/loader/scrc\load.sh

<collection>collection/UNCAP</collection>
<collection>institution/University+of+Chicago</collection>
<collection>project/SCRC</collection>

4.2.2 NWU

uncap/admin/loader/nw\load.sh

<collection>collection/UNCAP</collection>
<collection>institution/Northwestern University</collection>
<collection>project/NWU</collection>

5 Retrieving data

Front end: quarto:/disk/1/websites/uncap/index.php
Back end: marklogic:/opt/MarkLogic/uncap
search.php: uncap/request.xqy
browse.php: uncap/admin/gimmeSCRC_UNCAP.xqy; uncap/admin/gimmeNWU_UNCAP.xqy; uncap/admin/gimme2.xqy
scrcanduncap.php: uncap/admin/gimme.xqy
view.php: uncap/request.xqy

Author: Charles Blair (chas)

Date: 2012-11-09

Emacs 25.3.1 (Org mode 8.2.10)

Valid XHTML 1.0 Strict