From 84bdf6b78e3ec78218555c5f7b31f5a913e1c21e Mon Sep 17 00:00:00 2001 From: Alan Stanley Date: Mon, 18 Jul 2011 09:55:12 -0300 Subject: [PATCH] initial commit --- book.inc | 400 +++ image_rotator_tagger_block.inc | 107 + images/Crystal_Clear_mimetype_man.png | Bin 0 -> 7787 bytes islandora_book.info | 7 + islandora_book.install | 13 + islandora_book.module | 620 ++++ searchTerms.xml | 67 + tests/fedora_ilives.test | 132 + tests/test_files/mods_record.xml | 83 + xml/book_collection_policy.xml | 22 + xml/ilives_jp2Sdep-pageCModel.xml | 175 + xml/islandora_book_CollectionModel.xml | 138 + xml/islandora_book_bookCModel.xml | 2863 +++++++++++++++++ xml/islandora_book_collection.xml | 47 + xml/islandora_book_figuresCModel.xml | 20 + xml/islandora_book_jp2Sdef.xml | 81 + xml/islandora_book_jp2Sdep-pageCModel.xml | 179 ++ xml/islandora_book_pageCModel.xml | 101 + xml/islandora_book_tei2htmlSdef.xml | 64 + ...islandora_book_tei2htmlSdep-pageCModel.xml | 233 ++ xml/islandora_book_viewerSdef.xml | 64 + xml/islandora_book_viewerSdep-bookCModel.xml | 133 + xml/islandora_book_viewerSdep-pageCModel.xml | 133 + xsl/MODS3-22simpleDC.xsl | 409 +++ xsl/book_view.xsl | 65 + xsl/pageResults.xsl | 160 + xsl/results.xsl | 344 ++ 27 files changed, 6660 insertions(+) create mode 100644 book.inc create mode 100644 image_rotator_tagger_block.inc create mode 100644 images/Crystal_Clear_mimetype_man.png create mode 100644 islandora_book.info create mode 100644 islandora_book.install create mode 100644 islandora_book.module create mode 100644 searchTerms.xml create mode 100644 tests/fedora_ilives.test create mode 100644 tests/test_files/mods_record.xml create mode 100644 xml/book_collection_policy.xml create mode 100644 xml/ilives_jp2Sdep-pageCModel.xml create mode 100644 xml/islandora_book_CollectionModel.xml create mode 100644 xml/islandora_book_bookCModel.xml create mode 100644 xml/islandora_book_collection.xml create mode 100644 xml/islandora_book_figuresCModel.xml create mode 100644 xml/islandora_book_jp2Sdef.xml create mode 100644 xml/islandora_book_jp2Sdep-pageCModel.xml create mode 100644 xml/islandora_book_pageCModel.xml create mode 100644 xml/islandora_book_tei2htmlSdef.xml create mode 100644 xml/islandora_book_tei2htmlSdep-pageCModel.xml create mode 100644 xml/islandora_book_viewerSdef.xml create mode 100644 xml/islandora_book_viewerSdep-bookCModel.xml create mode 100644 xml/islandora_book_viewerSdep-pageCModel.xml create mode 100644 xsl/MODS3-22simpleDC.xsl create mode 100644 xsl/book_view.xsl create mode 100644 xsl/pageResults.xsl create mode 100644 xsl/results.xsl diff --git a/book.inc b/book.inc new file mode 100644 index 0000000..297d964 --- /dev/null +++ b/book.inc @@ -0,0 +1,400 @@ +pid = $pid; + $this->item = new Fedora_Item($pid); + } + } + + public function buildDrupalForm($form = array(), $ingest_form = array(), &$form_state = array()) { + $mods_save = ''; + if (isset($form_state['mods_save'])) { + $mods_save = $form_state['mods_save']; + } + + // Set #cache to true to create the $form_state cache + $form['#cache'] = TRUE; + + // Give the user an option to enter a custom PID + $form['custom_pid'] = array( + '#type' => 'textfield', + '#title' => 'Custom PID', + '#description' => 'If you want to manually specify the PID for the new object, enter it here. ' . + 'Leave it blank for an automatically-generated PID.', + ); + + // Prompt the user to enter a record ID to be looked up in Evergreen. + $form['unapi_url'] = array( + '#type' => 'textfield', + '#title' => 'Catalogue item URL', + ); + $form['unapi_url_submit'] = array( + '#type' => 'submit', + '#value' => t('Retrieve MODS record'), + '#submit' => array('islandora_book_retrieve_unapi_submit'), + '#ahah' => array( + 'path' => 'fedora/ilives/retrieve_unapi/js', // path we defined in hook_menu + 'wrapper' => 'mods-wrapper', // the HTML that wraps the element that needs to be replaced + 'method' => 'replace', // the method we're going to use: a replace operation + //'effect' => 'fade', // the effect used when replacing the element (try fade!) + ), + '#suffix' => '
', + ); + drupal_add_js('', 'inline'); + // We define a
wrapper. Everything in it will be replaced. + $form['mods'] = array( + '#tree' => TRUE, + '#prefix' => '
', + '#suffix' => '
', + ); + $form['mods']['mods_record'] = array( + '#type' => 'textarea', + '#title' => 'MODS Record to Import', + '#rows' => 20, + ); + + if (!empty($mods_save)) { + $form['mods']['mods_record']['#value'] = $mods_save['mods']['mods_record']; + } + return $form; + } + + public function buildEditMetadataForm($form = array()) { + + $form['submit'] = array( + '#type' => 'submit', + '#weight' => 10, + '#value' => 'Update' + ); + $form['pid'] = array( + '#type' => 'hidden', + '#value' => $this->pid, + ); + $form['dsid'] = array( + '#type' => 'hidden', + '#value' => "DARWIN_CORE", + ); + + return $this->buildDrupalForm($form); + } + + public function handleEditMetadataForm($form_id, $form_values) { + /* + * Process the metadata form + * Update the datastreams + */ + + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); + module_load_include('inc', 'fedora_repository', 'MimeClass'); + global $user; + $mimetype = new MimeClass(); + $dwc = new DarwinCore($this->item); + $dwc->handleForm($form_values); + $this->item->purge_datastream('DARWIN_CORE'); + $this->item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE', + 'Darwin Core Metadata', 'text/xml', 'X'); + return TRUE; + } + + public function handleIngestForm($form_values, &$form_state) { + /* + * process the metadata form + * Create fedora object + * Add the datastreams + */ + module_load_include('inc', 'fedora_repository', 'MimeClass'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + if ($form_state['clicked_button']['#value'] == 'Retrieve MODS record') { + return; + } + + $mods_list_doc = new DomDocument(); + $mods_list_doc->loadXML($form_values['mods']['mods_record']); + $mods_item_doc = new DomDocument(); + $mods_item = $mods_list_doc->getElementsByTagNameNS('http://www.loc.gov/mods/v3', 'mods')->item(0); + $new_mods_item = $mods_item_doc->importNode($mods_item, TRUE); + $mods_item_doc->appendChild($new_mods_item); + + $title_info = $mods_item_doc->getElementsByTagNameNS('http://www.loc.gov/mods/v3', 'titleInfo')->item(0); + $title = ''; + foreach (array('nonSort', 'title') as $title_field) { + $title .= $title_info->getElementsByTagNameNS('http://www.loc.gov/mods/v3', $title_field)->item(0)->nodeValue . ' '; + } + $title = trim($title); + $mods_text = $mods_item_doc->saveXML(); + global $user; + $mimetype = new MimeClass(); + + $new_item = Fedora_Item::ingest_new_item(!empty($form_values['custom_pid']) ? $form_values['custom_pid'] : $form_values['pid'], 'A', $title, + $user->name); + + $new_item->add_datastream_from_string($mods_text, 'MODS', + 'MODS Metadata', 'text/xml', 'X'); + + $dc = transform_mods_to_dc($mods_text); + if ($dc) { + // Add the PID to a dc:identifier field. + $dc_doc = simplexml_load_string($dc); + $dc_doc->registerXPathNamespace('oai_dc', 'http://www.openarchives.org/OAI/2.0/oai_dc/'); + $dc_item = $dc_doc->xpath('//oai_dc:dc'); + foreach ($dc_item as $node) { + $node->addChild('dc:identifier', $new_item->pid, 'http://purl.org/dc/elements/1.1/'); + } + $new_item->modify_datastream_by_value($dc_doc->saveXML(), 'DC', 'Dublin Core XML Metadata', 'text/xml'); + } + $new_item->add_relationship('hasModel', $form_values['content_model_pid'], FEDORA_MODEL_URI); + $new_item->add_relationship(!empty($form_values['relationship']) ? $form_values['relationship'] : 'isMemberOfCollection', $form_values['collection_pid']); + drupal_set_message(t("Item !pid created successfully.", array('!pid' => l($new_item->pid, 'fedora/repository/' . $new_item->pid))), "status"); + } + + public function buildAddPagesForm($form = array()) { + + } + + public function showFieldSets() { + module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); + module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); + module_load_include('module', 'islandora_book'); + global $base_url; + $show_purge_tab = (!empty($_POST['form_id']) && ($_POST['form_id'] == 'islandora_book_purge_pages_form')); + $first_page = new Fedora_Item($this->pid . '-001'); + $hasPage = $first_page->exists(); + $tabset = array(); + + global $user; + $qs = ''; + if ($user->uid != 0) { + $qs = '?uid=' . base64_encode($user->name . ':' . $user->pass); + } + + $viewer_url = variable_get('fedora_base_url', '') . '/get/' . $this->pid . '/islandora-book:viewerSdef/getViewer' . $qs; + $html = ''; + + $tabset['first_tab'] = array( + // #type and #title are the minimum requirements. + '#type' => 'tabpage', + '#title' => t('Description'), + // This will be the content of the tab. + '#content' => islandora_book_create_book_view($this->pid), + ); + + if ($hasPage) { + $tabset['second_tab'] = array( + '#type' => 'tabpage', + '#title' => t('Read'), + '#content' => $html + ); + } + + if (!$hasPage && user_access('ingest new fedora objects')) { + $tabset['third_tab'] = array( + '#type' => 'tabpage', + '#title' => t('Add pages'), + '#content' => drupal_get_form('book_add_pages_form', $this->pid), + ); + } + if ($hasPage && user_access('purge objects and datastreams')) { + $tabset['fourth_tab'] = array( + '#type' => 'tabpage', + '#title' => t('Purge all pages'), + '#selected' => $show_purge_tab, + '#content' => drupal_get_form('islandora_book_purge_pages_form', $this->pid), + ); + } + return $tabset; + } + +} + +function book_add_pages_form(&$form_state, $pid, $page_cmodel = 'islandora-book:pageCModel', $relation = 'isMemberOf') { + $file = (isset($form_state['values']['ingest-file-location']) ? $form_state['values']['ingest-file-location'] : ''); + $form['#attributes']['enctype'] = 'multipart/form-data'; + $form['pid'] = array( + '#type' => 'hidden', + '#value' => $pid, + ); + $form['page_cmodel'] = array( + '#type' => 'hidden', + '#value' => $page_cmodel, + ); + $form['relation'] = array( + '#type' => 'hidden', + '#value' => $relation, + ); + + $form['#attributes'] = array('enctype' => 'multipart/form-data'); + $form['file_upload'] = array( + '#type' => 'file', + '#title' => t('Upload Zipped TIFFs'), + '#size' => 48, + '#description' => t('Upload a zip file containing a tiff for each page of this book'),); + + $form['submit'] = array( + '#type' => 'submit', + '#weight' => 10, + '#value' => 'Ingest Pages' + ); + return $form; +} + +function s_book_add_pages_form_validate($form, &$form_state) { + if ($form_state['values']['tiff_dir'] == '') { + //form_set_error('', t('You must provide a file.')); + } +} + +function book_add_pages_form_submit($form, &$form_state) { + $pid = $form_state['values']['pid']; + $dirName = str_replace(':', '_', $pid); + $tmpDir = file_directory_path() . '/' . $dirName . '/'; + mkdir($tmpDir); + if (!$file = file_save_upload('file_upload', NULL, $tmpDir)) { + + drupal_set_message('No file loaded', 'warning'); + return; + } + if ($file->filemime != 'application/zip') { + drupal_set_message('Input file must be a .zip file', 'warning'); + file_delete($file->filepath); + return; + } + $fileName = $file->filepath; + $cmdString = "unzip -q -o -d $tmpDir \"$fileName\""; + + system($cmdString, $retVal); + + + $file_list = array(); + if ($tiff_dir = opendir($tmpDir)) { + while (FALSE !== ($file_name = readdir($tiff_dir))) { + $ext = strrchr($file_name, '.'); + if ($ext == '.tif' || $ext == '.tiff') { + array_push($file_list, $tmpDir . $file_name); + } + } + closedir($tiff_dir); + sort($file_list); + ilives_create_page_objects($pid, $file_list, $form_state['values']['page_cmodel'], $form_state['values']['relation'], $tmpDir); + } +} + +/** + * Create a page object for each element in $image_list as a child object of $pid + */ +function ilives_create_page_objects($pid, $image_list = array(), $page_cmodel = 'islandora-book:pageCModel', $relation = 'isMemberOfCollection', $tmpDir) { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + $book = new Fedora_Item($pid); + if (!$book->exists()) { + return FALSE; + } + $dirName = str_replace(':', '_', $pid); + + $page_pids = array(); + $batch = array( + 'title' => 'Creating page objects', + 'operations' => array(), + 'file' => drupal_get_path('module', 'islandora_book') . '/book.inc', + ); + $page_num = 1; + $book_title = $book->objectProfile->objLabel; + foreach ($image_list as $image_path) { + $batch['operations'][] = array('ilives_add_single_page_object', array($pid, $image_path, $page_num, "$book_title - Page " . sprintf("%03d", $page_num), $page_cmodel, $relation)); + $page_num++; + } + $batch['operations'][] = array('deleteDirectory', array($tmpDir)); + + batch_set($batch); + + $objectHelper = new ObjectHelper; + $dc_xml = $objectHelper->getStream($pid, 'DC'); + $xml = new DOMDocument(); + $xml->loadXML($dc_xml); + $root = $xml->documentElement; + $typeNode = $xml->createElement('dc:type', 'ingested'); + $typeNode = $xml->createElementNS("http://purl.org/dc/elements/1.1/", 'dc:type', 'ingested'); + $root->appendChild($typeNode); + $book->modify_datastream_by_value($xml->saveXML(), 'DC', 'Dublin core', 'text/xml', TRUE, "Added Type of Ingest", FALSE); +} + +function ilives_add_single_page_object($book_pid, $page_file, $page_num = 1, $page_title = NULL, $page_cmodel = 'islandora-book:pageCModel', $relation = 'isMemberOfCollection') { + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + $page_item = Fedora_Item::ingest_new_item("$book_pid-" . sprintf("%03d", $page_num), 'A', $page_title); + $page_item->add_relationship('hasModel', $page_cmodel, FEDORA_MODEL_URI); + $page_item->add_relationship($relation, $book_pid); + // add original tiff + $page_item->add_datastream_from_file($page_file, 'TIFF', 'Archival TIFF', 'image/tiff', 'M'); + + //add compresed jp2 for viewer + exec('kdu_compress -i "' . $page_file . '" -o "' . $page_file . '.jp2' . '" -rate 0.5 Clayers=1 Clevels=7 "Cprecincts={256,256},{256,256},{256,256},{128,128},{128,128},{64,64},{64,64},{32,32},{16,16}" "Corder=RPCL" "ORGgen_plt=yes" "ORGtparts=R" "Cblk={32,32}" Cuse_sop=yes', $output, $returnValue); + if ($returnValue == '0') { + $page_item->add_datastream_from_file("$page_file.jp2", 'JP2', "Compressed JP2", 'image/jp2', 'M'); + } + + //add thumbnail image + exec("convert {$page_file}[0] -thumbnail x2000 -thumbnail x450 -resize '450x<' -resize 50% -fuzz 1% -trim +repage -gravity center -crop 200x200+0+0 +repage -format jpg -quality 100 $page_file-tn.jpg", $output, $returnValue); + if ($returnValue == '0') { + $page_item->add_datastream_from_file("$page_file-tn.jpg", 'TN', 'Thumbnail', 'image/jpeg', 'M'); + if (preg_match('/frontcover/', $page_file)) { + $book_item = new Fedora_Item($book_pid); + $book_item->add_datastream_from_file("$page_file-tn.jpg", 'TN', 'Thumbnail', 'image/jpeg', 'M'); + } + } + + //add jpeg + exec("convert -resize 800 \"{$page_file}\"[0] \"$page_file-med.jpg\"", $output, $returnValue); + if ($returnValue == '0') { + $page_item->add_datastream_from_file("$page_file-med.jpg", 'JPEG', "JPEG image", 'image/jpeg', 'M'); + } + + //perform OCR using Tesseract, add text datastream + exec("/usr/local/bin/tesseract $page_file $page_file -l eng", $output, $returnValue); + if ($returnValue == '0') { + $page_item->add_datastream_from_file("$page_file.txt", 'OCR', "Scanned Text", 'text/xml', 'M'); + } +} + +function transform_mods_to_dc($mods) { + $xp = new XsltProcessor(); + // create a DOM document and load the XSL stylesheet + $xsl = new DomDocument; + $xsl->load(drupal_get_path('module', 'islandora_book') . '/xsl/MODS3-22simpleDC.xsl'); + + // import the XSL styelsheet into the XSLT process + $xp->importStylesheet($xsl); + + // create a DOM document and load the XML datat + $xml_doc = new DomDocument; + $xml_doc->loadXML($mods); + + // transform the XML into HTML using the XSL file + if ($dc = $xp->transformToXML($xml_doc)) { + return $dc; + } + else { + return FALSE; + } +} + +function deleteDirectory($dir) { + if (!file_exists($dir)) + return true; + if (!is_dir($dir)) + return unlink($dir); + foreach (scandir($dir) as $item) { + if ($item == '.' || $item == '..') + continue; + if (!deleteDirectory($dir . DIRECTORY_SEPARATOR . $item)) + return false; + } + return rmdir($dir); +} diff --git a/image_rotator_tagger_block.inc b/image_rotator_tagger_block.inc new file mode 100644 index 0000000..eb29e23 --- /dev/null +++ b/image_rotator_tagger_block.inc @@ -0,0 +1,107 @@ + +where $object +and $object +and $object $title'; + $collection = new CollectionClass('ilives:figures'); + $results = $collection->getRelatedItems('ilives:figures', $itqlquery); + //drupal_set_message($results); + + + if (empty($results)) { + return NULL; + } + $resultsdoc = new DomDocument(); + $resultsdoc->loadXML($results); + + $resultslist = $resultsdoc->getElementsByTagName('result'); + if ( $resultslist->length == 0 ) { + return NULL; + } + //return htmlentities(substr($results, 0, 1000)); + $randresult = $resultslist->item( rand()%$resultslist->length ); + if (empty($randresult)) { + return NULL; + } + $objs = $randresult->getElementsByTagName('object'); + $obj = $objs->item(0); + $pid = substr( $obj->getAttribute('uri'), 12); + $titles = $randresult->getElementsByTagName('title'); + $title = $titles->item(0); + + return array('pid' => $pid, + //'title' => $randresult->textContent); + 'title' => $title->nodeValue); + +} + + +function _fedora_image_rotator_tagger_block_content() { + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); + + global $base_url; + if (!empty($_POST['pid'])) { + $image_item = new Fedora_Item($_POST['pid']); + $result['pid'] = $_POST['pid']; + $result['title'] = $image_item->objectProfile->objLabel; + } + elseif (empty($_POST) && !empty($_SESSION['fedora_tagged_image']['pid'])) { + $image_item = new Fedora_Item($_SESSION['fedora_tagged_image']['pid']); + $result['pid'] = $_SESSION['fedora_tagged_image']['pid']; + $result['title'] = $image_item->objectProfile->objLabel; + unset($_SESSION['fedora_tagged_image']); + } + else { + $result = get_random_image(); + + $image_item = new Fedora_Item($result['pid']); + } + if (!empty ($result)) { + return '

' + . l( '', 'fedora/repository/'. $result['pid'], array('html' => TRUE, 'alias' => TRUE)) + .'

This image is from '. l($result['title'], 'fedora/ilives_book_viewer/'. substr($image_item->pid, 0, strrpos($image_item->pid, '-')), array('html' => TRUE, 'alias' => TRUE)) . '.' + . drupal_get_form('fedora_repository_image_tagging_form', $result['pid']) . '

'; + } + else { + return ''; + } +} + + +/* +function fedora_ilives_preprocess_page(&$variables) { + drupal_add_js(drupal_get_path('module', 'fedora_ilives').'/fedora_ilives_ajax.js', 'theme'); + return TRUE; +}*/ + +class ShowILivesStreamsInFieldSets { + + private $pid =NULL; + + function ShowILivesStreamsInFieldSets($pid) { + //drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); + $this->pid=$pid; + } + + function showJPG() { + module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); + global $base_url; + $collection_fieldset = array( + '#collapsible' => FALSE, + '#value' => '', + ); + return theme('fieldset', $collection_fieldset) + . drupal_get_form('fedora_repository_image_tagging_form', $this->pid); + } +} diff --git a/images/Crystal_Clear_mimetype_man.png b/images/Crystal_Clear_mimetype_man.png new file mode 100644 index 0000000000000000000000000000000000000000..9237fc56876642d595de1241710154d6bba79af8 GIT binary patch literal 7787 zcmV-x9+csUP)+D)mfR}4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(}>#I1obP?~bV00M(4$RG=W*E5q-n&>jtB}}#Hhw-SGC+jJfeAF{kHRp`4ZG>& zrlm>wSrNf9P26g?q0gRoSdm(5g;AiYkQJ04tf{>$7DTmW6h` z3DlYpwS7=>bQxqAa3=Oa7zT`6Dv++56L+M@AVRHH#fOgFj_E^(QK?i)Z56z&7oX+* zs1O46dL0L6W^n9|WgJZ-!}_ICS_h`u+Zv--u$T97KdlrGf(o4q$3(3e{@0 z)SbOI@@{D6MxT&nS=hgSKWeoaT-V*Om3X5brfI^qZB!~1m?eGiM$X&F09Ps%IF6I~ z<3b2nmIceQcCF?n7kza3Oo`8Wo`-I?8v(o}QFQ1>i3rtd6^%v%j^h*pn0BxFEFz`s zWNoxH*o+%QX5TO@`?Ev@DJ9m{)*^tVl)M!H)BEqg-#K^g9OmceVVWi;CMICpHayQu zJ)x`<%lcdhaM5?dMV9=&4t|n#(|738zaRc)S|j=>+b1W-k@nrZ_jS3U_A)b8R#tH7 z(xpqSR?FK=fEfTzpFaJ{kt0X$t<`F?$BrGtwH z8G$`vKV4_C4G_ zu!jp^9l#=ha{!hAw8u5mWk3o+-WPyd2Vm_1ylICAzyYuZU^V!E>_Dq5NFwmpR`A!@ x!(r2oV2gaX!Q;Bf1lr`!?;Y2XPH%*e{{++5RG=S!#A*Nl002ovPDHLkV1j+6vZeq4 literal 0 HcmV?d00001 diff --git a/islandora_book.info b/islandora_book.info new file mode 100644 index 0000000..763adfd --- /dev/null +++ b/islandora_book.info @@ -0,0 +1,7 @@ +; $Id$ +name = Islandora Book +description = Provides book interface +package = Fedora Repository +dependencies[] = fedora_repository +version = 6.1dev +core = 6.x diff --git a/islandora_book.install b/islandora_book.install new file mode 100644 index 0000000..e826839 --- /dev/null +++ b/islandora_book.install @@ -0,0 +1,13 @@ + t('Book view'), + 'page callback' => 'islandora_book_create_book_view', + 'type' => MENU_CALLBACK, + 'access arguments' => array('view fedora collection'), + ); + $items['fedora/book_viewer'] = array( + 'title' => t('Book viewer'), + 'page callback' => 'islandora_book_book_viewer', + 'type' => MENU_CALLBACK, + 'access arguments' => array('view fedora collection'), + ); + // This block defines the path and the corresponding callback function. + $items['fedora/book/retrieve_unapi/js'] = array( + 'page callback' => 'islandora_book_button_retrieve_unapi_ahah', // the AHAH callback function + 'access arguments' => array('add fedora datastreams'), + 'type' => MENU_CALLBACK, + ); + return $items; +} + + +function islandora_book_block($op = 'list', $delta = 0, $edit = array()) { + // The $op parameter determines what piece of information is being requested. + switch ($op) { + case 'list': + // If $op is "list", we just need to return a list of block descriptions. + // This is used to provide a list of possible blocks to the administrator, + // end users will not see these descriptions. + $blocks[0] = array( + 'info' => t('Book search block'), + ); + $blocks[1] = array( + 'info' => t('Image rotator and tagger'), + ); + $blocks[2] = array( + 'info' => t('Simple book search block'), + ); + + return $blocks; + case 'configure': + // If $op is "configure", we need to provide the administrator with a + // configuration form. The $delta parameter tells us which block is being + // configured. In this example, we'll allow the administrator to customize + // the text of the first block. + // If $op is "configure", we need to provide the administrator with a + // configuration form. The $delta parameter tells us which block is being + // configured. In this example, we'll allow the administrator to customize + // the text of the first block. + $form = array(); + switch ($delta) { + case 0: + // All we need to provide is a text field, Drupal will take care of + // the other block configuration options and the save button. + $form['islandora_book_book_search_block_repeat'] = array( + '#type' => 'textfield', + '#title' => t('Number of times to repeat search fields'), + '#size' => 5, + '#description' => t('The number of times you would like the search blocks to be repeated'), + '#default_value' => variable_get('islandora_book_book_search_block_repeat', t('3')), + ); + break; + case 1: + // This is the image rotator block. + $form['islandora_book_image_rotator_block_query'] = array( + '#type' => 'textarea', + '#title' => t('ITQL Query'), + '#description' => t('The ITQL query to return a list of images.'), + '#default_value' => variable_get('islandora_book_image_rotator_tagger_block_query', 'select $object $title from <#ri> +where $object +and $object +and $object $title'), + ); + break; + case 2: + // All we need to provide is a text field, Drupal will take care of + // the other block configuration options and the save button. + $form['islandora_book_simple_book_search_block_title'] = array( + '#type' => 'textfield', + '#title' => t('Title'), + '#size' => 15, + '#description' => t('The title of the block'), + '#default_value' => variable_get('islandora_book_simple_book_search_block_title', t('Title')), + ); + break; + } + + return $form; + case 'save': + // If $op is "save", we need to save settings from the configuration form. + // Since the first block is the only one that allows configuration, we + // need to check $delta to make sure we only save it. + switch ($delta) { + case 0: + // Have Drupal save the string to the database. + variable_set('islandora_book_book_search_block_repeat', $edit['islandora_book_book_search_block_repeat']); + break; + case 1: + variable_set('islandora_book_image_rotator_tagger_block_query', $edit['islandora_book_image_rotator_block_query']); + break; + case 2: + // Have Drupal save the string to the database. + variable_set('islandora_book_simple_book_search_block_title', $edit['islandora_book_simple_book_search_block_title']); + break; + } + return; + case 'view': default: + // If $op is "view", then we need to generate the block for display + // purposes. The $delta parameter tells us which block is being requested. + switch ($delta) { + case 0: + // The subject is displayed at the top of the block. Note that it + // should be passed through t() for translation. + $block['subject'] = t('Book advanced search'); + // The content of the block is typically generated by calling a custom + // function. + $block['content'] = drupal_get_form('islandora_book_book_search_form'); + break; + case 1: + module_load_include('inc', 'islandora_book', 'image_rotator_tagger_block'); + $block['subject'] = t('Random repository image'); + $block['content'] = _fedora_image_rotator_tagger_block_content(); + break; + case 2: + // The subject is displayed at the top of the block. Note that it + // should be passed through t() for translation. + $block['subject'] = t('Simple Book Search'); + // The content of the block is typically generated by calling a custom + // function. + $block['content'] = drupal_get_form('islandora_book_simple_book_search_form'); + break; + } + + return $block; + } +} + +function islandora_book_book_viewer($pid) { + global $user; + $qs = ''; + if ($user->uid != 0) { + $qs = '?uid=' . base64_encode($user->name . ':' . $user->pass); + } + + $viewer_url = variable_get('fedora_base_url', '') . '/get/' . $pid . '/islandora-book:viewerSdef/getViewer' . $qs; + $html = ''; + $fieldset = array( + '#title' => t('Viewer - ') . $pid, + '#collapsible' => TRUE, + '#collapsed' => FALSE, + '#value' => $html); + drupal_add_css(path_to_theme() . '/header-viewer.css', 'theme'); + return theme('fieldset', $fieldset); +} + +//loads an xslt for the main book page uses mods for most of the display. if there is a $query parameter +// it will execute it against the book. +function islandora_book_create_book_view($pid, $query = NULL) { + global $user; + module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + $path = drupal_get_path('module', 'islandora_book'); + $objectHelper = new ObjectHelper; + $xml = $objectHelper->getStream($pid, 'MODS'); + $dc_xml = $objectHelper->getStream($pid, 'DC'); + if (!$dc_xml) { + drupal_set_message(t('Object does not exist.'), 'error'); + return ''; + } + $simpleDCxml = simplexml_load_string($dc_xml); + $types = $simpleDCxml->xpath('//dc:type'); + $ingested = 'false'; + if (!empty($types)) { + foreach ($types as $type) { + if ($type == 'ingested') { + $ingested = 'true'; + } + } + } + + if (!isset($pid)) { + drupal_set_message(t('Error getting book view, no identifier specified.')); + return; + } + $proc = NULL; + try { + $proc = new XsltProcessor(); + } catch (Exception $e) { + drupal_set_message(t('Error loading Book View XSLT: $e', array('!e' => $e->getMessage()))); + return; + } + + //inject into xsl stylesheet + $proc->setParameter('', 'userID', $user->uid); + $proc->setParameter('', 'objectsPage', base_path()); + $proc->setParameter('', 'pid', $pid); + $proc->setParameter('', 'ingested', $ingested); + $xsl = new DomDocument(); + $test = $xsl->load($path . '/xsl/book_view.xsl'); + if (!isset($test)) { + drupal_set_message(t('Error loading search results XSLT.')); + return t('Error loading search results XSLT.'); + } + + $input = new DomDocument(); + $didLoadOk = $input->loadXML($xml); + $output = NULL; + if (!isset($didLoadOk)) { + drupal_set_message(t('Error loading Book View XML.')); + return t('Error loading Book View XML.'); + } + else { + $xsl = $proc->importStylesheet($xsl); + $newdom = $proc->transformToDoc($input); + $output .= $newdom->saveXML(); + } + if (isset($query)) { + module_load_include('inc', 'fedora_repository', 'SearchClass'); + $searchClass = new SearchClass(); + $pageQuery = convert_query_to_page_query($query, $pid); + $output .= '
' . $searchClass->custom_search($pageQuery, $startPage, '/ilives/xsl/pageResults.xsl', 500) . '
'; //limit results to 500 pages of a book since there is no paging if we enable paging in xslt this can be changed + //return $output."
used this query to find this page $query and new query = $pageQuery
"; + + return $output; + } + else { + return $output; + } +} + +function convert_query_to_page_query($query, $pid) { + $newQuery = substr($query, 0, strlen($query) - 23); + $pid = str_replace(':', '?', $pid); + $newQuery = $newQuery . " AND PID:$pid* AND dc.type:Text"; + return $newQuery; +} + +/** + * Custom form element to do our nice images. + */ +function islandora_book_elements() { // Change this line + $type['imagebutton'] = array( + '#input' => TRUE, + '#button_type' => 'submit', + '#executes_submit_callback' => TRUE, + '#name' => 'op', + '#process' => array('hook_imagebutton_process' => array()), + ); + return $type; +} + +function theme_imagebutton($element) { + return '\n"; +} + +/** + * Implementation of hook_theme() to register how to theme image buttons. + */ +function islandora_book_theme() { + return array( + 'imagebutton' => array( + 'arguments' => array('form' => NULL), + ), + 'islandora_book_book_search_form' => array( + 'arguments' => array('form' => NULL), + ), + 'islandora_book_simple_book_search_form' => array( + 'arguments' => array('form' => NULL), + ) + ); +} + + + + + + + +function retrieve_unapi_MODS_record($url) { + $bib_response = drupal_http_request($url); + $bib_html = $bib_response->data; + $bib_doc = new DOMDocument; + @$bib_doc->loadHTML($bib_html); + $links = $bib_doc->getElementsByTagName('link'); + foreach ($links as $link) { + if ($link->getAttribute('rel') == 'unapi-server') { + $unapi_server = $link->getAttribute('href'); + break; + } + } + $attrs = $bib_doc->getElementsByTagName('abbr'); + foreach ($attrs as $attr) { + if ($attr->getAttribute('class') == 'unapi-id') { + + $unapi_id = $attr->getAttribute('title'); + break; + } + } + $mods_url = "$unapi_server?id=$unapi_id&format=mods3"; + $mods_resp = drupal_http_request($mods_url); + $mods_data = $mods_resp->data; + return $mods_data; +} + +/** + * AHAH callback for the 'match type' select. + * This function handles the actual replace and sets the $form and $form_state arrays. + * */ +function islandora_book_button_retrieve_unapi_ahah() { + + // this part is used to set up $form_state. + // In Drupal 7, these next 11 lines will be put in a core utility function. + // Just remember you'll need them in D6 when you do AHAH. + $form_state = array('storage' => NULL, 'submitted' => FALSE); + $form_build_id = $_POST['form_build_id']; + $form = form_get_cache($form_build_id, $form_state); + $args = $form['#parameters']; + $form_id = array_shift($args); + $form['#post'] = $_POST; + $form['#redirect'] = FALSE; + $form['#programmed'] = FALSE; + + $form_state['post'] = $_POST; + drupal_process_form($form_id, $form, $form_state); + $form_state['storage']['step'] = 2; + $form = drupal_rebuild_form($form_id, $form_state, $args, $form_build_id); + // From here on, we'll add our own code. + // We just get the element of $form that needs to be refreshed, and just resubmit that + // part through the json call. In this case we want to rebuild the 'kind'
wrapper and the + // select box it contains + $changed_elements = $form['mods']['mods_record']; + + + unset($changed_elements['#prefix'], $changed_elements['suffix']); // we'll unset the div to make sure it won't be repeated! + // the actual JSON call + $javascript = drupal_add_js(NULL, NULL, 'header'); + drupal_json(array( + 'status' => TRUE, + 'data' => theme('status_messages') . drupal_render($changed_elements), // rebuild just the part that needs to be changed + 'settings' => call_user_func_array('array_merge_recursive', $javascript['setting']), + )); +} + +/** + * This is the handler for the 'type' box: pressing this will refresh the
kind wrapper. + * */ +function islandora_book_retrieve_unapi_submit($form, &$form_state) { + + unset($form_state['submit_handlers']); // unset all the submit handlers in the form + form_execute_handlers('submit', $form, $form_state); // execute submit handler + $url = $form_state['values']['unapi_url']; + $mods = retrieve_unapi_MODS_record($url); + $form_state['values']['mods']['mods_record'] = $mods; + $mods_save = $form_state['values']; // store all the submitted values in the form + $form_state['mods_save'] = $mods_save; // put the values in a new form + + $form_state['rebuild'] = TRUE; // set to true to make sure the form gets rebuild + return $mods_save; +} + + +/** + * Implementation of hook_requirements(). + * + * @return + * An array describing the status of the site regarding available updates. + * If there is no update data, only one record will be returned, indicating + * that the status of core can't be determined. If data is available, there + * will be two records: one for core, and another for all of contrib + * (assuming there are any contributed modules or themes enabled on the + * site). In addition to the fields expected by hook_requirements ('value', + * 'severity', and optionally 'description'), this array will contain a + * 'reason' attribute, which is an integer constant to indicate why the + * given status is being returned (UPDATE_NOT_SECURE, UPDATE_NOT_CURRENT, or + * UPDATE_UNKNOWN). This is used for generating the appropriate e-mail + * notification messages during update_cron(), and might be useful for other + * modules that invoke update_requirements() to find out if the site is up + * to date or not. + * + * @see _update_message_text() + * @see _update_cron_notify() + */ +function islandora_book_requirements($phase) { + global $base_url; + if ($phase == 'runtime') { + module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); + $requirements['iiv-war'] = array(); + $requirements['iiv-war']['title'] = t("Islandora OpenLayers image viewer web app"); + if (!_islandora_book_viewer_available()) { + $requirements['iiv-war']['value'] = ("Not available"); + $requirements['iiv-war']['severity'] = REQUIREMENT_ERROR; + $requirements['iiv-war']['description'] = t('Ensure that Fedora is running and that the IIV app is deployed.', + array('@iiv-home' => 'http://github.com/islandora/iiv')); + } + else { + $requirements['iiv-war']['value'] = ("Available"); + $requirements['iiv-war']['severity'] = REQUIREMENT_OK; + } + } + return $requirements; +} + +function _islandora_book_viewer_available() { + $url = parse_url(variable_get('fedora_base_url', 'http://localhost:8080/fedora')); + $fedora_host = ("{$url['scheme']}://{$url['host']}" . (!empty($url['port']) ? ":{$url['port']}/" : '/')); + $response = drupal_http_request("$fedora_host/iiv/images/loading.gif"); + return empty($response->error); +} + +function islandora_book_required_fedora_objects() { + // array( 'path-to-foxml-file', 'pid', 'dsid', 'path-to-datastream-file', int dsversion, boolean required) + $module_path = drupal_get_path('module', 'islandora_book'); + return array( + 'islandora_book' => array( + 'module' => 'islandora_book', + 'title' => 'Island Lives Books', + 'objects' => array( + array( + 'foxml_file' => "$module_path/xml/islandora_book_pageCModel.xml", + 'pid' => 'islandora-book:pageCModel', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_bookCModel.xml", + 'pid' => 'islandora-book:bookCModel', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_jp2Sdef.xml", + 'pid' => 'islandora-book:jp2Sdef', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_viewerSdef.xml", + 'pid' => 'islandora-book:viewerSdef', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_viewerSdep-bookCModel.xml", + 'pid' => 'islandora-book:viewerSdep-bookCModel', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_viewerSdep-pageCModel.xml", + 'pid' => 'islandora-book:viewerSdep-pageCModel', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_tei2htmlSdef.xml", + 'pid' => 'islandora-book:tei2htmlSdef', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_tei2htmlSdep-pageCModel.xml", + 'pid' => 'islandora-book:tei2htmlSdep-pageCModel', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_collection.xml", + 'pid' => 'islandora-book:collection', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'foxml_file' => "$module_path/xml/islandora_book_CollectionModel.xml", + 'pid' => 'islandora-book:CollectionModel', + 'dsid' => NULL, + 'datastream_file' => NULL, + 'dsversion' => NULL, + ), + array( + 'pid' => 'books:collection', + 'label' => 'Book Collection', + 'cmodel' => 'islandora:collectionCModel', + 'parent' => 'islandora:demos', + 'datastreams' => array( + array( + 'dsid' => 'COLLECTION_POLICY', + 'datastream_file' => "$module_path/xml/book_collection_policy.xml", + ), + array( + 'dsid' => 'TN', + 'datastream_file' => "$module_path/images/Crystal_Clear_mimetype_man.png", + 'mimetype' => 'image/png', + ), + ), + ), + ), + ), + ); +} + +function islandora_book_purge_pages_form(&$form_state, $pid, $referrer = NULL) { + global $base_url; + if (!user_access('purge objects and datastreams')) { + return NULL; + } + if ($pid == NULL) { + return NULL; + } + $form['pid'] = array( + '#type' => 'hidden', + '#value' => "$pid" + ); + if (!strstr(drupal_get_destination(), urlencode('fedora/repository'))) { + $form['referrer'] = array( + '#type' => 'hidden', + '#value' => $referrer, + ); + } + if (!isset($form_state['storage']['confirm'])) { + // do your normal $form definition here + + + $form['submit'] = array( + '#type' => 'image_button', + '#src' => drupal_get_path('module', 'fedora_repository') . '/images/purge_big.png', + '#value' => t('Purge'), + '#suffix' => 'Purge all pages associated with this book', + ); + + return $form; + } + else { + // ALSO do $form definition here. Your final submit handler (after user clicks Yes, I Confirm) will only see $form_state info defined here. Form you create here passed as param1 to confirm_form + + return confirm_form($form, 'Confirm Purge ALL pages?', $referrer, 'Are you sure you want to delete these objects? This action cannot be undone.', 'Purge Pages', 'Cancel'); //Had better luck leaving off last param 'name' + } + return $form; +} + +function islandora_book_purge_pages_form_submit($form, &$form_state) { + module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); + $pid = $form_state['values']['pid']; + if (!isset($form_state['storage']['confirm'])) { + $form_state['storage']['confirm'] = TRUE; // this will cause the form to be rebuilt, entering the confirm part of the form + $form_state['rebuild'] = TRUE; // along with this + } + else { + + $query = << + where (\$object \$title + and \$object + and \$object ) + order by \$title + +XML; + + // this is where you do your processing after they have pressed the confirm button + module_load_include('inc', 'fedora_repoitory', 'CollectionClass'); + $collection = new CollectionClass($pid); + $contents = $collection->getRelatedItems($pid, $query); + $results_xml = simplexml_load_string($contents); + $resultsarray = array(); + foreach ($results_xml->results->result as $result) { + $pid_to_delete = str_replace('info:fedora/', '', $result->object->attributes()->uri); + + //parse contents + + $params = array( + "pid" => $pid_to_delete, + "logMessage" => "Purged", + "force" => "" + ); + try { + $soapHelper = new ConnectionHelper(); + $client = $soapHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); + $object = $client->__soapCall('purgeObject', array($params)); + unset($form_state['storage']['confirm']); + } catch (exception $e) { + if (preg_match('/org\.fcrepo\.server\.security\.xacml\.pep\.AuthzDeniedException/', $e->getMessage())) { + drupal_set_message(t('Error: Insufficient permissions to purge object.'), 'error'); + } + else { + drupal_set_message(t($e->getMessage()), 'error'); + } + return; + } + } + if (!empty($form_state['values']['referrer'])) { + $form_state['redirect'] = $form_state['values']['referrer']; + } + elseif (empty($collectionPid) && !empty($_SESSION['fedora_collection']) && $_SESSION['fedora_collection'] != $pid) { + $collectionPid = $_SESSION['fedora_collection']; + + $form_state['redirect'] = "fedora/repository/$collectionPid/"; + } + else { + $form_state['redirect'] = 'fedora/repository/'; + } + } +} diff --git a/searchTerms.xml b/searchTerms.xml new file mode 100644 index 0000000..b224c95 --- /dev/null +++ b/searchTerms.xml @@ -0,0 +1,67 @@ + + + + dc.title + 1000 + + dc.title + Title + + + mods.sor + Author + + + mods.subject + Subject + + + + tei.fullText + Text + + + tei.persName + People + + + + + tei.placeName + Places + + + tei.orgName + Organization Name + + + + + + + + + + + + diff --git a/tests/fedora_ilives.test b/tests/fedora_ilives.test new file mode 100644 index 0000000..be8c0ff --- /dev/null +++ b/tests/fedora_ilives.test @@ -0,0 +1,132 @@ + 'Fedora Book', + 'description' => t('The Fedora repository book content model.'), + 'group' => t('fedora repository'), + ); + } + + function setUp() { + parent::setUp('fedora_repository', 'fedora_ilives', 'tabs'); + + module_load_include('inc', 'fedora_repository', 'api/fedora_item'); + + // Create and login user. + $repository_user = $this->drupalCreateFedoraUser(array('add fedora datastreams', + 'edit fedora meta data', + 'edit tags datastream', + 'ingest new fedora objects', + 'purge objects and datastreams', + 'view fedora collection', + 'view detailed list of content')); + + + $this->drupalLogin($repository_user); + + } + + public function testBookCModel() { + // First add a book collection + + $pid_list = array(); + // Create a collection for ingesting book content model objects. + + $ingest_form = array(); + $ingest_form['models'] = 'islandora:collectionCModel/ISLANDORACM'; + + $this->drupalPost('fedora/ingestObject/islandora:top/Islandora%20Top-Level%20Collection', $ingest_form, 'Next'); + + $ingest_title = $this->randomName(32); + $ingest_form_step_2['dc:title'] = $ingest_title; + $ingest_form_step_2['dc:description'] = $this->randomName(256); + $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'fedora_ilives') . '/xml/book_collection_policy.xml'); + $this->drupalPost(NULL, $ingest_form_step_2, 'Ingest'); + $this->assertPattern('/Item .* created successfully./', "Verified item created."); + + $pid = $this->getIngestedPid(); + $this->drupalGet("fedora/repository/$pid"); + $pid_list[] = $pid; + + // Now add a book into the new collection + $this->pass("Create book collection $pid below top-level collection.", 'fedora book'); + $ingest_book_form = array(); + $ingest_book_form['models'] = 'ilives:bookCModel/ISLANDORACM'; + $this->drupalPost("fedora/ingestObject/$pid/", $ingest_book_form, 'Next'); + $ingest_book_form_step_2 = array(); + + $ingest_book_form_step_2['mods[mods_record]'] = file_get_contents(drupal_get_path('module', 'fedora_ilives') . '/tests/test_files/mods_record.xml'); + $this->outputScreenContents(); + $this->drupalPost(NULL, $ingest_book_form_step_2, 'Ingest'); + $this->outputScreenContents(); + $book_pid = $this->getIngestedPid(); + $pid_list[] = $book_pid; + if (!empty($book_pid)) { + $this->pass("Successfully ingested book object $book_pid."); + } + $this->cleanUpRepository($pid_list); + + } + + private function cleanUpRepository($pid_list = array()) { + $this->pass("This is the PID list to purge: ". implode(", ", $pid_list) ); + foreach ($pid_list as $pid) { + $this->drupalPost("fedora/repository/purgeObject/$pid", array(), 'Purge'); + $this->drupalPost(NULL, array(), 'Delete'); + } + } + + private function getIngestedPid() { + $subject = $this->drupalGetContent(); + $pattern = '/">(.*)<\/a> created successfully./'; + $matches = array(); + $res = preg_match($pattern, $subject, $matches); + return $matches[1]; + } + + private function outputScreenContents($description = '', $basename = '') { + // This is a hack to get a directory that won't be cleaned up by SimpleTest. + $file_dir = file_directory_path() . '../simpletest_output_pages'; + if (!is_dir($file_dir)) { + mkdir($file_dir, 0777, TRUE); + } + $output_path = "$file_dir/$basename.". $this->randomName(10) . '.html'; + $rv = file_put_contents($output_path, $this->drupalGetContent()); + $this->pass("$description: Contents of result page are ". l('here', $output_path)); + } + + protected function drupalCreateFedoraUser($permissions = array('access comments', 'access content', 'post comments', 'post comments without approval')) { + // Create a role with the given permission set. + if (!($rid = $this->drupalCreateRole($permissions))) { + return FALSE; + } + + // Create a user assigned to that role. + $edit = array(); + $edit['name'] = 'simpletestuser'; + $edit['mail'] = $edit['name'] . '@example.com'; + $edit['roles'] = array($rid => $rid); + $edit['pass'] = 'simpletestpass'; + $edit['status'] = 1; + + $account = user_save('', $edit); + + $this->assertTrue(!empty($account->uid), t('User created with name %name and pass %pass', array('%name' => $edit['name'], '%pass' => $edit['pass'])), t('User login')); + if (empty($account->uid)) { + return FALSE; + } + + // Add the raw password so that we can log in as this user. + $account->pass_raw = $edit['pass']; + return $account; + } + +} \ No newline at end of file diff --git a/tests/test_files/mods_record.xml b/tests/test_files/mods_record.xml new file mode 100644 index 0000000..6ec2a1d --- /dev/null +++ b/tests/test_files/mods_record.xml @@ -0,0 +1,83 @@ + + + + + The + amazing Maurice and his educated rodents + + + Pratchett, Terry. + + creator + + + text + novel + + + enk + + + London + + Corgi Books + 2002 + 2001 + monographic + + + eng + + +
print
+ 269 p. ; 22 cm. +
+ A talking cat, intelligent rats, and a strange boy cooperate in a Pied Piper scam until they try to con the wrong town and are confronted by a deadly evil rat king. + juvenile + Terry Pratchett. + Carnegie Medal winner. + + Discworld (Imaginary place) + Fiction + + + Discworld (Imaginary place) + Fiction + + + Rats + Fiction + + + Cats + Fiction + + + Fantasy fiction + + + Humorous stories + + PZ7.P8865 Am 2002 + + + Discworld series + + + Pratchett, Terry. + + + 006001234X (library binding) + 0385601239 + 0552546933 (pbk.) + + CaNWHRN + 010730 + 20020314 .0 + + eng + + +
+
+ diff --git a/xml/book_collection_policy.xml b/xml/book_collection_policy.xml new file mode 100644 index 0000000..6969b5e --- /dev/null +++ b/xml/book_collection_policy.xml @@ -0,0 +1,22 @@ + + + + + + + dc.title + dc.creator + dc.description + dc.date + dc.identifier + dc.language + dc.publisher + dc.rights + dc.subject + dc.relation + dcterms.temporal + dcterms.spatial + Full Text + + isMemberOfCollection + \ No newline at end of file diff --git a/xml/ilives_jp2Sdep-pageCModel.xml b/xml/ilives_jp2Sdep-pageCModel.xml new file mode 100644 index 0000000..46447f1 --- /dev/null +++ b/xml/ilives_jp2Sdep-pageCModel.xml @@ -0,0 +1,175 @@ + + + + + + + + + + + + + + + +ingest + +fedoraAdmin +2009-11-12T14:57:00.246Z +Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdep-pageCModel.xml + + + +ingest + +fedoraAdmin +2010-06-01T00:46:19.239Z +Ingested from local file /Users/al/Desktop/ilives_jp2Sdep-pageCModel.xml + + + +modifyDatastreamByValue +RELS-EXT +fedoraAdmin +2010-06-01T00:48:39.302Z + + + + +ingest + +fedoraAdmin +2010-06-02T17:52:31.539Z +Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_jp2Sdep-pageCModel.xml + + + + + + + + + + ilives:jp2Sdep-pageCModel + ilives:jp2Sdep-pageCModel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DC + text/xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/xml/islandora_book_CollectionModel.xml b/xml/islandora_book_CollectionModel.xml new file mode 100644 index 0000000..41ffec3 --- /dev/null +++ b/xml/islandora_book_CollectionModel.xml @@ -0,0 +1,138 @@ + + + + + + + + + + + + + + + +ingest + +fedoraAdmin +2009-01-23T20:43:42.518Z +Created with Admin GUI "New Object" command + + + +modifyDatastreamByValue +RELS-EXT +fedoraAdmin +2009-01-23T20:45:33.190Z + + + + +modifyDatastreamByValue +DC +fedoraAdmin +2009-01-23T20:48:22.246Z + + + + +ingest + +fedoraAdmin +2009-01-26T20:27:14.697Z +Ingested from local file /opt/fedora/export/ilives_CollectionModel.xml + + + +ingest + +fedoraAdmin +2009-03-21T22:35:49.622Z +Ingested from local file /Volumes/iLives/iLivesTexts/215258_jpg/Content_Models/CollectionCModel.xml + + + +ingest + +admin +2009-09-14T14:09:41.955Z +Fedora Object Ingested + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + This DS-COMPOSITE-MODEL datastream is included as a starting point to + assist in the creation of a content model. The DS-COMPOSITE-MODEL + should define the datastreams that are required for any objects + conforming to this content model. + For more information about content models, see: + http://fedora-commons.org/confluence/x/dgBI. + For examples of completed content model objects, see the demonstration + objects included with your Fedora distribution, such as: + demo:CMImage, demo:UVA_STD_IMAGE, demo:DualResImageCollection, + demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC. + For more information about the demonstration objects, see: + http://fedora-commons.org/confluence/x/AwFI. + + +
+
+
+
+
+
+ + + + + IslandLives Collection Model + islandora-book:CollectionModel + + + + + + + IslandLives Collection + Made possible through a generous private donation, the IslandLives project builds on the Robertson Library’s mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI's ongoing commitment to making PEI's cultural and published heritage available to all. +Utilizing the library’s “Prince Edward Island Collection” and the latest in digitization technology, IslandLives will start by digitizing 300 or so published community histories dating from the mid-1800’s to the present day. These transformed community histories will form the basis of a rich online repository. +IslandLives will provide a variety of search interfaces that will allow users to browse and search the content by name, community, time period, and keyword. The Island community will have a whole new way to rediscover, search and share their stories. +This project will engage and build community – recruiting interested individuals from the cultural heritage community and everyday Islanders. Project staff will travel to communities and host ‘digitization days’, introducing community members to the project and its goals, providing them with an opportunity to digitize their own content, and to contribute their content to the IslandLives collection. + Robertson Library, University of Prince Edward Island + islandora-book:CollectionModel + + + + +
\ No newline at end of file diff --git a/xml/islandora_book_bookCModel.xml b/xml/islandora_book_bookCModel.xml new file mode 100644 index 0000000..c5fd740 --- /dev/null +++ b/xml/islandora_book_bookCModel.xml @@ -0,0 +1,2863 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T14:56:58.331Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_bookCModel.xml + + + + ingest + + fedoraAdmin + 2010-05-31T19:56:44.131Z + Ingested from source repository with pid islandora-book:bookCModel + + + + ingest + + fedoraAdmin + 2010-06-10T17:43:56.335Z + Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_bookCModel.xml + + + + addDatastream + ISLANDORACM + fedoraAdmin + 2010-06-10T19:01:39.144Z + DatastreamsPane generated this logMessage. + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2010-06-10T19:29:20.220Z + + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2010-06-10T19:46:24.930Z + + + + + ingest + + fedoraAdmin + 2010-06-16T11:27:32.059Z + Ingested from local file /Users/aoneill/Dropbox/fedora_repository/content_models/ilives_bookCModel.xml + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2010-06-16T11:29:54.285Z + + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2010-06-16T18:36:16.581Z + + + + + ingest + + fedoraAdmin + 2010-06-16T16:14:12.989Z + Ingested from local file /Applications/MAMP/htdocs/f3/sites/default/modules/fedora_repository/content_models/ilives_bookCModel.xml + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2010-09-16T17:43:54.445Z + + + + + ingest + + admin + 2011-07-06T17:16:54.682Z + Fedora Object Ingested + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2011-07-06T17:52:12.495Z + + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2011-07-06T18:34:55.951Z + + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2011-07-08T16:53:57.068Z + + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2011-07-08T17:52:00.689Z + + + + + modifyDatastreamByValue + ISLANDORACM + fedoraAdmin + 2011-07-08T18:28:14.022Z + + + + + + + + + + + + + + + + + + + + + + + + This DS-COMPOSITE-MODEL datastream is included as a starting point to + assist in the creation of a content model. The DS-COMPOSITE-MODEL + should define the datastreams that are required for any objects + conforming to this content model. + For more information about content models, see: + http://fedora-commons.org/confluence/x/dgBI. + For examples of completed content model objects, see the demonstration + objects included with your Fedora distribution, such as: + demo:CMImage, demo:UVA_STD_IMAGE, demo:DualResImageCollection, + demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC. + For more information about the demonstration objects, see: + http://fedora-commons.org/confluence/x/AwFI. + + +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+ +
+
+
+
+
+
+ + + + + Book Content Model + islandora-book:bookCModel + + + + + + + + + + image/tiff + image/tif + + + + + ilives + plugins/herbarium.inc + Herbarium + showFieldSets + + + + + + + + text/xml + + + ilives + book.inc + IslandoraBook + ingestBook + MODS + + + + + + + ilives + book.inc + IslandoraBook + buildDrupalForm + handleIngestForm + + + + + ilives + book.inc + IslandoraBook + buildEditMetadataForm + + + ilives + book.inc + IslandoraBook + handleEditMetadataForm + + + + + + + + + + image/tiff + image/tif + + + + + fedora_ilives + plugins/herbarium.inc + Herbarium + showFieldSets + + + + + + + + text/xml + + + fedora_ilives + book.inc + IslandoraBook + ingestBook + MODS + + + + + + + fedora_ilives + book.inc + IslandoraBook + buildDrupalForm + handleIngestForm + + + + + fedora_ilives + book.inc + IslandoraBook + buildEditMetadataForm + + + fedora_ilives + book.inc + IslandoraBook + handleEditMetadataForm + + + + + + + + + + image/tiff + + + + + fedora_ilives + plugins/herbarium.inc + Herbarium + showFieldSets + + + + + + + + text/xml + + + fedora_ilives + book.inc + IslandoraBook + ingestBook + MODS + + + + + + + fedora_ilives + book.inc + IslandoraBook + buildDrupalForm + handleIngestForm + + + + + fedora_ilives + book.inc + IslandoraBook + buildEditMetadataForm + + + fedora_ilives + book.inc + IslandoraBook + handleEditMetadataForm + + + + + + + + + + image/tiff + + + + + fedora_ilives + book.inc + IslandoraBook + showFieldSets + + + + + + + + + text/xml + + + fedora_ilives + book.inc + IslandoraBook + ingestBook + MODS + + + + + + + fedora_ilives + book.inc + IslandoraBook + buildDrupalForm + handleIngestForm + + + + + fedora_ilives + book.inc + IslandoraBook + buildEditMetadataForm + + + fedora_ilives + book.inc + IslandoraBook + handleEditMetadataForm + + + + + + + + + + text/xml + + + + + fedora_ilives + book.inc + IslandoraBook + showFieldSets + + + + + + + + text/xml + + + fedora_ilives + book.inc + IslandoraBook + ingestBook + MODS + + + + + + + fedora_ilives + book.inc + IslandoraBook + buildDrupalForm + handleIngestForm + + + + + fedora_ilives + book.inc + IslandoraBook + buildEditMetadataForm + + + fedora_ilives + book.inc + IslandoraBook + handleEditMetadataForm + + + + + + + + + + text/xml + + + + text/xml + + + + + + + + + + + + + + + + + + + + + + + + + application/pdf + + + + application/pdf + + + + 100 + 120 + + + + + + + + + + + + + + + + + + + + + + + + + + The name given to the resource + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + experiment session + home recording + image + meeting + presentation + sound + text + + + + Examples include an abstract, table of contents, or free-text account of the content of the resource. + + + An entity, (including persons, organizations, or services), responsible for making the resource available. + + + An entity responsible for contributing to the content of the resource such as a person, organization or service. + + + Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) + + + Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. + + none + collection + dataset + event + image + interactive resource + model + party + physical object + place + service + software + sound + text + + + + A reference to a resource from which the present resource is derived. + + + A unique reference to the resource; In this instance, the accession number or collection number. + + + The language of the intellectual content of the resource. + + English + French + + + + Reference to a related resource. + + + Information about intellectual property rights, copyright, and various property rights. + + + + +
+ + Title + true + + + /mods:mods/mods:titleInfo[not(@type)]/mods:title + /mods:mods + <titleInfo><title>%value%</title></titleInfo> + + false + + + + Statement of Responsibility + + + /mods:mods/mods:note[@type="statement of responsibility"] + /mods:mods + <note type="statement of responsibility">%value%</note> + + + false + + + + Creator + + + Creator + + + mods:namePart[not(@type)] + namePart + + false + + + + Creator Dates + + + mods:namePart[@type='date'] + <namePart type="date">%value%</namePart> + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Contributor + + + Contributor + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + + + Corporate Creator + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Corporate Contributor + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + +
+ Origin Information + true + + + Place of Publication + + + mods:place/mods:placeTerm[@type='text'] + <place><placeTerm + type='text'>%value%</placeTerm></place> + + + false + + + + Publisher + + + mods:publisher + publisher + + false + + + + Date Issued + + + mods:dateIssued + <dateIssued keyDate="yes">%value%</dateIssued> + + false + + + + Other Date + + + mods:dateOther + dateOther + + false + + + + + + /mods:mods/mods:originInfo + /mods:mods + originInfo + + false + +
+ + Genre + MARC Genre Term List (marcgt): + http://www.loc.gov/standards/valuelist/marcgt.html + + + + /mods:mods/mods:genre[@type='marcgt'] + /mods:mods + <genre type="marcgt">%value%</genre> + + false + + + + Language + + + /mods:mods/mods:language/mods:languageTerm[@type='text'] + /mods:mods + <language><languageTerm + type="text">%value%</languageTerm></language> + + + false + + +
+ Physical Description + true + + + Extent + Include units (e.g., pages) + + + mods:extent + extent + + false + + + + Form + + + mods:form + form + + false + + + + Note - General + general physical note + + + mods:note[not(@type)] + note + + false + + + + + + /mods:mods/mods:physicalDescription + /mods:mods + physicalDescription + + false + +
+ + +
+ Subject(s) + true + + + Topic + key topic describing the photo (tab to add a new topic) + + + mods:topic + mods:topic + + false + + + +
+ + +
+
+
+
+
+ + + + + application/pdf + + + + application/pdf + + + + 100 + 120 + + + + + + + + + + + + + + + + + + + + + + + + + + The name given to the resource + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + experiment session + home recording + image + meeting + presentation + sound + text + + + + Examples include an abstract, table of contents, or free-text account of the content of the resource. + + + An entity, (including persons, organizations, or services), responsible for making the resource available. + + + An entity responsible for contributing to the content of the resource such as a person, organization or service. + + + Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) + + + Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. + + none + collection + dataset + event + image + interactive resource + model + party + physical object + place + service + software + sound + text + + + + A reference to a resource from which the present resource is derived. + + + A unique reference to the resource; In this instance, the accession number or collection number. + + + The language of the intellectual content of the resource. + + English + French + + + + Reference to a related resource. + + + Information about intellectual property rights, copyright, and various property rights. + + + + +
+ + Title + true + + + /mods:mods/mods:titleInfo[not(@type)]/mods:title + /mods:mods + <titleInfo><title>%value%</title></titleInfo> + + false + + + + Statement of Responsibility + + + /mods:mods/mods:note[@type="statement of responsibility"] + /mods:mods + <note type="statement of responsibility">%value%</note> + + + false + + + + Creator + + + Creator + + + mods:namePart[not(@type)] + namePart + + false + + + + Creator Dates + + + mods:namePart[@type='date'] + <namePart type="date">%value%</namePart> + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Contributor + + + Contributor + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + + + Corporate Creator + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Corporate Contributor + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + +
+ Origin Information + true + + + Place of Publication + + + mods:place/mods:placeTerm[@type='text'] + <place><placeTerm + type='text'>%value%</placeTerm></place> + + + false + + + + Publisher + + + mods:publisher + publisher + + false + + + + Date Issued + + + mods:dateIssued + <dateIssued keyDate="yes">%value%</dateIssued> + + false + + + + Other Date + + + mods:dateOther + dateOther + + false + + + + + + /mods:mods/mods:originInfo + /mods:mods + originInfo + + false + +
+ + Genre + MARC Genre Term List (marcgt): + http://www.loc.gov/standards/valuelist/marcgt.html + + + + /mods:mods/mods:genre[@type='marcgt'] + /mods:mods + <genre type="marcgt">%value%</genre> + + false + + + + Language + + + /mods:mods/mods:language/mods:languageTerm[@type='text'] + /mods:mods + <language><languageTerm + type="text">%value%</languageTerm></language> + + + false + + +
+ Physical Description + true + + + Extent + Include units (e.g., pages) + + + mods:extent + extent + + false + + + + Form + + + mods:form + form + + false + + + + Note - General + general physical note + + + mods:note[not(@type)] + note + + false + + + + + + /mods:mods/mods:physicalDescription + /mods:mods + physicalDescription + + false + +
+ + +
+ Subject(s) + true + + + Topic + key topic describing the photo (tab to add a new topic) + + + mods:topic + mods:topic + + false + + + +
+ + +
+
+
+
+
+ + + + + application/pdf + + + + application/pdf + + + + 100 + 120 + + + + + + + + + + + + + + + + + + + + + + + + + + The name given to the resource + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + experiment session + home recording + image + meeting + presentation + sound + text + + + + Examples include an abstract, table of contents, or free-text account of the content of the resource. + + + An entity, (including persons, organizations, or services), responsible for making the resource available. + + + An entity responsible for contributing to the content of the resource such as a person, organization or service. + + + Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) + + + Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. + + none + collection + dataset + event + image + interactive resource + model + party + physical object + place + service + software + sound + text + + + + A reference to a resource from which the present resource is derived. + + + A unique reference to the resource; In this instance, the accession number or collection number. + + + The language of the intellectual content of the resource. + + English + French + + + + Reference to a related resource. + + + Information about intellectual property rights, copyright, and various property rights. + + + + +
+ + Title + true + + + /mods:mods/mods:titleInfo[not(@type)]/mods:title + /mods:mods + <titleInfo><title>%value%</title></titleInfo> + + false + + + + Statement of Responsibility + + + /mods:mods/mods:note[@type="statement of responsibility"] + /mods:mods + <note type="statement of responsibility">%value%</note> + + + false + + + + Creator + + + Creator + + + mods:namePart[not(@type)] + namePart + + false + + + + Creator Dates + + + mods:namePart[@type='date'] + <namePart type="date">%value%</namePart> + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Contributor + + + Contributor + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + + + Corporate Creator + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Corporate Contributor + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + +
+ Origin Information + true + + + Place of Publication + + + mods:place/mods:placeTerm[@type='text'] + <place><placeTerm + type='text'>%value%</placeTerm></place> + + + false + + + + Publisher + + + mods:publisher + publisher + + false + + + + Date Issued + + + mods:dateIssued + <dateIssued keyDate="yes">%value%</dateIssued> + + false + + + + Other Date + + + mods:dateOther + dateOther + + false + + + + + + /mods:mods/mods:originInfo + /mods:mods + originInfo + + false + +
+ + Genre + MARC Genre Term List (marcgt): + http://www.loc.gov/standards/valuelist/marcgt.html + + + + /mods:mods/mods:genre[@type='marcgt'] + /mods:mods + <genre type="marcgt">%value%</genre> + + false + + + + Language + + + /mods:mods/mods:language/mods:languageTerm[@type='text'] + /mods:mods + <language><languageTerm + type="text">%value%</languageTerm></language> + + + false + + +
+ Physical Description + true + + + Extent + Include units (e.g., pages) + + + mods:extent + extent + + false + + + + Form + + + mods:form + form + + false + + + + Note - General + general physical note + + + mods:note[not(@type)] + note + + false + + + + + + /mods:mods/mods:physicalDescription + /mods:mods + physicalDescription + + false + +
+ + +
+ Subject(s) + true + + + Topic + key topic describing the photo (tab to add a new topic) + + + mods:topic + mods:topic + + false + + + +
+ + +
+
+
+
+
+ + + + + application/pdf + + + + application/pdf + + + + 100 + 120 + + + + + + + + + + + + + + + + + + + + + + + + + + The name given to the resource + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + experiment session + home recording + image + meeting + presentation + sound + text + + + + Examples include an abstract, table of contents, or free-text account of the content of the resource. + + + An entity, (including persons, organizations, or services), responsible for making the resource available. + + + An entity responsible for contributing to the content of the resource such as a person, organization or service. + + + Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) + + + Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. + + none + collection + dataset + event + image + interactive resource + model + party + physical object + place + service + software + sound + text + + + + A reference to a resource from which the present resource is derived. + + + A unique reference to the resource; In this instance, the accession number or collection number. + + + The language of the intellectual content of the resource. + + English + French + + + + Reference to a related resource. + + + Information about intellectual property rights, copyright, and various property rights. + + + + +
+ + Title + true + + + /mods:mods/mods:titleInfo[not(@type)]/mods:title + /mods:mods + <titleInfo><title>%value%</title></titleInfo> + + false + + + + Statement of Responsibility + + + /mods:mods/mods:note[@type="statement of responsibility"] + /mods:mods + <note type="statement of responsibility">%value%</note> + + + false + + + + Creator + + + Creator + + + mods:namePart[not(@type)] + namePart + + false + + + + Creator Dates + + + mods:namePart[@type='date'] + <namePart type="date">%value%</namePart> + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Contributor + + + Contributor + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + + + Corporate Creator + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Corporate Contributor + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + +
+ Origin Information + true + + + Place of Publication + + + mods:place/mods:placeTerm[@type='text'] + <place><placeTerm + type='text'>%value%</placeTerm></place> + + + false + + + + Publisher + + + mods:publisher + publisher + + false + + + + Date Issued + + + mods:dateIssued + <dateIssued keyDate="yes">%value%</dateIssued> + + false + + + + Other Date + + + mods:dateOther + dateOther + + false + + + + + + /mods:mods/mods:originInfo + /mods:mods + originInfo + + false + +
+ + Genre + MARC Genre Term List (marcgt): + http://www.loc.gov/standards/valuelist/marcgt.html + + + + /mods:mods/mods:genre[@type='marcgt'] + /mods:mods + <genre type="marcgt">%value%</genre> + + false + + + + Language + + + /mods:mods/mods:language/mods:languageTerm[@type='text'] + /mods:mods + <language><languageTerm + type="text">%value%</languageTerm></language> + + + false + + +
+ Physical Description + true + + + Extent + Include units (e.g., pages) + + + mods:extent + extent + + false + + + + Form + + + mods:form + form + + false + + + + Note - General + general physical note + + + mods:note[not(@type)] + note + + false + + + + + + /mods:mods/mods:physicalDescription + /mods:mods + physicalDescription + + false + +
+ + +
+ Subject(s) + true + + + Topic + key topic describing the photo (tab to add a new topic) + + + mods:topic + mods:topic + + false + + + +
+ + +
+
+
+
+
+ + + + + application/pdf + + + + application/pdf + + + + 100 + 120 + + + + + + + + + + + + + + + + + + + + + + + + + + The name given to the resource + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + + An entity primarily responsible for making the content of the resource such as a person, organization or service. + + experiment session + home recording + image + meeting + presentation + sound + text + + + + Examples include an abstract, table of contents, or free-text account of the content of the resource. + + + An entity, (including persons, organizations, or services), responsible for making the resource available. + + + An entity responsible for contributing to the content of the resource such as a person, organization or service. + + + Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23) + + + Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary. + + none + collection + dataset + event + image + interactive resource + model + party + physical object + place + service + software + sound + text + + + + A reference to a resource from which the present resource is derived. + + + A unique reference to the resource; In this instance, the accession number or collection number. + + + The language of the intellectual content of the resource. + + English + French + + + + Reference to a related resource. + + + Information about intellectual property rights, copyright, and various property rights. + + + + +
+ + Title + true + + + /mods:mods/mods:titleInfo[not(@type)]/mods:title + /mods:mods + <titleInfo><title>%value%</title></titleInfo> + + false + + + + Statement of Responsibility + + + /mods:mods/mods:note[@type="statement of responsibility"] + /mods:mods + <note type="statement of responsibility">%value%</note> + + + false + + + + Creator + + + Creator + + + mods:namePart[not(@type)] + namePart + + false + + + + Creator Dates + + + mods:namePart[@type='date'] + <namePart type="date">%value%</namePart> + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Contributor + + + Contributor + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='personal']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='personal'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + + + Corporate Creator + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='creator']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">creator</roleTerm></role></name> + + + false + + + + Corporate Contributor + + + Name + + + mods:namePart[not(@type)] + namePart + + false + + + + + + (/mods:mods/mods:name[@type='corporate']/mods:role[mods:roleTerm='contributor']/..) + /mods:mods + <name type='corporate'><role><roleTerm + authority="marcrelator" + type="text">contributor</roleTerm></role></name> + + + false + + +
+ Origin Information + true + + + Place of Publication + + + mods:place/mods:placeTerm[@type='text'] + <place><placeTerm + type='text'>%value%</placeTerm></place> + + + false + + + + Publisher + + + mods:publisher + publisher + + false + + + + Date Issued + + + mods:dateIssued + <dateIssued keyDate="yes">%value%</dateIssued> + + false + + + + Other Date + + + mods:dateOther + dateOther + + false + + + + + + /mods:mods/mods:originInfo + /mods:mods + originInfo + + false + +
+ + Genre + MARC Genre Term List (marcgt): + http://www.loc.gov/standards/valuelist/marcgt.html + + + + /mods:mods/mods:genre[@type='marcgt'] + /mods:mods + <genre type="marcgt">%value%</genre> + + false + + + + Language + + + /mods:mods/mods:language/mods:languageTerm[@type='text'] + /mods:mods + <language><languageTerm + type="text">%value%</languageTerm></language> + + + false + + +
+ Physical Description + true + + + Extent + Include units (e.g., pages) + + + mods:extent + extent + + false + + + + Form + + + mods:form + form + + false + + + + Note - General + general physical note + + + mods:note[not(@type)] + note + + false + + + + + + /mods:mods/mods:physicalDescription + /mods:mods + physicalDescription + + false + +
+ + +
+ Subject(s) + true + + + Topic + key topic describing the photo (tab to add a new topic) + + + mods:topic + mods:topic + + false + + + +
+ + +
+
+
+
+
+
+
\ No newline at end of file diff --git a/xml/islandora_book_collection.xml b/xml/islandora_book_collection.xml new file mode 100644 index 0000000..83ee7ee --- /dev/null +++ b/xml/islandora_book_collection.xml @@ -0,0 +1,47 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-05-14T19:32:21.132Z + Created with Admin GUI "New Object" command + + + + modifyDatastreamByValue + DC + fedoraAdmin + 2009-05-14T19:35:11.912Z + + + + + + + + + + + IslandLives Collection + islandora-book:collection + + + + + \ No newline at end of file diff --git a/xml/islandora_book_figuresCModel.xml b/xml/islandora_book_figuresCModel.xml new file mode 100644 index 0000000..7b63ae7 --- /dev/null +++ b/xml/islandora_book_figuresCModel.xml @@ -0,0 +1,20 @@ + + + + image/jpeg + + + + + fedora_ilives + image_rotator_tagger_block.inc + ShowILivesStreamsInFieldSets + showJPG + + + + image/jpeg + + + + diff --git a/xml/islandora_book_jp2Sdef.xml b/xml/islandora_book_jp2Sdef.xml new file mode 100644 index 0000000..2f95067 --- /dev/null +++ b/xml/islandora_book_jp2Sdef.xml @@ -0,0 +1,81 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T14:56:59.840Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdef.xml + + + + ingest + + admin + 2010-05-25T13:17:14.106Z + Fedora Object Ingested + + + + ingest + + fedoraAdmin + 2010-06-01T01:40:47.337Z + Ingested from local file /Users/al/fedora_repository/content_models/ilives_jp2Sdef.xml + + + + + + + + + + + + + + + + + + + + + islandora-book:jp2Sdef + islandora-book:jp2Sdef + + + + + + + + + + + + + + + diff --git a/xml/islandora_book_jp2Sdep-pageCModel.xml b/xml/islandora_book_jp2Sdep-pageCModel.xml new file mode 100644 index 0000000..679c521 --- /dev/null +++ b/xml/islandora_book_jp2Sdep-pageCModel.xml @@ -0,0 +1,179 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T14:57:00.246Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdep-pageCModel.xml + + + + ingest + + fedoraAdmin + 2010-06-01T00:46:19.239Z + Ingested from local file /Users/al/Desktop/ilives_jp2Sdep-pageCModel.xml + + + + modifyDatastreamByValue + RELS-EXT + fedoraAdmin + 2010-06-01T00:48:39.302Z + + + + + + + + + + + islandora-book:jp2Sdep-pageCModel + islandora-book:jp2Sdep-pageCModel + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + DC + text/xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/islandora_book_pageCModel.xml b/xml/islandora_book_pageCModel.xml new file mode 100644 index 0000000..05a59d4 --- /dev/null +++ b/xml/islandora_book_pageCModel.xml @@ -0,0 +1,101 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T14:57:00.652Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/islandora_book_pageCModel.xml + + + + + + + + + + + + + + + + + + + + + + + + + This DS-COMPOSITE-MODEL datastream is included as a starting point to + assist in the creation of a content model. The DS-COMPOSITE-MODEL + should define the datastreams that are required for any objects + conforming to this content model. + For more information about content models, see: + http://fedora-commons.org/confluence/x/dgBI. + For examples of completed content model objects, see the demonstration + objects included with your Fedora distribution, such as: + demo:CMImage, demo:UVA_STD_IMAGE, demo:DualResImageCollection, + demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC. + For more information about the demonstration objects, see: + http://fedora-commons.org/confluence/x/AwFI. + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + Page Content Model + islandora-book:pageCModel + + + + + diff --git a/xml/islandora_book_tei2htmlSdef.xml b/xml/islandora_book_tei2htmlSdef.xml new file mode 100644 index 0000000..3dd9b49 --- /dev/null +++ b/xml/islandora_book_tei2htmlSdef.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T14:57:01.057Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdef.xml + + + + + + + + + + + + + + + + + + + + + islandora-book:tei2htmlSdef + islandora-book:tei2htmlSdef + + + + + + + + + + + + + + diff --git a/xml/islandora_book_tei2htmlSdep-pageCModel.xml b/xml/islandora_book_tei2htmlSdep-pageCModel.xml new file mode 100644 index 0000000..c65eab0 --- /dev/null +++ b/xml/islandora_book_tei2htmlSdep-pageCModel.xml @@ -0,0 +1,233 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T14:57:01.366Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdep-pageCModel.xml + + + + modifyDatastreamByValue + XSL + fedoraAdmin + 2009-12-11T19:09:52.417Z + + + + + modifyDatastreamByValue + XSL + fedoraAdmin + 2009-12-11T19:22:11.096Z + + + + + + + + + + + + + + + + + + + + + + + + islandora-book:tei2htmlSdep-pageCModel + islandora-book:tei2htmlSdep-pageCModel + + + + + + + + + + TEI + text/xml + + + + XSL + text/xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <xsl:value-of select="normalize-space(tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title)"/> + + + + + + + + +
+ +
+
+ +

+ +

+
+ + + + + + + + + + + search persName + _blank + http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22 + + + %22+AND+dc.type:collection + + + + + + + + + + + + + search placeName + _blank + http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22 + %22+AND+dc.type:collection + + + + + + + search orgName + _blank + http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22 + %22+AND+dc.type:collection + + + + + +
+
+
+
+
diff --git a/xml/islandora_book_viewerSdef.xml b/xml/islandora_book_viewerSdef.xml new file mode 100644 index 0000000..cb0ea89 --- /dev/null +++ b/xml/islandora_book_viewerSdef.xml @@ -0,0 +1,64 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T17:09:29.912Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdef.xml + + + + + + + + + + + + + + + + + + + + + islandora-book:viewerSdef + islandora-book:viewerSdef + + + + + + + + + + + + + + diff --git a/xml/islandora_book_viewerSdep-bookCModel.xml b/xml/islandora_book_viewerSdep-bookCModel.xml new file mode 100644 index 0000000..7dbd25c --- /dev/null +++ b/xml/islandora_book_viewerSdep-bookCModel.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-12T17:09:41.797Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-bookCModel.xml + + + + + + + + + + islandora-book:viewerSdep-bookCModel + islandora-book:viewerSdep-bookCModel + + + + + + + + + + + + + + + + + + + + + + + DC + text/xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xml/islandora_book_viewerSdep-pageCModel.xml b/xml/islandora_book_viewerSdep-pageCModel.xml new file mode 100644 index 0000000..f2ee29f --- /dev/null +++ b/xml/islandora_book_viewerSdep-pageCModel.xml @@ -0,0 +1,133 @@ + + + + + + + + + + + + + + + + ingest + + fedoraAdmin + 2009-11-24T14:52:27.296Z + Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-pageCModel.xml + + + + + + + + + + + + + + + + + + + + + + + islandora-book:viewerSdep-pageCModel + islandora-book:viewerSdep-pageCModel + + + + + + + + + + + + + + + + + + + + + + + + + DC + text/xml + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/xsl/MODS3-22simpleDC.xsl b/xsl/MODS3-22simpleDC.xsl new file mode 100644 index 0000000..4a4eff8 --- /dev/null +++ b/xsl/MODS3-22simpleDC.xsl @@ -0,0 +1,409 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + : + + + + . + + + + . + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + + + + + - + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Collection + + + DataSet + + + Service + + + Software + + + Image + + + InteractiveResource + + + MovingImage + + + PhysicalObject + + + Sound + + + StillImage + + + Text + + + Text + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + -- + + + + + + + + + + + -- + + + + + + + + + + + + + + + + + + + + + + , + + + + , + + + + + ( + + ) + + + ( + + ) + + + + + + + + + - + + + + + - + + + + + + + + + + + + diff --git a/xsl/book_view.xsl b/xsl/book_view.xsl new file mode 100644 index 0000000..a8bfb82 --- /dev/null +++ b/xsl/book_view.xsl @@ -0,0 +1,65 @@ + + + + + + + + + + + + + + + + +

+ :

+

+ +

+
+
+ + fedora/repository//TN + + + + + +
+ + + + + + + + +
By Statement:
Place of Publication:
Publisher:
Date:
Language:
Pagination:
ISBN 10:
Subjects: + + fedora/ilives_book_search/mods.subject:""%20AND%20dc.type:collection%20AND%20dc.type:ingested + + +
+
+ + + + + + +
+ +
+
\ No newline at end of file diff --git a/xsl/pageResults.xsl b/xsl/pageResults.xsl new file mode 100644 index 0000000..fccee47 --- /dev/null +++ b/xsl/pageResults.xsl @@ -0,0 +1,160 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Total Hits = + + , + + +
We have repeated your search within this book and found results on the following pages. + +
+ + + + +
+ +
+
+ + + +
+ + + + + + + + + +
+
+
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fedora/ilives_book_viewer/ + + + Thumbnail + + + fedora/repository//TN + + + +
+ + + fedora/ilives_book_viewer/ + + +
+
+ + + + + + + +
+ + + + +   + + + + + + + +
diff --git a/xsl/results.xsl b/xsl/results.xsl new file mode 100644 index 0000000..0757ea1 --- /dev/null +++ b/xsl/results.xsl @@ -0,0 +1,344 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + Total Hits = , + Number of Hits/page = + + +
+ +
+ + + + + + + + +
+ +
+ +

Your search yielded no results

+ +
    +
  • Check if your spelling is correct.
  • + +
  • Remove quotes around phrases to match each word individually: "blue smurf" will match less than blue smurf.
  • +
  • Consider loosening your query with OR: blue smurf will match less than blue OR smurf.
  • +
+ +
+ +
+
+
+ + + +
+
+ + + + + + + + + + + + + + + + + + + + + + + + +
+ + + +
+ +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + fedora/ilives// + + + + fedora/repository//TN + + 100 + + + + + + + + + + + + + + + fedora/ilives// + + + + + + + + + + : + + + + + + + + + + + / + + + + + + + + + + + + + + : + + + + + + + , . + + + + + + + + + + + + + + + + + + + + + + + + + + + +