Browse Source

Merge pull request #7 from bwoodhead/6.x

ISLANDORA-260 Bugfix
pull/8/merge
Ben Woodhead 13 years ago
parent
commit
1fb0e07e62
  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. 79
      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 <?php
// $Id$
/** /**
* @file * @file
@ -321,7 +320,7 @@ class CollectionClass {
$thisClass = new $phpClass (); $thisClass = new $phpClass ();
$returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext); $returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
if (!$returnValue) { 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; return FALSE;
} }
} }
@ -435,7 +434,7 @@ class CollectionClass {
module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass'); module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass');
$personalCollectionClass = new PersonalCollectionClass(); $personalCollectionClass = new PersonalCollectionClass();
if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) { 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 return FALSE; //creation failed don't save the collection pid in drupal db
} }
user_save($user, $personal_collection_pid); user_save($user, $personal_collection_pid);

15
CollectionPolicy.inc

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

59
ContentModel.inc

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

2
MimeClass.inc

@ -3,7 +3,7 @@
// $Id$ // $Id$
/** /**
* * @file
* This class inspired by Chris Jean's work, here: * This class inspired by Chris Jean's work, here:
* http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/ * 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"); $headers = module_invoke_all('file_download', "/fedora/repository/$pid/$dsID");
if (in_array(-1, $headers)) { if (in_array(-1, $headers)) {
drupal_set_message('hello'); drupal_set_message(t('hello'));
drupal_access_denied(); drupal_access_denied();
return ' '; return ' ';
@ -383,7 +383,7 @@ class ObjectHelper {
$input = new DomDocument(); $input = new DomDocument();
$input->loadXML(trim($xmlstr)); $input->loadXML(trim($xmlstr));
} catch (exception $e) { } 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); $xsl = $proc->importStylesheet($xsl);
$newdom = $proc->transformToDoc($input); $newdom = $proc->transformToDoc($input);
@ -560,7 +560,7 @@ class ObjectHelper {
try { try {
$sxml = new SimpleXMLElement($content_models); $sxml = new SimpleXMLElement($content_models);
} catch (exception $e) { } 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; 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 ') . $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() . $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 . '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 />'; $parent_collections_HTML .= '<a href="' . $uri . '">' . $collection_label . '</a><br />';
} }
if (!empty($parent_collections_HTML)) { 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; return $parent_collections_HTML;
@ -972,8 +972,8 @@ class ObjectHelper {
$warnMess = "Creation of one or more datastreams failed.<hr width='40%' align = 'left'/>"; $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. "; $configMess = "Please ensure that %app is installed and configured for this site. ";
drupal_set_message($warnMess, '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); 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 { try {
$implementation = new $solrClass(); $implementation = new $solrClass();
} catch (Exception $e) { } 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 'Error getting solr search results class. Check watchdog for more info.';
} }
return $implementation->$solrFunction($query, $startPage, $fq, $dismax); return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
@ -367,7 +367,7 @@ class SearchClass {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'Fedora_Repository');
$test = $xslt_file; $test = $xslt_file;
$isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE); $isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
if (!isRestricted && $xslt_file == null) { if (!isRestricted && $xslt_file == NULL) {
$xslt_file = '/xsl/unfilteredresults.xsl'; $xslt_file = '/xsl/unfilteredresults.xsl';
} }
$proc = NULL; $proc = NULL;
@ -431,7 +431,7 @@ class SearchClass {
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error loading results xslt! ') . $e->getMessage()); drupal_set_message(t('Error loading results xslt!') . " " . $e->getMessage());
return ' '; return ' ';
} }

13
XMLDatastream.inc

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

2
api/fedora_collection.inc

@ -56,7 +56,7 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio
} }
} }
else { 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 FALSE;
} }
return TRUE; 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) // Remove rdf elements added during ingest (if present)
if ($remove_islandora) { if ($remove_islandora) {
$xpath->registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); $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)) { if ($model = $desc_node->getElementsByTagName('hasModel')->item(0)) {
$descNode->removeChild($model); $desc_node->removeChild($model);
} }
if ($member = $descNode->getElementsByTagName('rel:isMemberOfCollection')->item(0)) { if ($member = $desc_node->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
$descNode->removeChild($member); $desc_node->removeChild($member);
} }
} }
@ -121,24 +121,24 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Update datastream uris // Update datastream uris
$xpath->registerNamespace('foxml', 'info:fedora/fedora-system:def/foxml#'); $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 // 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; continue;
} }
$dsId = $dsNode->getAttribute('ID'); $ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream // Remove QUERY datastream
if ($dsId == "QUERY") { if ($ds_id == "QUERY") {
$parentNode = $xpath->query('/foxml:digitalObject')->item(0); $parent_node = $xpath->query('/foxml:digitalObject')->item(0);
$parentNode->removeChild($dsNode); $parent_node->removeChild($ds_node);
} }
foreach ($dsNode->getElementsByTagName('*') as $contentNode) { foreach ($ds_node->getElementsByTagName('*') as $content_node) {
if ($str = $contentNode->getAttribute('REF')) { if ($str = $content_node->getAttribute('REF')) {
$contentNode->setAttribute('REF', url($paths[$dsId], array('absolute' => TRUE))); $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: case METS_11:
// Update datastream uris // Update datastream uris
$xpath->registerNamespace('METS', 'http://www.loc.gov/METS/'); $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 // Remove QUERY datastream
if ($dsId == "QUERY") { if ($ds_id == "QUERY") {
$parentNode = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0); $parent_node = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
$parentNode->removeChild($dsNode); $parent_node->removeChild($ds_node);
} }
$xpath->registerNamespace('xlink', 'http://www.loc.gov/METS/'); $xpath->registerNamespace('xlink', 'http://www.loc.gov/METS/');
foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $dsNode) as $Floc) { foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $ds_node) as $floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => TRUE))); $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 // 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; continue;
} }
foreach ($xpath->('METS:FLocat[@xlink:href]', $contentNode) as $Floc) { foreach ($xpath->('METS:FLocat[@xlink:href]', $content_node) as $floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => true))); $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 * @param type $mimeType
* @return type * @return type
*/ */
function get_file_extension($mimeType) { function get_file_extension($mime_type) {
return substr(strstr($mimeType, '/'), 1); return substr(strstr($mime_type, '/'), 1);
} }
/** /**

30
api/fedora_item.inc

@ -1,6 +1,10 @@
<?php <?php
// $Id$
/**
* @file
*
*/
/** /**
* @file * @file
@ -76,7 +80,7 @@ class Fedora_Item {
* @param type $logMessage * @param type $logMessage
* @return type * @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'); module_load_include('inc', 'fedora_repository', 'MimeClass');
if (empty($datastream_mimetype)) { if (empty($datastream_mimetype)) {
// Get mime type from the file extension. // Get mime type from the file extension.
@ -107,7 +111,7 @@ class Fedora_Item {
* @param type $logMessage * @param type $logMessage
* @return type * @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)) { if (empty($datastream_label)) {
$datastream_label = $datastream_id; $datastream_label = $datastream_id;
} }
@ -125,7 +129,7 @@ class Fedora_Item {
'dsState' => 'A', 'dsState' => 'A',
'checksumType' => 'DISABLED', 'checksumType' => 'DISABLED',
'checksum' => 'none', '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 * @param type $logMessage
* @return type * @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(); $dir = sys_get_temp_dir();
$tmpfilename = tempnam($dir, 'fedoratmp'); $tmpfilename = tempnam($dir, 'fedoratmp');
$tmpfile = fopen($tmpfilename, 'w'); $tmpfile = fopen($tmpfilename, 'w');
@ -402,7 +406,7 @@ class Fedora_Item {
* @param type $as_of_date_time * @param type $as_of_date_time
* @return string * @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( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'serviceDefinitionPid' => $service_definition_pid, 'serviceDefinitionPid' => $service_definition_pid,
@ -546,7 +550,7 @@ class Fedora_Item {
try { try {
$relsext = $this->get_datastream_dissemination('RELS-EXT'); $relsext = $this->get_datastream_dissemination('RELS-EXT');
} catch (exception $e) { } 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; return $relationships;
} }
@ -587,7 +591,7 @@ class Fedora_Item {
foreach ($relationships as $rel) { foreach ($relationships as $rel) {
if (empty($rel['subject']) || empty($rel['predicate']) || empty($rel['object']) || $rel['subject'] != 'info:fedora/' . $this->pid) { 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 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; return FALSE;
} }
} }
@ -727,7 +731,7 @@ class Fedora_Item {
* @param type $quiet * @param type $quiet
* @return type * @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( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
@ -828,7 +832,7 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array)); $result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
} }
else { 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; return NULL;
} }
} catch (exception $e) { } 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'); 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; return NULL;
} }
@ -854,13 +858,13 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array)); $result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
} }
else { 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; return NULL;
} }
} catch (exception $e) { } catch (exception $e) {
if (!$quiet) { 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; return NULL;
} }

8
api/fedora_utils.inc

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

1
api/rels-ext.inc

@ -21,7 +21,6 @@ class RelsExt {
* the repository for the given Fedora_Item. * the repository for the given Fedora_Item.
* @param Fedora_Item $item * @param Fedora_Item $item
*/ */
function RelsExt($item) { function RelsExt($item) {
$relsextxml = $item->get_datastream_dissemination('RELS-EXT'); $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'); $this->item->modify_datastream_by_value($tagdoc->saveXML(), $this->tagsDSID, 'Tags', 'text/xml', 'X');
} }
} catch (exception $e) { } 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 FALSE;
} }
return TRUE; 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"> <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_models>
<content_model dsid="ISLANDORACM" name="Collection" namespace="islandora:collection" pid="islandora:collectionCModel"/> <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> <collection_policy>
<!---we will define allowed mimetypes and what to do with various types as part of the content model--> <!---we will define allowed mimetypes and what to do with various types as part of the content model-->
<contentmodels> <contentmodels>

1
collection_policies/book_collection_policy.xml

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

43
collection_policies/qt_collection_policy.xml

@ -1,35 +1,48 @@
<?xml version="1.0" encoding="utf-8"?> <?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_models>
<content_model name="Video" dsid="ISLANDORACM" namespace="islandora" pid="islandora:qtCModel"/> <content_model name="Video" dsid="ISLANDORACM" namespace="islandora" pid="islandora:qtCModel"/>
</content_models> </content_models>
<search_terms> <search_terms>
<term field="dc.title"> <term field="dc.title">
dc.title</term> dc.title
</term>
<term field="dc.creator"> <term field="dc.creator">
dc.creator</term> dc.creator
</term>
<term field="dc.description" default="true"> <term field="dc.description" default="true">
dc.description</term> dc.description
</term>
<term field="dc.date"> <term field="dc.date">
dc.date</term> dc.date
</term>
<term field="dc.identifier"> <term field="dc.identifier">
dc.identifier</term> dc.identifier
</term>
<term field="dc.language"> <term field="dc.language">
dc.language</term> dc.language
</term>
<term field="dc.publisher"> <term field="dc.publisher">
dc.publisher</term> dc.publisher
</term>
<term field="dc.rights"> <term field="dc.rights">
dc.rights</term> dc.rights
</term>
<term field="dc.subject"> <term field="dc.subject">
dc.subject</term> dc.subject
</term>
<term field="dc.relation"> <term field="dc.relation">
dc.relation</term> dc.relation
</term>
<term field="dcterms.temporal"> <term field="dcterms.temporal">
dcterms.temporal</term> dcterms.temporal
</term>
<term field="dcterms.spatial"> <term field="dcterms.spatial">
dcterms.spatial</term> dcterms.spatial
</term>
</search_terms> </search_terms>
<relationship> <relationship>
isMemberOfCollection</relationship> isMemberOfCollection
</collection_policy> </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:schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema" targetNamespace="http://www.islandora.ca" elementFormDefault="qualified" >
<xsd:annotation> <xsd:annotation>
<xsd:documentation xml:lang="en"> <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" <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"> xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"> <xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){ // YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){ //$(document).ready(function(){
window.onload = function(){ window.onload = function(){
var images = [</xsl:text> var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result"> <xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/> <xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/> <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 myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}}); var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text> };
</xsl:text>
</script> </script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div> <div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/> <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" <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"> xmlns:s="http://www.w3.org/2001/sw/DataAccess/rf1/result" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:template match="/"> <xsl:template match="/">
@ -40,7 +41,8 @@
// YAHOO.util.Event.onDOMReady(function(){ // YAHOO.util.Event.onDOMReady(function(){
//$(document).ready(function(){ //$(document).ready(function(){
window.onload = function(){ window.onload = function(){
var images = [</xsl:text> var images = [
</xsl:text>
<xsl:for-each select="/s:sparql/s:results/s:result"> <xsl:for-each select="/s:sparql/s:results/s:result">
<xsl:variable name="OBJECTURI" select="s:object/@uri"/> <xsl:variable name="OBJECTURI" select="s:object/@uri"/>
<xsl:variable name="pid" select="substring-after($OBJECTURI,'/')"/> <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 myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}}); var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
};</xsl:text> };
</xsl:text>
</script> </script>
<div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div> <div class="title">Testing YUI's CoverFlow version 0.1 (beta)</div>
<div id="coverFlowTest"/> <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="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/> <xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/> <xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/"> <xsl:template match="/">
<xsl:if test="$count>0"> <xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%"> <table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}"> <tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;"> <div STYLE="text-align: center;">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</div> <br clear="all" /> </div>
</td></tr> <br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]"> <!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/> <xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>- </xsl:for-each>-
--> -->
<xsl:apply-templates select="sparql/results"/> <xsl:apply-templates select="sparql/results"/>
</table><br clear="all" /> </table>
<div STYLE="text-align: center;"> <br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
@ -122,7 +182,7 @@
</xsl:choose> </xsl:choose>
</div> </div>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="sparql/results"> <xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]"> <xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr> <tr>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl"> <xsl:variable name="linkUrl">
<xsl:choose> <xsl:choose>
<xsl:when test="(content='Collection' or content='Community')"> <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:when>
<xsl:otherwise> <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:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<td valign="top" width="25%"> <td valign="top" width="25%">
<a> <a>
<xsl:attribute name="href"> <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:attribute>
<img> <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>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/> <xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute> </xsl:attribute>
</img> </a> <br clear="all" /> </img>
</a>
<br clear="all" />
<a> <a>
<xsl:attribute name="href"> <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:attribute>
<xsl:value-of select="$newTitle"/> <xsl:value-of select="$newTitle"/>
</a> </a>

131
collection_views/REFWORKS-COLLECTION_VIEW.xml

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

145
collection_views/SIMPLE-COLLECTION_VIEW.xml

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

135
collection_views/default-sparqltoHtml.xsl

@ -15,104 +15,169 @@
<xsl:variable name="end" select="($start - 1) + number($size)"/> <xsl:variable name="end" select="($start - 1) + number($size)"/>
<xsl:variable name='columns' select="4"/> <xsl:variable name='columns' select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/> <xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/"> <xsl:template match="/">
<xsl:if test="$count>0"> <xsl:if test="$count>0">
<table> <table>
<tr><td colspan="2"> <tr>
<td colspan="2">
<div align="center"> <div align="center">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</div> </div>
</td></tr> </td>
</tr>
<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]"> <xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/> <xsl:variable name='OBJECTURI' select="object/@uri"/>
<xsl:variable name='PID' select="substring-after($OBJECTURI,'/')"/> <xsl:variable name='PID' select="substring-after($OBJECTURI,'/')"/>
<tr> <tr>
<td> <td>
<img> <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>
</img> </img>
</td><td> </td>
<td>
<a> <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:attribute>
<xsl:value-of select="title"/> <xsl:value-of select="title"/>
</a> </a>
</td></tr> </td>
</tr>
</xsl:for-each> </xsl:for-each>
</table> </table>
<div align="center"> <div align="center">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
@ -120,5 +185,5 @@
</xsl:choose> </xsl:choose>
</div> </div>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
</xsl:stylesheet> </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"> <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 --> <!-- simple list view for a itql query that looks queries for $object and $title only -->
<xsl:template match="/"> <xsl:template match="/">
@ -14,7 +15,8 @@
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/> <xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text> <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:attribute>
<xsl:value-of select="s:title"/> <xsl:value-of select="s:title"/>
</a> </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: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:template match="/">
<xsl:variable name="BASEURL"> <xsl:variable name="BASEURL">
@ -50,7 +51,8 @@
<xsl:attribute name="href"> <xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/> <xsl:value-of select="$BASEURL"/>
<xsl:text>/fedora/repository/</xsl:text> <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:attribute>
<xsl:value-of select="s:memberTitle"/> <xsl:value-of select="s:memberTitle"/>
</a> </a>

244
collection_views/yui_coverflow/js/CoverFlow.js vendored

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

2
content_models/BASIC_VIDEO.xml

@ -215,4 +215,4 @@
</element> </element>
</form_elements> </form_elements>
</ingest_form> </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"> <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> <mimetypes>
<type>text/xml</type> <type>text/xml</type>

1
content_models/FAS_slideCModel.xml

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

2
content_models/STANDARD PDF.xml

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

2
content_models/STANDARD_FLVCM.xml

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

2
content_models/STANDARD_IMAGECM.xml

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

33
content_models/STANDARD_QT.xml

@ -53,12 +53,14 @@
<element label="Creator/" name="dc:creator" type="textfield"> <element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the <description>An entity primarily responsible for making the
content of the resource such as a person, organization or content of the resource such as a person, organization or
service.</description> service.
</description>
</element> </element>
<element label="Subject" name="dc:subject" type="select"> <element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the <description>An entity primarily responsible for making the
content of the resource such as a person, organization or content of the resource such as a person, organization or
service.</description> service.
</description>
<authoritative_list> <authoritative_list>
<item>home recording</item> <item>home recording</item>
<item>meeting</item> <item>meeting</item>
@ -69,27 +71,32 @@
<element label="Description of Media" name="dc:description" required="true" type="textarea"> <element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of <description>Examples include an abstract, table of
contents, or free-text account of the content of the contents, or free-text account of the content of the
resource.</description> resource.
</description>
</element> </element>
<element label="Publisher" name="dc:publisher" type="textfield"> <element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, <description>An entity, (including persons, organizations,
or services), responsible for making the resource or services), responsible for making the resource
available.</description> available.
</description>
</element> </element>
<element label="Contributor" name="dc:contributor" type="textfield"> <element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the <description>An entity responsible for contributing to the
content of the resource such as a person, organization or content of the resource such as a person, organization or
service.</description> service.
</description>
</element> </element>
<element label="Date" name="dc:date" type="textfield"> <element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date <description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description> 2007-10-23)
</description>
</element> </element>
<element label="Resource Type" name="dc:type" type="select"> <element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples <description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description> report, essay, dictionary.
</description>
<authoritative_list> <authoritative_list>
<item>none</item> <item>none</item>
<item>video</item> <item>video</item>
@ -108,16 +115,19 @@
</element> </element>
<element label="Source" name="dc:source" type="textfield"> <element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the <description>A reference to a resource from which the
present resource is derived.</description> present resource is derived.
</description>
</element> </element>
<element label="Identifier" name="dc:identifier" type="textfield"> <element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this <description>A unique reference to the resource; In this
instance, the accession number or collection instance, the accession number or collection
number.</description> number.
</description>
</element> </element>
<element label="Language" name="dc:language" type="select"> <element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of <description>The language of the intellectual content of
the resource.</description> the resource.
</description>
<authoritative_list> <authoritative_list>
<item field="eng">English</item> <item field="eng">English</item>
<item field="fre">French</item> <item field="fre">French</item>
@ -129,7 +139,8 @@
<element label="Rights Management" name="dc:rights" type="textarea"> <element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property <description>Information about intellectual property
rights, copyright, and various property rights, copyright, and various property
rights.</description> rights.
</description>
</element> </element>
</form_elements> </form_elements>
</ingest_form> </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"> <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> <mimetypes>
<type>application/pdf</type> <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="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute> <xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute <xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute> <xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/> <xsl:apply-templates select="*|node()"/>
</a> </a>
</span> </span>
@ -213,7 +216,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute> <xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute> <xsl:attribute name="target">_blank</xsl:attribute>
<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(.)"/> <xsl:value-of select="normalize-space(.)"/>
</a> </a>
</xsl:template> </xsl:template>
@ -222,7 +227,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute> <xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute> <xsl:attribute name="target">_blank</xsl:attribute>
<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(.)"/> <xsl:value-of select="normalize-space(.)"/>
</a> </a>
</xsl:template> </xsl:template>

294
content_models/islandora_jp2Sdep-slideCModel.xml

@ -3,123 +3,123 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties> <foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/> <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#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#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/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:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T20:58:05.234Z"/>
</foxml:objectProperties> </foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false"> <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: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> <foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#"> <audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1"> <audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action> <audit:action>ingest</audit:action>
<audit:componentID></audit:componentID> <audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:25:48.654Z</audit:date> <audit:date>2009-11-27T18:25:48.654Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification> <audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC2"> <audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>METHODMAP</audit:componentID> <audit:componentID>METHODMAP</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:30:03.064Z</audit:date> <audit:date>2009-11-27T18:30:03.064Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC3"> <audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DSINPUTSPEC</audit:componentID> <audit:componentID>DSINPUTSPEC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:30:34.272Z</audit:date> <audit:date>2009-11-27T18:30:34.272Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC4"> <audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>WSDL</audit:componentID> <audit:componentID>WSDL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:31:33.967Z</audit:date> <audit:date>2009-11-27T18:31:33.967Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC5"> <audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID> <audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:36:14.648Z</audit:date> <audit:date>2009-11-27T18:36:14.648Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC6"> <audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action> <audit:action>ingest</audit:action>
<audit:componentID></audit:componentID> <audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-01-26T20:06:07.452Z</audit:date> <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:justification>Ingested from local file /Users/aoneill/Desktop/tmp/islandora_jp2Sdep-slideCModel.xml</audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC7"> <audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID> <audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-05T16:47:23.192Z</audit:date> <audit:date>2010-03-05T16:47:23.192Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC8"> <audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID> <audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-11T20:58:05.234Z</audit:date> <audit:date>2010-03-11T20:58:05.234Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
</audit:auditTrail> </audit:auditTrail>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <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: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"> <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: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:isDeploymentOf rdf:resource="info:fedora/changeme-to-sDefPid"></fedora-model:isDeploymentOf>
<fedora-model:isContractorOf rdf:resource="info:fedora/changeme-to-cModelPid"></fedora-model:isContractorOf> <fedora-model:isContractorOf rdf:resource="info:fedora/changeme-to-cModelPid"></fedora-model:isContractorOf>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:jp2Sdep-slideCModel"> <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> <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> <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:slideCModel"></isContractorOf>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:jp2Sdep-slideCModel"> <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> <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> <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:slideCModel"></isContractorOf>
<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:herbCModel"></isContractorOf>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:jp2Sdep-slideCModel"> <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> <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> <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:herbCModel"></isContractorOf>
<isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:mapCModel"></isContractorOf> <isContractorOf xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:mapCModel"></isContractorOf>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="METHODMAP" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#"> <comment xmlns="info:fedora/fedora-system:def/comment#">
This METHODMAP datastream is included as a starting point to This METHODMAP datastream is included as a starting point to
assist in the creation of a service deployment. The METHODMAP assist in the creation of a service deployment. The METHODMAP
should define the the mapping of the WSDL to Fedora object methods. should define the the mapping of the WSDL to Fedora object methods.
</comment> </comment>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <foxml:xmlContent>
<fmm:MethodMap xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap" bDefPID="djatoka:bDef" name="MethodMap - djatoka Service Methods"> <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: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="$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> <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:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="image/jpeg"></fmm:MethodReturnType>
</fmm:Method> </fmm:Method>
</fmm:MethodMap> </fmm:MethodMap>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="DSINPUTSPEC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#"> <comment xmlns="info:fedora/fedora-system:def/comment#">
This DSINPUTSPEC datastream is included as a starting point to This DSINPUTSPEC datastream is included as a starting point to
assist in the creation of a service deployment. The DSINPUTSPEC assist in the creation of a service deployment. The DSINPUTSPEC
should define the datastreams to be used by WSDL-defined methods. should define the datastreams to be used by WSDL-defined methods.
</comment> </comment>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <foxml:xmlContent>
<fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec" label="jp2SdepInputSpec"> <fbs:DSInputSpec xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec" label="jp2SdepInputSpec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC"> <fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC">
<fbs:DSInputLabel>DC</fbs:DSInputLabel> <fbs:DSInputLabel>DC</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME> <fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction></fbs:DSInputInstruction> <fbs:DSInputInstruction></fbs:DSInputInstruction>
</fbs:DSInput> </fbs:DSInput>
</fbs:DSInputSpec> </fbs:DSInputSpec>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="WSDL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#"> <comment xmlns="info:fedora/fedora-system:def/comment#">
This WSDL datastream is included as a starting point to This WSDL datastream is included as a starting point to
assist in the creation of a service deployment. The WSDL assist in the creation of a service deployment. The WSDL
should define the services provided by this 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: For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI. http://fedora-commons.org/confluence/x/AwFI.
</comment> </comment>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <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: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:message name="getMetadataRequest">
<wsdl:part name="PID" type="xsd:string"></wsdl:part> <wsdl:part name="PID" type="xsd:string"></wsdl:part>
<wsdl:part name="DSID" 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:operation>
</wsdl:binding> </wsdl:binding>
</wsdl:definitions> </wsdl:definitions>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <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"> <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:title>islandora:jp2Sdep-slideCModel</dc:title>
<dc:identifier>islandora:jp2Sdep-slideCModel</dc:identifier> <dc:identifier>islandora:jp2Sdep-slideCModel</dc:identifier>
</oai_dc:dc> </oai_dc:dc>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
</foxml:digitalObject> </foxml:digitalObject>

20
content_models/islandora_mods2htmlSdep.xml

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

71
content_models/islandora_qtCModel.xml

@ -3,27 +3,27 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties> <foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/> <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#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#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/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:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T21:01:44.921Z"/>
</foxml:objectProperties> </foxml:objectProperties>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <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"> <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:title>Quicktime Content Model</dc:title>
<dc:identifier>islandora:qtCModel</dc:identifier> <dc:identifier>islandora:qtCModel</dc:identifier>
</oai_dc:dc> </oai_dc:dc>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="ISLANDORACM" CONTROL_GROUP="X" STATE="A" > <foxml:datastream ID="ISLANDORACM" CONTROL_GROUP="X" STATE="A" >
<foxml:datastreamVersion ID="ISLANDORACM.0" MIMETYPE="application/xml" LABEL="ISLANDORACM.0"> <foxml:datastreamVersion ID="ISLANDORACM.0" MIMETYPE="application/xml" LABEL="ISLANDORACM.0">
<foxml:xmlContent> <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> <mimetypes>
<type>video/quicktime</type> <type>video/quicktime</type>
<type>video/mp4</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"> <element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the <description>An entity primarily responsible for making the
content of the resource such as a person, organization or content of the resource such as a person, organization or
service.</description> service.
</description>
</element> </element>
<element label="Subject" name="dc:subject" type="select"> <element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the <description>An entity primarily responsible for making the
content of the resource such as a person, organization or content of the resource such as a person, organization or
service.</description> service.
</description>
<authoritative_list> <authoritative_list>
<item>home recording</item> <item>home recording</item>
<item>meeting</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"> <element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of <description>Examples include an abstract, table of
contents, or free-text account of the content of the contents, or free-text account of the content of the
resource.</description> resource.
</description>
</element> </element>
<element label="Publisher" name="dc:publisher" type="textfield"> <element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, <description>An entity, (including persons, organizations,
or services), responsible for making the resource or services), responsible for making the resource
available.</description> available.
</description>
</element> </element>
<element label="Contributor" name="dc:contributor" type="textfield"> <element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the <description>An entity responsible for contributing to the
content of the resource such as a person, organization or content of the resource such as a person, organization or
service.</description> service.
</description>
</element> </element>
<element label="Date" name="dc:date" type="textfield"> <element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date <description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description> 2007-10-23)
</description>
</element> </element>
<element label="Resource Type" name="dc:type" type="select"> <element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples <description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description> report, essay, dictionary.
</description>
<authoritative_list> <authoritative_list>
<item>none</item> <item>none</item>
<item>video</item> <item>video</item>
@ -131,16 +138,19 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
</element> </element>
<element label="Source" name="dc:source" type="textfield"> <element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the <description>A reference to a resource from which the
present resource is derived.</description> present resource is derived.
</description>
</element> </element>
<element label="Identifier" name="dc:identifier" type="textfield"> <element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this <description>A unique reference to the resource; In this
instance, the accession number or collection instance, the accession number or collection
number.</description> number.
</description>
</element> </element>
<element label="Language" name="dc:language" type="select"> <element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of <description>The language of the intellectual content of
the resource.</description> the resource.
</description>
<authoritative_list> <authoritative_list>
<item field="eng">English</item> <item field="eng">English</item>
<item field="fre">French</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"> <element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property <description>Information about intellectual property
rights, copyright, and various property rights, copyright, and various property
rights.</description> rights.
</description>
</element> </element>
</form_elements> </form_elements>
</ingest_form> </ingest_form>
</content_model> </content_model>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
</foxml:digitalObject> </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="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/> <xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/> <xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/"> <xsl:template match="/">
<xsl:if test="$count>0"> <xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3"> <table cellpadding="3" cellspacing="3">
<tr><td colspan="{$cellsPerRow}"> <tr>
<td colspan="{$cellsPerRow}">
<div align="center"> <div align="center">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</div> <br clear="all" /> </div>
</td></tr> <br clear="all" />
</td>
</tr>
<xsl:apply-templates select="sparql/results"/> <xsl:apply-templates select="sparql/results"/>
</table><br clear="all" /> </table>
<div align="center"> <br clear="all" />
<div align="center">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
@ -103,7 +163,7 @@
</xsl:choose> </xsl:choose>
</div> </div>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="sparql/results"> <xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]"> <xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr> <tr>
@ -124,30 +184,44 @@
<xsl:variable name="linkUrl"> <xsl:variable name="linkUrl">
<xsl:choose> <xsl:choose>
<xsl:when test="(content='Collection' or content='Community')"> <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:when>
<xsl:otherwise> <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:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<td valign="top" width="25%"> <td valign="top" width="25%">
<a> <a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/> <xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute> </xsl:attribute>
<img> <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>
</img> </a> <br clear="all" /> </img>
</a>
<br clear="all" />
<a> <a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/> <xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="$newTitle"/> <xsl:value-of select="$newTitle"/>
</a> </a>
<xsl:if test="(content!='Collection' and content!='Community')"> <xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a> <br />--
<a>
<xsl:attribute name="href"> <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:attribute>
DETAILS DETAILS
</a>-- </a>--

95
example_collection_views/critter.xsl

@ -5,29 +5,92 @@
<xsl:template match="/"> <xsl:template match="/">
<ul> <ul>
<li><b>Date Collected:</b><xsl:text> </xsl:text> <xsl:value-of select="/critters:sample/critters:date_collected"/></li> <li>
<li><b>Type:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:type"/></li> <b>Date Collected:</b>
<li><b>Phylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:phylum"/></li> <xsl:text> </xsl:text>
<li><b>SubPhylum:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:SubPhylum"/></li> <xsl:value-of select="/critters:sample/critters:date_collected"/>
<li><b>Class:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:class"/></li> </li>
<li><b>Order:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:order"/></li> <li>
<li><b>Family:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:family"/></li> <b>Type:</b>
<li><b>Genus:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:genus"/></li> <xsl:text> </xsl:text>
<li><b>Species:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:taxonomy/critters:species"/></li> <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> </ul>
<h4>Collection Location</h4> <h4>Collection Location</h4>
<ul> <ul>
<li><b>Site Name:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:sitename"/></li> <li>
<li><b>Country:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:country"/></li> <b>Site Name:</b>
<li><b>Region:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:region"/></li> <xsl:text> </xsl:text>
<li><b>Latitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:latitude"/></li> <xsl:value-of select="/critters:sample/critters:site/critters:sitename"/>
<li><b>Longitude:</b> <xsl:text> </xsl:text><xsl:value-of select="/critters:sample/critters:site/critters:longitude"/></li> </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>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> </ul>
<h4>Description</h4> <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:template>
</xsl:stylesheet> </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="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/> <xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/> <xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/"> <xsl:template match="/">
<xsl:if test="$count>0"> <xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%"> <table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}"> <tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;"> <div STYLE="text-align: center;">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</div> <br clear="all" /> </div>
</td></tr> <br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]"> <!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/> <xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>- </xsl:for-each>-
--> -->
<xsl:apply-templates select="sparql/results"/> <xsl:apply-templates select="sparql/results"/>
</table><br clear="all" /> </table>
<div STYLE="text-align: center;"> <br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
@ -122,7 +182,7 @@
</xsl:choose> </xsl:choose>
</div> </div>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="sparql/results"> <xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]"> <xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr> <tr>
@ -143,27 +203,40 @@
<xsl:variable name="linkUrl"> <xsl:variable name="linkUrl">
<xsl:choose> <xsl:choose>
<xsl:when test="(content='Collection' or content='Community')"> <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:when>
<xsl:otherwise> <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:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<td valign="top" width="25%"> <td valign="top" width="25%">
<a> <a>
<xsl:attribute name="href"> <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:attribute>
<img> <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>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/> <xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute> </xsl:attribute>
</img> </a> <br clear="all" /> </img>
</a>
<br clear="all" />
<a> <a>
<xsl:attribute name="href"> <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:attribute>
<xsl:value-of select="$newTitle"/> <xsl:value-of select="$newTitle"/>
</a> </a>

147
example_collection_views/mlp-sparqltoHtml.xsl

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

174
example_collection_views/refworks.xsl

@ -6,27 +6,127 @@
<xsl:if test="/reference/jf"> <xsl:if test="/reference/jf">
<h2>General Information</h2> <h2>General Information</h2>
<table cellpadding="2" cellspacing="2"> <table cellpadding="2" cellspacing="2">
<tr><td ><strong>Periodical:</strong></td><td><xsl:value-of select="/reference/jf"/></td></tr> <tr>
<tr><td><strong>Abbreviation:</strong></td><td><xsl:value-of select="/reference/jo"/></td></tr> <td >
<tr><td><strong>Volume:</strong></td><td><xsl:value-of select="/reference/vo"/></td></tr> <strong>Periodical:</strong>
<tr><td><strong>Issue:</strong></td><td><xsl:value-of select="/reference/is"/></td></tr> </td>
<tr><td><strong>Publisher:</strong></td><td><xsl:value-of select="/reference/pb"/></td></tr> <td>
<tr><td><strong>Place of Publication:</strong></td><td><xsl:value-of select="/reference/pp"/></td></tr> <xsl:value-of select="/reference/jf"/>
<tr><td><strong>Edition:</strong></td><td><xsl:value-of select="/reference/ed"/></td></tr> </td>
<tr><td><strong>Year:</strong></td><td><xsl:value-of select="/reference/yr"/></td></tr> </tr>
<tr><td><strong>Date:</strong></td><td><xsl:value-of select="/reference/fd"/></td></tr> <tr>
<tr><td><strong>Start Page:</strong></td><td><xsl:value-of select="/reference/sp"/></td></tr> <td>
<tr><td><strong>Other Pages:</strong></td><td><xsl:value-of select="/reference/op"/></td></tr> <strong>Abbreviation:</strong>
<tr><td><strong>ISSN/ISBN:</strong></td><td><xsl:value-of select="/reference/sn"/></td></tr> </td>
<tr><td><strong>Language:</strong></td><td><xsl:value-of select="/reference/la"/></td></tr> <td>
<tr><td><strong>UL:</strong></td><td><xsl:value-of select="/reference/ul"/></td></tr> <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> </table>
</xsl:if> </xsl:if>
<xsl:if test="/reference/t1"> <xsl:if test="/reference/t1">
<h2>Titles</h2> <h2>Titles</h2>
<ul> <ul>
<xsl:for-each select="/reference/t1"> <xsl:for-each select="/reference/t1">
<li><xsl:value-of select="."/></li> <li>
<xsl:value-of select="."/>
</li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if> </xsl:if>
@ -34,7 +134,9 @@
<ul> <ul>
<h3>Secondary Titles</h3> <h3>Secondary Titles</h3>
<xsl:for-each select="/reference/t2"> <xsl:for-each select="/reference/t2">
<li><xsl:value-of select="."/></li> <li>
<xsl:value-of select="."/>
</li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if> </xsl:if>
@ -42,7 +144,9 @@
<h2>Authors</h2> <h2>Authors</h2>
<ul> <ul>
<xsl:for-each select="/reference/a1"> <xsl:for-each select="/reference/a1">
<li><xsl:value-of select="."/></li> <li>
<xsl:value-of select="."/>
</li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if> </xsl:if>
@ -51,7 +155,9 @@
<ul> <ul>
<h3>Secondary Authors</h3> <h3>Secondary Authors</h3>
<xsl:for-each select="/reference/a2"> <xsl:for-each select="/reference/a2">
<li><xsl:value-of select="."/></li> <li>
<xsl:value-of select="."/>
</li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if> </xsl:if>
@ -59,34 +165,52 @@
<h2>Keywords</h2> <h2>Keywords</h2>
<ul> <ul>
<xsl:for-each select="/reference/k1"> <xsl:for-each select="/reference/k1">
<li><xsl:value-of select="."/></li> <li>
<xsl:value-of select="."/>
</li>
</xsl:for-each> </xsl:for-each>
</ul> </ul>
</xsl:if> </xsl:if>
<xsl:if test="/reference/ab"> <xsl:if test="/reference/ab">
<h2>Abstract</h2> <h2>Abstract</h2>
<xsl:for-each select="/reference/ab"> <xsl:for-each select="/reference/ab">
<div><xsl:value-of select="."/> </div> <div>
<xsl:value-of select="."/>
</div>
</xsl:for-each> </xsl:for-each>
</xsl:if> </xsl:if>
<xsl:if test="/reference/no"> <xsl:if test="/reference/no">
<h2>Notes</h2> <h2>Notes</h2>
<xsl:for-each select="/reference/no"> <xsl:for-each select="/reference/no">
<div><xsl:value-of select="."/> </div> <div>
<xsl:value-of select="."/>
</div>
</xsl:for-each> </xsl:for-each>
</xsl:if> </xsl:if>
<xsl:variable name="ISSN"> <xsl:variable name="ISSN">
<xsl:value-of select="/reference/sn"/> <xsl:value-of select="/reference/sn"/>
</xsl:variable> </xsl:variable>
<xsl:variable name="BASEURL"> <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> </xsl:variable>
<br /> <br />
<xsl:if test="/reference/sn"> <xsl:if test="/reference/sn">
<div><a> <div>
<xsl:attribute name="href"><xsl:value-of select="$BASEURL"/></xsl:attribute> <a>
<xsl:attribute name="href">
<xsl:value-of select="$BASEURL"/>
</xsl:attribute>
<xsl:attribute name="target">_blank</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:if>
</xsl:template> </xsl:template>
</xsl:stylesheet> </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="end" select="($start - 1) + number($size)"/>
<xsl:variable name="cellsPerRow" select="4"/> <xsl:variable name="cellsPerRow" select="4"/>
<xsl:variable name="count" select="count(sparql/results/result)"/> <xsl:variable name="count" select="count(sparql/results/result)"/>
<xsl:template match="/"> <xsl:template match="/">
<xsl:if test="$count>0"> <xsl:if test="$count>0">
<table cellpadding="3" cellspacing="3" width="90%"> <table cellpadding="3" cellspacing="3" width="90%">
<tr><td colspan="{$cellsPerRow}"> <tr>
<td colspan="{$cellsPerRow}">
<div STYLE="text-align: center;"> <div STYLE="text-align: center;">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:otherwise> </xsl:otherwise>
</xsl:choose> </xsl:choose>
</div> <br clear="all" /> </div>
</td></tr> <br clear="all" />
</td>
</tr>
<!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]"> <!--<xsl:for-each select="/sparql/results/result[position()>=$start and position() &lt;=$end]">
<xsl:variable name='OBJECTURI' select="object/@uri"/> <xsl:variable name='OBJECTURI' select="object/@uri"/>
@ -80,41 +111,70 @@
</xsl:for-each>- </xsl:for-each>-
--> -->
<xsl:apply-templates select="sparql/results"/> <xsl:apply-templates select="sparql/results"/>
</table><br clear="all" /> </table>
<div STYLE="text-align: center;"> <br clear="all" />
<div STYLE="text-align: center;">
<xsl:choose> <xsl:choose>
<xsl:when test="$end >= $count and $start = 1"> <xsl:when test="$end >= $count and $start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
</xsl:when> </xsl:when>
<xsl:when test="$end >= $count"> <xsl:when test="$end >= $count">
<xsl:value-of select="$start"/>-<xsl:value-of select="$count"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$count"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a> </a>
</xsl:when> </xsl:when>
<xsl:when test="$start = 1"> <xsl:when test="$start = 1">
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
</xsl:when> </xsl:when>
<xsl:otherwise> <xsl:otherwise>
<xsl:value-of select="$start"/>-<xsl:value-of select="$end"/> <xsl:value-of select="$start"/>-
of <xsl:value-of select="$count"/>&#160;<br /> <xsl:value-of select="$end"/>
of
<xsl:value-of select="$count"/>&#160;
<br />
<a> <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> </xsl:attribute>
&lt;&lt;Prev &lt;&lt;Prev
</a>&#160; </a>&#160;
<a> <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> </xsl:attribute>
Next>> Next>>
</a> </a>
@ -122,7 +182,7 @@
</xsl:choose> </xsl:choose>
</div> </div>
</xsl:if> </xsl:if>
</xsl:template> </xsl:template>
<xsl:template match="sparql/results"> <xsl:template match="sparql/results">
<xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]"> <xsl:for-each select="result[position() mod $cellsPerRow = 1 and position()>=$start and position() &lt;=$end]">
<tr> <tr>
@ -143,32 +203,46 @@
<xsl:variable name="linkUrl"> <xsl:variable name="linkUrl">
<xsl:choose> <xsl:choose>
<xsl:when test="(content='Collection' or content='Community')"> <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:when>
<xsl:otherwise> <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:otherwise>
</xsl:choose> </xsl:choose>
</xsl:variable> </xsl:variable>
<td valign="top" width="25%"> <td valign="top" width="25%">
<a> <a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/> <xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute> </xsl:attribute>
<img> <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>
<xsl:attribute name="alt"><xsl:value-of select="$newTitle"/> <xsl:attribute name="alt">
<xsl:value-of select="$newTitle"/>
</xsl:attribute> </xsl:attribute>
</img> </a> <br clear="all" /> </img>
</a>
<br clear="all" />
<a> <a>
<xsl:attribute name="href"><xsl:value-of select="$linkUrl"/> <xsl:attribute name="href">
<xsl:value-of select="$linkUrl"/>
</xsl:attribute> </xsl:attribute>
<xsl:value-of select="$newTitle"/> <xsl:value-of select="$newTitle"/>
</a> </a>
<xsl:if test="(content!='Collection' and content!='Community')"> <xsl:if test="(content!='Collection' and content!='Community')">
<br />--<a> <br />--
<a>
<xsl:attribute name="href"> <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:attribute>
DETAILS DETAILS
</a>-- </a>--

135
example_collection_views/sparqltoHtml.xsl

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

5
fedora_repository.install

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/** /**
* @file fedora_repository.install * @file fedora_repository.install
@ -59,7 +60,7 @@ function fedora_repository_requirements($phase) {
$requirements['fedora-repository']['value'] = t("Not available"); $requirements['fedora-repository']['value'] = t("Not available");
$requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR; $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.', $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 { else {
$requirements['fedora-repository']['value'] = t("Available"); $requirements['fedora-repository']['value'] = t("Available");

79
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'); drupal_set_message(t('You must specify an object pid to purge an object.'), 'error');
return ''; 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, '%name' => $name,
'%pid' => $pid) '%pid' => $pid)
); );
@ -93,8 +94,8 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
return ''; return '';
} }
if (!validPid($collection_pid)) { if (!valid_pid($collection_pid)) {
if (validPid(urldecode($collection_pid))) { if (valid_pid(urldecode($collection_pid))) {
$collection_pid = urldecode($collection_pid); $collection_pid = urldecode($collection_pid);
} }
else { else {
@ -286,7 +287,7 @@ function fedora_repository_purge_object_form(&$form_state, $pid, $referrer = NUL
function add_stream($collection_pid=NULL, $collectionName=NULL) { function add_stream($collection_pid=NULL, $collectionName=NULL) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); 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'); drupal_set_message(t("This PID is not valid!"), 'error');
return ' '; return ' ';
} }
@ -377,9 +378,9 @@ function add_stream_form_validate($form, &$form_state) {
return FALSE; return FALSE;
} }
$validators = array( $validators = array(
// 'file_validate_is_image' => array(), // 'file_validate_is_image' => array(),
// 'file_validate_image_resolution' => array('85x85'), // 'file_validate_image_resolution' => array('85x85'),
// 'file_validate_size' => array(30 * 1024), // 'file_validate_size' => array(30 * 1024),
); );
$fileObject = file_save_upload('add-stream-file-location', $validators); $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 ' '; 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) '%name' => $name)
); );
$output .= drupal_get_form('fedora_repository_purge_stream_form', $pid, $dsId); $output .= drupal_get_form('fedora_repository_purge_stream_form', $pid, $dsId);
@ -534,7 +536,7 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) {
$pid = $form_state['values']['pid']; $pid = $form_state['values']['pid'];
$dsid = $form_state['values']['dsId']; $dsid = $form_state['values']['dsId'];
$dsLabel = $form_state['values']['dsLabel']; $dsLabel = $form_state['values']['dsLabel'];
// Remove the original file extension from the label and add the new one // Remove the original file extension from the label and add the new one
$indexOfDot = strrpos($dsLabel, '.'); //use strrpos to get the last dot $indexOfDot = strrpos($dsLabel, '.'); //use strrpos to get the last dot
if ($indexOfDot !== FALSE) { if ($indexOfDot !== FALSE) {
$dsLabel = substr($dsLabel, 0, $indexOfDot); $dsLabel = substr($dsLabel, 0, $indexOfDot);
@ -706,12 +708,12 @@ function fedora_repository_access($op, $node, $account) {
*/ */
function makeObject($pid, $dsID) { function makeObject($pid, $dsID) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!validPid($pid)) { if (!valid_pid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error'); drupal_set_message(t("Invalid PID!"), 'error');
return ' '; return ' ';
} }
if (!validDsid($dsID)) { if (!valid_dsid($dsID)) {
drupal_set_message(t("Invalid dsID!"), 'error'); drupal_set_message(t("Invalid dsID!"), 'error');
return ' '; return ' ';
} }
@ -742,27 +744,29 @@ function makeObject($pid, $dsID) {
function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) { function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
global $user; global $user;
if (!fedora_available()) { 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 ''; return '';
} }
if ($pid & !validPid($pid)) { $item = new fedora_item($pid);
if (!$item->exists()) {
drupal_not_found();
}
if ($pid & !validPid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error'); drupal_set_message(t("Invalid PID!"), 'error');
return ' '; return ' ';
} }
if ($dsId & !validDsid($dsId)) { if ($dsId & !valid_dsid($dsId)) {
drupal_set_message(t("Invalid dsID!"), 'error'); drupal_set_message(t("Invalid dsID!"), 'error');
return ' '; return ' ';
} }
if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
//drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied"), 'error');
if (user_access('access administration pages')) { if (user_access('access administration pages')) {
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning'); drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning');
} }
@ -790,13 +794,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');
$collectionClass = new CollectionClass(); $collectionClass = new CollectionClass();
//if(!isset($pageNumber)){
// $pageNumber=0;
//}
//if(!isset($limit)){
// $limit=20;
//}
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'ContentModel');
module_load_include('inc', 'fedora_repository', 'plugins/fedoraObject'); module_load_include('inc', 'fedora_repository', 'plugins/fedoraObject');
$breadcrumbs = array(); $breadcrumbs = array();
@ -804,15 +801,12 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
drupal_set_breadcrumb(array_reverse($breadcrumbs)); drupal_set_breadcrumb(array_reverse($breadcrumbs));
$offset = $limit * $page_number; $offset = $limit * $page_number;
//$results = $collectionClass->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt
//$results = $collectionClass->getRelatedItems($pid, NULL);
$content_models = $objectHelper->get_content_models_list($pid); $content_models = $objectHelper->get_content_models_list($pid);
// Each content model may return either a tabset array or plain HTML. If it's HTML, stick it in a tab. // Each content model may return either a tabset array or plain HTML. If it's HTML, stick it in a tab.
$cmodels_tabs = array( $cmodels_tabs = array(
'#type' => 'tabset', '#type' => 'tabset',
); );
foreach ($content_models as $content_model) { foreach ($content_models as $content_model) {
//$content_model_fieldsets = $objectHelper->createExtraFieldsets($pid, $content_model, $pageNumber);
$content_model_fieldset = $content_model->displayExtraFieldset($pid, $page_number); $content_model_fieldset = $content_model->displayExtraFieldset($pid, $page_number);
if (is_array($content_model_fieldset)) { if (is_array($content_model_fieldset)) {
$cmodels_tabs = array_merge($cmodels_tabs, $content_model_fieldset); $cmodels_tabs = array_merge($cmodels_tabs, $content_model_fieldset);
@ -829,13 +823,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$obj = new FedoraObject($pid); $obj = new FedoraObject($pid);
$object_details = $obj->showFieldSets(); $object_details = $obj->showFieldSets();
$cmodels_tabs = array_merge($cmodels_tabs, $object_details); $cmodels_tabs = array_merge($cmodels_tabs, $object_details);
//$content .= $objectHelper
//$content .= $objectHelper->parseContent($results, $pid, $dsId, $collection, $pageNumber);
//the below is for islandlives we should be able to do this in the xslt though
//$css=$path.'/stylesheets/container-large.css';
//drupal_add_css($css);
return tabs_render($cmodels_tabs); return tabs_render($cmodels_tabs);
} }
@ -892,7 +879,7 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU
$item = new Fedora_Item($pid); $item = new Fedora_Item($pid);
if ($item !== false) { if ($item !== FALSE) {
echo $item->get_dissemination($servicePid, $serviceMethod); echo $item->get_dissemination($servicePid, $serviceMethod);
} }
@ -1285,7 +1272,7 @@ function fedora_repository_demo_objects_form() {
); );
foreach (array( foreach (array(
'islandora:collectionCModel' => 'Islandora default content models', 'islandora:collectionCModel' => 'Islandora default content models',
'islandora:top' => 'Islandora top-level collection', 'islandora:top' => 'Islandora top-level collection',
'islandora:demos' => 'Islandora demos 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>.)', '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>.)',
@ -1391,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_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') . '/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'); $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) { } catch (exception $e) {
} }
@ -1403,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'); $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 { 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'); $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) { } catch (exception $e) {
} }
@ -1423,7 +1410,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI); $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'); $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'); $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) { } catch (exception $e) {
} }
@ -1445,7 +1432,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection'); $dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection');
try { 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'); $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) { } catch (exception $e) {
} }
@ -1464,14 +1451,14 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
try { try {
$item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/islandora_largeimages.xml'); $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'); $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) { } catch (exception $e) {
$error .= " - Problem ingesting islandora:largeimages collection"; $error .= " - Problem ingesting islandora:largeimages collection";
} }
} }
if (!empty($error)) { if (!empty($error)) {
drupal_set_message('Some problems occurred: ' . $error); drupal_set_message(t('Some problems occurred: ' . $error));
} }
} }
} }
@ -1919,7 +1906,7 @@ function _fedora_repository_empty_basket() {
function fedora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFlag = FALSE) { function fedora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFlag = FALSE) {
if ($warn && _is_added_to_basket($pid)) { 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'])) { if (!isset($_SESSION['basket'])) {
@ -1960,7 +1947,9 @@ function theme_add_to_basket_link($pid, $type = 'object') {
*/ */
if (!_is_added_to_basket($pid)) { if (!_is_added_to_basket($pid)) {
return l( 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)
); );
} }
@ -1988,7 +1977,7 @@ function fedora_repository_batch_reingest_object($object, &$context) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!empty($object) && is_array($object)) { if (!empty($object) && is_array($object)) {
$pid = $object['pid']; $pid = $object['pid'];
if (!validPid($pid)) { if (!valid_pid($pid)) {
return NULL; return NULL;
} }
// Does the object exist? If so, purge it. // Does the object exist? If so, purge it.

11
fedora_repository.solutionpacks.inc

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

17
formClass.inc

@ -2,6 +2,14 @@
// $Id$ // $Id$
/**
* @file
* formClass class
*/
/**
* form Class
*/
class formClass { class formClass {
function formClass() { function formClass() {
@ -237,7 +245,8 @@ class formClass {
$form['fedora_repository_url'] = array( $form['fedora_repository_url'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Fedora RISearch URL'), '#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, '#description' => t('The url of the Fedora server'), '#required' => TRUE,
'#weight' => 0 '#weight' => 0
); );
@ -437,10 +446,14 @@ class formClass {
try { try {
$object = $client->__soapCall('ModifyDatastreamByValue', array($params)); $object = $client->__soapCall('ModifyDatastreamByValue', array($params));
} catch (exception $e) { } 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) { function can_ingest_here($collection_pid) {
module_load_include('inc', 'fedora_repository', 'SecurityClass'); module_load_include('inc', 'fedora_repository', 'SecurityClass');
$securityClass = new SecurityClass(); $securityClass = new SecurityClass();

5
ilives/book.inc

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

3
ilives/fedora_ilives.install

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

2
ilives/fedora_ilives.module

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

33
ilives/image_rotator_tagger_block.inc

@ -1,7 +1,8 @@
<?php <?php
// $Id$
/*
/**
* @file image_rotator_tagger_block.inc * @file image_rotator_tagger_block.inc
*/ */
@ -25,27 +26,25 @@ and $object <dc:title> $title';
$resultsdoc->loadXML($results); $resultsdoc->loadXML($results);
$resultslist = $resultsdoc->getElementsByTagName('result'); $resultslist = $resultsdoc->getElementsByTagName('result');
if ( $resultslist->length == 0 ) { if ($resultslist->length == 0) {
return NULL; return NULL;
} }
//return htmlentities(substr($results, 0, 1000)); //return htmlentities(substr($results, 0, 1000));
$randresult = $resultslist->item( rand()%$resultslist->length ); $randresult = $resultslist->item(rand() % $resultslist->length);
if (empty($randresult)) { if (empty($randresult)) {
return NULL; return NULL;
} }
$objs = $randresult->getElementsByTagName('object'); $objs = $randresult->getElementsByTagName('object');
$obj = $objs->item(0); $obj = $objs->item(0);
$pid = substr( $obj->getAttribute('uri'), 12); $pid = substr($obj->getAttribute('uri'), 12);
$titles = $randresult->getElementsByTagName('title'); $titles = $randresult->getElementsByTagName('title');
$title = $titles->item(0); $title = $titles->item(0);
return array('pid' => $pid, return array('pid' => $pid,
//'title' => $randresult->textContent); //'title' => $randresult->textContent);
'title' => $title->nodeValue); 'title' => $title->nodeValue);
} }
function _fedora_image_rotator_tagger_block_content() { function _fedora_image_rotator_tagger_block_content() {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form'); 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']); $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>' 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)) . 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(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>'; . drupal_get_form('fedora_repository_image_tagging_form', $result['pid']) . '</p>';
} }
else { 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'); drupal_add_js(drupal_get_path('module', 'fedora_ilives').'/fedora_ilives_ajax.js', 'theme');
return TRUE; return TRUE;
}*/ } */
class ShowILivesStreamsInFieldSets { class ShowILivesStreamsInFieldSets {
private $pid =NULL; private $pid = NULL;
function ShowILivesStreamsInFieldSets($pid) { function ShowILivesStreamsInFieldSets($pid) {
//drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); //drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$this->pid=$pid; $this->pid = $pid;
} }
function showJPG() { function showJPG() {
@ -104,4 +106,5 @@ class ShowILivesStreamsInFieldSets {
return theme('fieldset', $collection_fieldset) return theme('fieldset', $collection_fieldset)
. drupal_get_form('fedora_repository_image_tagging_form', $this->pid); . 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'?> <?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--> <!--define what fields we can query as part of the advanced search for this collection-->
<default>dc.title</default> <default>dc.title</default>
<number_of_results>1000</number_of_results> <number_of_results>1000</number_of_results>
@ -55,7 +55,7 @@
<field>tagUser</field> <field>tagUser</field>
<value>Tag Creator</value> <value>Tag Creator</value>
</term>--> </term>-->
</search_terms> </search_terms>

19
ilives/tests/fedora_ilives.test

@ -1,9 +1,11 @@
<?php <?php
// $Id$
/*
* Tests the functions of the Fedora Repository module.
*/ /**
* @file
* Tests the functions of the Fedora Repository module.
*/
class FedoraBookTestCase extends DrupalWebTestCase { class FedoraBookTestCase extends DrupalWebTestCase {
@ -31,7 +33,6 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->drupalLogin($repository_user); $this->drupalLogin($repository_user);
} }
public function testBookCModel() { public function testBookCModel() {
@ -73,11 +74,10 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->pass("Successfully ingested book object $book_pid."); $this->pass("Successfully ingested book object $book_pid.");
} }
$this->cleanUpRepository($pid_list); $this->cleanUpRepository($pid_list);
} }
private function cleanUpRepository($pid_list = array()) { 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) { foreach ($pid_list as $pid) {
$this->drupalPost("fedora/repository/purgeObject/$pid", array(), 'Purge'); $this->drupalPost("fedora/repository/purgeObject/$pid", array(), 'Purge');
$this->drupalPost(NULL, array(), 'Delete'); $this->drupalPost(NULL, array(), 'Delete');
@ -98,9 +98,9 @@ class FedoraBookTestCase extends DrupalWebTestCase {
if (!is_dir($file_dir)) { if (!is_dir($file_dir)) {
mkdir($file_dir, 0777, TRUE); 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()); $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')) { 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:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties> <foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/> <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#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#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/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:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-09-14T14:09:41.955Z"/>
</foxml:objectProperties> </foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false"> <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: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> <foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#"> <audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1"> <audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action> <audit:action>ingest</audit:action>
<audit:componentID></audit:componentID> <audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:43:42.518Z</audit:date> <audit:date>2009-01-23T20:43:42.518Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification> <audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC2"> <audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID> <audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:45:33.190Z</audit:date> <audit:date>2009-01-23T20:45:33.190Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC3"> <audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DC</audit:componentID> <audit:componentID>DC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-23T20:48:22.246Z</audit:date> <audit:date>2009-01-23T20:48:22.246Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC4"> <audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action> <audit:action>ingest</audit:action>
<audit:componentID></audit:componentID> <audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-01-26T20:27:14.697Z</audit:date> <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:justification>Ingested from local file /opt/fedora/export/ilives_CollectionModel.xml</audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC5"> <audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action> <audit:action>ingest</audit:action>
<audit:componentID></audit:componentID> <audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-03-21T22:35:49.622Z</audit:date> <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:justification>Ingested from local file /Volumes/iLives/iLivesTexts/215258_jpg/Content_Models/CollectionCModel.xml</audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC6"> <audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action> <audit:action>ingest</audit:action>
<audit:componentID></audit:componentID> <audit:componentID></audit:componentID>
<audit:responsibility>admin</audit:responsibility> <audit:responsibility>admin</audit:responsibility>
<audit:date>2009-09-14T14:09:41.955Z</audit:date> <audit:date>2009-09-14T14:09:41.955Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification> <audit:justification>Fedora Object Ingested</audit:justification>
</audit:record> </audit:record>
</audit:auditTrail> </audit:auditTrail>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <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: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"> <rdf:Description rdf:about="info:fedora/ilives:CollectionModel">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0"></fedora-model:hasModel> <fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0"></fedora-model:hasModel>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:CollectionModel"> <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> <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> <hasMember xmlns="info:fedora/fedora-system:def/relations-external#" rdf:resource="ilives:lowerfreetown"></hasMember>
</rdf:Description> </rdf:Description>
</rdf:RDF> </rdf:RDF>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="DS-COMPOSITE-MODEL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#"> <dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#">
<comment xmlns="info:fedora/fedora-system:def/comment#"> <comment xmlns="info:fedora/fedora-system:def/comment#">
This DS-COMPOSITE-MODEL datastream is included as a starting point to This DS-COMPOSITE-MODEL datastream is included as a starting point to
assist in the creation of a content model. The DS-COMPOSITE-MODEL 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> <form MIME="text/xml"></form>
</dsTypeModel> </dsTypeModel>
</dsCompositeModel> </dsCompositeModel>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <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 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:title>IslandLives Collection Model</dc:title>
<dc:identifier>ilives:CollectionModel</dc:identifier> <dc:identifier>ilives:CollectionModel</dc:identifier>
</oai_dc:dc> </oai_dc:dc>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <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"> <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: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. <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. 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. 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:contributor>Robertson Library, University of Prince Edward Island</dc:contributor>
<dc:identifier>ilives:CollectionModel</dc:identifier> <dc:identifier>ilives:CollectionModel</dc:identifier>
</oai_dc:dc> </oai_dc:dc>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
</foxml:digitalObject> </foxml:digitalObject>

90
ilives/xml/ilives_collection.xml

@ -3,54 +3,54 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" 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"> xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties> <foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/> <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#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#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/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:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2009-05-14T19:35:11.912Z"/>
</foxml:objectProperties> </foxml:objectProperties>
<foxml:datastream ID="AUDIT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false"> <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: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> <foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#"> <audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1"> <audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action> <audit:action>ingest</audit:action>
<audit:componentID></audit:componentID> <audit:componentID></audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-05-14T19:32:21.132Z</audit:date> <audit:date>2009-05-14T19:32:21.132Z</audit:date>
<audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification> <audit:justification>Created with Admin GUI &quot;New Object&quot; command</audit:justification>
</audit:record> </audit:record>
<audit:record ID="AUDREC2"> <audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/> <audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action> <audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DC</audit:componentID> <audit:componentID>DC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility> <audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-05-14T19:35:11.912Z</audit:date> <audit:date>2009-05-14T19:35:11.912Z</audit:date>
<audit:justification></audit:justification> <audit:justification></audit:justification>
</audit:record> </audit:record>
</audit:auditTrail> </audit:auditTrail>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <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: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> <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"> <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:title>IslandLives Collection</dc:title>
<dc:identifier>ilives:collection</dc:identifier> <dc:identifier>ilives:collection</dc:identifier>
</oai_dc:dc> </oai_dc:dc>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </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: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> <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 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: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: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> <dc:identifier>ilives:collection</dc:identifier>
</oai_dc:dc> </oai_dc:dc>
</foxml:xmlContent> </foxml:xmlContent>
</foxml:datastreamVersion> </foxml:datastreamVersion>
</foxml:datastream> </foxml:datastream>
</foxml:digitalObject> </foxml:digitalObject>

15
ilives/xml/ilives_tei2htmlSdep-pageCModel.xml

@ -189,8 +189,11 @@
<xsl:attribute name="class">search persName</xsl:attribute> <xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute> <xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute <xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute> <xsl:value-of
select=".//tei:surname"/>+
<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection
</xsl:attribute>
<xsl:apply-templates select="*|node()"/> <xsl:apply-templates select="*|node()"/>
</a> </a>
</span> </span>
@ -205,7 +208,9 @@
<xsl:attribute name="class">search placeName</xsl:attribute> <xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute> <xsl:attribute name="target">_blank</xsl:attribute>
<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(.)"/> <xsl:value-of select="normalize-space(.)"/>
</a> </a>
</xsl:template> </xsl:template>
@ -214,7 +219,9 @@
<xsl:attribute name="class">search orgName</xsl:attribute> <xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute> <xsl:attribute name="target">_blank</xsl:attribute>
<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(.)"/> <xsl:value-of select="normalize-space(.)"/>
</a> </a>
</xsl:template> </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:choose>
<xsl:when test="contains ('isbn issn uri doi lccn uri', $type)"> <xsl:when test="contains ('isbn issn uri doi lccn uri', $type)">
<dc:identifier> <dc:identifier>
<xsl:value-of select="$type"/>: <xsl:value-of select="."/> <xsl:value-of select="$type"/>: 
<xsl:value-of select="."/>
</dc:identifier> </dc:identifier>
</xsl:when> </xsl:when>
<xsl:otherwise> <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: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()"/> <xsl:variable name="dateName" select="local-name()"/>
<dc:date> <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> </dc:date>
</xsl:template> </xsl:template>
<xsl:template match="mods:temporal[@point='start'] "> <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>
<xsl:template match="mods:temporal[@point!='start' and @point!='end'] "> <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: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:variable name="OBJECTSPAGE">
<xsl:value-of select="$objectsPage"/> <xsl:value-of select="$objectsPage"/>
</xsl:variable> </xsl:variable>
<xsl:variable name="PID"> <xsl:variable name="PID">
<xsl:value-of select="$pid"/> <xsl:value-of select="$pid"/>
</xsl:variable> </xsl:variable>
<xsl:variable name="RECORDID"> <xsl:variable name="RECORDID">
<xsl:value-of select='substring-after($PID,":")'/> <xsl:value-of select='substring-after($PID,":")'/>
</xsl:variable> </xsl:variable>
<xsl:variable name="USER" select="$userID"/> <xsl:variable name="USER" select="$userID"/>
<xsl:variable name="INGESTED" select="$ingested"/> <xsl:variable name="INGESTED" select="$ingested"/>
<xsl:template match="/"> <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"> <h1 >
: <xsl:value-of select="."/></xsl:for-each></h1> <xsl:value-of select="//mods:titleInfo/mods:nonSort"/>
<xsl:for-each select="//mods:titleInfo[@type='alternative']/mods.title"><h3> <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="substring-before(text(),'/')"/>-->
<xsl:value-of select="."/><xsl:text> </xsl:text> </h3> <xsl:value-of select="."/>
<xsl:text> </xsl:text>
</h3>
</xsl:for-each> </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> <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> </xsl:attribute>
</img> </img>
</td><td ><div style="align:left"><table cellpadding="3" cellspacing="2" width="90%" > </td>
<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> <td >
<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> <div style="align:left">
<tr><td align="right" valign="top"><b>Publisher: </b></td><td valign="top"><xsl:value-of select="//mods:publisher"/></td></tr> <table cellpadding="3" cellspacing="2" width="90%" >
<tr><td align="right" valign="top"><b>Date: </b></td><td valign="top"><xsl:value-of select="//mods:dateIssued"/></td></tr> <tr>
<tr><td align="right" valign="top"><b>Language: </b></td><td valign="top"><xsl:value-of select="//mods:languageTerm"/></td></tr> <td align="right" valign="top">
<tr><td align="right" valign="top"><b>Pagination: </b></td><td valign="top"><xsl:value-of select="//mods:extent"/></td></tr> <b>By Statement: </b>
<tr><td align="right" valign="top"><b>ISBN 10: </b></td><td valign="top"><xsl:value-of select="//mods:identifier[@type='isbn']"/></td></tr> </td>
<tr><td align="right" valign="top"><b>Subjects: </b></td><td valign="top"><xsl:for-each select="//mods:subject"> <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="*"> <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:attribute>
<xsl:value-of select="."/></a><xsl:text> </xsl:text></xsl:for-each><br /></xsl:for-each> <xsl:value-of select="."/>
</td></tr> </a>
</table></div></td><td valign="top"> <xsl:text> </xsl:text>
</xsl:for-each>
<br />
</xsl:for-each>
</td>
</tr>
</table>
</div>
</td>
<td valign="top">
<xsl:if test="$INGESTED = 'true'"> <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>
</div></xsl:if> <a>
<div> <xsl:attribute name="href">
<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> <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 Checkout
</a> </a>
</div> <xsl:if test="$INGESTED = 'true'"><div> </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> <xsl:if test="$INGESTED = 'true'">
</div></xsl:if> <div>
<xsl:if test="($USER > 0) and ($INGESTED = 'true')"> <a>
<div> <xsl:attribute name="href">
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>teieditor/<xsl:value-of select="$PID"/></xsl:attribute>Edit</a> <xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
</div> <xsl:value-of select="$PID"/>/PDF/
</xsl:if> <xsl:value-of select="$PID"/>.pdf
</td></tr></table> </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:template>
</xsl:stylesheet> </xsl:stylesheet>

13
ilives/xsl/pageResults.xsl

@ -118,21 +118,26 @@
<td valign="top" width="16%"> <td valign="top" width="16%">
<a> <a>
<xsl:attribute name="href"> <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> </xsl:attribute>
<img> <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"> <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> <!--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> </xsl:attribute>
</img> </img>
</a> </a>
<br /> <br />
<a> <a>
<xsl:attribute name="href"> <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:attribute>
<xsl:value-of select="substring-before($DCTITLE, '-')"/> <xsl:value-of select="substring-before($DCTITLE, '-')"/>
<br /> <br />

143
ilives/xsl/results.xsl

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

1
islandoracm.xsd

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

6
js/AC_Quicktime.js

@ -55,7 +55,7 @@ Copyright © 2006-2007 Apple Computer, Inc., All Rights Reserved
/************** LOCALIZABLE GLOBAL VARIABLES ****************/ /************** LOCALIZABLE GLOBAL VARIABLES ****************/
var gArgCountErr = 'The "%%" function requires an even number of arguments.' 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 **********************/ /******************** END LOCALIZABLE **********************/
@ -64,7 +64,9 @@ var gQTGeneratorVersion = 1.2;
var gQTBehaviorID = "qt_event_source"; var gQTBehaviorID = "qt_event_source";
var gQTEventsEnabled = false; var gQTEventsEnabled = false;
function AC_QuickTimeVersion() { return gQTGeneratorVersion; } function AC_QuickTimeVersion() {
return gQTGeneratorVersion;
}
function _QTComplain(callingFcnName, errMsg) function _QTComplain(callingFcnName, errMsg)
{ {

23
js/printer_tool.js

@ -3,12 +3,19 @@
var PrinterTool = {}; var PrinterTool = {};
PrinterTool.windowSettings = 'toolbar=no,location=no,' + 'status=no,menu=no,scrollbars=yes,width=650,height=400'; 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. */ /** * 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; PrinterTool.print = function (tagID) {
if(!target || target.childNodes.length === 0) { alert("Nothing to Print"); return; var target = document.getElementById(tagID);
} var title = document.title;
var content = target.innerHTML; if(!target || target.childNodes.length === 0) {
var text = '<html><head><title>' + title + alert(t("Nothing to Print"));
'</title><body>' + content +'</body></html>'; return;
printerWindow = window.open('', '', PrinterTool.windowSettings); printerWindow.document.open(); printerWindow.document.write(text); printerWindow.document.close(); }
printerWindow.print(); 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.util == "undefined") deconcept.util = new Object();
if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object(); if(typeof deconcept.SWFObjectUtil == "undefined") deconcept.SWFObjectUtil = new Object();
deconcept.SWFObject = function(swf, id, w, h, ver, c, quality, xiRedirectUrl, redirectUrl, detectKey) { 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.DETECT_KEY = detectKey ? detectKey : 'detectflash';
this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY); this.skipDetect = deconcept.util.getRequestParameter(this.DETECT_KEY);
this.params = new Object(); this.params = new Object();
this.variables = new Object(); this.variables = new Object();
this.attributes = new Array(); this.attributes = new Array();
if(swf) { this.setAttribute('swf', swf); } if(swf) {
if(id) { this.setAttribute('id', id); } this.setAttribute('swf', swf);
if(w) { this.setAttribute('width', w); } }
if(h) { this.setAttribute('height', h); } if(id) {
if(ver) { this.setAttribute('version', new deconcept.PlayerVersion(ver.toString().split("."))); } 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(); this.installedVer = deconcept.SWFObjectUtil.getPlayerVersion();
if (!window.opera && document.all && this.installedVer.major > 7) { 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 // only add the onunload cleanup if the Flash Player version supports External Interface and we are in IE
deconcept.SWFObject.doPrepUnload = true; deconcept.SWFObject.doPrepUnload = true;
} }
if(c) { this.addParam('bgcolor', c); } if(c) {
this.addParam('bgcolor', c);
}
var q = quality ? quality : 'high'; var q = quality ? quality : 'high';
this.addParam('quality', q); this.addParam('quality', q);
this.setAttribute('useExpressInstall', false); 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; var xir = (xiRedirectUrl) ? xiRedirectUrl : window.location;
this.setAttribute('xiRedirectUrl', xir); this.setAttribute('xiRedirectUrl', xir);
this.setAttribute('redirectUrl', ''); this.setAttribute('redirectUrl', '');
if(redirectUrl) { this.setAttribute('redirectUrl', redirectUrl); } if(redirectUrl) {
this.setAttribute('redirectUrl', redirectUrl);
}
} }
deconcept.SWFObject.prototype = { deconcept.SWFObject.prototype = {
useExpressInstall: function(path) { 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 = '<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') +'" '; swfNode += ' id="'+ this.getAttribute('id') +'" name="'+ this.getAttribute('id') +'" ';
var params = this.getParams(); 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("&"); var pairs = this.getVariablePairs().join("&");
if (pairs.length > 0){ swfNode += 'flashvars="'+ pairs +'"'; } if (pairs.length > 0){
swfNode += 'flashvars="'+ pairs +'"';
}
swfNode += '/>'; swfNode += '/>';
} else { // PC IE } else { // PC IE
if (this.getAttribute("doExpressInstall")) { if (this.getAttribute("doExpressInstall")) {
@ -97,7 +117,9 @@ deconcept.SWFObject.prototype = {
swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />'; swfNode += '<param name="'+ key +'" value="'+ params[key] +'" />';
} }
var pairs = this.getVariablePairs().join("&"); 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>"; swfNode += "</object>";
} }
return swfNode; return swfNode;
@ -209,7 +231,12 @@ if (deconcept.SWFObject.doPrepUnload) {
window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload); window.attachEvent("onbeforeunload", deconcept.SWFObjectUtil.prepUnload);
} }
/* add Array.push if needed (ie5) */ /* 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 */ /* add some aliases for ease of use/backwards compatibility */
var getQueryParamValue = deconcept.util.getRequestParameter; 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 * implements methods from content model ingest form xml
* builds a dc metadata form * builds a dc metadata form
*/ */
class CollectionFormBuilder extends FormBuilder { class CollectionFormBuilder extends FormBuilder {
/** /**

6
plugins/DarwinCore.inc

@ -1,6 +1,10 @@
<?php <?php
// $Id$ /* @file
*/
/** /**
* @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 * implements methods from content model ingest form xml
* builds a dc metadata form * builds a dc metadata form
*/ */
class DemoFormBuilder extends FormBuilder { class DemoFormBuilder extends FormBuilder {
/** /**

15
plugins/DocumentConverter.inc

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

2
plugins/Exiftool.inc

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

6
plugins/Ffmpeg.inc

@ -30,7 +30,7 @@ class Ffmpeg {
* @return type * @return type
*/ */
function extract_thumbnail($parameterArray, $dsid, $file, $file_ext) { 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); $params = array_merge($defaults, $parameterArray);
$system = getenv('System'); $system = getenv('System');
$file_suffix = '_' . $dsid . '.' . $file_ext; $file_suffix = '_' . $dsid . '.' . $file_ext;
@ -38,13 +38,13 @@ class Ffmpeg {
$output = array(); $output = array();
$size = ''; $size = '';
if ($params['s'] != null) { if ($params['s'] != NULL) {
$size = ' -s ' . escapeshellarg($params['s']); $size = ' -s ' . escapeshellarg($params['s']);
} }
exec('ffmpeg -i ' . escapeshellarg($file) . ' -r 1 -ss ' . escapeshellarg($params['ss']) . ' ' . $size . ' -t 1 ' . escapeshellarg($file . $file_suffix)); exec('ffmpeg -i ' . escapeshellarg($file) . ' -r 1 -ss ' . escapeshellarg($params['ss']) . ' ' . $size . ' -t 1 ' . escapeshellarg($file . $file_suffix));
if (!file_exists($file . $file_suffix)) { if (!file_exists($file . $file_suffix)) {
return false; return FALSE;
} }
$_SESSION['fedora_ingest_files']["$dsid"] = $file . $file_suffix; $_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 * implements methods from content model ingest form xml
* builds a dc metadata form * builds a dc metadata form
*/ */
class FlvFormBuilder extends FormBuilder { class FlvFormBuilder extends FormBuilder {
/** /**
@ -29,6 +30,7 @@ class FlvFormBuilder extends FormBuilder {
* @param type $dom * @param type $dom
* @param type $rootElement * @param type $rootElement
*/ */
function createFedoraDataStreams($form_values, &$dom, &$rootElement) { function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'MimeClass');
global $base_url; global $base_url;

6
plugins/FormBuilder.inc

@ -102,14 +102,14 @@ class FormBuilder {
$policyElement = $dom->createDocumentFragment(); $policyElement = $dom->createDocumentFragment();
if (!$policyElement) { if (!$policyElement) {
drupal_set_message(t('Error parsing security policy stream.')); 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; return FALSE;
} }
$dom->importNode($policyElement, TRUE); $dom->importNode($policyElement, TRUE);
$value = $policyElement->appendXML($policyStreamDoc); $value = $policyElement->appendXML($policyStreamDoc);
if (!$value) { if (!$value) {
drupal_set_message(t('Error creating security policy stream.')); 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; return FALSE;
} }
@ -183,7 +183,7 @@ class FormBuilder {
file_delete($form_values['ingest-file-location']); file_delete($form_values['ingest-file-location']);
} catch (exception $e) { } catch (exception $e) {
drupal_set_message(t('Error ingesting object: !e', array('!e' => $e->getMessage())), 'error'); 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; return;
} }
} }

13
plugins/ModsFormBuilder.inc

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

4
plugins/PersonalCollectionClass.inc

@ -83,7 +83,7 @@ class PersonalCollectionClass {
if (!$policyElement) { if (!$policyElement) {
drupal_set_message(t('Error parsing policy stream.')); 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; return FALSE;
} }
$dom->importNode($policyElement, TRUE); $dom->importNode($policyElement, TRUE);
@ -91,7 +91,7 @@ class PersonalCollectionClass {
$value = $policyElement->appendXML($collectionTemplate); $value = $policyElement->appendXML($collectionTemplate);
if (!$value) { if (!$value) {
drupal_set_message(t('Error creating collection policy stream.')); 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; return FALSE;
} }

4
plugins/Refworks.inc

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

6
plugins/ShowDemoStreamsInFieldSets.inc

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

10
plugins/fedora_attach/fedora_attach.admin.inc

@ -1,12 +1,12 @@
<?php <?php
// $Id$
/** /**
* @file * @file
* Administration page callbacks for the redmine_issuer module. * Administration page callbacks for the redmine_issuer module.
*/ */
/** /**
* Form builder. Configure Redmine parameters. * Form builder. Configure Redmine parameters.
* *
@ -16,11 +16,11 @@
function fedora_attach_admin() { function fedora_attach_admin() {
$options = drupal_map_assoc(explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '))); $options = drupal_map_assoc(explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: ')));
$default_value = variable_get('fedora_attach_pid_namespace', 'default:'); $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) { if (!in_array($default_value, $options) && $is_restricted) {
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' ); 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(); $form = array();

12
plugins/fedora_attach/fedora_attach.install

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

44
plugins/fedora_imageapi.module

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

20
plugins/herbarium.inc

@ -1,6 +1,9 @@
<?php <?php
// $Id$ /**
* @file
*
*/
/** /**
* @file * @file
@ -78,7 +81,8 @@ class Herbarium {
$dwc = new DarwinCore($this->item); $dwc = new DarwinCore($this->item);
$dwc->handleForm($form_values); $dwc->handleForm($form_values);
$this->item->purge_datastream('DARWIN_CORE'); $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; return TRUE;
} }
@ -104,14 +108,17 @@ class Herbarium {
. $form_values['dwc:collectionCode'] . ':' . $form_values['dwc:collectionCode'] . ':'
. $form_values['dwc:catalogNumber']; . $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']; $file = $form_values['ingest-file-location'];
if (!empty($file)) { if (!empty($file)) {
$dformat = $mimetype->getType($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); $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) { foreach ($_SESSION['fedora_ingest_files'] as $dsid => $created_file) {
$created_file_format = $mimetype->getType($created_file); $created_file_format = $mimetype->getType($created_file);
$created_filename = strstr($created_file, $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 <?php
// $Id$ /* @file
* News Paper Plugin for Fedora Repository module.
*/
class Newspaper { class Newspaper {
@ -19,7 +21,7 @@ class Newspaper {
$form['custom_pid'] = array( $form['custom_pid'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => 'Custom PID', '#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.', 'Leave it blank for an automatically-generated PID.',
); );
@ -32,7 +34,6 @@ class Newspaper {
'#type' => 'textarea', '#type' => 'textarea',
'#title' => 'MODS Record to Import', '#title' => 'MODS Record to Import',
'#rows' => 20, '#rows' => 20,
); );
return $form; return $form;
@ -56,7 +57,7 @@ class Newspaper {
$title_info = $mods_item_doc->getElementsByTagNameNS('http://www.loc.gov/mods/v3', 'titleInfo')->item(0); $title_info = $mods_item_doc->getElementsByTagNameNS('http://www.loc.gov/mods/v3', 'titleInfo')->item(0);
$title = ''; $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; $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 = simplexml_load_string($dc);
$dc_doc->registerXPathNamespace('oai_dc', 'http://www.openarchives.org/OAI/2.0/oai_dc/'); $dc_doc->registerXPathNamespace('oai_dc', 'http://www.openarchives.org/OAI/2.0/oai_dc/');
$dc_item = $dc_doc->xpath('//oai_dc: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/'); $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->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('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']); $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() { public function showFieldSets() {
@ -100,11 +100,11 @@ class Newspaper {
global $user; global $user;
$qs = ''; $qs = '';
if ($user->uid != 0) { 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; $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>'; $html = '<iframe src="' . $viewer_url . '" scrolling="no" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$tabset['read'] = array( $tabset['read'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
@ -141,11 +141,11 @@ class Newspaper {
global $user; global $user;
$qs = ''; $qs = '';
if ($user->uid != 0) { 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; $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>'; $html = '<iframe src="' . $viewer_url . '" frameborder="0" style="width: 100%; height: 800px;">Errors: unable to load viewer</iframe>';
$tabset['first_tab'] = array( $tabset['first_tab'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
@ -173,4 +173,5 @@ class Newspaper {
return $tabset; return $tabset;
} }
} }

8
plugins/islandora_newspaper/islandora_newspaper.module

@ -40,17 +40,17 @@ function islandora_newspaper_required_fedora_objects() {
'datastream_file' => NULL, 'datastream_file' => NULL,
'dsversion' => NULL, 'dsversion' => NULL,
), ),
array ( array(
'pid' => 'newspapers:collection', 'pid' => 'newspapers:collection',
'label' => 'Newspapers Collection', 'label' => 'Newspapers Collection',
'cmodel' => 'islandora:collectionCModel', 'cmodel' => 'islandora:collectionCModel',
'parent' => 'islandora:demos', 'parent' => 'islandora:demos',
'datastreams' => array ( 'datastreams' => array(
array ( array(
'dsid' => 'COLLECTION_POLICY', 'dsid' => 'COLLECTION_POLICY',
'datastream_file' => "$module_path/newspapers_collection_policy.xml", 'datastream_file' => "$module_path/newspapers_collection_policy.xml",
), ),
array ( array(
'dsid' => 'TN', 'dsid' => 'TN',
'datastream_file' => "$module_path/Crystal_Clear_mimetype_document.png", 'datastream_file' => "$module_path/Crystal_Clear_mimetype_document.png",
'mimetype' => 'image/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"> <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_models>
<content_model dsid="ISLANDORACM" name="Newspaper" namespace="islandora" pid="newspapers:issueCModel"></content_model> <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. 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>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>Ceased publication in 1920?</dc:description>
<dc:description>Missing issues.</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"> <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> <mimetypes>
<type>text/xml</type> <type>text/xml</type>

3
plugins/pidfield/pidfield.install

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

22
plugins/pidfield/pidfield.module

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/** /**
* @file * @file
@ -9,7 +10,6 @@
* declare what kind of field they work with, which can be any * declare what kind of field they work with, which can be any
* existing field as well as any new field the module creates. * existing field as well as any new field the module creates.
*/ */
//==========================================// //==========================================//
// DEFINING A FIELD // DEFINING A FIELD
//==========================================// //==========================================//
@ -50,7 +50,6 @@ function pidfield_field_settings($op, $field) {
'#title' => t('Maximum length'), '#title' => t('Maximum length'),
'#default_value' => is_numeric($field['max_length']) ? $field['max_length'] : 64, '#default_value' => is_numeric($field['max_length']) ? $field['max_length'] : 64,
'#required' => FALSE, '#required' => FALSE,
// Use #element_validate to validate the settings. // Use #element_validate to validate the settings.
'#element_validate' => array('_pidfield_length_validate'), '#element_validate' => array('_pidfield_length_validate'),
'#description' => t('The maximum length of the field in characters. Must be a number between 1 and 255'), '#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); $data = content_views_field_views_data($field);
$db_info = content_database_info($field); $db_info = content_database_info($field);
$table_alias = content_views_tablename($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. // Make changes to $data as needed here.
return $data; return $data;
} }
@ -107,7 +106,7 @@ function pidfield_field_settings($op, $field) {
*/ */
function _pidfield_length_validate($element, &$form_state) { function _pidfield_length_validate($element, &$form_state) {
$value = $form_state['values']['max_length']; $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.')); 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 // set an error on the right sub-element when
// fields are deeply nested in the form. // fields are deeply nested in the form.
$error_element = isset($item['_error_element']) ? $item['_error_element'] : ''; $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($item['value'])) {
if (!empty($field['max_length']) && drupal_strlen($item['value']) > $field['max_length']) { 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']))); 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) { function theme_pidfield_formatter_default($element) {
$pid = $element['#item']['safe']; $pid = $element['#item']['safe'];
if(!empty($pid)) { if (!empty($pid)) {
return fedora_repository_get_items($pid); return fedora_repository_get_items($pid);
} }
return null; 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(); $results = array();
while ($data = db_fetch_object($ids)) { while ($data = db_fetch_object($ids)) {
@ -444,18 +444,16 @@ function get_node_references_for_fedora_item($item) {
$results[] = $data->nid; $results[] = $data->nid;
//$referred_node = node_load(array('nid'=>$data->nid) ); //$referred_node = node_load(array('nid'=>$data->nid) );
} }
return $results; return $results;
} }
} }
function fedora_pidfield_redirect_to_node($item) { function fedora_pidfield_redirect_to_node($item) {
$node_references = get_node_references_for_fedora_item($item); $node_references = get_node_references_for_fedora_item($item);
if (!empty($node_references)) { if (!empty($node_references)) {
if (strstr( drupal_get_destination(), urlencode('fedora/repository'))) { if (strstr(drupal_get_destination(), urlencode('fedora/repository'))) {
drupal_goto(drupal_get_path_alias("node/".$node_references[0])); 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/'); $doc->registerXPathNamespace('Composite', 'http://ns.exiftool.ca/Composite/1.0/');
$mime = reset($doc->xpath('//File:MIMEType')); $mime = reset($doc->xpath('//File:MIMEType'));
$data['mime'] = $mime; $data['mime'] = $mime;
if (strpos($mime, 'audio/') !== false) { if (strpos($mime, 'audio/') !== FALSE) {
$data['width'] = 300; $data['width'] = 300;
$data['height'] = 0; $data['height'] = 0;
} }
@ -73,8 +73,8 @@ class ShowQtStreamsInFieldSets {
*/ */
function getPosterFrameDatastreamInfo($dsid = 'FULL_SIZE') { function getPosterFrameDatastreamInfo($dsid = 'FULL_SIZE') {
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid); $p = ObjectHelper::getDatastreamInfo($this->pid, $dsid);
if (empty($p) || $p == ' ' || $p === false) { if (empty($p) || $p == ' ' || $p === FALSE) {
return false; return FALSE;
} }
return $p; return $p;
} }
@ -87,12 +87,12 @@ class ShowQtStreamsInFieldSets {
*/ */
function getMediaDatastreamInfo($dsid = 'OBJ', $alt = array('')) { function getMediaDatastreamInfo($dsid = 'OBJ', $alt = array('')) {
$p = ObjectHelper::getDatastreamInfo($this->pid, $dsid); $p = ObjectHelper::getDatastreamInfo($this->pid, $dsid);
if (empty($p) || $p == ' ' || $p === false) { if (empty($p) || $p == ' ' || $p === FALSE) {
if (!empty($alt)) { if (!empty($alt)) {
$ds = array_shift($alt); $ds = array_shift($alt);
return $this->getMediaDatastreamInfo($ds, $alt); return $this->getMediaDatastreamInfo($ds, $alt);
} }
return false; return FALSE;
} }
return $p; return $p;
@ -103,7 +103,7 @@ class ShowQtStreamsInFieldSets {
* @return FALSE * @return FALSE
*/ */
function enableDownload() { function enableDownload() {
return false; return FALSE;
} }
/** /**
@ -122,7 +122,7 @@ class ShowQtStreamsInFieldSets {
$pframe = $this->getPosterFrameDatastreamInfo(); $pframe = $this->getPosterFrameDatastreamInfo();
$media = $this->getMediaDatastreamInfo('PROXY', array('OBJ')); $media = $this->getMediaDatastreamInfo('PROXY', array('OBJ'));
if ($media === false) { if ($media === FALSE) {
return ''; return '';
} }
global $base_url; global $base_url;
@ -134,7 +134,7 @@ class ShowQtStreamsInFieldSets {
$divid = 'player' . md5($this->pid) . 'MOV'; $divid = 'player' . md5($this->pid) . 'MOV';
$content .= '<div class="player" id="' . $divid . '">'; $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 .= '<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 .= '<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>'; $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'; $src = base_path() . 'fedora/repository/' . $this->pid . '/' . $media->ID . '/MOV.mov';
$qtparams = ''; $qtparams = '';
$qtparams .= "'autostart', '" . ($pframe !== false ? 'true' : 'false') . "', "; $qtparams .= "'autostart', '" . ($pframe !== FALSE ? 'true' : 'false') . "', ";
$init = <<<EOD $init = <<<EOD
$(function() { $(function() {
src = "$src"; src = "$src";
@ -156,12 +156,12 @@ class ShowQtStreamsInFieldSets {
} }
str = QT_GenerateOBJECTText_XHTML(src, "$width", ($height+15), '', str = QT_GenerateOBJECTText_XHTML(src, "$width", ($height+15), '',
$qtparams $qtparams
'postdomevents', 'true', 'postdomevents', 'TRUE',
'EnableJavaScript', 'true', 'EnableJavaScript', 'TRUE',
'bgcolor', 'black', 'bgcolor', 'black',
'controller', 'true', 'controller', 'TRUE',
'SCALE', 'aspect', 'SCALE', 'aspect',
'LOOP', 'false' 'LOOP', 'FALSE'
); );
if($('.poster', '#$divid').length ==0) { if($('.poster', '#$divid').length ==0) {
$('#$divid').append(str); $('#$divid').append(str);

4
searchTerms.xml

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

4
solrSearchTerms.xml

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

5
tests/fedora_repository.test

@ -1,8 +1,7 @@
<?php <?php
// $Id$
/* /* @file
* Tests the functions of the Fedora Repository module. * 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'; $output_path = "$file_dir/$basename." . $this->randomName(10) . '.html';
$rv = file_put_contents($output_path, $this->drupalGetContent()); $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')) { 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