Browse Source

Merge branch 'ISLANDORA-278' into 6.x

Conflicts:
	CollectionClass.inc
	CollectionPolicy.inc
	ConnectionHelper.inc
	ContentModel.inc
	MimeClass.inc
	ObjectHelper.inc
	SearchClass.inc
	SecurityClass.inc
	api/dublin_core.inc
	api/fedora_collection.inc
	api/fedora_export.inc
	api/fedora_item.inc
	api/fedora_utils.inc
	api/rels-ext.inc
	api/tagging.inc
	fedora_repository.module
	formClass.inc
	form_elements/css/copyright.css
	form_elements/css/filechooser.css
	form_elements/css/list.css
	form_elements/css/people.css
	form_elements/css/sticky.css
	form_elements/css/ui-lightness/jquery-ui-1.8.4.custom.css
	form_elements/includes/autocomplete.inc
	form_elements/includes/creative_commons.inc
	form_elements/includes/filechooser.inc
	form_elements/includes/people.inc
	form_elements/islandora_form_elements.module
	form_elements/js/copyright.js
	form_elements/js/filechooser.js
	form_elements/js/jcarousellite_1.0.1.js
	form_elements/js/jquery.breakly-1.0.js
	form_elements/js/jquery.easing.1.1.js
	form_elements/js/jquery.loadImages.1.0.1.js
	form_elements/js/jquery.loadImages.1.0.1.min.js
	form_elements/js/jquery.mousewheel.min.js
	form_elements/js/jquery.tag.editor-min.js
	form_elements/js/jquery.ui.core.js
	form_elements/js/jquery.ui.datepicker.js
	form_elements/js/jquery.ui.widget.js
	form_elements/js/otherselect.js
	form_elements/js/people_ahah.js
	form_elements/xml/gacs.xml
	form_elements/xml/languages.xml
	plugins/CollectionFormBuilder.inc
	plugins/CreateCollection.inc
	plugins/DemoFormBuilder.inc
	plugins/DocumentConverter.inc
	plugins/Exiftool.inc
	plugins/Ffmpeg.inc
	plugins/Flv.inc
	plugins/FlvFormBuilder.inc
	plugins/FormBuilder.inc
	plugins/ImageManipulation.inc
	plugins/ModsFormBuilder.inc
	plugins/PersonalCollectionClass.inc
	plugins/QtFormBuilder.php
	plugins/Refworks.inc
	plugins/ShowDemoStreamsInFieldSets.inc
	plugins/ShowStreamsInFieldSets.inc
	plugins/fedoraObject.inc
	plugins/herbarium.inc
	plugins/map_viewer.inc
	plugins/qt_viewer.inc
	plugins/slide_viewer.inc
	plugins/tagging_form.inc
pull/7/head
Ben Woodhead 13 years ago
parent
commit
b3fa58db05
  1. 5
      CollectionClass.inc
  2. 15
      CollectionPolicy.inc
  3. 59
      ContentModel.inc
  4. 2
      MimeClass.inc
  5. 14
      ObjectHelper.inc
  6. 6
      SearchClass.inc
  7. 13
      XMLDatastream.inc
  8. 2
      api/fedora_collection.inc
  9. 54
      api/fedora_export.inc
  10. 30
      api/fedora_item.inc
  11. 8
      api/fedora_utils.inc
  12. 1
      api/rels-ext.inc
  13. 2
      api/tagging.inc
  14. 1
      collection_policies/COLLECTION-COLLECTION POLICY.xml
  15. 25
      collection_policies/PDF-COLLECTION POLICY.xml
  16. 1
      collection_policies/PERSONAL-COLLECTION-POLICY.xml
  17. 1
      collection_policies/book_collection_policy.xml
  18. 43
      collection_policies/qt_collection_policy.xml
  19. 1
      collection_policy.xsd
  20. 7
      collection_views/Coverflow_Collection_View.xsl
  21. 7
      collection_views/Coverflow_PRE_Collection_View.xsl
  22. 151
      collection_views/FLV-COLLECTION VIEW(2).xml
  23. 131
      collection_views/REFWORKS-COLLECTION_VIEW.xml
  24. 145
      collection_views/SIMPLE-COLLECTION_VIEW.xml
  25. 4
      collection_views/SmileyStuff-COLLECTION_VIEW.xml
  26. 4
      collection_views/Video-COLLECTION_VIEW.xml
  27. 135
      collection_views/default-sparqltoHtml.xsl
  28. 4
      collection_views/simple_list_view.xml
  29. 4
      collection_views/standard_jpeg_collection_view.xml
  30. 244
      collection_views/yui_coverflow/js/CoverFlow.js
  31. 87
      collection_views/yui_coverflow/js/test.js
  32. 2
      content_models/BASIC_AUDIO.xml
  33. 2
      content_models/BASIC_VIDEO.xml
  34. 1
      content_models/COLLECTIONCM.xml
  35. 1
      content_models/FAS_slideCModel.xml
  36. 2
      content_models/STANDARD PDF.xml
  37. 2
      content_models/STANDARD_FLVCM.xml
  38. 2
      content_models/STANDARD_IMAGECM.xml
  39. 33
      content_models/STANDARD_QT.xml
  40. 1
      content_models/STRICT_PDFCM.xml
  41. 15
      content_models/ilives_tei2htmlSdep-pageCModel.xml
  42. 294
      content_models/islandora_jp2Sdep-slideCModel.xml
  43. 20
      content_models/islandora_mods2htmlSdep.xml
  44. 71
      content_models/islandora_qtCModel.xml
  45. 154
      example_collection_views/MHL-sparqltoHtml.xsl
  46. 95
      example_collection_views/critter.xsl
  47. 151
      example_collection_views/flv-sparqltoHtml.xsl
  48. 147
      example_collection_views/mlp-sparqltoHtml.xsl
  49. 174
      example_collection_views/refworks.xsl
  50. 156
      example_collection_views/riri-sparqltoHtml.xsl
  51. 135
      example_collection_views/sparqltoHtml.xsl
  52. 5
      fedora_repository.install
  53. 50
      fedora_repository.module
  54. 11
      fedora_repository.solutionpacks.inc
  55. 17
      formClass.inc
  56. 5
      ilives/book.inc
  57. 3
      ilives/fedora_ilives.install
  58. 2
      ilives/fedora_ilives.module
  59. 33
      ilives/image_rotator_tagger_block.inc
  60. 4
      ilives/searchTerms.xml
  61. 19
      ilives/tests/fedora_ilives.test
  62. 193
      ilives/xml/ilives_CollectionModel.xml
  63. 90
      ilives/xml/ilives_collection.xml
  64. 15
      ilives/xml/ilives_tei2htmlSdep-pageCModel.xml
  65. 9
      ilives/xsl/MODS3-22simpleDC.xsl
  66. 183
      ilives/xsl/book_view.xsl
  67. 13
      ilives/xsl/pageResults.xsl
  68. 143
      ilives/xsl/results.xsl
  69. 1
      islandoracm.xsd
  70. 6
      js/AC_Quicktime.js
  71. 23
      js/printer_tool.js
  72. 51
      js/swfobject.js
  73. 1
      plugins/CollectionFormBuilder.inc
  74. 6
      plugins/DarwinCore.inc
  75. 1
      plugins/DemoFormBuilder.inc
  76. 15
      plugins/DocumentConverter.inc
  77. 2
      plugins/Exiftool.inc
  78. 6
      plugins/Ffmpeg.inc
  79. 2
      plugins/FlvFormBuilder.inc
  80. 6
      plugins/FormBuilder.inc
  81. 13
      plugins/ModsFormBuilder.inc
  82. 4
      plugins/PersonalCollectionClass.inc
  83. 4
      plugins/Refworks.inc
  84. 6
      plugins/ShowDemoStreamsInFieldSets.inc
  85. 10
      plugins/fedora_attach/fedora_attach.admin.inc
  86. 12
      plugins/fedora_attach/fedora_attach.install
  87. 52
      plugins/fedora_attach/fedora_attach.module
  88. 44
      plugins/fedora_imageapi.module
  89. 20
      plugins/herbarium.inc
  90. 27
      plugins/islandora_newspaper/Newspaper.inc
  91. 8
      plugins/islandora_newspaper/islandora_newspaper.module
  92. 1
      plugins/islandora_newspaper/newspapers_collection_policy.xml
  93. 3
      plugins/islandora_newspaper/newspapers_guardian.xml
  94. 1
      plugins/islandora_newspaper/newspapers_issueCModel_islandoracm.xml
  95. 3
      plugins/pidfield/pidfield.install
  96. 22
      plugins/pidfield/pidfield.module
  97. 26
      plugins/qt_viewer.inc
  98. 4
      searchTerms.xml
  99. 4
      solrSearchTerms.xml
  100. 5
      tests/fedora_repository.test
  101. Some files were not shown because too many files have changed in this diff Show More

5
CollectionClass.inc

@ -1,6 +1,5 @@
<?php
// $Id$
/**
* @file
@ -321,7 +320,7 @@ class CollectionClass {
$thisClass = new $phpClass ();
$returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
if (!$returnValue) {
drupal_set_message('Error! Failed running content model method !m !rv', array('!m' => $phpMethod, '!rv' => $returnValue));
drupal_set_message(t('Error! Failed running content model method !m !rv'), array('!m' => $phpMethod, '!rv' => $returnValue));
return FALSE;
}
}
@ -435,7 +434,7 @@ class CollectionClass {
module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass');
$personalCollectionClass = new PersonalCollectionClass();
if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) {
drupal_set_message("Did not create a personal collection object for !u", array('!u' => $user->name));
drupal_set_message(t("Did not create a personal collection object for !u"), array('!u' => $user->name));
return FALSE; //creation failed don't save the collection pid in drupal db
}
user_save($user, $personal_collection_pid);

15
CollectionPolicy.inc

@ -1,7 +1,5 @@
<?php
// $Id$
/**
* @file
* Collection Policy Class
@ -41,7 +39,7 @@ class CollectionPolicy extends XMLDatastream {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
try {
if (self::validPid($pid)) {
if (self::valid_pid($pid)) {
$dsid = CollectionPolicy::getDefaultDSID();
if ($preFetch) {
@ -49,7 +47,7 @@ class CollectionPolicy extends XMLDatastream {
$ds = $fedoraItem->get_datastream_dissemination($dsid);
}
else {
$ds = null;
$ds = NULL;
}
}
@ -364,7 +362,7 @@ class CollectionPolicy extends XMLDatastream {
*/
public function getNextPid($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
$namespace = FALSE;
for ($i = 0; $namespace === FALSE && $i < $content_models->length; $i++) {
@ -393,7 +391,10 @@ class CollectionPolicy extends XMLDatastream {
$ret = array();
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
for ($i = 0; $i < $content_models->length; $i++) {
$cm = ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'), $content_models->item($i)->getAttribute('dsid'), $content_models->item($i)->getAttribute('namespace'), $content_models->item($i)->getAttribute('name'));
$cm = ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'),
$content_models->item($i)->getAttribute('dsid'),
$content_models->item($i)->getAttribute('namespace'),
$content_models->item($i)->getAttribute('name'));
if ($cm !== FALSE) {
$ret[] = $cm;
}
@ -583,7 +584,7 @@ class CollectionPolicy extends XMLDatastream {
*/
function addModel($cm, $namespace) {
$ret = FALSE;
if (self::validPid($namespace) && $this->validate() && $cm->validate()) {
if (self::valid_pid($namespace) && $this->validate() && $cm->validate()) {
$contentmodelsEl = $this->xml->getElementsByTagName('content_models');
$models = $contentmodelsEl->item(0)->getElementsByTagName('content_model');
$found = FALSE;

59
ContentModel.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -38,7 +41,7 @@ class ContentModel extends XMLDatastream {
*/
public static function loadFromObject($pid) {
$ret = FALSE;
if (self::validPid($pid)) {
if (self::valid_pid($pid)) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper();
@ -199,9 +202,9 @@ class ContentModel extends XMLDatastream {
$ret = FALSE;
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
try {
if (self::validPid($pid)) {
if (self::valid_pid($pid)) {
$fedoraItem = new Fedora_Item($pid);
$dsid = ($dsid != NULL && self::validDsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
$dsid = ($dsid != NULL && self::valid_dsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
$ds = $fedoraItem->get_datastream_dissemination($dsid);
if (!empty($ds)) {
$ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name);
@ -475,7 +478,7 @@ class ContentModel extends XMLDatastream {
*/
private function getDSModel($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$result = $this->xml->getElementsByTagName('datastreams');
if ($result->length > 0) {
$result = $result->item(0)->getElementsByTagName('datastream');
@ -586,23 +589,23 @@ class ContentModel extends XMLDatastream {
$elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
$elements = $elementsEl->getElementsByTagName('element');
$found = FALSE;
$refEl = FALSE;
$ref_el = FALSE;
for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
if ($elements->item($i)->getAttribute('name') == trim($name)) {
if ($reorder == 'inc') {
$found = $elements->item($i);
$refEl = ($i > 0) ? $elements->item($i - 1) : false;
$ref_el = ($i > 0) ? $elements->item($i - 1) : FALSE;
}
else {
$found = ($i + 1 < $elements->length) ? $elements->item($i + 1) : FALSE;
$refEl = $elements->item($i);
$ref_el = $elements->item($i);
}
}
}
if ($found !== FALSE) {
$elementsEl->removeChild($found);
$elementsEl->insertBefore($found, $refEl);
$elementsEl->insertBefore($found, $ref_el);
$ret = TRUE;
}
}
@ -874,23 +877,23 @@ class ContentModel extends XMLDatastream {
$items = $authListEl->getElementsByTagName('item');
$found = FALSE;
$refEl = FALSE;
$ref_el = FALSE;
for ($i = 0; $found === FALSE && $i < $items->length; $i++) {
if ($items->item($i)->nodeValue == $value) {
if ($reorder == 'inc') {
$refEl = ($i > 0) ? $items->item($i - 1) : FALSE;
$ref_el = ($i > 0) ? $items->item($i - 1) : FALSE;
$found = $items->item($i);
}
else {
$refEl = $items->item($i);
$ref_el = $items->item($i);
$found = ($i + 1 < $items->length) ? $items->item($i + 1) : FALSE;
}
}
}
if ($found !== FALSE && $refEl !== FALSE) {
if ($found !== FALSE && $ref_el !== FALSE) {
$authListEl->removeChild($found);
$authListEl->insertBefore($found, $refEl);
$authListEl->insertBefore($found, $ref_el);
$ret = TRUE;
}
}
@ -1084,7 +1087,7 @@ class ContentModel extends XMLDatastream {
*/
public function buildEditMetadataForm($pid, $dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$method = $this->xml->getElementsByTagName('edit_metadata_method');
if ($method->length > 0 && $method->item(0)->getAttribute('dsid') == $dsid) {
$method = $method->item(0);
@ -1218,7 +1221,7 @@ class ContentModel extends XMLDatastream {
*/
public function updateEditMetadataMethod($module, $file, $class, $method, $handler, $dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$methodEl = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method');
if ($methodEl->length > 0) {
$methodEl = $methodEl->item(0);
@ -1248,7 +1251,7 @@ class ContentModel extends XMLDatastream {
*/
public function execAddDatastreamMethods($dsid, $file) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$addMethod = $ds->getElementsByTagName('add_datastream_method');
if ($addMethod->length > 0) {
$addMethod = $addMethod->item(0);
@ -1586,7 +1589,7 @@ class ContentModel extends XMLDatastream {
public function addDs($dsid, $display_in_fieldset = FALSE) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) {
$datastreamsEl = $this->xml->getElementsByTagName('datastreams');
if ($datastreamsEl->length > 0) {
$datastreamsEl = $datastreamsEl->item(0);
@ -1615,7 +1618,7 @@ class ContentModel extends XMLDatastream {
public function removeDs($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$datastreamsEl = $this->xml->getElementsByTagName('datastreams')->item(0);
$datastreamsEl->removeChild($ds);
$ret = TRUE;
@ -1630,7 +1633,7 @@ class ContentModel extends XMLDatastream {
*/
public function displayInFieldset($dsid) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$ret = strtolower($ds->getAttribute('display_in_fieldset')) == 'true';
}
return $ret;
@ -1644,7 +1647,7 @@ class ContentModel extends XMLDatastream {
*/
public function setDisplayInFieldset($dsid, $value = TRUE) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if ($value == FALSE && $ds->attributes->getNamedItem('display_in_fieldset') !== NULL) {
$ds->removeAttribute('display_in_fieldset');
$ret = TRUE;
@ -1669,7 +1672,7 @@ class ContentModel extends XMLDatastream {
public function setDefaultDispMeth($dsid, $module, $file, $class, $method) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$found = FALSE;
$dispMethods = $ds->getElementsByTagName('display_method');
for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
@ -1707,7 +1710,7 @@ class ContentModel extends XMLDatastream {
*/
public function removeDispMeth($dsid, $module, $file, $class, $method) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$found = FALSE;
$dispMethods = $ds->getElementsByTagName('display_method');
for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
@ -1739,7 +1742,7 @@ class ContentModel extends XMLDatastream {
*/
public function addDispMeth($dsid, $module, $file, $class, $method, $default = FALSE) {
$ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$dispMethEl = $this->xml->createElement('display_method');
$dispMethEl->setAttribute('module', $module);
$dispMethEl->setAttribute('file', $file);
@ -1853,7 +1856,7 @@ class ContentModel extends XMLDatastream {
*/
public function addIngestMethod($rule_id, $module, $file, $class, $method, $dsid, $modified_files_ext) {
$ret = FALSE;
if (self::validDsid($dsid) && ($rule = $this->getIngestRule($rule_id)) !== FALSE) {
if (self::valid_dsid($dsid) && ($rule = $this->getIngestRule($rule_id)) !== FALSE) {
$methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
$meth = $this->xml->createElement('ingest_method');
$meth->setAttribute('module', $module);
@ -2025,7 +2028,7 @@ class ContentModel extends XMLDatastream {
*/
public function addIngestRule($applies_to, $module, $file, $class, $method, $dsid, $modified_files_ext) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$ingestRulesEl = $this->xml->getElementsByTagName('ingest_rules')->item(0);
$rule = $this->xml->createElement('rule');
$ingestMethodsEl = $this->xml->createElement('ingest_methods');
@ -2107,7 +2110,7 @@ class ContentModel extends XMLDatastream {
*/
public function editIngestFormAttributes($dsid, $page, $hide_file_chooser = FALSE, $redirect = TRUE) {
$ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
$ingest_formEl->setAttribute('dsid', $dsid);
$ingest_formEl->setAttribute('page', $page);
@ -2274,7 +2277,7 @@ class ContentModel extends XMLDatastream {
$result->item(0)->appendChild($forms);
return TRUE;
}
else if ($result->length == 1) {
elseif ($result->length == 1) {
$element = $this->xml->importNode($element);
$result->item(0)->appendChild($element);
return TRUE;

2
MimeClass.inc

@ -3,7 +3,7 @@
// $Id$
/**
*
* @file
* This class inspired by Chris Jean's work, here:
* http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/
*

14
ObjectHelper.inc

@ -60,7 +60,7 @@ class ObjectHelper {
}
$headers = module_invoke_all('file_download', "/fedora/repository/$pid/$dsID");
if (in_array(-1, $headers)) {
drupal_set_message('hello');
drupal_set_message(t('hello'));
drupal_access_denied();
return ' ';
@ -383,7 +383,7 @@ class ObjectHelper {
$input = new DomDocument();
$input->loadXML(trim($xmlstr));
} catch (exception $e) {
watchdog(t("Fedora_Repository"), t("Problem loading XSL file: !e", array('!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Problem loading XSL file: !e", array('!e' => $e), NULL, WATCHDOG_ERROR);
}
$xsl = $proc->importStylesheet($xsl);
$newdom = $proc->transformToDoc($input);
@ -560,7 +560,7 @@ class ObjectHelper {
try {
$sxml = new SimpleXMLElement($content_models);
} catch (exception $e) {
watchdog(t("Fedora_Repository"), t("Could not find a parent object for %s", $pid), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Could not find a parent object for %s", $pid, NULL, WATCHDOG_ERROR);
return $pids;
}
@ -674,7 +674,7 @@ class ObjectHelper {
// $ingestObject = '<a title="'. t('Ingest a New object into ') . $collectionName . ' '. $collection_pid . '" href="'. base_path() .
$ingestObject = '<a title="' . t('Ingest a New object into !collection_name PID !collection_pid', array('!collection_name' => $collectionName, '!collection_pid' => $collection_pid)) . '" href="' . base_path() .
'fedora/ingestObject/' . $collection_pid . '/' . $collectionName . '"><img src="' . $base_url . '/' . $path .
'/images/ingest.png" alt="' . t('Add a New Object') . '" class="icon"></a>' . t(' Add to this Collection');
'/images/ingest.png" alt="' . t('Add a New Object') . '" class="icon"></a> ' . t('Add to this Collection');
}
}
}
@ -763,7 +763,7 @@ class ObjectHelper {
$parent_collections_HTML .= '<a href="' . $uri . '">' . $collection_label . '</a><br />';
}
if (!empty($parent_collections_HTML)) {
$parent_collections_HTML = '<tr><td><h3>' . t("Belongs to these collections: ") . '</h3></td><td colspan="4">' . $parent_collections_HTML . '</td></tr>';
$parent_collections_HTML = '<tr><td><h3>' . t("Belongs to these collections:") . ' </h3></td><td colspan="4">' . $parent_collections_HTML . '</td></tr>';
}
return $parent_collections_HTML;
@ -972,8 +972,8 @@ class ObjectHelper {
$warnMess = "Creation of one or more datastreams failed.<hr width='40%' align = 'left'/>";
$configMess = "Please ensure that %app is installed and configured for this site. ";
drupal_set_message($warnMess, 'warning', false);
drupal_set_message(t($configMess . "<br />" . $messMap[$app] . "<hr width='40%' align = 'left'/>", array('%app' => $app)), 'warning', false);
drupal_set_message($warnMess, 'warning', FALSE);
drupal_set_message(t($configMess . "<br />" . $messMap[$app] . "<hr width='40%' align = 'left'/>", array('%app' => $app)), 'warning', FALSE);
}
}

6
SearchClass.inc

@ -33,7 +33,7 @@ class SearchClass {
try {
$implementation = new $solrClass();
} catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("Error getting solr search results class: !message", array('!message' => $e->getMessage())), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Error getting solr search results class: !message", array('!message' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return 'Error getting solr search results class. Check watchdog for more info.';
}
return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
@ -367,7 +367,7 @@ class SearchClass {
$path = drupal_get_path('module', 'Fedora_Repository');
$test = $xslt_file;
$isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if (!isRestricted && $xslt_file == null) {
if (!isRestricted && $xslt_file == NULL) {
$xslt_file = '/xsl/unfilteredresults.xsl';
}
$proc = NULL;
@ -431,7 +431,7 @@ class SearchClass {
try {
$proc = new XsltProcessor();
} catch (Exception $e) {
drupal_set_message(t('Error loading results xslt! ') . $e->getMessage());
drupal_set_message(t('Error loading results xslt!') . " " . $e->getMessage());
return ' ';
}

13
XMLDatastream.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -31,7 +34,7 @@ abstract class XMLDatastream {
}
/**
* validPid
* valid_pid
* Validates a fedora PID based on the regexp provided in the fedora
* 3.3 documentation.
* http://www.fedora-commons.org/confluence/display/FCR30/Fedora+Identifiers
@ -39,7 +42,7 @@ abstract class XMLDatastream {
* @param String $pid
* @return boolean $valid
*/
public static function validPid($pid) {
public static function valid_pid($pid) {
$valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE;
@ -49,7 +52,7 @@ abstract class XMLDatastream {
}
/**
* validDsid
* valid_dsid
* Validates a fedora Dsid based on the the allowed XML standard NCName.
* The regexp is a "regular" subset of names allowed, it excludes some extended hex characters that are
* technically permitted.
@ -58,7 +61,7 @@ abstract class XMLDatastream {
* @param String $pid
* @return boolean $valid
*/
public static function validDsid($dsid) {
public static function valid_dsid($dsid) {
$valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE;

2
api/fedora_collection.inc

@ -56,7 +56,7 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio
}
}
else {
drupal_set_message("Error creating temp directory for batch export.", 'error');
drupal_set_message(t("Error creating temp directory for batch export."), 'error');
return FALSE;
}
return TRUE;

54
api/fedora_export.inc

@ -100,14 +100,14 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Remove rdf elements added during ingest (if present)
if ($remove_islandora) {
$xpath->registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
$descNode = $xpath->query("//rdf:RDF/rdf:Description")->item(0);
$desc_node = $xpath->query("//rdf:RDF/rdf:Description")->item(0);
if ($model = $descNode->getElementsByTagName('hasModel')->item(0)) {
$descNode->removeChild($model);
if ($model = $desc_node->getElementsByTagName('hasModel')->item(0)) {
$desc_node->removeChild($model);
}
if ($member = $descNode->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
$descNode->removeChild($member);
if ($member = $desc_node->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
$desc_node->removeChild($member);
}
}
@ -121,24 +121,24 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Update datastream uris
$xpath->registerNamespace('foxml', 'info:fedora/fedora-system:def/foxml#');
foreach ($xpath->query("//foxml:datastream[@ID]") as $dsNode) {
foreach ($xpath->query("//foxml:datastream[@ID]") as $ds_node) {
// Don't update datastreams having external uris
if (in_array($dsNode->getAttribute('CONTROL_GROUP'), $disallowed_groups)) {
if (in_array($ds_node->getAttribute('CONTROL_GROUP'), $disallowed_groups)) {
continue;
}
$dsId = $dsNode->getAttribute('ID');
$ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream
if ($dsId == "QUERY") {
$parentNode = $xpath->query('/foxml:digitalObject')->item(0);
$parentNode->removeChild($dsNode);
if ($ds_id == "QUERY") {
$parent_node = $xpath->query('/foxml:digitalObject')->item(0);
$parent_node->removeChild($ds_node);
}
foreach ($dsNode->getElementsByTagName('*') as $contentNode) {
if ($str = $contentNode->getAttribute('REF')) {
$contentNode->setAttribute('REF', url($paths[$dsId], array('absolute' => TRUE)));
foreach ($ds_node->getElementsByTagName('*') as $content_node) {
if ($str = $content_node->getAttribute('REF')) {
$content_node->setAttribute('REF', url($paths[$ds_id], array('absolute' => TRUE)));
}
}
}
@ -148,29 +148,29 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
case METS_11:
// Update datastream uris
$xpath->registerNamespace('METS', 'http://www.loc.gov/METS/');
foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $dsNode) {
foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $ds_node) {
$dsId = $dsNode->getAttribute('ID');
$ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream
if ($dsId == "QUERY") {
$parentNode = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
$parentNode->removeChild($dsNode);
if ($ds_id == "QUERY") {
$parent_node = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
$parent_node->removeChild($ds_node);
}
$xpath->registerNamespace('xlink', 'http://www.loc.gov/METS/');
foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $dsNode) as $Floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => TRUE)));
foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $ds_node) as $floc) {
$floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => TRUE)));
}
/*
foreach ($dsNode->getElementsByTagName('METS:file') as $contentNode) {
foreach ($ds_node->getElementsByTagName('METS:file') as $content_node) {
// Don't update datastreams having external uris
if (in_array($dsNode->getAttribute('OWNERID'), $disallowed_groups)) {
if (in_array($ds_node->getAttribute('OWNERID'), $disallowed_groups)) {
continue;
}
foreach ($xpath->('METS:FLocat[@xlink:href]', $contentNode) as $Floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => true)));
foreach ($xpath->('METS:FLocat[@xlink:href]', $content_node) as $floc) {
$floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => true)));
}
`}
*/
@ -201,8 +201,8 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
* @param type $mimeType
* @return type
*/
function get_file_extension($mimeType) {
return substr(strstr($mimeType, '/'), 1);
function get_file_extension($mime_type) {
return substr(strstr($mime_type, '/'), 1);
}
/**

30
api/fedora_item.inc

@ -1,6 +1,10 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -76,7 +80,7 @@ class Fedora_Item {
* @param type $logMessage
* @return type
*/
function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
if (empty($datastream_mimetype)) {
// Get mime type from the file extension.
@ -107,7 +111,7 @@ class Fedora_Item {
* @param type $logMessage
* @return type
*/
function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
if (empty($datastream_label)) {
$datastream_label = $datastream_id;
}
@ -125,7 +129,7 @@ class Fedora_Item {
'dsState' => 'A',
'checksumType' => 'DISABLED',
'checksum' => 'none',
'logMessage' => ($logMessage != null) ? $logMessage : 'Ingested object ' . $datastream_id
'logMessage' => ($logMessage != NULL) ? $logMessage : 'Ingested object ' . $datastream_id
);
@ -142,7 +146,7 @@ class Fedora_Item {
* @param type $logMessage
* @return type
*/
function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = null) {
function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = NULL) {
$dir = sys_get_temp_dir();
$tmpfilename = tempnam($dir, 'fedoratmp');
$tmpfile = fopen($tmpfilename, 'w');
@ -402,7 +406,7 @@ class Fedora_Item {
* @param type $as_of_date_time
* @return string
*/
function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = null) {
function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = NULL) {
$params = array(
'pid' => $this->pid,
'serviceDefinitionPid' => $service_definition_pid,
@ -546,7 +550,7 @@ class Fedora_Item {
try {
$relsext = $this->get_datastream_dissemination('RELS-EXT');
} catch (exception $e) {
drupal_set_message("Error retrieving RELS-EXT of object $pid", 'error');
drupal_set_message(t("Error retrieving RELS-EXT of object $pid"), 'error');
return $relationships;
}
@ -587,7 +591,7 @@ class Fedora_Item {
foreach ($relationships as $rel) {
if (empty($rel['subject']) || empty($rel['predicate']) || empty($rel['object']) || $rel['subject'] != 'info:fedora/' . $this->pid) {
// drupal_set_message should use parameterized variables, not interpolated.
drupal_set_message("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object'], "error");
drupal_set_message(t("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object']), "error");
return FALSE;
}
}
@ -727,7 +731,7 @@ class Fedora_Item {
* @param type $quiet
* @return type
*/
function modify_object($label = '', $state = null, $ownerId = null, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
function modify_object($label = '', $state = NULL, $ownerId = NULL, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
$params = array(
'pid' => $this->pid,
@ -828,7 +832,7 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
}
else {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
watchdog(t("FEDORA_REPOSITORY"), "Error trying to get SOAP client connection.");
return NULL;
}
} catch (exception $e) {
@ -841,7 +845,7 @@ class Fedora_Item {
drupal_set_message(t("Error trying to call SOAP function $function_name. Check watchdog logs for more information."), 'error');
}
watchdog(t("FEDORA_REPOSITORY"), t("Error Trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("FEDORA_REPOSITORY"), "Error Trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e), NULL, WATCHDOG_ERROR);
}
return NULL;
}
@ -854,13 +858,13 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
}
else {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
watchdog(t("FEDORA_REPOSITORY"), "Error trying to get SOAP client connection.");
return NULL;
}
} catch (exception $e) {
if (!$quiet) {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("FEDORA_REPOSITORY"), "Error trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e), NULL, WATCHDOG_ERROR);
}
return NULL;
}

8
api/fedora_utils.inc

@ -12,7 +12,7 @@
*/
if (!function_exists('str_getcsv')) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=null, $eol=null) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=NULL, $eol=NULL) {
$temp = fopen("php://memory", "rw");
fwrite($temp, $input);
fseek($temp, 0);
@ -109,7 +109,7 @@ function fix_encoding($in_str) {
* @param type $pid
* @return boolean
*/
function validPid($pid) {
function valid_pid($pid) {
$valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE;
@ -123,7 +123,7 @@ function validPid($pid) {
* @param type $dsid
* @return boolean
*/
function validDsid($dsid) {
function valid_dsid($dsid) {
$valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE;
@ -137,7 +137,7 @@ function validDsid($dsid) {
* @param type $dsid
* @return string
*/
function fixDsid($dsid) {
function fix_dsid($dsid) {
$new_dsid = trim($dsid);
$find = '/[^a-zA-Z0-9\.\_\-]/';

1
api/rels-ext.inc

@ -21,7 +21,6 @@ class RelsExt {
* the repository for the given Fedora_Item.
* @param Fedora_Item $item
*/
function RelsExt($item) {
$relsextxml = $item->get_datastream_dissemination('RELS-EXT');
}

2
api/tagging.inc

@ -69,7 +69,7 @@ class TagSet {
$this->item->modify_datastream_by_value($tagdoc->saveXML(), $this->tagsDSID, 'Tags', 'text/xml', 'X');
}
} catch (exception $e) {
drupal_set_message('There was an error saving the tags datastream: !e', array('!e' => $e), 'error');
drupal_set_message(t('There was an error saving the tags datastream: !e'), array('!e' => $e), 'error');
return FALSE;
}
return TRUE;

1
collection_policies/COLLECTION-COLLECTION POLICY.xml

@ -1,3 +1,4 @@
<collection_policy name="" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="Collection" namespace="islandora:collection" pid="islandora:collectionCModel"/>

25
collection_policies/PDF-COLLECTION POLICY.xml

@ -1 +1,24 @@
<?xml version="1.0" encoding="utf-8"?> <collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd"> <content_models> <content_model name="STANDARD_PDF" dsid="ISLANDORACM" namespace="islandora:spdf" pid="islandora:standard_pdf"/> <content_model name="STRICT_PDF" dsid="ISLANDORACM" namespace="islandora:strictpdf" pid="islandora:strict_pdf"/> <content_model name="REFWORKS_BATCH" dsid="ISLANDORACM" namespace="islandora:ref" pid="islandora:refworks_cm"/> </content_models> <search_terms> <term field="dc.title">dc.title</term> <term field="dc.creator">dc.creator</term> <term field="dc.description" default="true">dc.description</term> <term field="dc.date">dc.date</term> <term field="dc.identifier">dc.identifier</term> <term field="dc.language">dc.language</term> <term field="dc.publisher">dc.publisher</term> <term field="dc.rights">dc.rights</term> <term field="dc.subject">dc.subject</term> <term field="dc.relation">dc.relation</term> <term field="dcterms.temporal">dcterms.temporal</term> <term field="dcterms.spatial">dcterms.spatial</term> <term field="fgs.DS.first.text">Full Text</term> </search_terms> <relationship>isMemberOfCollection</relationship> </collection_policy>
<?xml version="1.0" encoding="utf-8"?>
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model name="STANDARD_PDF" dsid="ISLANDORACM" namespace="islandora:spdf" pid="islandora:standard_pdf"/>
<content_model name="STRICT_PDF" dsid="ISLANDORACM" namespace="islandora:strictpdf" pid="islandora:strict_pdf"/>
<content_model name="REFWORKS_BATCH" dsid="ISLANDORACM" namespace="islandora:ref" pid="islandora:refworks_cm"/>
</content_models>
<search_terms>
<term field="dc.title">dc.title</term>
<term field="dc.creator">dc.creator</term>
<term field="dc.description" default="true">dc.description</term>
<term field="dc.date">dc.date</term>
<term field="dc.identifier">dc.identifier</term>
<term field="dc.language">dc.language</term>
<term field="dc.publisher">dc.publisher</term>
<term field="dc.rights">dc.rights</term>
<term field="dc.subject">dc.subject</term>
<term field="dc.relation">dc.relation</term>
<term field="dcterms.temporal">dcterms.temporal</term>
<term field="dcterms.spatial">dcterms.spatial</term>
<term field="fgs.DS.first.text">Full Text</term>
</search_terms>
<relationship>isMemberOfCollection</relationship>
</collection_policy>

1
collection_policies/PERSONAL-COLLECTION-POLICY.xml

@ -1,3 +1,4 @@
<collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels>

1
collection_policies/book_collection_policy.xml

@ -1,3 +1,4 @@
<collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels>

43
collection_policies/qt_collection_policy.xml

@ -1,35 +1,48 @@
<?xml version="1.0" encoding="utf-8"?>
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model name="Video" dsid="ISLANDORACM" namespace="islandora" pid="islandora:qtCModel"/>
</content_models>
<search_terms>
<term field="dc.title">
dc.title</term>
dc.title
</term>
<term field="dc.creator">
dc.creator</term>
dc.creator
</term>
<term field="dc.description" default="true">
dc.description</term>
dc.description
</term>
<term field="dc.date">
dc.date</term>
dc.date
</term>
<term field="dc.identifier">
dc.identifier</term>
dc.identifier
</term>
<term field="dc.language">
dc.language</term>
dc.language
</term>
<term field="dc.publisher">
dc.publisher</term>
dc.publisher
</term>
<term field="dc.rights">
dc.rights</term>
dc.rights
</term>
<term field="dc.subject">
dc.subject</term>
dc.subject
</term>
<term field="dc.relation">
dc.relation</term>
dc.relation
</term>
<term field="dcterms.temporal">
dcterms.temporal</term>
dcterms.temporal
</term>
<term field="dcterms.spatial">
dcterms.spatial</term>
dcterms.spatial
</term>
</search_terms>
<relationship>
isMemberOfCollection</relationship>
</collection_policy>
isMemberOfCollection
</relationship>
</collection_policy>

1
collection_policy.xsd

@ -1,3 +1,4 @@
<xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.islandora.ca" elementFormDefault="qualified" >
<xsd:annotation>
<xsd:documentation xml:lang="en">

7
collection_views/Coverflow_Collection_View.xsl

@ -1,3 +1,4 @@
<xsl:stylesheet exclude-result-prefixes="php" version="1.0" xmlns:php="http://php.net/xsl"
xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){
window.onload = function(){
var images = [</xsl:text>
var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/>
@ -67,7 +69,8 @@
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text>
};
</xsl:text>
</script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/>

7
collection_views/Coverflow_PRE_Collection_View.xsl

@ -1,3 +1,4 @@
<xsl:stylesheet exclude-result-prefixes="php" version="1.0" xmlns:php="http://php.net/xsl"
xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){
window.onload = function(){
var images = [</xsl:text>
var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/>
@ -71,7 +73,8 @@
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text>
};
</xsl:text>
</script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/>

151
collection_views/FLV-COLLECTION VIEW(2).xml

@ -15,51 +15,82 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/">
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<table cellpadding="3" cellspacing="3" width="90%">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
<div STYLE="text-align: center;">
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -122,7 +182,7 @@
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:template>
<xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

131
collection_views/REFWORKS-COLLECTION_VIEW.xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -145,10 +205,14 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="($CONTENTMODEL='islandora:collectionCModel')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="s:title"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="s:content"/>
@ -164,9 +228,12 @@
</xsl:attribute>
</img> </a> <br clear="all" />-->
<br /><a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

145
collection_views/SIMPLE-COLLECTION_VIEW.xml

@ -18,48 +18,79 @@
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="s:sparql/s:results"/>
</table><br clear="all" />
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -145,28 +205,41 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="($CONTENTMODEL='islandora:collectionCModel')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="s:title"/>
</xsl:otherwise>
</xsl:choose>
<xsl:value-of select="s:content"/>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<br /><a>
<br />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

4
collection_views/SmileyStuff-COLLECTION_VIEW.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -51,7 +52,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

4
collection_views/Video-COLLECTION_VIEW.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -48,7 +49,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

135
collection_views/default-sparqltoHtml.xsl

@ -15,104 +15,169 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name='columns' select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/">
<xsl:template match="/">
<xsl:if test="$count>0">
<table>
<tr><td colspan="2">
<table>
<tr>
<td colspan="2">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td></tr>
</td>
</tr>
<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
<xsl:variable name='PID' select="substring-after($OBJECTURI,'/')"/>
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td>
</td>
<td>
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td></tr>
</td>
</tr>
</xsl:for-each>
</table>
<div align="center">
</table>
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -120,5 +185,5 @@
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:template>
</xsl:stylesheet>

4
collection_views/simple_list_view.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<!-- simple list view for a itql query that looks queries for $object and $title only -->
<xsl:template match="/">
@ -14,7 +15,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:title"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:title"/>
</xsl:attribute>
<xsl:value-of select="s:title"/>
</a>

4
collection_views/standard_jpeg_collection_view.xml

@ -1,3 +1,4 @@
<xsl:stylesheet version="1.0" xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/">
<xsl:variable name="BASEURL">
@ -50,7 +51,8 @@
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text>
<xsl:value-of select="$pid"/>/-/<xsl:value-of select="s:memberTitle"/>
<xsl:value-of select="$pid"/>/-/
<xsl:value-of select="s:memberTitle"/>
</xsl:attribute>
<xsl:value-of select="s:memberTitle"/>
</a>

244
collection_views/yui_coverflow/js/CoverFlow.js vendored

@ -19,7 +19,7 @@ YAHOO.namespace("ext");
//(function(){
/**
/**
* @class CoverFlow
* @namespace YAHOO.ext
* @constructor
@ -31,28 +31,28 @@ YAHOO.namespace("ext");
* config.bgColor {String} Background color. Could be in the form #00000 or black. Optional. Default: CoverFlow.DEFAULT_BG_COLOR.
*
*/
YAHOO.ext.CoverFlow = function(el, userConfig){
YAHOO.ext.CoverFlow = function(el, userConfig){
if(el)
this.init(el, userConfig || {});
};
};
//shortcuts
var CoverFlow = YAHOO.ext.CoverFlow;
var Dom = YAHOO.util.Dom;
//shortcuts
var CoverFlow = YAHOO.ext.CoverFlow;
var Dom = YAHOO.util.Dom;
/**
/**
* Defaults
*/
CoverFlow.DEFAULT_HEIGHT = 300;
CoverFlow.DEFAULT_WIDTH = 800;
CoverFlow.DEFAULT_BG_COLOR = '#000000';
CoverFlow.IMAGE_SEPARATION = 50;
CoverFlow.RIGHT = 'right';
CoverFlow.LEFT = 'left';
CoverFlow.LABEL_CLASS = 'coverFlowLabel';
CoverFlow.prototype = {
CoverFlow.DEFAULT_HEIGHT = 300;
CoverFlow.DEFAULT_WIDTH = 800;
CoverFlow.DEFAULT_BG_COLOR = '#000000';
CoverFlow.IMAGE_SEPARATION = 50;
CoverFlow.RIGHT = 'right';
CoverFlow.LEFT = 'left';
CoverFlow.LABEL_CLASS = 'coverFlowLabel';
CoverFlow.prototype = {
//Images array (it's a sort of transient var)
images: [],
//Items array {CoverFlowItem[]}
@ -122,9 +122,9 @@ YAHOO.namespace("ext");
this.element.appendChild(image);
//a shortcut to not create another context to call onload
var me = this;
// image.onload = function(){
// CoverFlow.preloadImage(me, this); // this = image
// };
// image.onload = function(){
// CoverFlow.preloadImage(me, this); // this = image
// };
YAHOO.util.Event.on(image, 'load', this.preloadImage, image, this);
image.src = img.src;
@ -203,15 +203,23 @@ YAHOO.namespace("ext");
},
attachEventListeners: function(){
new YAHOO.util.KeyListener(this.element, { keys:39 },
{ fn:this.selectNext,
new YAHOO.util.KeyListener(this.element, {
keys:39
},
{
fn:this.selectNext,
scope:this,
correctScope:true } ).enable();
correctScope:true
} ).enable();
new YAHOO.util.KeyListener(this.element, { keys:37 },
{ fn:this.selectPrevious,
new YAHOO.util.KeyListener(this.element, {
keys:37
},
{
fn:this.selectPrevious,
scope:this,
correctScope:true } ).enable();
correctScope:true
} ).enable();
},
@ -245,37 +253,61 @@ YAHOO.namespace("ext");
if(distance == 0){// selected
coverFlowItem.setZIndex(this.imageZIndex);
coverFlowItem.isSelected(false);
animateItems.push({item: coverFlowItem, attribute:{angle: {start: 0, end: this.perspectiveAngle} } });
animateItems.push({
item: coverFlowItem,
attribute:{
angle: {
start: 0,
end: this.perspectiveAngle
}
}
});
coverFlowItem = this.coverFlowItems[++i];
coverFlowItem.isSelected(true);
this.showLabel(coverFlowItem.getLabel());
animateItems.push({item: coverFlowItem, attribute:{angle: {start: this.perspectiveAngle, end: 0} } });
animateItems.push({
item: coverFlowItem,
attribute:{
angle: {
start: this.perspectiveAngle,
end: 0
}
}
});
}else{
animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION} }});
}
animateItems.push({
item: coverFlowItem,
attribute: {
left: {
start:coverFlowItem.getLeft(),
end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION
}
}
});
}
}
}
var animation = new CoverFlowAnimation({
var animation = new CoverFlowAnimation({
direction: CoverFlow.LEFT,
center: this.getCenter(),
startLeftPos: this.getLeftStart(),
startRightPos: this.getRightStart()
},
animateItems, 0.5);
},
animateItems, 0.5);
animation.onStart.subscribe(this.handleAnimationWorking, this);
animation.onComplete.subscribe(this.handleQueuedMove, this);
animation.onStart.subscribe(this.handleAnimationWorking, this);
animation.onComplete.subscribe(this.handleQueuedMove, this);
animation.animate();
animation.animate();
if(this.selectedItem + 1 < this.coverFlowItems.length)
if(this.selectedItem + 1 < this.coverFlowItems.length)
this.selectedItem++;
},
},
selectPrevious: function(){
selectPrevious: function(){
if(this.animationWorking){
this.moveQueue.push('moveRight');
return;
@ -292,40 +324,64 @@ YAHOO.namespace("ext");
coverFlowItem.setZIndex(this.selectedImageZIndex);
coverFlowItem.isSelected(true);
this.showLabel(coverFlowItem.getLabel());
animateItems.push({item: coverFlowItem, attribute: {angle: {start: this.perspectiveAngle, end: 0}}});
animateItems.push({
item: coverFlowItem,
attribute: {
angle: {
start: this.perspectiveAngle,
end: 0
}
}
});
coverFlowItem = this.coverFlowItems[++i];
coverFlowItem.isSelected(false);
coverFlowItem.setZIndex(this.imageZIndex);
animateItems.push({item: coverFlowItem, attribute: {angle: {start: 0, end: this.perspectiveAngle}}});
}else{
coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1);
animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION} }});
animateItems.push({
item: coverFlowItem,
attribute: {
angle: {
start: 0,
end: this.perspectiveAngle
}
}
});
}else{
coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1);
animateItems.push({
item: coverFlowItem,
attribute: {
left: {
start:coverFlowItem.getLeft(),
end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION
}
}
var animation = new CoverFlowAnimation({
});
}
}
}
var animation = new CoverFlowAnimation({
direction: CoverFlow.RIGHT,
center: this.getCenter(),
startLeftPos: this.getLeftStart(),
startRightPos: this.getRightStart()
},
animateItems, 0.5);
},
animateItems, 0.5);
animation.onStart.subscribe(this.handleAnimationWorking, this);
animation.onComplete.subscribe(this.handleQueuedMove, this);
animation.onStart.subscribe(this.handleAnimationWorking, this);
animation.onComplete.subscribe(this.handleQueuedMove, this);
animation.animate();
animation.animate();
if(this.selectedItem > 0)
if(this.selectedItem > 0)
this.selectedItem--;
},
},
handleAnimationWorking: function(a, b, cf){
handleAnimationWorking: function(a, b, cf){
cf.animationWorking = true;
},
},
handleQueuedMove: function(msg, data, cf){
handleQueuedMove: function(msg, data, cf){
cf.animationWorking = false;
var next = cf.moveQueue.pop();
@ -333,29 +389,29 @@ YAHOO.namespace("ext");
cf.selectNext();
if(next == 'moveRight')
cf.selectPrevious();
},
},
getCenter: function(){
getCenter: function(){
return this.containerWidth / 2;
},
},
getRightStart: function() {
getRightStart: function() {
return this.containerWidth - this.sideRatio * this.containerWidth;
},
},
getLeftStart: function() {
getLeftStart: function() {
return this.sideRatio * this.containerWidth;
},
},
sortCoverFlowItems: function(){
sortCoverFlowItems: function(){
function sortFunction(aCoverFlowItem, bCoverFlowItem){
return aCoverFlowItem.index - bCoverFlowItem.index;
}
this.coverFlowItems.sort(sortFunction);
},
},
createCoverFlowItems: function(){
createCoverFlowItems: function(){
this.coverFlowItems = [];
for(var i=0; i<this.images.length; i++){
var image = this.images[i];
@ -364,15 +420,18 @@ YAHOO.namespace("ext");
scaledHeight: this.scaleHeight(image),
reflectionRatio: this.reflectionRatio,
bgColor: this.backgroundColor,
onclick: {fn: this.select, scope: this}
onclick: {
fn: this.select,
scope: this
}
});
this.alignCenterHeight(coverFlowItem);
this.coverFlowItems.push(coverFlowItem);
};
delete this.images;
},
},
alignCenterHeight: function(coverFlowItem){//review!!!!!
alignCenterHeight: function(coverFlowItem){//review!!!!!
coverFlowItem.element.style.position = 'absolute';
var imageHeight = coverFlowItem.canvas.height / (1 + this.reflectionRatio);
@ -381,9 +440,9 @@ YAHOO.namespace("ext");
coverFlowItem.setTop(top);
},
},
scaleHeight: function(image){
scaleHeight: function(image){
var height = 0;
if(image.height <= this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
height = image.height;
@ -401,9 +460,9 @@ YAHOO.namespace("ext");
height = ((this.getMaxImageWidth() / image.width)) * image.height;
}
return height;
},
},
scaleWidth: function(image){
scaleWidth: function(image){
var width = 0;
if(image.height <= this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
width = image.width;
@ -421,37 +480,37 @@ YAHOO.namespace("ext");
width = ((this.getMaxImageWidth() / image.width)) * image.width;
}
return width;
},
},
getMaxImageHeight: function(){
getMaxImageHeight: function(){
return (this.containerHeight * this.imageHeightRatio);
},
},
getMaxImageWidth: function(){
getMaxImageWidth: function(){
return (this.containerWidth * this.imageWidthRatio);
},
},
getTopOffset: function(){
getTopOffset: function(){
return this.containerHeight * this.topRatio;
},
},
getFooterOffset: function(){
getFooterOffset: function(){
return this.containerHeight * (this.topRatio + this.imageHeightRatio);
}
};
}
};
/**
/**
* @class CoverFlowItem
*
*/
CoverFlowItem = function(image, config){
CoverFlowItem = function(image, config){
if(image)
this.init(image, config);
};
};
CoverFlowItem.prototype = {
CoverFlowItem.prototype = {
canvas: null,
element: null,
index: null,
@ -573,7 +632,8 @@ YAHOO.namespace("ext");
ctx.fillRect(0, 0, scaledWidth, scaledHeight);
//apply the background color to the gradient
ctx.globalCompositeOperation = 'destination-over';
ctx.fillStyle = bgColor; '#000';
ctx.fillStyle = bgColor;
'#000';
ctx.globalAlpha = 0.8;
ctx.fillRect(0, 0 , scaledWidth, scaledHeight);
ctx.restore();
@ -696,17 +756,17 @@ YAHOO.namespace("ext");
}
}
};
};
/**
/**
* @class CoverFlowAnimation
* @requires YAHOO.util.AnimMgr
*/
CoverFlowAnimation = function(config, animationItems, duration){
CoverFlowAnimation = function(config, animationItems, duration){
this.init(config, animationItems, duration);
};
};
CoverFlowAnimation.prototype = {
CoverFlowAnimation.prototype = {
direction: null,
center: null,
@ -931,6 +991,6 @@ YAHOO.namespace("ext");
}
}
}
};
};
//});

87
collection_views/yui_coverflow/js/test.js vendored

@ -4,33 +4,82 @@
YAHOO.util.Event.onDOMReady(function(){
var images = [
{src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
{src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'},
{src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
{src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
{src: 'images/msn2.jpg', label: 'My Mac'},
{src: 'images/msn2.jpg', label: 'My Mac again...'}
{
src: 'images/ardillitaMac.jpg',
label: 'Ardileta!',
onclick: function(){
alert('image1');
}
},
{
src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'
},
{
src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
},
{
src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
},
{
src: 'images/msn2.jpg',
label: 'My Mac'
},
{
src: 'images/msn2.jpg',
label: 'My Mac again...'
}
];
var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {height: 200, width: 600, images: images});
];
var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {
height: 200,
width: 600,
images: images
});
function moveLeft(e, coverFlow){
function moveLeft(e, coverFlow){
coverFlow.selectNext();
}
function moveRight(e, coverFlow){
}
function moveRight(e, coverFlow){
coverFlow.selectPrevious();
}
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {
onclick: {
fn: moveLeft,
obj: myCoverFlow
}
});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {
onclick: {
fn: moveRight,
obj: myCoverFlow
}
var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
});
var otherImages = [
{src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
{src: 'images/msn2.jpg', label: 'My Mac'},
{src: 'images/msn2.jpg', label: 'My Mac again...'}
var otherImages = [
{
src: 'images/ardillitaMac.jpg',
label: 'Ardileta!',
onclick: function(){
alert('image1');
}
},
{
src: 'images/msn2.jpg',
label: 'My Mac'
},
{
src: 'images/msn2.jpg',
label: 'My Mac again...'
}
];
var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {height: 150, width: 500, images: otherImages, bgColor: '#C0C0C0'});
];
var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {
height: 150,
width: 500,
images: otherImages,
bgColor: '#C0C0C0'
});

2
content_models/BASIC_AUDIO.xml

@ -215,4 +215,4 @@
</element>
</form_elements>
</ingest_form>
</content_model>
</content_model>

2
content_models/BASIC_VIDEO.xml

@ -215,4 +215,4 @@
</element>
</form_elements>
</ingest_form>
</content_model>
</content_model>

1
content_models/COLLECTIONCM.xml

@ -1,3 +1,4 @@
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Collection" version="2" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>

1
content_models/FAS_slideCModel.xml

@ -1,3 +1,4 @@
<content_model name="standard_slide">
<mimetypes>
<type>image/tiff</type>

2
content_models/STANDARD PDF.xml

@ -233,4 +233,4 @@
</element>
</form_elements>
</ingest_form>
</content_model>
</content_model>

2
content_models/STANDARD_FLVCM.xml

@ -215,4 +215,4 @@
</element>
</form_elements>
</ingest_form>
</content_model>
</content_model>

2
content_models/STANDARD_IMAGECM.xml

@ -268,4 +268,4 @@
</element>
</form_elements>
</ingest_form>
</content_model>
</content_model>

33
content_models/STANDARD_QT.xml

@ -53,12 +53,14 @@
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
@ -69,27 +71,32 @@
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
resource.
</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
available.
</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
2007-10-23)
</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
report, essay, dictionary.
</description>
<authoritative_list>
<item>none</item>
<item>video</item>
@ -108,16 +115,19 @@
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
present resource is derived.
</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
number.
</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
the resource.
</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
@ -129,7 +139,8 @@
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
rights.
</description>
</element>
</form_elements>
</ingest_form>

1
content_models/STRICT_PDFCM.xml

@ -1,3 +1,4 @@
<content_model name="strict_pdf" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>application/pdf</type>

15
content_models/ilives_tei2htmlSdep-pageCModel.xml

@ -197,8 +197,11 @@
<xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
<xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/>
</a>
</span>
@ -213,7 +216,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
@ -222,7 +227,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>

294
content_models/islandora_jp2Sdep-slideCModel.xml

@ -3,123 +3,123 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="islandora:jp2Sdep-slideCModel"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-11-27T18:25:48.654Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T20:58:05.234Z"/>
</foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2009-11-27T18:25:48.654Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:25:48.654Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>METHODMAP</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:30:03.064Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DSINPUTSPEC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:30:34.272Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>WSDL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:31:33.967Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:36:14.648Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-01-26T20:06:07.452Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/Desktop/tmp/islandora_jp2Sdep-slideCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-05T16:47:23.192Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-11T20:58:05.234Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT1.0" LABEL="RDF Statements about this object" CREATED="2009-11-27T18:25:48.726Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="618">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="islandora:jp2Sdep-slideCModel"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-11-27T18:25:48.654Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T20:58:05.234Z"/>
</foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2009-11-27T18:25:48.654Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:25:48.654Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>METHODMAP</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:30:03.064Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DSINPUTSPEC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:30:34.272Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>WSDL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:31:33.967Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:36:14.648Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-01-26T20:06:07.452Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/Desktop/tmp/islandora_jp2Sdep-slideCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-05T16:47:23.192Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-11T20:58:05.234Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT1.0" LABEL="RDF Statements about this object" CREATED="2009-11-27T18:25:48.726Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="618">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:jp2Sdep-slideCModel">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"></fedora-model:hasModel>
<fedora-model:isDeploymentOf rdf:resource="info:fedora/changeme-to-sDefPid"></fedora-model:isDeploymentOf>
<fedora-model:isContractorOf rdf:resource="info:fedora/changeme-to-cModelPid"></fedora-model:isContractorOf>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.1" LABEL="RDF Statements about this object" CREATED="2009-11-27T18:36:14.648Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="612">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.1" LABEL="RDF Statements about this object" CREATED="2009-11-27T18:36:14.648Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="612">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:jp2Sdep-slideCModel">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"></hasModel>
<isDeploymentOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/ilives:jp2Sdef"></isDeploymentOf>
<isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:slideCModel"></isContractorOf>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.2" LABEL="RDF Statements about this object" CREATED="2010-03-05T16:47:23.192Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="695">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.2" LABEL="RDF Statements about this object" CREATED="2010-03-05T16:47:23.192Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="695">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:jp2Sdep-slideCModel">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"></hasModel>
<isDeploymentOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/ilives:jp2Sdef"></isDeploymentOf>
<isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:slideCModel"></isContractorOf>
<isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:herbCModel"></isContractorOf>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.3" LABEL="RDF Statements about this object" CREATED="2010-03-11T20:58:05.234Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="825">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.3" LABEL="RDF Statements about this object" CREATED="2010-03-11T20:58:05.234Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="825">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:jp2Sdep-slideCModel">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"></hasModel>
<isDeploymentOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/ilives:jp2Sdef"></isDeploymentOf>
@ -127,23 +127,23 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:herbCModel"></isContractorOf>
<isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:mapCModel"></isContractorOf>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="METHODMAP" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="METHODMAP1.0" LABEL="Deployment Method Map" CREATED="2009-11-27T18:25:48.726Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" SIZE="298">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="METHODMAP" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="METHODMAP1.0" LABEL="Deployment Method Map" CREATED="2009-11-27T18:25:48.726Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" SIZE="298">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This METHODMAP datastream is included as a starting point to
assist in the creation of a service deployment. The METHODMAP
should define the the mapping of the WSDL to Fedora object methods.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="METHODMAP.1" LABEL="Deployment Method Map" CREATED="2009-11-27T18:30:03.064Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" SIZE="2498">
<foxml:xmlContent>
<fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" bDefPID="djatoka:bDef" name="MethodMap - djatoka Service Methods">
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="METHODMAP.1" LABEL="Deployment Method Map" CREATED="2009-11-27T18:30:03.064Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" SIZE="2498">
<foxml:xmlContent>
<fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" bDefPID="djatoka:bDef" name="MethodMap - djatoka Service Methods">
<fmm:Method operationName="getMetadata" wsdlMsgName="getMetadataRequest" wsdlMsgOutput="response">
<fmm:DefaultInputParm defaultValue="$PID" label="fedora object pid" parmName="PID" passBy="VALUE" required="true"></fmm:DefaultInputParm>
<fmm:DefaultInputParm defaultValue="JP2" label="content model" parmName="DSID" passBy="VALUE" required="true"></fmm:DefaultInputParm>
@ -165,35 +165,35 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="image/jpeg"></fmm:MethodReturnType>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DSINPUTSPEC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DSINPUTSPEC1.0" LABEL="Datastream Input Specification" CREATED="2009-11-27T18:25:48.726Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" SIZE="300">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DSINPUTSPEC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DSINPUTSPEC1.0" LABEL="Datastream Input Specification" CREATED="2009-11-27T18:25:48.726Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" SIZE="300">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This DSINPUTSPEC datastream is included as a starting point to
assist in the creation of a service deployment. The DSINPUTSPEC
should define the datastreams to be used by WSDL-defined methods.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="DSINPUTSPEC.1" LABEL="Datastream Input Specification" CREATED="2009-11-27T18:30:34.272Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" SIZE="401">
<foxml:xmlContent>
<fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec" label="jp2SdepInputSpec">
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="DSINPUTSPEC.1" LABEL="Datastream Input Specification" CREATED="2009-11-27T18:30:34.272Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" SIZE="401">
<foxml:xmlContent>
<fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec" label="jp2SdepInputSpec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC">
<fbs:DSInputLabel>DC</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction></fbs:DSInputInstruction>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="WSDL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="WSDL1.0" LABEL="WSDL Bindings" CREATED="2009-11-27T18:25:48.732Z" MIMETYPE="text/xml" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/" SIZE="752">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="WSDL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="WSDL1.0" LABEL="WSDL Bindings" CREATED="2009-11-27T18:25:48.732Z" MIMETYPE="text/xml" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/" SIZE="752">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This WSDL datastream is included as a starting point to
assist in the creation of a service deployment. The WSDL
should define the services provided by this
@ -206,11 +206,11 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="WSDL.1" LABEL="WSDL Bindings" CREATED="2009-11-27T18:31:33.967Z" MIMETYPE="text/xml" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/" SIZE="3258">
<foxml:xmlContent>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap" xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="djatoka" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Fedora Local Djatoka Service" targetNamespace="jp2SDep">
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="WSDL.1" LABEL="WSDL Bindings" CREATED="2009-11-27T18:31:33.967Z" MIMETYPE="text/xml" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/" SIZE="3258">
<foxml:xmlContent>
<wsdl:definitions xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/" xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap" xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="djatoka" xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema" name="Fedora Local Djatoka Service" targetNamespace="jp2SDep">
<wsdl:message name="getMetadataRequest">
<wsdl:part name="PID" type="xsd:string"></wsdl:part>
<wsdl:part name="DSID" type="xsd:string"></wsdl:part>
@ -261,17 +261,17 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2009-11-27T18:25:48.654Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="411">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2009-11-27T18:25:48.654Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="411">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>islandora:jp2Sdep-slideCModel</dc:title>
<dc:identifier>islandora:jp2Sdep-slideCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

20
content_models/islandora_mods2htmlSdep.xml

@ -435,27 +435,35 @@
</xsl:choose>
</xsl:template>
<xsl:template name="attr">
<xsl:for-each select="@type|@point">:<xsl:call-template name="longName">
<xsl:for-each select="@type|@point">:
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@authority or @edition">
<xsl:for-each select="@authority">(<xsl:call-template name="longName">
<xsl:for-each select="@authority">(
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@edition">Edition <xsl:value-of select="@edition"/>
</xsl:if>)</xsl:if>
<xsl:if test="@edition">Edition
<xsl:value-of select="@edition"/>
</xsl:if>)
</xsl:if>
<xsl:variable name="attrStr">
<xsl:for-each select="@*[local-name()!='edition' and local-name()!='type' and local-name()!='authority' and local-name()!='point']">
<xsl:value-of select="local-name()"/>="<xsl:value-of select="."/>",</xsl:for-each>
<xsl:value-of select="local-name()"/>="
<xsl:value-of select="."/>",
</xsl:for-each>
</xsl:variable>
<xsl:variable name="nattrStr" select="normalize-space($attrStr)"/>
<xsl:if test="string-length($nattrStr)">(<xsl:value-of select="substring($nattrStr,1,string-length($nattrStr)-1)"/>)</xsl:if>
<xsl:if test="string-length($nattrStr)">(
<xsl:value-of select="substring($nattrStr,1,string-length($nattrStr)-1)"/>)
</xsl:if>
</xsl:template>
</xsl:stylesheet>
</foxml:xmlContent>

71
content_models/islandora_qtCModel.xml

@ -3,27 +3,27 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Generic Content Model for Fedora Attach"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-01-26T21:29:20.416Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T21:01:44.921Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2010-01-26T21:29:20.416Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="396">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Generic Content Model for Fedora Attach"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-01-26T21:29:20.416Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T21:01:44.921Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2010-01-26T21:29:20.416Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="396">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Quicktime Content Model</dc:title>
<dc:identifier>islandora:qtCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="ISLANDORACM" CONTROL_GROUP="X" STATE="A" >
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="ISLANDORACM" CONTROL_GROUP="X" STATE="A" >
<foxml:datastreamVersion ID="ISLANDORACM.0" MIMETYPE="application/xml" LABEL="ISLANDORACM.0">
<foxml:xmlContent>
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_qt" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_qt" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>video/quicktime</type>
<type>video/mp4</type>
@ -76,12 +76,14 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
service.
</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
@ -92,27 +94,32 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
resource.
</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
available.
</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
service.
</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
2007-10-23)
</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
report, essay, dictionary.
</description>
<authoritative_list>
<item>none</item>
<item>video</item>
@ -131,16 +138,19 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
present resource is derived.
</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
number.
</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
the resource.
</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
@ -152,12 +162,13 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
rights.
</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:datastream>
</foxml:digitalObject>

154
example_collection_views/MHL-sparqltoHtml.xsl

@ -15,87 +15,147 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/">
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3">
<tr><td colspan="{$cellsPerRow}">
<table cellpadding="3" cellspacing="3">
<tr>
<td colspan="{$cellsPerRow}">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
<div align="center">
</table>
<br clear="all" />
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -103,7 +163,7 @@
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:template>
<xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr>
@ -124,30 +184,44 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/<xsl:value-of select="title"/>/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/
<xsl:value-of select="title"/>/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

95
example_collection_views/critter.xsl

@ -5,29 +5,92 @@
<xsl:template match="/">
<ul>
<li><b>Date Collected:</b><xsl:text> </xsl:text> <xsl:value-of select="/critters:sample/critters:date_collected"/></li>
<li><b>Type:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:type"/></li>
<li><b>Phylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:phylum"/></li>
<li><b>SubPhylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:SubPhylum"/></li>
<li><b>Class:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:class"/></li>
<li><b>Order:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:order"/></li>
<li><b>Family:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:family"/></li>
<li><b>Genus:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:genus"/></li>
<li><b>Species:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:species"/></li>
<li>
<b>Date Collected:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:date_collected"/>
</li>
<li>
<b>Type:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:type"/>
</li>
<li>
<b>Phylum:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:phylum"/>
</li>
<li>
<b>SubPhylum:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:SubPhylum"/>
</li>
<li>
<b>Class:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:class"/>
</li>
<li>
<b>Order:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:order"/>
</li>
<li>
<b>Family:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:family"/>
</li>
<li>
<b>Genus:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:genus"/>
</li>
<li>
<b>Species:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:taxonomy/critters:species"/>
</li>
</ul>
<h4>Collection Location</h4>
<ul>
<li><b>Site Name:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:sitename"/></li>
<li><b>Country:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:country"/></li>
<li><b>Region:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:region"/></li>
<li><b>Latitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:latitude"/></li>
<li><b>Longitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:longitude"/></li>
<li><b>Depth:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:depth"/><xsl:text> </xsl:text>Feet</li>
<li>
<b>Site Name:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:sitename"/>
</li>
<li>
<b>Country:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:country"/>
</li>
<li>
<b>Region:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:region"/>
</li>
<li>
<b>Latitude:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:latitude"/>
</li>
<li>
<b>Longitude:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:longitude"/>
</li>
<li>
<b>Depth:</b>
<xsl:text> </xsl:text>
<xsl:value-of select="/critters:sample/critters:site/critters:depth"/>
<xsl:text> </xsl:text>Feet
</li>
</ul>
<h4>Description</h4>
<div><xsl:value-of select="/critters:sample/critters:description"/></div>
<div>
<xsl:value-of select="/critters:sample/critters:description"/>
</div>
</xsl:template>
</xsl:stylesheet>

151
example_collection_views/flv-sparqltoHtml.xsl

@ -15,51 +15,82 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/">
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<table cellpadding="3" cellspacing="3" width="90%">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
<div STYLE="text-align: center;">
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -122,7 +182,7 @@
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:template>
<xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>

147
example_collection_views/mlp-sparqltoHtml.xsl

@ -15,87 +15,147 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/">
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3">
<tr><td colspan="{$cellsPerRow}">
<table cellpadding="3" cellspacing="3">
<tr>
<td colspan="{$cellsPerRow}">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
<div align="center">
</table>
<br clear="all" />
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -103,7 +163,7 @@
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:template>
<xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr>
@ -124,27 +184,38 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/<xsl:value-of select="title"/>/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/
<xsl:value-of select="title"/>/
<xsl:value-of select="title"/>
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img> <br clear="all" />
</img>
<br clear="all" />
<xsl:value-of select="$newTitle"/>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

174
example_collection_views/refworks.xsl

@ -6,27 +6,127 @@
<xsl:if test="/reference/jf">
<h2>General Information</h2>
<table cellpadding="2" cellspacing="2">
<tr><td ><strong>Periodical:</strong></td><td><xsl:value-of select="/reference/jf"/></td></tr>
<tr><td><strong>Abbreviation:</strong></td><td><xsl:value-of select="/reference/jo"/></td></tr>
<tr><td><strong>Volume:</strong></td><td><xsl:value-of select="/reference/vo"/></td></tr>
<tr><td><strong>Issue:</strong></td><td><xsl:value-of select="/reference/is"/></td></tr>
<tr><td><strong>Publisher:</strong></td><td><xsl:value-of select="/reference/pb"/></td></tr>
<tr><td><strong>Place of Publication:</strong></td><td><xsl:value-of select="/reference/pp"/></td></tr>
<tr><td><strong>Edition:</strong></td><td><xsl:value-of select="/reference/ed"/></td></tr>
<tr><td><strong>Year:</strong></td><td><xsl:value-of select="/reference/yr"/></td></tr>
<tr><td><strong>Date:</strong></td><td><xsl:value-of select="/reference/fd"/></td></tr>
<tr><td><strong>Start Page:</strong></td><td><xsl:value-of select="/reference/sp"/></td></tr>
<tr><td><strong>Other Pages:</strong></td><td><xsl:value-of select="/reference/op"/></td></tr>
<tr><td><strong>ISSN/ISBN:</strong></td><td><xsl:value-of select="/reference/sn"/></td></tr>
<tr><td><strong>Language:</strong></td><td><xsl:value-of select="/reference/la"/></td></tr>
<tr><td><strong>UL:</strong></td><td><xsl:value-of select="/reference/ul"/></td></tr>
<tr>
<td >
<strong>Periodical:</strong>
</td>
<td>
<xsl:value-of select="/reference/jf"/>
</td>
</tr>
<tr>
<td>
<strong>Abbreviation:</strong>
</td>
<td>
<xsl:value-of select="/reference/jo"/>
</td>
</tr>
<tr>
<td>
<strong>Volume:</strong>
</td>
<td>
<xsl:value-of select="/reference/vo"/>
</td>
</tr>
<tr>
<td>
<strong>Issue:</strong>
</td>
<td>
<xsl:value-of select="/reference/is"/>
</td>
</tr>
<tr>
<td>
<strong>Publisher:</strong>
</td>
<td>
<xsl:value-of select="/reference/pb"/>
</td>
</tr>
<tr>
<td>
<strong>Place of Publication:</strong>
</td>
<td>
<xsl:value-of select="/reference/pp"/>
</td>
</tr>
<tr>
<td>
<strong>Edition:</strong>
</td>
<td>
<xsl:value-of select="/reference/ed"/>
</td>
</tr>
<tr>
<td>
<strong>Year:</strong>
</td>
<td>
<xsl:value-of select="/reference/yr"/>
</td>
</tr>
<tr>
<td>
<strong>Date:</strong>
</td>
<td>
<xsl:value-of select="/reference/fd"/>
</td>
</tr>
<tr>
<td>
<strong>Start Page:</strong>
</td>
<td>
<xsl:value-of select="/reference/sp"/>
</td>
</tr>
<tr>
<td>
<strong>Other Pages:</strong>
</td>
<td>
<xsl:value-of select="/reference/op"/>
</td>
</tr>
<tr>
<td>
<strong>ISSN/ISBN:</strong>
</td>
<td>
<xsl:value-of select="/reference/sn"/>
</td>
</tr>
<tr>
<td>
<strong>Language:</strong>
</td>
<td>
<xsl:value-of select="/reference/la"/>
</td>
</tr>
<tr>
<td>
<strong>UL:</strong>
</td>
<td>
<xsl:value-of select="/reference/ul"/>
</td>
</tr>
</table>
</xsl:if>
<xsl:if test="/reference/t1">
<h2>Titles</h2>
<ul>
<xsl:for-each select="/reference/t1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -34,7 +134,9 @@
<ul>
<h3>Secondary Titles</h3>
<xsl:for-each select="/reference/t2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -42,7 +144,9 @@
<h2>Authors</h2>
<ul>
<xsl:for-each select="/reference/a1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -51,7 +155,9 @@
<ul>
<h3>Secondary Authors</h3>
<xsl:for-each select="/reference/a2">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
@ -59,34 +165,52 @@
<h2>Keywords</h2>
<ul>
<xsl:for-each select="/reference/k1">
<li><xsl:value-of select="."/></li>
<li>
<xsl:value-of select="."/>
</li>
</xsl:for-each>
</ul>
</xsl:if>
<xsl:if test="/reference/ab">
<h2>Abstract</h2>
<xsl:for-each select="/reference/ab">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:if test="/reference/no">
<h2>Notes</h2>
<xsl:for-each select="/reference/no">
<div><xsl:value-of select="."/> </div>
<div>
<xsl:value-of select="."/>
</div>
</xsl:for-each>
</xsl:if>
<xsl:variable name="ISSN">
<xsl:value-of select="/reference/sn"/>
</xsl:variable>
<xsl:variable name="BASEURL">
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=<xsl:value-of select="/reference/sn/text()"/>&amp;date=<xsl:value-of select="/reference/yr/text()"/>&amp;volume=<xsl:value-of select="/reference/vo/text()"/>&amp;issue=<xsl:value-of select="/reference/is/text()"/>&amp;spage=<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=<xsl:value-of select="/reference/t1"/>&amp;stitle=<xsl:value-of select="/reference/jf"/>
http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&amp;issn=
<xsl:value-of select="/reference/sn/text()"/>&amp;date=
<xsl:value-of select="/reference/yr/text()"/>&amp;volume=
<xsl:value-of select="/reference/vo/text()"/>&amp;issue=
<xsl:value-of select="/reference/is/text()"/>&amp;spage=
<xsl:value-of select="/reference/sp/text()"/>&amp;atitle=
<xsl:value-of select="/reference/t1"/>&amp;stitle=
<xsl:value-of select="/reference/jf"/>
</xsl:variable>
<br />
<xsl:if test="/reference/sn">
<div><a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/></xsl:attribute>
<div>
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/> </a></div>
<img src="http://asin1.its.unb.ca:8000/muse/images/getit4.gif"/>
</a>
</div>
</xsl:if>
</xsl:template>
</xsl:stylesheet>

156
example_collection_views/riri-sparqltoHtml.xsl

@ -15,51 +15,82 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/">
<xsl:template match="/">
<xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}">
<table cellpadding="3" cellspacing="3" width="90%">
<tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div> <br clear="all" />
</td></tr>
</div>
<br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>-
-->
<xsl:apply-templates select="sparql/results"/>
</table><br clear="all" />
<div STYLE="text-align: center;">
</table>
<br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -122,7 +182,7 @@
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:template>
<xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr>
@ -143,32 +203,46 @@
<xsl:variable name="linkUrl">
<xsl:choose>
<xsl:when test="(content='Collection' or content='Community')">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/OBJ/<xsl:value-of select="title"/>.pdf <!-- we know in riri that all OBJ streams are pdf so we can add the extension to tell browsers what it is-->
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/OBJ/
<xsl:value-of select="title"/>.pdf <!-- we know in riri that all OBJ streams are pdf so we can add the extension to tell browsers what it is-->
</xsl:otherwise>
</xsl:choose>
</xsl:variable>
<td valign="top" width="25%">
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/>
<xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute>
</img> </a> <br clear="all" />
</img>
</a>
<br clear="all" />
<a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/>
<xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute>
<xsl:value-of select="$newTitle"/>
</a>
<xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a>
<br />--
<a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
DETAILS
</a>--

135
example_collection_views/sparqltoHtml.xsl

@ -15,52 +15,82 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name='columns' select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/">
<xsl:template match="/">
<xsl:if test="$count>0">
<table width='100%'>
<tr><td colspan="2">
<table width='100%'>
<tr>
<td colspan="2">
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:otherwise>
</xsl:choose>
</div>
</td></tr>
</td>
</tr>
<!--select="//guestbook/entry[position()>=$start and $end>=position()]">-->
<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -68,52 +98,87 @@
<tr>
<td>
<img>
<xsl:attribute name="src"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td>
</td>
<td>
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:copy-of select="$PID"/>/-/<xsl:value-of select="title"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:copy-of select="$PID"/>/-/
<xsl:value-of select="title"/>
</xsl:attribute>
<xsl:value-of select="title"/>
</a>
</td></tr>
</td>
</tr>
</xsl:for-each>
</table>
<div align="center">
</table>
<div align="center">
<xsl:choose>
<xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when>
<xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>
</xsl:when>
<xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/>
of <xsl:value-of select="$count"/>&#160;<br />
<xsl:value-of select="$start"/>-
<xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page - 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page - 1"/>
</xsl:attribute>
&lt;&lt;Prev
</a>&#160;
<a>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/>/fedora/repository/<xsl:value-of select="$thisPid"/>/-/<xsl:value-of select="$thisTitle"/>/<xsl:value-of select="$page + 1"/>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>/fedora/repository/
<xsl:value-of select="$thisPid"/>/-/
<xsl:value-of select="$thisTitle"/>/
<xsl:value-of select="$page + 1"/>
</xsl:attribute>
Next>>
</a>
@ -121,5 +186,5 @@
</xsl:choose>
</div>
</xsl:if>
</xsl:template>
</xsl:template>
</xsl:stylesheet>

5
fedora_repository.install

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* @file fedora_repository.install
@ -59,7 +60,7 @@ function fedora_repository_requirements($phase) {
$requirements['fedora-repository']['value'] = t("Not available");
$requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR;
$requirements['fedora-repository']['description'] = t('Ensure that Fedora is running and that the <a href="@collection-settings">collection settings</a> are correct.',
array('@collection-settings' => $base_url.'/admin/settings/fedora_repository'));
array('@collection-settings' => $base_url . '/admin/settings/fedora_repository'));
}
else {
$requirements['fedora-repository']['value'] = t("Available");

50
fedora_repository.module

@ -53,7 +53,8 @@ function fedora_repository_purge_object($pid = NULL, $name = NULL) {
drupal_set_message(t('You must specify an object pid to purge an object.'), 'error');
return '';
}
$output = t('Are you sure you wish to purge object %name %pid!<br /><b>This cannot be undone</b><br />', array(
$output = t('Are you sure you wish to purge object %name %pid!<br /><b>This cannot be undone</b><br />',
array(
'%name' => $name,
'%pid' => $pid)
);
@ -93,8 +94,8 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
return '';
}
if (!validPid($collection_pid)) {
if (validPid(urldecode($collection_pid))) {
if (!valid_pid($collection_pid)) {
if (valid_pid(urldecode($collection_pid))) {
$collection_pid = urldecode($collection_pid);
}
else {
@ -286,7 +287,7 @@ function fedora_repository_purge_object_form(&$form_state, $pid, $referrer = NUL
function add_stream($collection_pid=NULL, $collectionName=NULL) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!validPid($collection_pid)) {
if (!valid_pid($collection_pid)) {
drupal_set_message(t("This PID is not valid!"), 'error');
return ' ';
}
@ -377,9 +378,9 @@ function add_stream_form_validate($form, &$form_state) {
return FALSE;
}
$validators = array(
// 'file_validate_is_image' => array(),
// 'file_validate_image_resolution' => array('85x85'),
// 'file_validate_size' => array(30 * 1024),
// 'file_validate_is_image' => array(),
// 'file_validate_image_resolution' => array('85x85'),
// 'file_validate_size' => array(30 * 1024),
);
$fileObject = file_save_upload('add-stream-file-location', $validators);
@ -403,7 +404,8 @@ function fedora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NULL)
return ' ';
}
$output = t('Are you sure you wish to purge this datastream %name<br />', array(
$output = t('Are you sure you wish to purge this datastream %name<br />',
array(
'%name' => $name)
);
$output .= drupal_get_form('fedora_repository_purge_stream_form', $pid, $dsId);
@ -706,12 +708,12 @@ function fedora_repository_access($op, $node, $account) {
*/
function makeObject($pid, $dsID) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!validPid($pid)) {
if (!valid_pid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error');
return ' ';
}
if (!validDsid($dsID)) {
if (!valid_dsid($dsID)) {
drupal_set_message(t("Invalid dsID!"), 'error');
return ' ';
}
@ -746,7 +748,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
global $user;
if (!fedora_available()) {
drupal_set_message('The Fedora repository server is currently unavailable. Please contact the site administrator.', 'warning', FALSE);
drupal_set_message(t('The Fedora repository server is currently unavailable. Please contact the site administrator.'), 'warning', FALSE);
return '';
}
@ -760,7 +762,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
return ' ';
}
if ($dsId & !validDsid($dsId)) {
if ($dsId & !valid_dsid($dsId)) {
drupal_set_message(t("Invalid dsID!"), 'error');
return ' ';
}
@ -877,7 +879,7 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU
$item = new Fedora_Item($pid);
if ($item !== false) {
if ($item !== FALSE) {
echo $item->get_dissemination($servicePid, $serviceMethod);
}
@ -1270,7 +1272,7 @@ function fedora_repository_demo_objects_form() {
);
foreach (array(
'islandora:collectionCModel' => 'Islandora default content models',
'islandora:collectionCModel' => 'Islandora default content models',
'islandora:top' => 'Islandora top-level collection',
'islandora:demos' => 'Islandora demos collection',
'islandora:largeimages' => 'Sample large image content model (requires <a href="http://sourceforge.net/projects/djatoka/">Djatoka</a> and <a href="http://www.kakadusoftware.com/index.php?option=com_content&task=view&id=26&Itemid=22">Kakadu</a>.)',
@ -1376,7 +1378,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$cmodel_collection->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_views/simple_list_view.xml', 'COLLECTION_VIEW', 'Collection View', 'text/xml', 'X');
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/contentModel.jpg', 'TN', 'Thumbnail', 'image/jpg', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:ContentModelCollection\">islandora:ContentModelCollection</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:ContentModelCollection\">islandora:ContentModelCollection</a>."), 'message');
} catch (exception $e) {
}
@ -1388,7 +1390,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/COLLECTION-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
try {
$tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:top\">islandora:top</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:top\">islandora:top</a>."), 'message');
} catch (exception $e) {
}
@ -1408,7 +1410,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/PDF-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
$tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Crystal_Clear_mimetype_pdf.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:demos\">islandora:demos</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:demos\">islandora:demos</a>."), 'message');
} catch (exception $e) {
}
@ -1430,7 +1432,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection');
try {
$cmstream = $dual_res_image_collection_cmodel->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/demo:SmileyStuff\">demo:SmileyStuff</a> collection view.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/demo:SmileyStuff\">demo:SmileyStuff</a> collection view."), 'message');
} catch (exception $e) {
}
@ -1449,14 +1451,14 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
try {
$item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/islandora_largeimages.xml');
$tn = $item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
drupal_set_message("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeimages\">islandora:largeimages</a>.", 'message');
drupal_set_message(t("Successfully installed <a href=\"" . $base_url . "/fedora/repository/islandora:largeimages\">islandora:largeimages</a>."), 'message');
} catch (exception $e) {
$error .= " - Problem ingesting islandora:largeimages collection";
}
}
if (!empty($error)) {
drupal_set_message('Some problems occurred: ' . $error);
drupal_set_message(t('Some problems occurred: ' . $error));
}
}
}
@ -1904,7 +1906,7 @@ function _fedora_repository_empty_basket() {
function fedora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFlag = FALSE) {
if ($warn && _is_added_to_basket($pid)) {
drupal_set_message("Object already in basket");
drupal_set_message(t("Object already in basket"));
}
if (!isset($_SESSION['basket'])) {
@ -1945,7 +1947,9 @@ function theme_add_to_basket_link($pid, $type = 'object') {
*/
if (!_is_added_to_basket($pid)) {
return l(
theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))), "fedora/repository/addToBasket/" . $path, array('html' => TRUE)
theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))),
"fedora/repository/addToBasket/" . $path,
array('html' => TRUE)
);
}
@ -1973,7 +1977,7 @@ function fedora_repository_batch_reingest_object($object, &$context) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!empty($object) && is_array($object)) {
$pid = $object['pid'];
if (!validPid($pid)) {
if (!valid_pid($pid)) {
return NULL;
}
// Does the object exist? If so, purge it.

11
fedora_repository.solutionpacks.inc

@ -1,7 +1,7 @@
<?php
/**
* @file
* Invokes a hook to any dependent modules asking them if their installations require
* any fedora objects to be present. Modules implementing this hook should return an array
* of arrays of the form:
@ -87,7 +87,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
if (!$item->exists()) {
$object_status = 'Missing';
$needs_install = TRUE;
} else {
}
else {
if (isset($object['dsid']) && isset($object['datastream_file']) && isset($object['dsversion'])) {
$datastreams = array(
array(
@ -96,7 +97,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
'dsversion' => $object['dsversion'],
),
);
} elseif (!empty($object['datastreams'])) {
}
elseif (!empty($object['datastreams'])) {
$datastreams = $object['datastreams'];
}
if (!empty($datastreams) && is_array($datastreams)) {
@ -137,7 +139,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
);
if (!$needs_install && !$needs_update) {
$form['install_status']['#value'] = theme_image('misc/watchdog-ok.png') . t('All required objects are installed and up-to-date.');
} else {
}
else {
$form['install_status']['#value'] = theme_image('misc/watchdog-warning.png') . t('Some objects must be re-ingested. See Objects list for details.');
}
$form['submit'] = array(

17
formClass.inc

@ -2,6 +2,14 @@
// $Id$
/**
* @file
* formClass class
*/
/**
* form Class
*/
class formClass {
function formClass() {
@ -237,7 +245,8 @@ class formClass {
$form['fedora_repository_url'] = array(
'#type' => 'textfield',
'#title' => t('Fedora RISearch URL'),
'#default_value' => variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'),
'#default_value' => variable_get('fedora_repository_url',
'http://localhost:8080/fedora/risearch'),
'#description' => t('The url of the Fedora server'), '#required' => TRUE,
'#weight' => 0
);
@ -437,10 +446,14 @@ class formClass {
try {
$object = $client->__soapCall('ModifyDatastreamByValue', array($params));
} catch (exception $e) {
drupal_set_message(t("Error updating metadata ") . $e->getMessage(), 'error');
drupal_set_message(t("Error updating metadata") . " " . $e->getMessage(), 'error');
}
}
/**
* queries the collection object for a childsecurity datastream and if found parses it
* to determine if this user is allowed to ingest in this collection
*/ we assume if they are able to modify objects in the collection they can ingest as well.
function can_ingest_here($collection_pid) {
module_load_include('inc', 'fedora_repository', 'SecurityClass');
$securityClass = new SecurityClass();

5
ilives/book.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
class IslandoraBook {

3
ilives/fedora_ilives.install

@ -1,5 +1,6 @@
<?php
// $Id$
/*
* @file fedora_ilives.install

2
ilives/fedora_ilives.module

@ -1,6 +1,6 @@
<?php
// $Id$
/*
* To change this template, choose Tools | Templates

33
ilives/image_rotator_tagger_block.inc

@ -1,7 +1,8 @@
<?php
// $Id$
/*
/**
* @file image_rotator_tagger_block.inc
*/
@ -25,27 +26,25 @@ and $object <dc:title> $title';
$resultsdoc->loadXML($results);
$resultslist = $resultsdoc->getElementsByTagName('result');
if ( $resultslist->length == 0 ) {
if ($resultslist->length == 0) {
return NULL;
}
//return htmlentities(substr($results, 0, 1000));
$randresult = $resultslist->item( rand()%$resultslist->length );
$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);
$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');
@ -67,10 +66,14 @@ function _fedora_image_rotator_tagger_block_content() {
$image_item = new Fedora_Item($result['pid']);
}
if (!empty ($result)) {
if (!empty($result)) {
$image = theme_image( . $base_url . '/fedora/imageapi/' . $result['pid'] . '/JPG?op=scale&height=500&width=300');
return '<p>'
. l( '<img src="'. $base_url . '/fedora/imageapi/'. $result['pid'] . '/JPG?op=scale&height=500&width=300" />', 'fedora/repository/'. $result['pid'], array('html' => TRUE, 'alias' => TRUE))
.'<p>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)) . '.'
. l('<img src="' . $base_url . '/fedora/imageapi/' . $result['pid'] . '/JPG?op=scale&height=500&width=300" />', 'fedora/repository/' . $result['pid'], array('html' => TRUE, 'alias' => TRUE))
//. l(t("!image", array(image => $image))
. '<p>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']) . '</p>';
}
else {
@ -78,20 +81,19 @@ function _fedora_image_rotator_tagger_block_content() {
}
}
/*
function fedora_ilives_preprocess_page(&$variables) {
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;
private $pid = NULL;
function ShowILivesStreamsInFieldSets($pid) {
//drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$this->pid=$pid;
$this->pid = $pid;
}
function showJPG() {
@ -104,4 +106,5 @@ class ShowILivesStreamsInFieldSets {
return theme('fieldset', $collection_fieldset)
. drupal_get_form('fedora_repository_image_tagging_form', $this->pid);
}
}

4
ilives/searchTerms.xml

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<search_terms>
<search_terms>
<!--define what fields we can query as part of the advanced search for this collection-->
<default>dc.title</default>
<number_of_results>1000</number_of_results>
@ -55,7 +55,7 @@
<field>tagUser</field>
<value>Tag Creator</value>
</term>-->
</search_terms>
</search_terms>

19
ilives/tests/fedora_ilives.test

@ -1,9 +1,11 @@
<?php
// $Id$
/*
* Tests the functions of the Fedora Repository module.
*/
/**
* @file
* Tests the functions of the Fedora Repository module.
*/
class FedoraBookTestCase extends DrupalWebTestCase {
@ -31,7 +33,6 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->drupalLogin($repository_user);
}
public function testBookCModel() {
@ -73,11 +74,10 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$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) );
$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');
@ -98,9 +98,9 @@ class FedoraBookTestCase extends DrupalWebTestCase {
if (!is_dir($file_dir)) {
mkdir($file_dir, 0777, TRUE);
}
$output_path = "$file_dir/$basename.". $this->randomName(10) . '.html';
$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));
$this->pass("$description: Contents of result page are " . l(t('here'), $output_path));
}
protected function drupalCreateFedoraUser($permissions = array('access comments', 'access content', 'post comments', 'post comments without approval')) {
@ -130,3 +130,4 @@ class FedoraBookTestCase extends DrupalWebTestCase {
}
}

193
ilives/xml/ilives_CollectionModel.xml

@ -3,94 +3,94 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="IslandLives Collection Model"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-01-23T20:43:42.518Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-09-14T14:09:41.955Z"/>
</foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2009-01-23T20:43:42.518Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:43:42.518Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:45:33.190Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:48:22.246Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-26T20:27:14.697Z</audit:date>
<audit:justification>Ingested from local file /opt/fedora/export/ilives_CollectionModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-03-21T22:35:49.622Z</audit:date>
<audit:justification>Ingested from local file /Volumes/iLives/iLivesTexts/215258_jpg/Content_Models/CollectionCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2009-09-14T14:09:41.955Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT1.0" LABEL="RDF Statements about this object" CREATED="2009-01-23T20:43:44.131Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="366">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="IslandLives Collection Model"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-01-23T20:43:42.518Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-09-14T14:09:41.955Z"/>
</foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2009-01-23T20:43:42.518Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:43:42.518Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:45:33.190Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:48:22.246Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-26T20:27:14.697Z</audit:date>
<audit:justification>Ingested from local file /opt/fedora/export/ilives_CollectionModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-03-21T22:35:49.622Z</audit:date>
<audit:justification>Ingested from local file /Volumes/iLives/iLivesTexts/215258_jpg/Content_Models/CollectionCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2009-09-14T14:09:41.955Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT1.0" LABEL="RDF Statements about this object" CREATED="2009-01-23T20:43:44.131Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="366">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:CollectionModel">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0"></fedora-model:hasModel>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.1" LABEL="RDF Statements about this object" CREATED="2009-01-23T20:45:33.190Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="457">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.1" LABEL="RDF Statements about this object" CREATED="2009-01-23T20:45:33.190Z" MIMETYPE="application/rdf+xml" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" SIZE="457">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:CollectionModel">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ContentModel-3.0"></hasModel>
<hasMember xmlns="info:fedora/fedora-system:def/relations-external#" rdf:resource="ilives:lowerfreetown"></hasMember>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DS-COMPOSITE-MODEL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DS-COMPOSITE-MODEL1.0" LABEL="Datastream Composite Model" CREATED="2009-01-23T20:43:44.131Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0" SIZE="1120">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#">
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DS-COMPOSITE-MODEL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DS-COMPOSITE-MODEL1.0" LABEL="Datastream Composite Model" CREATED="2009-01-23T20:43:44.131Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0" SIZE="1120">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#">
<comment xmlns="info:fedora/fedora-system:def/comment#">
This DS-COMPOSITE-MODEL datastream is included as a starting point to
assist in the creation of a content model. The DS-COMPOSITE-MODEL
@ -109,30 +109,31 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<form MIME="text/xml"></form>
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2009-01-23T20:43:42.518Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="427">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2009-01-23T20:43:42.518Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="427">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>IslandLives Collection Model</dc:title>
<dc:identifier>ilives:CollectionModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="DC.1" LABEL="Dublin Core Record for this object" CREATED="2009-01-23T20:48:22.246Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="1812">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="DC.1" LABEL="Dublin Core Record for this object" CREATED="2009-01-23T20:48:22.246Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="1812">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>IslandLives Collection</dc:title>
<dc:description>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&apos;s ongoing commitment to making PEI&apos;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.</dc:description>
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.
</dc:description>
<dc:contributor>Robertson Library, University of Prince Edward Island</dc:contributor>
<dc:identifier>ilives:CollectionModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

90
ilives/xml/ilives_collection.xml

@ -3,54 +3,54 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="IslandLives Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-14T19:32:21.132Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-05-14T19:35:11.912Z"/>
</foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2009-05-14T19:32:21.132Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-05-14T19:32:21.132Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-05-14T19:35:11.912Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2009-05-14T19:32:21.132Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="392">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="IslandLives Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-14T19:32:21.132Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-05-14T19:35:11.912Z"/>
</foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="AUDIT.0" LABEL="Audit Trail for this object" CREATED="2009-05-14T19:32:21.132Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-05-14T19:32:21.132Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-05-14T19:35:11.912Z</audit:date>
<audit:justification></audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2009-05-14T19:32:21.132Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="392">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>IslandLives Collection</dc:title>
<dc:identifier>ilives:collection</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="DC.1" LABEL="Dublin Core Record for this object" CREATED="2009-05-14T19:35:11.912Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="783">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="DC.1" LABEL="Dublin Core Record for this object" CREATED="2009-05-14T19:35:11.912Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="783">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>IslandLives Collection</dc:title>
<dc:description>Made possible through a generous private donation, IslandLives contains community and church histories and it builds on the Robertson Library&apos;s mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI&quot;s ongoing commitment to making PEI&quot;s cultural and published heritage available to all. Welcome.</dc:description>
<dc:identifier>ilives:collection</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

15
ilives/xml/ilives_tei2htmlSdep-pageCModel.xml

@ -189,8 +189,11 @@
<xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
<xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/>
</a>
</span>
@ -205,7 +208,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
@ -214,7 +219,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>

9
ilives/xsl/MODS3-22simpleDC.xsl

@ -297,7 +297,8 @@ Version 1.0 2007-05-04 Tracy Meehleib <tmee@loc.gov>
<xsl:choose>
<xsl:when test="contains ('isbn issn uri doi lccn uri', $type)">
<dc:identifier>
<xsl:value-of select="$type"/>: <xsl:value-of select="."/>
<xsl:value-of select="$type"/>: 
<xsl:value-of select="."/>
</dc:identifier>
</xsl:when>
<xsl:otherwise>
@ -389,12 +390,14 @@ Version 1.0 2007-05-04 Tracy Meehleib <tmee@loc.gov>
<xsl:template match="mods:dateIssued[@point='start'] | mods:dateCreated[@point='start'] | mods:dateCaptured[@point='start'] | mods:dateOther[@point='start'] ">
<xsl:variable name="dateName" select="local-name()"/>
<dc:date>
<xsl:value-of select="."/>-<xsl:value-of select="../*[local-name()=$dateName][@point='end']"/>
<xsl:value-of select="."/>-
<xsl:value-of select="../*[local-name()=$dateName][@point='end']"/>
</dc:date>
</xsl:template>
<xsl:template match="mods:temporal[@point='start'] ">
<xsl:value-of select="."/>-<xsl:value-of select="../mods:temporal[@point='end']"/>
<xsl:value-of select="."/>-
<xsl:value-of select="../mods:temporal[@point='end']"/>
</xsl:template>
<xsl:template match="mods:temporal[@point!='start' and @point!='end'] ">

183
ilives/xsl/book_view.xsl

@ -2,64 +2,173 @@
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:mods="http://www.loc.gov/mods/v3">
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
</xsl:variable>
<xsl:variable name="PID">
<xsl:value-of select="$pid"/>
</xsl:variable>
<xsl:variable name="RECORDID">
</xsl:variable>
<xsl:variable name="RECORDID">
<xsl:value-of select='substring-after($PID,":")'/>
</xsl:variable>
</xsl:variable>
<xsl:variable name="USER" select="$userID"/>
<xsl:variable name="INGESTED" select="$ingested"/>
<xsl:template match="/">
<h1 ><xsl:value-of select="//mods:titleInfo/mods:nonSort"/><xsl:text> </xsl:text><xsl:value-of select="//mods:titleInfo/mods:title"/> <xsl:for-each select="//mods:titleInfo/mods:subTitle">
: <xsl:value-of select="."/></xsl:for-each></h1>
<xsl:for-each select="//mods:titleInfo[@type='alternative']/mods.title"><h3>
<h1 >
<xsl:value-of select="//mods:titleInfo/mods:nonSort"/>
<xsl:text> </xsl:text>
<xsl:value-of select="//mods:titleInfo/mods:title"/>
<xsl:for-each select="//mods:titleInfo/mods:subTitle">
:
<xsl:value-of select="."/>
</xsl:for-each>
</h1>
<xsl:for-each select="//mods:titleInfo[@type='alternative']/mods.title">
<h3>
<!-- <xsl:value-of select="substring-before(text(),'/')"/>-->
<xsl:value-of select="."/><xsl:text> </xsl:text> </h3>
<xsl:value-of select="."/>
<xsl:text> </xsl:text>
</h3>
</xsl:for-each>
<table cellpadding="3" cellspacing="2" valign="top" ><tr><td valign="top">
<table cellpadding="3" cellspacing="2" valign="top" >
<tr>
<td valign="top">
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PID"/>/TN
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PID"/>/TN
</xsl:attribute>
</img>
</td><td ><div style="align:left"><table cellpadding="3" cellspacing="2" width="90%" >
<tr><td align="right" valign="top"><b>By Statement: </b></td><td valign="top"><xsl:value-of select="//mods:note[@type='statement of responsibility']"/></td></tr>
<tr><td align="right" valign="top"><b>Place of Publication: </b></td ><td valign="top"><xsl:value-of select="//mods:placeTerm[@type='text']"/></td></tr>
<tr><td align="right" valign="top"><b>Publisher: </b></td><td valign="top"><xsl:value-of select="//mods:publisher"/></td></tr>
<tr><td align="right" valign="top"><b>Date: </b></td><td valign="top"><xsl:value-of select="//mods:dateIssued"/></td></tr>
<tr><td align="right" valign="top"><b>Language: </b></td><td valign="top"><xsl:value-of select="//mods:languageTerm"/></td></tr>
<tr><td align="right" valign="top"><b>Pagination: </b></td><td valign="top"><xsl:value-of select="//mods:extent"/></td></tr>
<tr><td align="right" valign="top"><b>ISBN 10: </b></td><td valign="top"><xsl:value-of select="//mods:identifier[@type='isbn']"/></td></tr>
<tr><td align="right" valign="top"><b>Subjects: </b></td><td valign="top"><xsl:for-each select="//mods:subject">
</td>
<td >
<div style="align:left">
<table cellpadding="3" cellspacing="2" width="90%" >
<tr>
<td align="right" valign="top">
<b>By Statement: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:note[@type='statement of responsibility']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Place of Publication: </b>
</td >
<td valign="top">
<xsl:value-of select="//mods:placeTerm[@type='text']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Publisher: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:publisher"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Date: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:dateIssued"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Language: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:languageTerm"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Pagination: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:extent"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>ISBN 10: </b>
</td>
<td valign="top">
<xsl:value-of select="//mods:identifier[@type='isbn']"/>
</td>
</tr>
<tr>
<td align="right" valign="top">
<b>Subjects: </b>
</td>
<td valign="top">
<xsl:for-each select="//mods:subject">
<xsl:for-each select="*">
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/mods.subject:"<xsl:value-of select="normalize-space(.)"/>"%20AND%20dc.type:collection%20AND%20dc.type:ingested
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/mods.subject:"
<xsl:value-of select="normalize-space(.)"/>"%20AND%20dc.type:collection%20AND%20dc.type:ingested
</xsl:attribute>
<xsl:value-of select="."/></a><xsl:text> </xsl:text></xsl:for-each><br /></xsl:for-each>
</td></tr>
</table></div></td><td valign="top">
<xsl:value-of select="."/>
</a>
<xsl:text> </xsl:text>
</xsl:for-each>
<br />
</xsl:for-each>
</td>
</tr>
</table>
</div>
</td>
<td valign="top">
<xsl:if test="$INGESTED = 'true'">
<div><a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:value-of select="$PID"/></xsl:attribute>Read</a>
</div></xsl:if>
<div>
<a><xsl:attribute name="href">http://islandpines.roblib.upei.ca/opac/en-CA/skin/roblib/xml/rdetail.xml?r=<xsl:value-of select="$RECORDID"/></xsl:attribute>
<div>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:value-of select="$PID"/>
</xsl:attribute>Read
</a>
</div>
</xsl:if>
<div>
<a>
<xsl:attribute name="href">http://islandpines.roblib.upei.ca/opac/en-CA/skin/roblib/xml/rdetail.xml?r=
<xsl:value-of select="$RECORDID"/>
</xsl:attribute>
Checkout
</a>
</div> <xsl:if test="$INGESTED = 'true'"><div>
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:value-of select="$PID"/>/PDF/<xsl:value-of select="$PID"/>.pdf</xsl:attribute>Download</a>
</div></xsl:if>
<xsl:if test="($USER > 0) and ($INGESTED = 'true')">
<div>
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>teieditor/<xsl:value-of select="$PID"/></xsl:attribute>Edit</a>
</div>
</xsl:if>
</td></tr></table>
</a>
</div>
<xsl:if test="$INGESTED = 'true'">
<div>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:value-of select="$PID"/>/PDF/
<xsl:value-of select="$PID"/>.pdf
</xsl:attribute>Download
</a>
</div>
</xsl:if>
<xsl:if test="($USER > 0) and ($INGESTED = 'true')">
<div>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>teieditor/
<xsl:value-of select="$PID"/>
</xsl:attribute>Edit
</a>
</div>
</xsl:if>
</td>
</tr>
</table>
</xsl:template>
</xsl:stylesheet>

13
ilives/xsl/pageResults.xsl

@ -118,21 +118,26 @@
<td valign="top" width="16%">
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:copy-of select="$PIDVALUE"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:copy-of select="$PIDVALUE"/>
</xsl:attribute>
<img>
<xsl:attribute name="alt">Thumbnail <xsl:copy-of select="$PIDVALUE"/></xsl:attribute>
<xsl:attribute name="alt">Thumbnail
<xsl:copy-of select="$PIDVALUE"/>
</xsl:attribute>
<xsl:attribute name="src">
<!--http://islandlives.ca:8080/adore-djatoka/resolver?url_ver=Z39.88-2004&amp;rft_id=http://islandlives.ca/fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/JP2/jp2.jp2&amp;svc_id=info:lanl-repo/svc/getRegion&amp;svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg2000&amp;svc.format=image/jpeg&amp;svc.level=0&amp;svc.rotate=0&amp;svc.region=0,0,100,100</xsl:attribute>
-->
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
</img>
</a>
<br />
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/<xsl:value-of select="$PIDVALUE"/>
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:value-of select="$PIDVALUE"/>
</xsl:attribute>
<xsl:value-of select="substring-before($DCTITLE, '-')"/>
<br />

143
ilives/xsl/results.xsl

@ -1,16 +1,16 @@
<?xml version="1.0" encoding="UTF-8"?>
<xsl:stylesheet xmlns:xsl="http://www.w3.org/1999/XSL/Transform" version="1.0" xmlns:php="http://php.net/xsl" exclude-result-prefixes="php">
<xsl:variable name="OBJECTSPAGE">
<xsl:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/>
</xsl:variable>
</xsl:variable>
<xsl:variable name="ALLOWEDNAMESPACES" select="$allowedPidNameSpaces"/>
<xsl:variable name="FULLQUERY" select="$fullQuery"/>
<!--<xsl:variable name="PATHTOMAKEIMAGE">
<xsl:value-of select="$pathToMakeImage"/>
</xsl:variable>-->
<xsl:template match="gfindObjects">
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:template match="gfindObjects">
<xsl:variable name="INDEXNAME" select="@indexName"/>
<xsl:variable name="PREQUERY" select="substring-before(@query,':')"/>
<xsl:variable name="QUERY" select="substring-after(@query,':')"/>
@ -38,11 +38,15 @@
<xsl:variable name="HITPAGENO" select="ceiling($HITPAGESTART div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGENOLAST" select="ceiling($HITTOTAL div $HITPAGESIZE)"/>
<xsl:variable name="HITPAGESTARTT" select="(($HITPAGENO - 1) * $HITPAGESIZE + 1)"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
Total Hits = <strong><xsl:value-of select="$HITTOTAL"/>,</strong>
Number of Hits/page = <xsl:value-of select="$HITPAGESIZE"/>
<xsl:choose>
<xsl:when test="$HITTOTAL > 0">
Total Hits =
<strong>
<xsl:value-of select="$HITTOTAL"/>,
</strong>
Number of Hits/page =
<xsl:value-of select="$HITPAGESIZE"/>
<!-- <br />You may not have sufficient privileges to view any or all of the items found. The objects you have rights to view will be shown below.-->
<!--Current page = <xsl:value-of select="@hitPageStart"/>-->
<br/>
@ -54,15 +58,24 @@
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -81,23 +94,32 @@
{
font-weight: bold
}
</style>
<xsl:apply-templates select="objects"/>
<xsl:if test="$HITTOTAL > $HITPAGESIZE">
</style>
<xsl:apply-templates select="objects"/>
<xsl:if test="$HITTOTAL > $HITPAGESIZE">
<div class="item-list">
<ul class="pager">
<xsl:if test="$HITPAGENO > 1">
<li class="pager-previous">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT - $HITPAGESIZE"/>
</xsl:attribute>
&lt; Previous
</a>
</li>
</xsl:if><xsl:text> </xsl:text>
</xsl:if>
<xsl:text> </xsl:text>
<xsl:if test="$HITPAGENO &lt; $HITPAGENOLAST">
<li class="pager-next">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/<xsl:value-of select="$FULLQUERY"/>/<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/></xsl:attribute>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_search/
<xsl:value-of select="$FULLQUERY"/>/
<xsl:value-of select="$HITPAGESTARTT+$HITPAGESIZE"/>
</xsl:attribute>
Next >
</a>
</li>
@ -105,33 +127,45 @@
</ul>
</div>
</xsl:if>
</xsl:when>
</xsl:when>
<xsl:otherwise>
<div class="box">
<h2>Your search yielded no results</h2>
<div class="content"><ul>
<li>Check if your spelling is correct.</li>
<div class="content">
<ul>
<li>Check if your spelling is correct.</li>
<li>Remove quotes around phrases to match each word individually: <em>"blue smurf"</em> will match less than <em>blue smurf</em>.</li>
<li>Consider loosening your query with <em>OR</em>: <em>blue smurf</em> will match less than <em>blue OR smurf</em>.</li>
</ul></div>
<li>Remove quotes around phrases to match each word individually:
<em>"blue smurf"</em> will match less than
<em>blue smurf</em>.
</li>
<li>Consider loosening your query with
<em>OR</em>:
<em>blue smurf</em> will match less than
<em>blue OR smurf</em>.
</li>
</ul>
</div>
</div>
</div>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
</xsl:choose>
</xsl:template>
<xsl:template match="objects">
<xsl:template match="objects">
<table cellpadding="3" cellspacing="3" width="100%"><div class="search-results">
<tr><td colspan="2">
<table cellpadding="3" cellspacing="3" width="100%">
<div class="search-results">
<tr>
<td colspan="2">
</td></tr>
</td>
</tr>
<xsl:for-each select="object">
<xsl:variable name="PIDVALUE">
<xsl:choose>
@ -156,9 +190,10 @@
</xsl:for-each>
</div></table>
</div>
</table>
</xsl:template>
</xsl:template>
<xsl:template name="splitBySpace">
<xsl:param name="str"/>
@ -199,7 +234,7 @@
</xsl:choose>
</xsl:template>
<xsl:template name="showResult">
<xsl:template name="showResult">
<xsl:param name="PIDVALUE"/>
<xsl:variable name="DCTITLE">
@ -209,15 +244,21 @@
<xsl:variable name="CLEANTITLE">
<xsl:value-of select="php:functionString('fedora_repository_urlencode_string', $DCTITLE)"/>
</xsl:variable>
<tr><td valign="top">
<tr>
<td valign="top">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/<xsl:copy-of select="$PIDVALUE"/>/<xsl:value-of select="$FULLQUERY"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/
<xsl:copy-of select="$PIDVALUE"/>/
<xsl:value-of select="$FULLQUERY"/>
</xsl:attribute>
<!--<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/><![CDATA[&pid=]]><xsl:value-of select="$PIDVALUE"/><![CDATA[&collection=object]]>
</xsl:attribute>-->
<img>
<xsl:attribute name="src"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/<xsl:copy-of select="$PIDVALUE"/>/TN
<xsl:attribute name="src">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:copy-of select="$PIDVALUE"/>/TN
</xsl:attribute>
<xsl:attribute name="height">100</xsl:attribute>
</img>
@ -234,17 +275,22 @@
<span class="searchtitle">
<a>
<xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/<xsl:value-of select="$PIDVALUE"/>/<xsl:value-of select="$FULLQUERY"/>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives/
<xsl:value-of select="$PIDVALUE"/>/
<xsl:value-of select="$FULLQUERY"/>
</xsl:attribute>
<xsl:for-each select="field[@name='mods.title']">
<!-- <xsl:value-of select="substring-before(text(),'/')"/>-->
<xsl:value-of select="node()"/><xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.subTitle']">
<span class="searchsubtitle">
<xsl:text> : </xsl:text><xsl:value-of select="node()"/>
<xsl:text> : </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
@ -255,35 +301,40 @@
<xsl:for-each select="field[@name='mods.sor']">
<span class="searchcreator">
<xsl:text> / </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> / </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.place_of_publication']">
<span class="searchpop">
<xsl:text> </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.publisher']">
<span class="searchpop">
<xsl:text> : </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> : </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.dateIssued']">
<span class="searchdateIssued">
<xsl:text>, </xsl:text> <xsl:value-of select="node()"/>.
<xsl:text>, </xsl:text>
<xsl:value-of select="node()"/>.
</span>
</xsl:for-each>
<xsl:for-each select="field[@name='mods.edition']">
<span class="searchedition">
<xsl:text> </xsl:text> <xsl:value-of select="node()"/>
<xsl:text> </xsl:text>
<xsl:value-of select="node()"/>
</span>
</xsl:for-each>
@ -339,6 +390,6 @@
</xsl:template>
</xsl:template>
</xsl:stylesheet>

1
islandoracm.xsd

@ -1,3 +1,4 @@
<xsd:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.islandora.ca" elementFormDefault="qualified">
<xsd:annotation>

6
js/AC_Quicktime.js

@ -55,7 +55,7 @@ Copyright © 2006-2007 Apple Computer, Inc., All Rights Reserved
/************** LOCALIZABLE GLOBAL VARIABLES ****************/
var gArgCountErr = 'The "%%" function requires an even number of arguments.'
+ '\nArguments should be in the form "atttributeName", "attributeValue", ...';
+ '\nArguments should be in the form "atttributeName", "attributeValue", ...';
/******************** END LOCALIZABLE **********************/
@ -64,7 +64,9 @@ var gQTGeneratorVersion = 1.2;
var gQTBehaviorID = "qt_event_source";
var gQTEventsEnabled = false;
function AC_QuickTimeVersion() { return gQTGeneratorVersion; }
function AC_QuickTimeVersion() {
return gQTGeneratorVersion;
}
function _QTComplain(callingFcnName, errMsg)
{

23
js/printer_tool.js

@ -3,12 +3,19 @@
var PrinterTool = {};
PrinterTool.windowSettings = 'toolbar=no,location=no,' + 'status=no,menu=no,scrollbars=yes,width=650,height=400';
/** * Open a printer-friendly page and prompt for printing. * @param tagID * The ID of the tag that contains the material that should * be printed. */
PrinterTool.print = function (tagID) { var target = document.getElementById(tagID); var title = document.title;
if(!target || target.childNodes.length === 0) { alert("Nothing to Print"); return;
}
var content = target.innerHTML;
var text = '<html><head><title>' + title +
'</title><body>' + content +'</body></html>';
printerWindow = window.open('', '', PrinterTool.windowSettings); printerWindow.document.open(); printerWindow.document.write(text); printerWindow.document.close();
printerWindow.print();
PrinterTool.print = function (tagID) {
var target = document.getElementById(tagID);
var title = document.title;
if(!target || target.childNodes.length === 0) {
alert(t("Nothing to Print"));
return;
}
var content = target.innerHTML;
var text = '<html><head><title>' + title +
'</title><body>' + content +'</body></html>';
printerWindow = window.open('', '', PrinterTool.windowSettings);
printerWindow.document.open();
printerWindow.document.write(text);
printerWindow.document.close();
printerWindow.print();
};

51
js/swfobject.js

@ -10,23 +10,37 @@ if(typeof deconcept == "undefined") var deconcept = new Object();
if(typeof deconcept.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) {
if (!document.getElementById) { return; }
if (!document.getElementById) {
return;
}
this.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = new Object();
this.variables = new Object();
this.attributes = new Array();
if(swf) { this.setAttribute('swf', swf); }
if(id) { this.setAttribute('id', id); }
if(w) { this.setAttribute('width', w); }
if(h) { this.setAttribute('height', h); }
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); }
if(swf) {
this.setAttribute('swf', swf);
}
if(id) {
this.setAttribute('id', id);
}
if(w) {
this.setAttribute('width', w);
}
if(h) {
this.setAttribute('height', h);
}
if(ver) {
this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split(".")));
}
this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
if (!window.opera && document.all && this.installedVer.major > 7) {
// only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
deconcept.SWFObject.doPrepUnload = true;
}
if(c) { this.addParam('bgcolor', c); }
if(c) {
this.addParam('bgcolor', c);
}
var q = quality ? quality : 'high';
this.addParam('quality', q);
this.setAttribute('useExpressInstall', false);
@ -34,7 +48,9 @@ deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, re
var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', '');
if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); }
if(redirectUrl) {
this.setAttribute('redirectUrl', redirectUrl);
}
}
deconcept.SWFObject.prototype = {
useExpressInstall: function(path) {
@ -81,9 +97,13 @@ deconcept.SWFObject.prototype = {
swfNode = '<embed type="application/x-shockwave-flash" src="'+ this.getAttribute('swf') +'" width="'+ this.getAttribute('width') +'" height="'+ this.getAttribute('height') +'"';
swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
var params = this.getParams();
for(var key in params){ swfNode += [key] +'="'+ params[key] +'" '; }
for(var key in params){
swfNode += [key] +'="'+ params[key] +'" ';
}
var pairs = this.getVariablePairs().join("&");
if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; }
if (pairs.length > 0){
swfNode += 'flashvars="'+ pairs +'"';
}
swfNode += '/>';
} else { // PC IE
if (this.getAttribute("doExpressInstall")) {
@ -97,7 +117,9 @@ deconcept.SWFObject.prototype = {
swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
}
var pairs = this.getVariablePairs().join("&");
if(pairs.length > 0) {swfNode += '<param name="flashvars" value="'+ pairs +'" />';}
if(pairs.length > 0) {
swfNode += '<param name="flashvars" value="'+ pairs +'" />';
}
swfNode += "</object>";
}
return swfNode;
@ -209,7 +231,12 @@ if (deconcept.SWFObject.doPrepUnload) {
window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
}
/* add Array.push if needed (ie5) */
if (Array.prototype.push == null) { Array.prototype.push = function(item) { this[this.length] = item; return this.length; }}
if (Array.prototype.push == null) {
Array.prototype.push = function(item) {
this[this.length] = item;
return this.length;
}
}
/* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter;

1
plugins/CollectionFormBuilder.inc

@ -13,6 +13,7 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class CollectionFormBuilder extends FormBuilder {
/**

6
plugins/DarwinCore.inc

@ -1,6 +1,10 @@
<?php
// $Id$
/* @file
*/
/**
* @file

1
plugins/DemoFormBuilder.inc

@ -12,6 +12,7 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class DemoFormBuilder extends FormBuilder {
/**

15
plugins/DocumentConverter.inc

@ -1,6 +1,5 @@
<?php
// $Id$
/**
* @file
@ -71,7 +70,7 @@ class DocumentConverter {
$returnValue = file_put_contents($outputFile, $data);
if ($returnValue > 0) {
drupal_set_message("Conversion successful.", 'status');
drupal_set_message(t("Conversion successful."), 'status');
$_SESSION['fedora_ingest_files']["$dsid"] = $outputFile;
return $outputFile;
}
@ -80,7 +79,7 @@ class DocumentConverter {
}
}
else {
drupal_set_message("Conversion Failed. Webservice returned $code.", 'status');
drupal_set_message(t("Conversion Failed. Webservice returned $code."), 'status');
return FALSE;
}
}
@ -88,8 +87,8 @@ class DocumentConverter {
}
/*
$documentConverter = new DocumentConverter();
$inputFile = "document.docx";
$outputType = "txt";
$documentConverter->convert( null, 'TXT', $inputFile, $outputType);
/* */
$documentConverter = new DocumentConverter();
$inputFile = "document.docx";
$outputType = "txt";
$documentConverter->convert( NULL, 'TXT', $inputFile, $outputType);
/* */

2
plugins/Exiftool.inc

@ -68,7 +68,7 @@ class Exiftool {
$output .= '<li><b>' . $name . '</b>: ' . $value . ' </li>';
}
}
$output.='</ul></div>';
$output .= '</ul></div>';
$fieldset = array(
'#title' => t("!text", array('!text' => 'Technical Metadata')),

6
plugins/Ffmpeg.inc

@ -30,7 +30,7 @@ class Ffmpeg {
* @return type
*/
function extract_thumbnail($parameterArray, $dsid, $file, $file_ext) {
$defaults = array('ss' => '00:00:10', 's' => null);
$defaults = array('ss' => '00:00:10', 's' => NULL);
$params = array_merge($defaults, $parameterArray);
$system = getenv('System');
$file_suffix = '_' . $dsid . '.' . $file_ext;
@ -38,13 +38,13 @@ class Ffmpeg {
$output = array();
$size = '';
if ($params['s'] != null) {
if ($params['s'] != NULL) {
$size = ' -s ' . escapeshellarg($params['s']);
}
exec('ffmpeg -i ' . escapeshellarg($file) . ' -r 1 -ss ' . escapeshellarg($params['ss']) . ' ' . $size . ' -t 1 ' . escapeshellarg($file . $file_suffix));
if (!file_exists($file . $file_suffix)) {
return false;
return FALSE;
}
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix;

2
plugins/FlvFormBuilder.inc

@ -12,6 +12,7 @@ module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
* implements methods from content model ingest form xml
* builds a dc metadata form
*/
class FlvFormBuilder extends FormBuilder {
/**
@ -29,6 +30,7 @@ class FlvFormBuilder extends FormBuilder {
* @param type $dom
* @param type $rootElement
*/
function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass');
global $base_url;

6
plugins/FormBuilder.inc

@ -102,14 +102,14 @@ class FormBuilder {
$policyElement = $dom->createDocumentFragment();
if (!$policyElement) {
drupal_set_message(t('Error parsing security policy stream.'));
watchdog(t("Fedora_Repository"), t("Error parsing security policy stream, could not parse policy stream."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error parsing security policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE);
return FALSE;
}
$dom->importNode($policyElement, TRUE);
$value = $policyElement->appendXML($policyStreamDoc);
if (!$value) {
drupal_set_message(t('Error creating security policy stream.'));
watchdog(t("Fedora_Repository"), t("Error creating security policy stream, could not parse collection policy template file."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error creating security policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE);
return FALSE;
}
@ -183,7 +183,7 @@ class FormBuilder {
file_delete($form_values['ingest-file-location']);
} catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error');
watchdog(t("Fedora_Repository"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Error ingesting object: !e", array('!e' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return;
}
}

13
plugins/ModsFormBuilder.inc

@ -22,9 +22,9 @@ class ModsFormBuilder extends FormBuilder {
* Constructor
* @param type $pid
*/
function __construct($pid=null) {
function __construct($pid=NULL) {
parent::__construct();
if ($pid !== null) {
if ($pid !== NULL) {
module_load_include('inc', 'fedora_repository', 'ContentModel');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
@ -87,7 +87,7 @@ class ModsFormBuilder extends FormBuilder {
'#type' => $element['type']
);
$includeEl = true;
$includeEl = TRUE;
$elname = explode('][', $element['name']);
$elLocation = &$form['indicator2'];
while (isset($elLocation[$name[0]]) && ($partial = array_shift($elname)) != NULL) {
@ -114,13 +114,13 @@ class ModsFormBuilder extends FormBuilder {
if (is_string($nodeList)) {
$el['#default_value'] = $nodeList;
}
else if ($nodeList->length > 1) {
elseif ($nodeList->length > 1) {
$el['#default_value'] = array();
foreach ($nodeList as $node) {
$el['#default_value'][] = $node->nodeValue;
}
}
else if ($nodeList->length > 0) {
elseif ($nodeList->length > 0) {
if ($el['#type'] == 'list') {
$values = array();
for ($i = 0; $i < $nodeList->length; $i++) {
@ -317,7 +317,7 @@ class ModsFormBuilder extends FormBuilder {
file_delete($form_values['ingest-file-location']);
} catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error');
watchdog(t("Fedora_Repository"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
watchdog(t("Fedora_Repository"), "Error ingesting object: !e", array('!e' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return;
}
}
@ -679,7 +679,6 @@ class ModsFormBuilder extends FormBuilder {
$modifications = trim($form_values['mods_cc']['cc']['cc_modifications']);
$jurisdiction = trim($form_values['mods_cc']['cc']['cc_jurisdiction']);
// Include islandora form elements only if needed ??
module_load_include('inc', 'islandora_form_elements', 'includes/creative_commons.inc');
if (!isset(CreativeCommons::$cc_jurisdiction_vals[$jurisdiction]))

4
plugins/PersonalCollectionClass.inc

@ -83,7 +83,7 @@ class PersonalCollectionClass {
if (!$policyElement) {
drupal_set_message(t('Error parsing policy stream.'));
watchdog(t("Fedora_Repository"), t("Error parsing policy stream, could not parse policy stream."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error parsing policy stream, could not parse policy stream.", NULL, WATCHDOG_NOTICE);
return FALSE;
}
$dom->importNode($policyElement, TRUE);
@ -91,7 +91,7 @@ class PersonalCollectionClass {
$value = $policyElement->appendXML($collectionTemplate);
if (!$value) {
drupal_set_message(t('Error creating collection policy stream.'));
watchdog(t("Fedora_Repository"), t("Error creating collection policy stream, could not parse collection policy template file."), NULL, WATCHDOG_NOTICE);
watchdog(t("Fedora_Repository"), "Error creating collection policy stream, could not parse collection policy template file.", NULL, WATCHDOG_NOTICE);
return FALSE;
}

4
plugins/Refworks.inc

@ -83,7 +83,7 @@ class Refworks {
//$dom = dom_import_simplexml($xml);//test to see if it behaves better
//$xml = new SimpleXMLElement(trim(file_get_contents($file)));
} catch (Exception $e) {
drupal_set_message(t('Error processing Refworks file: ') . $e->getMessage());
drupal_set_message(t('Error processing Refworks file:') . " " . $e->getMessage());
return FALSE;
}
$this->referenceList = array();
@ -290,7 +290,7 @@ class Refworks {
if ($client == NULL) {
drupal_set_message(t('Error getting SOAP client.'), 'error');
watchdog(t("FEDORA_REPOSITORY"), t("Error getting SOAP client: !e", array('!e' => $e)), NULL, WATCHDOG_ERROR);
watchdog(t("FEDORA_REPOSITORY"), "Error getting SOAP client: !e", array('!e' => $e), NULL, WATCHDOG_ERROR);
return;
}
$object = $client->__soapCall('ingest', array(

6
plugins/ShowDemoStreamsInFieldSets.inc

@ -11,6 +11,7 @@
* Show Demo Streams in Field Sets ???
*/
class ShowDemoStreamsInFieldSets {
private $pid = NULL;
/**
@ -31,9 +32,10 @@ class ShowDemoStreamsInFieldSets {
global $base_url;
$collection_fieldset = array(
'#collapsible' => FALSE,
'#value' => '<a href="'. $base_url . '/fedora/repository/'. $this->pid . '/MEDIUM_SIZE/"><img src="'.
$base_url . '/fedora/repository/'. $this->pid . '/MEDIUM_SIZE/MEDIUM_SIZE'. '" /></a>',
'#value' => '<a href="' . $base_url . '/fedora/repository/' . $this->pid . '/MEDIUM_SIZE/"><img src="' .
$base_url . '/fedora/repository/' . $this->pid . '/MEDIUM_SIZE/MEDIUM_SIZE' . '" /></a>',
);
return theme('fieldset', $collection_fieldset);
}
}

10
plugins/fedora_attach/fedora_attach.admin.inc

@ -1,12 +1,12 @@
<?php
// $Id$
/**
* @file
* Administration page callbacks for the redmine_issuer module.
*/
/**
* Form builder. Configure Redmine parameters.
*
@ -16,11 +16,11 @@
function fedora_attach_admin() {
$options = drupal_map_assoc(explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: ')));
$default_value = variable_get('fedora_attach_pid_namespace', 'default:');
$isRestricted = variable_get('fedora_namespace_restriction_enforced',TRUE);
$is_restricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if (!in_array($default_value, $options) && $isRestricted) {
drupal_set_message( "The value last set here ($default_value) is not in the list of available PID namespaces (perhaps it has changed?). Please choose a valid option from the list.", 'warning' );
if (!in_array($default_value, $options) && $is_restricted) {
drupal_set_message(t("The value last set here ($default_value) is not in the list of available PID namespaces (perhaps it has changed?). Please choose a valid option from the list."), 'warning');
}
$form = array();

12
plugins/fedora_attach/fedora_attach.install

@ -1,14 +1,14 @@
<?php
// $Id$
// @file fedora_attach.install
/**
* Implementation of hook_install().
*
* Ensures fedora_attach runs after module upload
*/
* Implementation of hook_install().
*
* Ensures fedora_attach runs after module upload
*/
function fedora_attach_install() {
$weight = (int) db_result(db_query("SELECT weight FROM {system} WHERE name = 'upload'"));
db_query("UPDATE {system} SET weight = %d WHERE name = 'fedora_attach'", $weight+1);
db_query("UPDATE {system} SET weight = %d WHERE name = 'fedora_attach'", $weight + 1);
}

52
plugins/fedora_attach/fedora_attach.module

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* Implementation of hook_perm()
@ -19,7 +20,7 @@ function fedora_attach_perm() {
*/
function fedora_attach_nodeapi(&$node, $op, $teaser) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc','fedora_repository','api/fedora_utils.inc');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils.inc');
switch ($op) {
case 'insert':
case 'update':
@ -55,9 +56,9 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
// }
}
try {
$pid_namespace = variable_get('fedora_attach_pid_namespace','default:');
$pid_namespace = variable_get('fedora_attach_pid_namespace', 'default:');
$pid_namespace = substr($pid_namespace, 0, strpos($pid_namespace, ":"));
$pid = fedora_item::get_next_PID_in_namespace( $pid_namespace );
$pid = fedora_item::get_next_PID_in_namespace($pid_namespace);
$new_item = fedora_item::ingest_new_item($pid, 'A', $file->description); // PID will be generated using getNextPID
if (empty($new_item->objectProfile)) {
drupal_set_message("Unable to create fedora object. Check Watchdog log for details.", "error");
@ -68,7 +69,7 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
$new_item->add_datastream_from_string($policy_stream, 'POLICY', "Security Policy", "text/xml", "X");
}
$new_item->add_datastream_from_file($file->filepath, 'OBJ', $file->filename, $file->filemime, 'M');
$new_item->add_relationship("hasModel","islandora:genericCModel",FEDORA_MODEL_URI);
$new_item->add_relationship("hasModel", "islandora:genericCModel", FEDORA_MODEL_URI);
module_load_include('inc', 'fedora_repository', 'api/dublin_core');
$dc = new Dublin_Core();
$dc->add_element('dc:title', $file->description);
@ -78,20 +79,18 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
$success = TRUE;
}
}
catch (exception $e) {
} catch (exception $e) {
drupal_set_message(t('An error occurred ingesting the file: ') . $e, 'error');
$new_item->purge();
drupal_set_message(t('The item has been removed from the repository'));
}
if ($success) { // We were able to ingest the file, so update the file path.
$new_filepath = '/fedora/repository/'. $new_item->pid . '/OBJ/'. $file->description;
$new_filepath = '/fedora/repository/' . $new_item->pid . '/OBJ/' . $file->description;
_fedora_attach_update_filepath($new_filepath, $fid);
file_delete($filepath);
}
}
// Convert file to object for compatibility
// Remove file. Process removals first since no further processing
// will be required.
if (!empty($file->remove)) {
@ -109,7 +108,6 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
// Move on, so the removed file won't be added to new revisions.
continue;
}
}
}
}
@ -118,7 +116,6 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
// ******************************************************
// *** VIEW
// Re-theme the file attachments table.
// Rebuild the files table and overwrite default.
// Using the rules from upload.module.
if (isset($node->files) && count($node->files) && user_access('view uploaded files') && !$teaser) {
@ -129,7 +126,7 @@ function fedora_attach_nodeapi(&$node, $op, $teaser) {
}
/**
*Implementation of hook_menu().
* Implementation of hook_menu().
*/
function fedora_attach_menu() {
$items['admin/settings/fedora_repository/attach'] = array(
@ -143,7 +140,6 @@ function fedora_attach_menu() {
return $items;
}
function fedora_attach_save(&$node) {
print ("FNARF!");
}
@ -184,7 +180,7 @@ function fedora_attach_form_alter(&$form, $form_state, $form_id) {
'#default_value' => $default_value,
'#disabled' => $disabled,
);
$form['attachments']['wrapper']['files'][$fid]['description']['#description'] = $base_url.$file->filepath;
$form['attachments']['wrapper']['files'][$fid]['description']['#description'] = $base_url . $file->filepath;
}
if (user_access('select file access by role')) {
_fedora_attach_build_roles_form($form, FALSE);
@ -211,7 +207,7 @@ function fedora_attach_form_alter(&$form, $form_state, $form_id) {
'#default_value' => $ingested,
);
$form['attachments']['wrapper']['files'][$fid]['description']['#description'] = $base_url.$file['filepath'];
$form['attachments']['wrapper']['files'][$fid]['description']['#description'] = $base_url . $file['filepath'];
if (user_access('select file access by role')) {
_fedora_attach_build_roles_form($form, TRUE);
}
@ -232,12 +228,13 @@ function fedora_attach_form_validate($formid, $form_values) {
if (!isset($file['ingested'])) {
drupal_set_message(t('Fedora Attach cannot find add repository settings.'), 'error');
// Be sure we are going after core upload module
$upload_weight = (int)db_result(db_query("SELECT weight FROM {system} WHERE name = 'upload'"));
$attach_weight = (int)db_result(db_query("SELECT weight FROM {system} WHERE name = 'fedora_attach'"));
$upload_weight = (int) db_result(db_query("SELECT weight FROM {system} WHERE name = 'upload'"));
$attach_weight = (int) db_result(db_query("SELECT weight FROM {system} WHERE name = 'fedora_attach'"));
if ($attach_weight <= $uplaod_weight) {
$new_weight = $upload_weight + 1;
drupal_set_message(t('Adjusting Fedora Attach module\'s weight to') . $new_weight, 'warning');
db_query("UPDATE {system} SET weight = '%d' WHERE name = 'fedora_attach'", $new_weight);;
db_query("UPDATE {system} SET weight = '%d' WHERE name = 'fedora_attach'", $new_weight);
;
}
else {
drupal_set_message(t('Please check for modules that conflict with Fedora Attach'), 'error');
@ -259,7 +256,7 @@ function fedora_attach_form_submit($form, &$form_state) {
foreach ($form_state['values']['files'] as $fid => $file) {
if ($file['remove'] && !empty($file['ingested']) && $file['ingested']) {
drupal_set_message("The attachment <a href=\"$base_url/". substr($file['filepath'], 0, strpos($file['filepath'], 'OBJ'))."\">${file['filename']}</a> was removed from this node but it will remain in the repository until it is purged it directly.");
drupal_set_message("The attachment <a href=\"$base_url/" . substr($file['filepath'], 0, strpos($file['filepath'], 'OBJ')) . "\">${file['filename']}</a> was removed from this node but it will remain in the repository until it is purged it directly.");
}
if (!isset($file->ingested)) { // Newly-inserted file.
if (isset($form['attachments']['wrapper']['files'])) {
@ -340,8 +337,8 @@ function theme_fedora_attach_attachments($files) {
if ($file->list && empty($file->remove)) {
$inspect_item = '';
if (_fedora_attach_is_file_in_repository($file->filepath)) {
$inspect_item = ' <a href="'. $GLOBALS['base_url'] . substr($file->filepath, 0, strpos($file->filepath, 'OBJ')) .
'">'. theme_image(drupal_get_path('module', 'Fedora_Repository') . '/images/view.gif', '', 'View the item\'s repository page' ) . '</a>';
$inspect_item = ' <a href="' . $GLOBALS['base_url'] . substr($file->filepath, 0, strpos($file->filepath, 'OBJ')) .
'">' . theme_image(drupal_get_path('module', 'Fedora_Repository') . '/images/view.gif', '', 'View the item\'s repository page') . '</a>';
}
$href = _fedora_attach_create_url($file); // this is the changed line
$text = $file->description ? $file->description : $file->filename;
@ -384,8 +381,7 @@ function _fedora_attach_build_roles_form(&$form, $inside_js = FALSE) {
}
function _fedora_attach_create_policy($roles) {
$policy_filename = !empty($roles) ? drupal_get_path('module', 'fedora_repository') . '/policies/viewANDeditbyrole.xml'
: drupal_get_path('module', 'fedora_repository') . '/policies/noObjectEditPolicy.xml';
$policy_filename = !empty($roles) ? drupal_get_path('module', 'fedora_repository') . '/policies/viewANDeditbyrole.xml' : drupal_get_path('module', 'fedora_repository') . '/policies/noObjectEditPolicy.xml';
$policy_document = new DOMDocument();
$policy_document->load($policy_filename);
$designators = $policy_document->getElementsByTagName("SubjectAttributeDesignator");
@ -427,10 +423,10 @@ function fedora_attach_file_download($filepath) {
if (!strstr($filepath, 'fedora/repository')) {
return;
}
$result = db_query("SELECT DISTINCT(u.nid) FROM {upload} u INNER JOIN {files} f ON u.fid = f.fid ".
"WHERE f.filepath LIKE '%s'", $filepath.'%');
$result = db_query("SELECT DISTINCT(u.nid) FROM {upload} u INNER JOIN {files} f ON u.fid = f.fid " .
"WHERE f.filepath LIKE '%s'", $filepath . '%');
$has_results = FALSE;
while($row = db_fetch_array($result)) {
while ($row = db_fetch_array($result)) {
$has_results = TRUE;
$node = node_load($row['nid']);
if (node_access('view', $node)) {
@ -452,7 +448,7 @@ function fedora_attach_file_download($filepath) {
* @return str: the correct URL
*/
function _fedora_attach_create_url($file) {
if ( _fedora_attach_is_file_in_repository( $file->filepath)) {
if (_fedora_attach_is_file_in_repository($file->filepath)) {
$href = $GLOBALS['base_url'] . $file->filepath;
}
else {
@ -486,6 +482,6 @@ function _fedora_attach_starts_with($str, $start) {
* @param string $filepath
* @param int $fid
*/
function _fedora_attach_update_filepath( $filepath, $fid ) {
function _fedora_attach_update_filepath($filepath, $fid) {
db_query("UPDATE {files} SET filepath = '%s' WHERE fid=%d", $filepath, $fid);
}

44
plugins/fedora_imageapi.module

@ -1,5 +1,6 @@
<?php
// $Id$
function fedora_imageapi_menu() {
$items = array();
@ -21,20 +22,19 @@ function fedora_imageapi_menu() {
* @param string $params
*/
function fedora_repository_image_manip($pid = '', $dsid = '', $op = '', $params = '') {
module_load_include( 'inc', 'Fedora_Repository', 'ObjectHelper');
module_load_include( 'module', 'imageapi');
module_load_include('inc', 'Fedora_Repository', 'ObjectHelper');
module_load_include('module', 'imageapi');
$obj = new ObjectHelper();
$mimetype = $obj->getMimeType( $pid, $dsid);
$ext = substr( strstr($mimetype, '/'), 1);
$mimetype = $obj->getMimeType($pid, $dsid);
$ext = substr(strstr($mimetype, '/'), 1);
$op = (!empty($_GET['op']) ? $_GET['op'] : '');
$safe_pid = str_replace(':', '_', $pid);
$cache_key = 'fedora_repository_image_manip_'.md5($safe_pid.'_'.$dsid.'_'.$ext.'_'.$op.(isset($_GET['width'])?'_'.$_GET['width']:'').(isset($_GET['height'])?'_'.$_GET['height']:''));
if (($file=cache_get($cache_key))===0)
{
$cache_key = 'fedora_repository_image_manip_' . md5($safe_pid . '_' . $dsid . '_' . $ext . '_' . $op . (isset($_GET['width']) ? '_' . $_GET['width'] : '') . (isset($_GET['height']) ? '_' . $_GET['height'] : ''));
if (($file = cache_get($cache_key)) === 0) {
//added the slash as sys_get_temp_dir in linux does not seem to include the slash
$tmp_file_name = sys_get_temp_dir() .'/'. $safe_pid . '_'. $dsid . '.'. $ext;
$handle = fopen( $tmp_file_name, "w");
$tmp_file_name = sys_get_temp_dir() . '/' . $safe_pid . '_' . $dsid . '.' . $ext;
$handle = fopen($tmp_file_name, "w");
$numbytes = fwrite($handle, $obj->getStream($pid, $dsid));
fclose($handle);
if ($numbytes == 0) {
@ -42,30 +42,30 @@ function fedora_repository_image_manip($pid = '', $dsid = '', $op = '', $params
}
$image = imageapi_image_open( $tmp_file_name);
$image = imageapi_image_open($tmp_file_name);
switch ($op) {
case 'scale':
if (!empty( $_GET['height'] ) || !empty( $_GET['width'])) {
if (!empty($_GET['height']) || !empty($_GET['width'])) {
imageapi_image_scale($image, $_GET['width'], $_GET['height']);
}
case 'centerscale':
if (!empty($_GET['height']) && !empty($_GET['width'])) {
imageapi_image_scale_and_crop($image, $_GET['width'], $_GET['height']);
}
}
imageapi_image_close($image);
$file = file_get_contents($tmp_file_name);
cache_set($cache_key,$file,'cache',time()+variable_get('fedora_image_blocks_cache_time',3600));
cache_set($cache_key, $file, 'cache', time() + variable_get('fedora_image_blocks_cache_time', 3600));
file_delete($tmp_file_name);
} else {
}
else {
$file = $file->data;
}
header("Content-type: $mimetype");
header('Content-Disposition: attachment; filename="'. $dsid . '.'. $ext . '"');
header('Content-Disposition: attachment; filename="' . $dsid . '.' . $ext . '"');
echo $file;
@ -79,8 +79,8 @@ function fedora_repository_image_manip($pid = '', $dsid = '', $op = '', $params
* @param unknown_type $form_state
* @param unknown_type $form_id
*/
/*
function fedora_imageapi_form_alter( &$form, $form_state, $form_id) {
/*
function fedora_imageapi_form_alter( &$form, $form_state, $form_id) {
switch ( $form_id ) {
case 'fedora_repository_admin':
@ -106,11 +106,11 @@ function fedora_imageapi_form_alter( &$form, $form_state, $form_id) {
$form['buttons']['#weight'] = 2;
break;
}
}
}
function show_openlayers_viewer() {
function show_openlayers_viewer() {
$output = 'Hi.';
return $output;
}
*/
}
*/

20
plugins/herbarium.inc

@ -1,6 +1,9 @@
<?php
// $Id$
/**
* @file
*
*/
/**
* @file
@ -78,7 +81,8 @@ class Herbarium {
$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');
$this->item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE',
'Darwin Core Metadata', 'text/xml', 'X');
return TRUE;
}
@ -104,14 +108,17 @@ class Herbarium {
. $form_values['dwc:collectionCode'] . ':'
. $form_values['dwc:catalogNumber'];
$new_item = Fedora_Item::ingest_new_item($form_values['pid'], 'A', $label, $user->name);
$new_item = Fedora_Item::ingest_new_item($form_values['pid'], 'A', $label,
$user->name);
$new_item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE', 'Darwin Core Metadata', 'text/xml', 'X');
$new_item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE',
'Darwin Core Metadata', 'text/xml', 'X');
$file = $form_values['ingest-file-location'];
if (!empty($file)) {
$dformat = $mimetype->getType($file);
$new_item->add_datastream_from_file($file, 'FULL_SIZE', "$label-full-size", $dformat, 'M');
$new_item->add_datastream_from_file($file, 'FULL_SIZE',
"$label-full-size", $dformat, 'M');
}
$new_item->add_relationship('hasModel', $form_values['content_model_pid'], FEDORA_MODEL_URI);
@ -121,7 +128,8 @@ class Herbarium {
foreach ($_SESSION['fedora_ingest_files'] as $dsid => $created_file) {
$created_file_format = $mimetype->getType($created_file);
$created_filename = strstr($created_file, $file);
$new_item->add_datastream_from_file($created_file, $dsid, $created_filename, $created_file_format, 'M');
$new_item->add_datastream_from_file($created_file, $dsid,
$created_filename, $created_file_format, 'M');
}
}
}

27
plugins/islandora_newspaper/Newspaper.inc

@ -1,6 +1,8 @@
<?php
// $Id$
/* @file
* News Paper Plugin for Fedora Repository module.
*/
class Newspaper {
@ -19,7 +21,7 @@ class Newspaper {
$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. '.
'#description' => 'If you want to manually specify the PID for the new object, enter it here. ' .
'Leave it blank for an automatically-generated PID.',
);
@ -32,7 +34,6 @@ class Newspaper {
'#type' => 'textarea',
'#title' => 'MODS Record to Import',
'#rows' => 20,
);
return $form;
@ -56,7 +57,7 @@ class Newspaper {
$title_info = $mods_item_doc->getElementsByTagNameNS('http://www.loc.gov/mods/v3', 'titleInfo')->item(0);
$title = '';
foreach(array('nonSort', 'title') as $title_field) {
foreach (array('nonSort', 'title') as $title_field) {
$title .= $title_info->getElementsByTagNameNS('http://www.loc.gov/mods/v3', $title_field)->item(0)->nodeValue;
}
@ -76,15 +77,14 @@ class Newspaper {
$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) {
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");
drupal_set_message(t("Item !pid created successfully.", array('!pid' => l($new_item->pid, 'fedora/repository/' . $new_item->pid))), "status");
}
public function showFieldSets() {
@ -100,11 +100,11 @@ class Newspaper {
global $user;
$qs = '';
if ($user->uid != 0) {
$qs = '?uid='. base64_encode($user->name . ':'. $user->pass);
$qs = '?uid=' . base64_encode($user->name . ':' . $user->pass);
}
$viewer_url = variable_get('fedora_base_url', '') . '/get/'. $this->pid . '/ilives:viewerSdef/getViewer'. $qs;
$html = '<iframe src="'. $viewer_url . '" scrolling="no" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$viewer_url = variable_get('fedora_base_url', '') . '/get/' . $this->pid . '/ilives:viewerSdef/getViewer' . $qs;
$html = '<iframe src="' . $viewer_url . '" scrolling="no" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$tabset['read'] = array(
'#type' => 'tabpage',
@ -141,11 +141,11 @@ class Newspaper {
global $user;
$qs = '';
if ($user->uid != 0) {
$qs = '?uid='. base64_encode($user->name . ':'. $user->pass);
$qs = '?uid=' . base64_encode($user->name . ':' . $user->pass);
}
$viewer_url = variable_get('fedora_base_url', '') . '/get/'. $this->pid . '/ilives:viewerSdef/getViewer'. $qs;
$html = '<iframe src="'. $viewer_url . '" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$viewer_url = variable_get('fedora_base_url', '') . '/get/' . $this->pid . '/ilives:viewerSdef/getViewer' . $qs;
$html = '<iframe src="' . $viewer_url . '" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$tabset['first_tab'] = array(
'#type' => 'tabpage',
@ -173,4 +173,5 @@ class Newspaper {
return $tabset;
}
}

8
plugins/islandora_newspaper/islandora_newspaper.module

@ -40,17 +40,17 @@ function islandora_newspaper_required_fedora_objects() {
'datastream_file' => NULL,
'dsversion' => NULL,
),
array (
array(
'pid' => 'newspapers:collection',
'label' => 'Newspapers Collection',
'cmodel' => 'islandora:collectionCModel',
'parent' => 'islandora:demos',
'datastreams' => array (
array (
'datastreams' => array(
array(
'dsid' => 'COLLECTION_POLICY',
'datastream_file' => "$module_path/newspapers_collection_policy.xml",
),
array (
array(
'dsid' => 'TN',
'datastream_file' => "$module_path/Crystal_Clear_mimetype_document.png",
'mimetype' => 'image/png',

1
plugins/islandora_newspaper/newspapers_collection_policy.xml

@ -1,3 +1,4 @@
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="Newspaper" namespace="islandora" pid="newspapers:issueCModel"></content_model>

3
plugins/islandora_newspaper/newspapers_guardian.xml

@ -175,7 +175,8 @@
The tone of the newspaper changed during the first decade of the twentieth century; its news coverage became more sensational and its editorials offered less political commentary. Special weekend issues were printed during the second half of this decade, featuring comic strips, housekeeping articles, popular songs, sermons, local history and Sunday School lessons. Photographs and line drawings appeared frequently during the final years of the decade.
.... more in Heather Boylan ... p.54-Checklist and Historical Directory of Prince Edward Island Newspapers.</dc:description>
.... more in Heather Boylan ... p.54-Checklist and Historical Directory of Prince Edward Island Newspapers.
</dc:description>
<dc:description>Title varies: 1887- , The Island guardian; Dec. 1890-Jan. 1891, The Daily guardian; Jan. 1891- , The Morning guardian.</dc:description>
<dc:description>Ceased publication in 1920?</dc:description>
<dc:description>Missing issues.</dc:description>

1
plugins/islandora_newspaper/newspapers_issueCModel_islandoracm.xml

@ -1,3 +1,4 @@
<content_model name="Newspaper" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd" version="2">
<mimetypes>
<type>text/xml</type>

3
plugins/pidfield/pidfield.install

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* @file

22
plugins/pidfield/pidfield.module

@ -1,5 +1,6 @@
<?php
// $Id$
/**
* @file
@ -9,7 +10,6 @@
* declare what kind of field they work with, which can be any
* existing field as well as any new field the module creates.
*/
//==========================================//
// DEFINING A FIELD
//==========================================//
@ -50,7 +50,6 @@ function pidfield_field_settings($op, $field) {
'#title' => t('Maximum length'),
'#default_value' => is_numeric($field['max_length']) ? $field['max_length'] : 64,
'#required' => FALSE,
// Use #element_validate to validate the settings.
'#element_validate' => array('_pidfield_length_validate'),
'#description' => t('The maximum length of the field in characters. Must be a number between 1 and 255'),
@ -94,7 +93,7 @@ function pidfield_field_settings($op, $field) {
$data = content_views_field_views_data($field);
$db_info = content_database_info($field);
$table_alias = content_views_tablename($field);
$field_data = $data[$table_alias][$field['field_name'] .'_value'];
$field_data = $data[$table_alias][$field['field_name'] . '_value'];
// Make changes to $data as needed here.
return $data;
}
@ -107,7 +106,7 @@ function pidfield_field_settings($op, $field) {
*/
function _pidfield_length_validate($element, &$form_state) {
$value = $form_state['values']['max_length'];
if ($value && !is_numeric($value)|| $value < 1 || $value > 255) {
if ($value && !is_numeric($value) || $value < 1 || $value > 255) {
form_set_error('max_length', t('"Max length" must be a number between 1 and 64.'));
}
}
@ -128,7 +127,8 @@ function pidfield_field($op, &$node, $field, &$items, $teaser, $page) {
// set an error on the right sub-element when
// fields are deeply nested in the form.
$error_element = isset($item['_error_element']) ? $item['_error_element'] : '';
if (is_array($item) && isset($item['_error_element'])) unset($item['_error_element']);
if (is_array($item) && isset($item['_error_element']))
unset($item['_error_element']);
if (!empty($item['value'])) {
if (!empty($field['max_length']) && drupal_strlen($item['value']) > $field['max_length']) {
form_set_error($error_element, t('%name: the value may not be longer than %max characters.', array('%name' => $field['widget']['label'], '%max' => $field['max_length'])));
@ -274,7 +274,7 @@ function pidfield_field_formatter_info() {
*/
function theme_pidfield_formatter_default($element) {
$pid = $element['#item']['safe'];
if(!empty($pid)) {
if (!empty($pid)) {
return fedora_repository_get_items($pid);
}
return null;
@ -435,7 +435,7 @@ function get_node_references_for_fedora_item($item) {
$ids = db_query("SELECT nid FROM {". $db_info['table'] ."} WHERE ". $field['field_name'] ."_value=\"". $item->pid."\"");
$ids = db_query("SELECT nid FROM {" . $db_info['table'] . "} WHERE " . $field['field_name'] . "_value=\"" . $item->pid . "\"");
$results = array();
while ($data = db_fetch_object($ids)) {
@ -444,18 +444,16 @@ function get_node_references_for_fedora_item($item) {
$results[] = $data->nid;
//$referred_node = node_load(array('nid'=>$data->nid) );
}
return $results;
}
}
function fedora_pidfield_redirect_to_node($item) {
$node_references = get_node_references_for_fedora_item($item);
if (!empty($node_references)) {
if (strstr( drupal_get_destination(), urlencode('fedora/repository'))) {
drupal_goto(drupal_get_path_alias("node/".$node_references[0]));
if (strstr(drupal_get_destination(), urlencode('fedora/repository'))) {
drupal_goto(drupal_get_path_alias("node/" . $node_references[0]));
}
}
}

26
plugins/qt_viewer.inc

@ -47,7 +47,7 @@ class ShowQtStreamsInFieldSets {
$doc->registerXPathNamespace('Composite', 'http://ns.exiftool.ca/Composite/1.0/');
$mime = reset($doc->xpath('//File:MIMEType'));
$data['mime'] = $mime;
if (strpos($mime, 'audio/') !== false) {
if (strpos($mime, 'audio/') !== FALSE) {
$data['width'] = 300;
$data['height'] = 0;
}
@ -73,8 +73,8 @@ class ShowQtStreamsInFieldSets {
*/
function getPosterFrameDatastreamInfo($dsid = 'FULL_SIZE') {
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid);
if (empty($p) || $p == ' ' || $p === false) {
return false;
if (empty($p) || $p == ' ' || $p === FALSE) {
return FALSE;
}
return $p;
}
@ -87,12 +87,12 @@ class ShowQtStreamsInFieldSets {
*/
function getMediaDatastreamInfo($dsid = 'OBJ', $alt = array('')) {
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid);
if (empty($p) || $p == ' ' || $p === false) {
if (empty($p) || $p == ' ' || $p === FALSE) {
if (!empty($alt)) {
$ds = array_shift($alt);
return $this->getMediaDatastreamInfo($ds, $alt);
}
return false;
return FALSE;
}
return $p;
@ -103,7 +103,7 @@ class ShowQtStreamsInFieldSets {
* @return FALSE
*/
function enableDownload() {
return false;
return FALSE;
}
/**
@ -122,7 +122,7 @@ class ShowQtStreamsInFieldSets {
$pframe = $this->getPosterFrameDatastreamInfo();
$media = $this->getMediaDatastreamInfo('PROXY', array('OBJ'));
if ($media === false) {
if ($media === FALSE) {
return '';
}
global $base_url;
@ -134,7 +134,7 @@ class ShowQtStreamsInFieldSets {
$divid = 'player' . md5($this->pid) . 'MOV';
$content .= '<div class="player" id="' . $divid . '">';
if ($pframe !== false) {
if ($pframe !== FALSE) {
$content .= '<div class="poster" style="cursor: pointer; position: relative; width: ' . $width . 'px; min-height: ' . ($height) . 'px;">';
$content .= '<img src="' . base_path() . 'fedora/repository/' . $this->pid . '/' . $pframe->ID . '/poster.jpg' . '" />';
$content .= '<div class="play" style="font-size: 128px; color: white; position: absolute; top: 50%; left: 50%; margin-top: -0.085em; margin-left: -0.33em; opacity: 0.9; "></div>';
@ -147,7 +147,7 @@ class ShowQtStreamsInFieldSets {
}
$src = base_path() . 'fedora/repository/' . $this->pid . '/' . $media->ID . '/MOV.mov';
$qtparams = '';
$qtparams .= "'autostart', '" . ($pframe !== false ? 'true' : 'false') . "', ";
$qtparams .= "'autostart', '" . ($pframe !== FALSE ? 'true' : 'false') . "', ";
$init = <<<EOD
$(function() {
src = "$src";
@ -156,12 +156,12 @@ class ShowQtStreamsInFieldSets {
}
str = QT_GenerateOBJECTText_XHTML(src, "$width", ($height+15), '',
$qtparams
'postdomevents', 'true',
'EnableJavaScript', 'true',
'postdomevents', 'TRUE',
'EnableJavaScript', 'TRUE',
'bgcolor', 'black',
'controller', 'true',
'controller', 'TRUE',
'SCALE', 'aspect',
'LOOP', 'false'
'LOOP', 'FALSE'
);
if($('.poster', '#$divid').length ==0) {
$('#$divid').append(str);

4
searchTerms.xml

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<search_terms>
<search_terms>
<!--define what fields we can query as part of the advanced search for this collection-->
<default>dc.description</default>
<number_of_results>1000</number_of_results>
@ -67,7 +67,7 @@
<field>dsm.text</field>
<value>Full Text</value>
</term>
</search_terms>
</search_terms>

4
solrSearchTerms.xml

@ -1,5 +1,5 @@
<?xml version='1.0' encoding='utf-8'?>
<search_terms>
<search_terms>
<!--define what fields we can query as part of the advanced search for this collection-->
<default>dc.description</default>
<number_of_results>1000</number_of_results>
@ -67,7 +67,7 @@
<field>dsm.text</field>
<value>Full Text</value>
</term>
</search_terms>
</search_terms>

5
tests/fedora_repository.test

@ -1,8 +1,7 @@
<?php
// $Id$
/*
/* @file
* Tests the functions of the Fedora Repository module.
*/
@ -153,7 +152,7 @@ class FedoraRepositoryTestCase extends DrupalWebTestCase {
}
$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));
$this->pass("$description: Contents of result page are " . l(t('here'), $output_path));
}
protected function drupalCreateFedoraUser($permissions = array('access comments', 'access content', 'post comments', 'post comments without approval')) {

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save