Browse Source

ISLANDORA-278 Initial pass at making the islandora code conform to the drupal coding standards.

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

2
CollectionClass.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on 18-Feb-08 * Created on 18-Feb-08

33
CollectionPolicy.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
module_load_include('inc', 'fedora_repository', 'XMLDatastream'); module_load_include('inc', 'fedora_repository', 'XMLDatastream');
@ -8,7 +8,6 @@ class CollectionPolicy extends XMLDatastream {
static $SCHEMA_URI = 'http://syn.lib.umanitoba.ca/collection_policy.xsd'; static $SCHEMA_URI = 'http://syn.lib.umanitoba.ca/collection_policy.xsd';
static $DEFAULT_DSID = 'COLLECTION_POLICY'; static $DEFAULT_DSID = 'COLLECTION_POLICY';
private $staging_area = NULL; private $staging_area = NULL;
/** /**
@ -41,17 +40,16 @@ class CollectionPolicy extends XMLDatastream {
if ($preFetch) { if ($preFetch) {
$fedoraItem = new Fedora_Item($pid); $fedoraItem = new Fedora_Item($pid);
$ds = $fedoraItem->get_datastream_dissemination($dsid); $ds = $fedoraItem->get_datastream_dissemination($dsid);
} else {
$ds=null;
} }
else {
$ds = NULL;
}
} }
if (!empty($ds) || !$preFetch) { if (!empty($ds) || !$preFetch) {
$ret = new CollectionPolicy($ds, $pid, $dsid); $ret = new CollectionPolicy($ds, $pid, $dsid);
} }
} } catch (SOAPException $e) {
catch (SOAPException $e) {
$ret = FALSE; $ret = FALSE;
} }
@ -175,13 +173,11 @@ class CollectionPolicy extends XMLDatastream {
$fedoraItem->add_datastream_from_string($cp->dumpXml(), $policyDsid, $name, 'text/xml', 'X'); $fedoraItem->add_datastream_from_string($cp->dumpXml(), $policyDsid, $name, 'text/xml', 'X');
$ret = $cp; $ret = $cp;
} }
} }
return $ret; return $ret;
} }
/** /**
* Constructor * Constructor
* NOTE: Use the static constructor methods whenever possible. * NOTE: Use the static constructor methods whenever possible.
@ -247,7 +243,6 @@ class CollectionPolicy extends XMLDatastream {
$this->xml = DOMDocument::loadXML($newDom->saveXml()); $this->xml = DOMDocument::loadXML($newDom->saveXml());
} }
/** /**
* Gets the name of the relationship to use * Gets the name of the relationship to use
* for members of this collection. * for members of this collection.
@ -297,7 +292,8 @@ class CollectionPolicy extends XMLDatastream {
if ($stagingEl->length > 0) { if ($stagingEl->length > 0) {
$this->staging_area = trim($stagingEl->item(0)->nodeValue); $this->staging_area = trim($stagingEl->item(0)->nodeValue);
} elseif ($recurse) { }
elseif ($recurse) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new Fedora_Item($this->pid); $item = new Fedora_Item($this->pid);
$rels = $item->get_relationships(); $rels = $item->get_relationships();
@ -314,7 +310,6 @@ class CollectionPolicy extends XMLDatastream {
} }
$ret = $this->staging_area; $ret = $this->staging_area;
} }
return $ret; return $ret;
} }
@ -352,7 +347,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Gets the next available PID for the * Gets the next available PID for the
* content model specified by the DSID * content model specified by the DSID
@ -399,14 +393,11 @@ class CollectionPolicy extends XMLDatastream {
if ($cm !== FALSE) { if ($cm !== FALSE) {
$ret[] = $cm; $ret[] = $cm;
} }
} }
} }
return $ret; return $ret;
} }
/** /**
* Gets a list of search terms from the Collection Policy. If asArray is set * Gets a list of search terms from the Collection Policy. If asArray is set
* it will return an associative array with the value, field name, and the default value. * it will return an associative array with the value, field name, and the default value.
@ -424,7 +415,8 @@ class CollectionPolicy extends XMLDatastream {
if ($cache == TRUE && ($cache = cache_get('collection_policy_search_terms-' . $this->pid)) !== 0) { if ($cache == TRUE && ($cache = cache_get('collection_policy_search_terms-' . $this->pid)) !== 0) {
$ret = $cache->data; $ret = $cache->data;
} else { }
else {
if ($this->xml == NULL) { if ($this->xml == NULL) {
$fedoraItem = new Fedora_Item($this->pid); $fedoraItem = new Fedora_Item($this->pid);
@ -460,13 +452,11 @@ class CollectionPolicy extends XMLDatastream {
} }
} }
cache_set('collection_policy_search_terms-' . $this->pid, $ret, 'cache', time() + 3600); cache_set('collection_policy_search_terms-' . $this->pid, $ret, 'cache', time() + 3600);
} }
} }
return $ret; return $ret;
} }
/** /**
* Adds a search term to the collection policy. * Adds a search term to the collection policy.
* Returns fase on failure. * Returns fase on failure.
@ -523,7 +513,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret; return $ret;
} }
function setDefaultTerm($field) { function setDefaultTerm($field) {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
@ -548,7 +537,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Removes the specified content model from the collection policy. This will only * Removes the specified content model from the collection policy. This will only
* prevent future ingests of the removed model to the collection. $cm should be * prevent future ingests of the removed model to the collection. $cm should be
@ -578,9 +566,6 @@ class CollectionPolicy extends XMLDatastream {
return $ret; return $ret;
} }
function addModel($cm, $namespace) { function addModel($cm, $namespace) {
$ret = FALSE; $ret = FALSE;
if (self::validPid($namespace) && $this->validate() && $cm->validate()) { if (self::validPid($namespace) && $this->validate() && $cm->validate()) {

12
ConnectionHelper.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on Jan 24, 2008 * Created on Jan 24, 2008
@ -9,7 +10,9 @@
*/ */
module_load_include('inc', 'ConnectionHelper', ''); module_load_include('inc', 'ConnectionHelper', '');
class ConnectionHelper { class ConnectionHelper {
function ConnectionHelper() { function ConnectionHelper() {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
} }
@ -50,8 +53,7 @@ class ConnectionHelper {
'password' => 'anonymous', 'password' => 'anonymous',
'exceptions' => $exceptions, 'exceptions' => $exceptions,
)); ));
} } catch (SoapFault $e) {
catch (SoapFault $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage()))); drupal_set_message(t("!e", array('!e' => $e->getMessage())));
return NULL; return NULL;
} }
@ -63,13 +65,13 @@ class ConnectionHelper {
'password' => $user->pass, 'password' => $user->pass,
'exceptions' => TRUE, 'exceptions' => TRUE,
)); ));
} } catch (SoapFault $e) {
catch (SoapFault $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage()))); drupal_set_message(t("!e", array('!e' => $e->getMessage())));
return NULL; return NULL;
} }
} }
return $client; return $client;
} }
} }

30
ContentModel.inc

@ -1,13 +1,13 @@
<?php <?php
// $Id$
module_load_include('inc', 'fedora_repository', 'XMLDatastream'); module_load_include('inc', 'fedora_repository', 'XMLDatastream');
class ContentModel extends XMLDatastream { class ContentModel extends XMLDatastream {
static $SCHEMA_URI = 'http://localhost/islandoracm.xsd'; static $SCHEMA_URI = 'http://localhost/islandoracm.xsd';
static $DEFAULT_DSID = 'ISLANDORACM'; static $DEFAULT_DSID = 'ISLANDORACM';
private $mimes = NULL; private $mimes = NULL;
public $pid_namespace; public $pid_namespace;
public $name; public $name;
@ -73,7 +73,6 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Ingests a Content Model from an existing model to the specified pid/dsid . * Ingests a Content Model from an existing model to the specified pid/dsid .
* Returns false on failure. * Returns false on failure.
@ -103,7 +102,6 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Ingests a minimum Content Model to the specified pid/dsid. * Ingests a minimum Content Model to the specified pid/dsid.
* Returns false on failure. * Returns false on failure.
@ -174,7 +172,6 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Constructs a ContentModel object from the PID of the model in Fedora. * Constructs a ContentModel object from the PID of the model in Fedora.
* If DSID is specified it will use that datastream as the model, otherwise it will * If DSID is specified it will use that datastream as the model, otherwise it will
@ -203,8 +200,7 @@ class ContentModel extends XMLDatastream {
$ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name); $ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name);
} }
} }
} } catch (SOAPException $e) {
catch (SOAPException $e) {
$ret = FALSE; $ret = FALSE;
} }
return $ret; return $ret;
@ -287,7 +283,6 @@ class ContentModel extends XMLDatastream {
$ruleEl->appendChild($methodsEl); $ruleEl->appendChild($methodsEl);
$ingestRulesEl->appendChild($ruleEl); $ingestRulesEl->appendChild($ruleEl);
} }
} }
$rootEl->appendChild($ingestRulesEl); $rootEl->appendChild($ingestRulesEl);
@ -411,7 +406,6 @@ class ContentModel extends XMLDatastream {
$newDom->appendChild($rootEl); $newDom->appendChild($rootEl);
$this->xml = DOMDocument::loadXML($newDom->saveXml()); $this->xml = DOMDocument::loadXML($newDom->saveXml());
} }
/** /**
@ -464,7 +458,6 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Gets the element corresponding to the datastream specified * Gets the element corresponding to the datastream specified
* in the <datastreams> element of the schema. * in the <datastreams> element of the schema.
@ -706,7 +699,6 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Gets a list of all parameters that belong to the specified ingest form element. * Gets a list of all parameters that belong to the specified ingest form element.
* *
@ -801,7 +793,6 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/** /**
* Add an ingest form element to the model. * Add an ingest form element to the model.
* *
@ -991,7 +982,6 @@ class ContentModel extends XMLDatastream {
$ret = TRUE; $ret = TRUE;
} }
} }
} }
return $ret; return $ret;
} }
@ -1163,13 +1153,11 @@ class ContentModel extends XMLDatastream {
$metaDataForm = new formClass(); $metaDataForm = new formClass();
$ret = $metaDataForm->updateMetaData($form_state['values']['form_id'], $form_state['values'], $soap_client); $ret = $metaDataForm->updateMetaData($form_state['values']['form_id'], $form_state['values'], $soap_client);
$form_state['redirect'] = $base_url . '/fedora/repository/' . $form_state['values']['pid']; $form_state['redirect'] = $base_url . '/fedora/repository/' . $form_state['values']['pid'];
} }
} }
return $ret; return $ret;
} }
/** /**
* Gets an associative array describing the edit metadata method. * Gets an associative array describing the edit metadata method.
* Array has the following keys: 'file', 'class', 'method', 'handler', 'dsid' * Array has the following keys: 'file', 'class', 'method', 'handler', 'dsid'
@ -1348,7 +1336,8 @@ class ContentModel extends XMLDatastream {
self::$errors[] = 'Execute Ingest Rules: class \'' . $className . '\' does not exist.'; self::$errors[] = 'Execute Ingest Rules: class \'' . $className . '\' does not exist.';
$ret = FALSE; $ret = FALSE;
} }
else $class = new $className; else
$class = new $className;
if (!method_exists($class, $methodName)) { if (!method_exists($class, $methodName)) {
self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' does not exist.'; self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' does not exist.';
$ret = FALSE; $ret = FALSE;
@ -1365,7 +1354,6 @@ class ContentModel extends XMLDatastream {
} }
} }
} }
} }
return $ret; return $ret;
} }
@ -1531,7 +1519,6 @@ class ContentModel extends XMLDatastream {
$mimetypesEl->appendChild($newTypeEl); $mimetypesEl->appendChild($newTypeEl);
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
@ -1557,7 +1544,6 @@ class ContentModel extends XMLDatastream {
$mimetypesEl->removeChild($found); $mimetypesEl->removeChild($found);
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
@ -1662,7 +1648,6 @@ class ContentModel extends XMLDatastream {
$found->setAttribute('default', 'true'); $found->setAttribute('default', 'true');
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
@ -1685,7 +1670,6 @@ class ContentModel extends XMLDatastream {
$ds->removeChild($found); $ds->removeChild($found);
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
@ -1884,7 +1868,6 @@ class ContentModel extends XMLDatastream {
$ret = TRUE; $ret = TRUE;
} }
} }
} }
} }
return $ret; return $ret;
@ -1944,7 +1927,6 @@ class ContentModel extends XMLDatastream {
} }
$rule['ingest_methods'][] = $method; $rule['ingest_methods'][] = $method;
} }
$ret[] = $rule; $ret[] = $rule;
@ -1961,7 +1943,6 @@ class ContentModel extends XMLDatastream {
'page' => $ingest_formEl->getAttribute('page'), 'page' => $ingest_formEl->getAttribute('page'),
'hide_file_chooser' => strtolower($ingest_formEl->getAttribute('hide_file_chooser')) == 'true', 'hide_file_chooser' => strtolower($ingest_formEl->getAttribute('hide_file_chooser')) == 'true',
'redirect' => strtolower($ingest_formEl->getAttribute('redirect')) == 'false' ? FALSE : TRUE); 'redirect' => strtolower($ingest_formEl->getAttribute('redirect')) == 'false' ? FALSE : TRUE);
} }
return $ret; return $ret;
} }
@ -2130,7 +2111,6 @@ class ContentModel extends XMLDatastream {
return FALSE; return FALSE;
} }
/** /**
* Edits a form element with attribute name='$name' from the 'forms' element. * Edits a form element with attribute name='$name' from the 'forms' element.
* *

8
MimeClass.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/** /**
* *
@ -20,8 +21,8 @@
* http://api.drupal.org/api/function/file_default_mimetype_mapping/7 * http://api.drupal.org/api/function/file_default_mimetype_mapping/7
* *
*/ */
class MimeClass { class MimeClass {
private $private_mime_types = array( private $private_mime_types = array(
/** /**
* This is a shortlist of mimetypes which should catch most * This is a shortlist of mimetypes which should catch most
@ -190,7 +191,6 @@ class MimeClass {
// others: // others:
'bin' => 'application/octet-stream', 'bin' => 'application/octet-stream',
); );
private $private_file_extensions; private $private_file_extensions;
private $system_types; private $system_types;
private $system_exts; private $system_exts;
@ -205,7 +205,6 @@ class MimeClass {
if (is_readable('mime.types')) { if (is_readable('mime.types')) {
$this->etc_mime_types = 'mime.types'; $this->etc_mime_types = 'mime.types';
} }
} }
/** /**
@ -252,7 +251,6 @@ class MimeClass {
if (TRUE === $debug) if (TRUE === $debug)
return array('mime_type' => 'application/octet-stream', 'method' => 'last_resort'); return array('mime_type' => 'application/octet-stream', 'method' => 'last_resort');
return 'application/octet-stream'; return 'application/octet-stream';
} }
/** /**

38
ObjectHelper.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on Feb 1, 2008 * Created on Feb 1, 2008
@ -85,7 +85,8 @@ class ObjectHelper {
if ($label == NULL) { if ($label == NULL) {
$label = $item->datastreams[$dsID]['label']; $label = $item->datastreams[$dsID]['label'];
} }
} else { }
else {
drupal_not_found(); drupal_not_found();
exit(); exit();
} }
@ -95,7 +96,8 @@ class ObjectHelper {
$fedoraUser = 'anonymous'; $fedoraUser = 'anonymous';
$fedoraPass = 'anonymous'; $fedoraPass = 'anonymous';
$contentSize = 0; $contentSize = 0;
} else { }
else {
$fedoraUser = $user->name; $fedoraUser = $user->name;
$fedoraPass = $user->pass; $fedoraPass = $user->pass;
$dataStreamInfo = $item->get_datastream_info($dsID); $dataStreamInfo = $item->get_datastream_info($dsID);
@ -135,7 +137,8 @@ class ObjectHelper {
curl_setopt($ch, CURLOPT_HEADER, 0); curl_setopt($ch, CURLOPT_HEADER, 0);
curl_exec($ch); curl_exec($ch);
fclose($fp); fclose($fp);
} else { }
else {
header("Content-type: $mimeType"); header("Content-type: $mimeType");
if ($contentSize > 0) { if ($contentSize > 0) {
@ -168,12 +171,14 @@ class ObjectHelper {
if ((isset($user) && $user->uid != 0) || $forceSoap || isset($_SERVER['HTTPS'])) { if ((isset($user) && $user->uid != 0) || $forceSoap || isset($_SERVER['HTTPS'])) {
curl_exec($ch); curl_exec($ch);
} else { }
else {
header('Location: ' . $url); header('Location: ' . $url);
} }
} }
curl_close($ch); curl_close($ch);
} else { }
else {
drupal_set_message(t('No curl support.'), 'error'); drupal_set_message(t('No curl support.'), 'error');
} }
} }
@ -267,7 +272,8 @@ class ObjectHelper {
$pid . '/' . $dataStreamValue->ID . '/' . $dataStreamValue->label . '"><img src="' . $base_url . '/' . $path . $pid . '/' . $dataStreamValue->ID . '/' . $dataStreamValue->label . '"><img src="' . $base_url . '/' . $path .
'/images/purge.gif" alt="purge datastream" /></a>'; '/images/purge.gif" alt="purge datastream" /></a>';
} }
} else { }
else {
$purgeImage = '&nbsp;'; $purgeImage = '&nbsp;';
} }
$fullPath = base_path() . $path; $fullPath = base_path() . $path;
@ -322,7 +328,6 @@ class ObjectHelper {
if (empty($xmlstr)) { if (empty($xmlstr)) {
return ''; return '';
} }
try { try {
@ -375,13 +380,11 @@ class ObjectHelper {
$output .= '<br /><a title = "' . t('Edit Meta Data') . '" href="' . $base_url . '/fedora/repository/' . 'editmetadata/' . $pid . '/' . $output .= '<br /><a title = "' . t('Edit Meta Data') . '" href="' . $base_url . '/fedora/repository/' . 'editmetadata/' . $pid . '/' .
$dsid . '"><img src="' . $base_url . '/' . $path . '/images/edit.gif" alt="' . t('Edit Meta Data') . '" /></a>'; $dsid . '"><img src="' . $base_url . '/' . $path . '/images/edit.gif" alt="' . t('Edit Meta Data') . '" /></a>';
} }
} }
return $output; return $output;
} }
/** /**
* Gets a list of datastreams from an object using its pid * Gets a list of datastreams from an object using its pid
* *
@ -466,8 +469,6 @@ class ObjectHelper {
return ''; return '';
} }
/** /**
* returns a stream from a fedora object given a pid and dsid * returns a stream from a fedora object given a pid and dsid
* *
@ -572,7 +573,8 @@ class ObjectHelper {
return FALSE; return FALSE;
} }
return $user_access; return $user_access;
} else { }
else {
return FALSE; return FALSE;
} }
} }
@ -633,10 +635,10 @@ class ObjectHelper {
'/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');
} }
} }
} else { }
else {
$ingestObject = '&nbsp;'; $ingestObject = '&nbsp;';
} }
} }
$datastreams .= $ingestObject; $datastreams .= $ingestObject;
@ -853,7 +855,8 @@ class ObjectHelper {
if ($pid == variable_get('fedora_repository_pid', 'islandora:top')) { if ($pid == variable_get('fedora_repository_pid', 'islandora:top')) {
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository'); $breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url); $breadcrumbs[] = l(t('Home'), $base_url);
} else { }
else {
$query_string = 'select $parentObject $title $content from <#ri> $query_string = 'select $parentObject $title $content from <#ri>
where (<info:fedora/' . $pid . '> <dc:title> $title where (<info:fedora/' . $pid . '> <dc:title> $title
and $parentObject <fedora-model:hasModel> $content and $parentObject <fedora-model:hasModel> $content
@ -878,7 +881,8 @@ class ObjectHelper {
if ($parent == variable_get('fedora_repository_pid', 'islandora:top')) { if ($parent == variable_get('fedora_repository_pid', 'islandora:top')) {
$breadcrumbs[] = l(t('Digital repository'), 'fedora/repository'); $breadcrumbs[] = l(t('Digital repository'), 'fedora/repository');
$breadcrumbs[] = l(t('Home'), $base_url); $breadcrumbs[] = l(t('Home'), $base_url);
} elseif ($level > 0) { }
elseif ($level > 0) {
$this->getBreadcrumbs($parent, $breadcrumbs, $level - 1); $this->getBreadcrumbs($parent, $breadcrumbs, $level - 1);
} }
} }

24
SearchClass.inc

@ -1,8 +1,11 @@
<?php <?php
// $Id$
class SearchClass { class SearchClass {
public static $SEARCH_CLASS_ADVANCED_SEARCH_NUMBER_FIELDS = 5; public static $SEARCH_CLASS_ADVANCED_SEARCH_NUMBER_FIELDS = 5;
function solr_search($query, $startPage=1, $fq = NULL, $dismax = NULL) { function solr_search($query, $startPage=1, $fq = NULL, $dismax = NULL) {
$solrFile = trim(variable_get('islandora_solr_search_block_handler_file', 'plugins/SolrResults.inc')); $solrFile = trim(variable_get('islandora_solr_search_block_handler_file', 'plugins/SolrResults.inc'));
if (strpos($solrField, '../')) { // Don't let us bust out of fedora_repository modules directory when looking for a handler if (strpos($solrField, '../')) { // Don't let us bust out of fedora_repository modules directory when looking for a handler
@ -19,6 +22,7 @@ class SearchClass {
} }
return $implementation->$solrFunction($query, $startPage, $fq, $dismax); return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
} }
function build_solr_search_form($repeat = NULL, $pathToSearchTerms = NULL, $query = NULL) { function build_solr_search_form($repeat = NULL, $pathToSearchTerms = NULL, $query = NULL) {
$types = $this->get_search_terms_array(NULL, 'solrSearchTerms.xml'); $types = $this->get_search_terms_array(NULL, 'solrSearchTerms.xml');
$queryArray = NULL; $queryArray = NULL;
@ -114,6 +118,7 @@ class SearchClass {
); );
return $form; return $form;
} }
function theme_solr_search_form($form) { function theme_solr_search_form($form) {
if (!isset($repeat)) { if (!isset($repeat)) {
$repeat = variable_get('islandora_solr_search_block_repeat', t('3')); $repeat = variable_get('islandora_solr_search_block_repeat', t('3'));
@ -133,9 +138,8 @@ class SearchClass {
$output .= drupal_render($form['submit']); $output .= drupal_render($form['submit']);
$output .= drupal_render($form); $output .= drupal_render($form);
return $output; return $output;
} }
function quickSearch($type, $query, $showForm = 1, $orderBy = 0, & $userArray) { function quickSearch($type, $query, $showForm = 1, $orderBy = 0, & $userArray) {
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');
@ -181,7 +185,6 @@ class SearchClass {
} }
} }
// gets term from a lucene index and displays them in a list // gets term from a lucene index and displays them in a list
function getTerms($fieldName, $startTerm, $displayName = NULL) { function getTerms($fieldName, $startTerm, $displayName = NULL) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
@ -205,11 +208,8 @@ class SearchClass {
$output .= $this->applySpecifiedXSLT($resultData, $path . '/xsl/browseIndexToResultPage.xslt', $displayName); $output .= $this->applySpecifiedXSLT($resultData, $path . '/xsl/browseIndexToResultPage.xslt', $displayName);
//$output .= '<br />'.$alpha_out; //$output .= '<br />'.$alpha_out;
return $output; return $output;
} }
function custom_search($query, $startPage=1, $xslt= '/xsl/advanced_search_results.xsl', $numberOfHistPerPage = 50) { function custom_search($query, $startPage=1, $xslt= '/xsl/advanced_search_results.xsl', $numberOfHistPerPage = 50) {
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');
@ -242,7 +242,6 @@ class SearchClass {
} }
} }
function applySpecifiedXSLT($resultData, $pathToXSLT, $displayName = NULL) { function applySpecifiedXSLT($resultData, $pathToXSLT, $displayName = NULL) {
$proc = NULL; $proc = NULL;
global $user; global $user;
@ -252,8 +251,7 @@ class SearchClass {
} }
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
} } catch (Exception $e) {
catch (Exception $e) {
drupal_set_message(t('Error loading ' . $pathToXSLT . ' xslt!') . $e->getMessage()); drupal_set_message(t('Error loading ' . $pathToXSLT . ' xslt!') . $e->getMessage());
return ' '; return ' ';
} }
@ -291,8 +289,8 @@ class SearchClass {
return $newdom->saveXML(); return $newdom->saveXML();
} }
} }
//default function for lucene results
//default function for lucene results
/** /**
* apply an xslt to lucene gsearch search results * apply an xslt to lucene gsearch search results
@ -306,7 +304,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;
@ -501,7 +499,6 @@ class SearchClass {
return $form; return $form;
} }
function get_search_terms_array($path = NULL, $file = NULL) { function get_search_terms_array($path = NULL, $file = NULL) {
if (!isset($path)) { if (!isset($path)) {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'Fedora_Repository');
@ -522,4 +519,5 @@ class SearchClass {
} }
return $types; return $types;
} }
} }

14
SecurityClass.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on 22-Oct-08 * Created on 22-Oct-08
@ -9,7 +10,9 @@
*/ */
class SecurityClass { class SecurityClass {
public static $SECURITY_CLASS_SECURITY_STREAM = 'POLICY'; public static $SECURITY_CLASS_SECURITY_STREAM = 'POLICY';
function SecurityClass() { function SecurityClass() {
module_load_include('inc', 'SecurityClass', ''); module_load_include('inc', 'SecurityClass', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -54,8 +57,7 @@ class SecurityClass {
$usersAndRoles = array(); $usersAndRoles = array();
try { try {
$xml = new SimpleXMLElement($policyStream); $xml = new SimpleXMLElement($policyStream);
} } catch (Exception $e) {
catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("No roles found in security policy, could not parse policy stream."), NULL, WATCHDOG_ERROR); watchdog(t("Fedora_Repository"), t("No roles found in security policy, could not parse policy stream."), NULL, WATCHDOG_ERROR);
//we may not want to send this to the screen. //we may not want to send this to the screen.
drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => $e->getMessage())), 'error'); drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => $e->getMessage())), 'error');
@ -92,8 +94,8 @@ class SecurityClass {
$usersAndRoles['users'] = $allowedUsers; $usersAndRoles['users'] = $allowedUsers;
$usersAndRoles['roles'] = $allowedRoles; $usersAndRoles['roles'] = $allowedRoles;
return $usersAndRoles; return $usersAndRoles;
} }
// When a user's profile is saved in drupal we will attempt to create a collection for them in Fedora // When a user's profile is saved in drupal we will attempt to create a collection for them in Fedora
// this will be their personal space. In the IR it is editable by users with the same role in the VRE // this will be their personal space. In the IR it is editable by users with the same role in the VRE
// it probably would not be. // it probably would not be.
@ -101,8 +103,7 @@ class SecurityClass {
$doc = new DOMDocument(); $doc = new DOMDocument();
try { try {
$doc->load(drupal_get_path('module', 'Fedora_Repository') . '/policies/noObjectEditPolicy.xml'); $doc->load(drupal_get_path('module', 'Fedora_Repository') . '/policies/noObjectEditPolicy.xml');
} } catch (exception $e) {
catch (exception $e) {
watchdog(t("Fedora_Repository"), t("Problem loading policy file."), NULL, WATCHDOG_ERROR); watchdog(t("Fedora_Repository"), t("Problem loading policy file."), NULL, WATCHDOG_ERROR);
} }
$conditions = $doc->getElementsByTagName('Condition'); $conditions = $doc->getElementsByTagName('Condition');
@ -200,4 +201,5 @@ class SecurityClass {
// $this->collection_policy_stream = $dom->saveXML(); // $this->collection_policy_stream = $dom->saveXML();
return $dom->saveXML(); return $dom->saveXML();
} }
} }

11
XMLDatastream.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
abstract class XMLDatastream { abstract class XMLDatastream {
@ -180,7 +180,8 @@ abstract class XMLDatastream {
// a subclass. // a subclass.
$vars = get_class_vars(get_class($this)); $vars = get_class_vars(get_class($this));
$schemaLocation = $vars['SCHEMA_URI']; $schemaLocation = $vars['SCHEMA_URI'];
} elseif ($rootEl->attributes->getNamedItem('schemaLocation') !== NULL) { }
elseif ($rootEl->attributes->getNamedItem('schemaLocation') !== NULL) {
//figure out where the schema is located and validate. //figure out where the schema is located and validate.
list(, $schemaLocation) = preg_split('/\s+/', $rootEl->attributes->getNamedItem('schemaLocation')->nodeValue); list(, $schemaLocation) = preg_split('/\s+/', $rootEl->attributes->getNamedItem('schemaLocation')->nodeValue);
} }
@ -193,10 +194,12 @@ abstract class XMLDatastream {
foreach ($errors as $err) { foreach ($errors as $err) {
self::$errors[] = 'XML Error: Line ' . $err->line . ': ' . $err->message; self::$errors[] = 'XML Error: Line ' . $err->line . ': ' . $err->message;
} }
} else { }
else {
$this->name = $rootEl->attributes->getNamedItem('name')->nodeValue; $this->name = $rootEl->attributes->getNamedItem('name')->nodeValue;
} }
} else { }
else {
$ret = FALSE; $ret = FALSE;
self::$errors[] = 'Unable to load schema.'; self::$errors[] = 'Unable to load schema.';
} }

4
api/dublin_core.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Implements a simple class for working with Dublin Core data and exporting it * Implements a simple class for working with Dublin Core data and exporting it
@ -8,6 +9,7 @@
*/ */
class Dublin_Core { class Dublin_Core {
public $dc = array( public $dc = array(
'dc:title' => array(), 'dc:title' => array(),
'dc:creator' => array(), 'dc:creator' => array(),

3
api/fedora_collection.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Operations that affect a Fedora repository at a collection level. * Operations that affect a Fedora repository at a collection level.

2
api/fedora_export.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
define('FOXML_10', 'info:fedora/fedora-system:FOXML-1.0'); define('FOXML_10', 'info:fedora/fedora-system:FOXML-1.0');
define('FOXML_11', 'info:fedora/fedora-system:FOXML-1.1'); define('FOXML_11', 'info:fedora/fedora-system:FOXML-1.1');

15
api/fedora_item.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
define('RELS_EXT_URI', 'info:fedora/fedora-system:def/relations-external#'); define('RELS_EXT_URI', 'info:fedora/fedora-system:def/relations-external#');
define("FEDORA_MODEL_URI", 'info:fedora/fedora-system:def/model#'); define("FEDORA_MODEL_URI", 'info:fedora/fedora-system:def/model#');
@ -55,7 +55,7 @@ class Fedora_Item {
return (!empty($this->objectProfile)); return (!empty($this->objectProfile));
} }
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.
@ -76,7 +76,7 @@ class Fedora_Item {
return $return_value; return $return_value;
} }
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;
} }
@ -94,15 +94,14 @@ 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
); );
return $this->soap_call('addDataStream', $params); return $this->soap_call('addDataStream', $params);
} }
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');
@ -332,7 +331,7 @@ class Fedora_Item {
return $ret; return $ret;
} }
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,
@ -612,7 +611,7 @@ class Fedora_Item {
closedir($dir_handle); closedir($dir_handle);
} }
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,

10
api/fedora_utils.inc

@ -1,5 +1,5 @@
<?php <?php
// $Id$
// @file fedora_utils.inc // @file fedora_utils.inc
// Base utilities used by the Islansora fedora module. // Base utilities used by the Islansora fedora module.
@ -8,7 +8,8 @@
* Functions that emulate php5.3 functionality for backwards compatiablity * Functions that emulate php5.3 functionality for backwards compatiablity
*/ */
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);
@ -16,6 +17,7 @@ if (!function_exists('str_getcsv')) {
fclose($temp); fclose($temp);
return $r; return $r;
} }
} }
/* /*
* Functions that emulate php5.3 functionality for backwards compatiablity * Functions that emulate php5.3 functionality for backwards compatiablity
@ -25,7 +27,6 @@ if (!function_exists('str_getcsv')) {
* Static functions used by the Fedora PHP API. * Static functions used by the Fedora PHP API.
*/ */
function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post = NULL) { function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post = NULL) {
global $user; global $user;
// Check if we are inside Drupal and there is a valid user. // Check if we are inside Drupal and there is a valid user.
@ -69,10 +70,8 @@ function fedora_available() {
$response = do_curl(variable_get('fedora_base_url', 'http://localhost:8080/fedora') . '/describe'); $response = do_curl(variable_get('fedora_base_url', 'http://localhost:8080/fedora') . '/describe');
return strstr($response, 'Repository Information HTML Presentation') !== FALSE; return strstr($response, 'Repository Information HTML Presentation') !== FALSE;
} }
/** /**
* Returns a UTF-8-encoded transcripiton of the string given in $in_str. * Returns a UTF-8-encoded transcripiton of the string given in $in_str.
* @param string $in_str * @param string $in_str
@ -123,6 +122,5 @@ function fixDsid($dsid) {
$new_dsid = 'item' . rand(1, 100); $new_dsid = 'item' . rand(1, 100);
return $new_dsid; return $new_dsid;
} }

7
api/rels-ext.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* To change this template, choose Tools | Templates * To change this template, choose Tools | Templates
@ -12,9 +13,11 @@
* @author aoneill * @author aoneill
*/ */
class RelsExt { class RelsExt {
// Instance variables // Instance variables
public $relsExtArray = array(); public $relsExtArray = array();
private $originalRelsExtArray = array(); // Used to determine the result of modified() funciton. private $originalRelsExtArray = array(); // Used to determine the result of modified() funciton.
// Member functions // Member functions
/** /**
@ -24,7 +27,6 @@ class RelsExt {
*/ */
function RelsExt($item) { function RelsExt($item) {
$relsextxml = $item->get_datastream_dissemination('RELS-EXT'); $relsextxml = $item->get_datastream_dissemination('RELS-EXT');
} }
function modified() { function modified() {
@ -39,5 +41,6 @@ class RelsExt {
function save() { function save() {
} }
} }

8
api/tagging.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* @file tagging.inc * @file tagging.inc
@ -11,6 +12,7 @@
* @author aoneill * @author aoneill
*/ */
class TagSet { class TagSet {
public $tags = array(); public $tags = array();
public $item = NULL; public $item = NULL;
public $tagsDSID = 'TAGS'; public $tagsDSID = 'TAGS';
@ -59,11 +61,11 @@ class TagSet {
else { else {
$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('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>

39
collection_policies/qt_collection_policy.xml

@ -5,31 +5,44 @@
</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
</relationship>
</collection_policy> </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"/>

143
collection_views/FLV-COLLECTION VIEW(2).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="sparql/results"/> <xsl:apply-templates select="sparql/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>
@ -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>

125
collection_views/default-sparqltoHtml.xsl

@ -19,100 +19,165 @@
<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>

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>

88
collection_views/yui_coverflow/js/CoverFlow.js vendored

@ -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,15 +253,39 @@ 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
}
}
});
} }
} }
} }
@ -292,15 +324,39 @@ 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({
item: coverFlowItem,
attribute: {
angle: {
start: 0,
end: this.perspectiveAngle
}
}
});
}else{ }else{
coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1); coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1);
animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION} }}); animateItems.push({
item: coverFlowItem,
attribute: {
left: {
start:coverFlowItem.getLeft(),
end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION
}
}
});
} }
} }
} }
@ -364,7 +420,10 @@ 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);
@ -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();

75
collection_views/yui_coverflow/js/test.js vendored

@ -4,15 +4,37 @@
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();
@ -20,17 +42,44 @@ YAHOO.util.Event.onDOMReady(function(){
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 myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {
var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}}); 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'
});

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>

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>

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>

33
content_models/islandora_qtCModel.xml

@ -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,7 +162,8 @@ 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>

146
example_collection_views/MHL-sparqltoHtml.xsl

@ -18,84 +18,144 @@
<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>
<br clear="all" />
<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>
@ -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>

143
example_collection_views/flv-sparqltoHtml.xsl

@ -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="sparql/results"/> <xsl:apply-templates select="sparql/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>
@ -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>

139
example_collection_views/mlp-sparqltoHtml.xsl

@ -18,84 +18,144 @@
<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>
<br clear="all" />
<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>
@ -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>

148
example_collection_views/riri-sparqltoHtml.xsl

@ -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="sparql/results"/> <xsl:apply-templates select="sparql/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>
@ -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>--

125
example_collection_views/sparqltoHtml.xsl

@ -19,48 +19,78 @@
<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>

3
fedora_repository.install

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

13
fedora_repository.module

@ -1,6 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on Aug 10, 2007 * Created on Aug 10, 2007
@ -22,8 +22,6 @@ function fedora_repository_admin() {
return $adminForm->createAdminForm(); return $adminForm->createAdminForm();
} }
/** /**
* drupal hook * drupal hook
* calls the fedora_repositorys_admin form * calls the fedora_repositorys_admin form
@ -550,7 +548,6 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) {
$item->modify_datastream_by_reference($streamUrl, $dsid, $dsLabel, $dformat); $item->modify_datastream_by_reference($streamUrl, $dsid, $dsLabel, $dformat);
$form_state['redirect'] = 'fedora/repository/' . $pid; $form_state['redirect'] = 'fedora/repository/' . $pid;
} }
function fedora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) { function fedora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) {
@ -869,7 +866,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);
} }
@ -1180,7 +1177,6 @@ function fedora_repository_theme() {
'arguments' => array( 'arguments' => array(
'element' => NULL 'element' => NULL
), ),
'fedora_repository_solution_packs_list' => array( 'fedora_repository_solution_packs_list' => array(
'arguments' => array( 'arguments' => array(
'solution_packs' => NULL, 'solution_packs' => NULL,
@ -1454,7 +1450,6 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
} }
} }
function fedora_repository_required_fedora_objects() { function fedora_repository_required_fedora_objects() {
// array( 'path-to-foxml-file', 'pid', 'dsid', 'path-to-datastream-file', int dsversion, boolean required) // array( 'path-to-foxml-file', 'pid', 'dsid', 'path-to-datastream-file', int dsversion, boolean required)
$module_path = drupal_get_path('module', 'fedora_repository'); $module_path = drupal_get_path('module', 'fedora_repository');
@ -1964,7 +1959,6 @@ function fedora_repository_display_schema($file) {
return; return;
} }
function fedora_repository_batch_reingest_object($object, &$context) { function fedora_repository_batch_reingest_object($object, &$context) {
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'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
@ -2037,7 +2031,8 @@ function fedora_repository_get_islandora_datastream_version($item = NULL, $dsid
$return = NULL; $return = NULL;
if (isset($item)) { if (isset($item)) {
$doc = simplexml_load_string($item->get_datastream_dissemination($dsid)); $doc = simplexml_load_string($item->get_datastream_dissemination($dsid));
} elseif (isset($datastream_file)) { }
elseif (isset($datastream_file)) {
$doc = simplexml_load_file($datastream_file); $doc = simplexml_load_file($datastream_file);
} }

10
fedora_repository.solutionpacks.inc

@ -1,6 +1,5 @@
<?php <?php
/** /**
* 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
@ -87,7 +86,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 +96,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 +138,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(

3
formClass.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on Jan 22, 2008 * Created on Jan 22, 2008
@ -577,7 +577,6 @@ class formClass {
if (!empty($newElements)) { if (!empty($newElements)) {
$available_dsids = array_merge($available_dsids, $newElements); $available_dsids = array_merge($available_dsids, $newElements);
} }
} }
} }

50
form_elements/includes/autocomplete.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
function ife_autocomplete_person($string) { function ife_autocomplete_person($string) {
$string = trim(strtolower($string)); $string = trim(strtolower($string));
@ -52,27 +52,32 @@ function ife_autocomplete_person($string) {
foreach ($nodeList as $node) { foreach ($nodeList as $node) {
$type = $node->getAttribute('type'); $type = $node->getAttribute('type');
$title=null; $title = NULL;
$name =null; $name = NULL;
$given=null; $given = NULL;
$family=null; $family = NULL;
$date = null; $date = NULL;
$nameParts = $node->getElementsByTagName('namePart'); $nameParts = $node->getElementsByTagName('namePart');
foreach ($nameParts as $part) { foreach ($nameParts as $part) {
switch ($part->getAttribute('type')) { switch ($part->getAttribute('type')) {
case 'given': $given = $part->nodeValue; break; case 'given': $given = $part->nodeValue;
case 'family': $family = $part->nodeValue; break; break;
case 'termsOfAddress': $title= $part->nodeValue; break; case 'family': $family = $part->nodeValue;
case 'date': $date = $part->nodeValue; break; break;
default: $name = $part->nodeValue; break; case 'termsOfAddress': $title = $part->nodeValue;
break;
case 'date': $date = $part->nodeValue;
break;
default: $name = $part->nodeValue;
break;
} }
} }
if ($name == null && isset($given) && isset($family)) { if ($name == NULL && isset($given) && isset($family)) {
$name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $given; $name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $given;
} }
$role =null; $role = NULL;
$roleTerm = $node->getElementsByTagName('roleTerm'); $roleTerm = $node->getElementsByTagName('roleTerm');
if ($roleTerm->length > 0) { if ($roleTerm->length > 0) {
$role = $roleTerm->item(0)->nodeValue; $role = $roleTerm->item(0)->nodeValue;
@ -85,8 +90,8 @@ function ife_autocomplete_person($string) {
} }
} }
} }
drupal_json($matches); exit(); drupal_json($matches);
exit();
} }
function ife_autocomplete_marcrelator($collection, $string='') { function ife_autocomplete_marcrelator($collection, $string='') {
@ -119,8 +124,6 @@ function ife_autocomplete_marcrelator($collection, $string='') {
} }
echo drupal_json($terms); echo drupal_json($terms);
} }
} }
function ife_autocomplete_gacs($collection, $string='') { function ife_autocomplete_gacs($collection, $string='') {
@ -149,8 +152,6 @@ function ife_autocomplete_gacs($collection, $string='') {
} }
echo drupal_json($gacs); echo drupal_json($gacs);
} }
} }
function ife_autocomplete_language($collection, $string='') { function ife_autocomplete_language($collection, $string='') {
@ -179,14 +180,13 @@ function ife_autocomplete_language($collection, $string='') {
} }
echo drupal_json($languages); echo drupal_json($languages);
} }
} }
function ife_autocomplete($field, $collection, $string='') { function ife_autocomplete($field, $collection, $string='') {
if ($string == '') { if ($string == '') {
$string=$collection; $collection=FALSE; $string = $collection;
$collection = FALSE;
} }
module_load_include('php', 'islandora_solr_search', 'Solr/Service'); module_load_include('php', 'islandora_solr_search', 'Solr/Service');
@ -207,8 +207,7 @@ function ife_autocomplete($field, $collection, $string='') {
try { try {
$results = $solr->search($query, 0, 10, $additionalParams); $results = $solr->search($query, 0, 10, $additionalParams);
} } catch (Exception $e) {
catch (Exception $e) {
drupal_set_message(t('error searching ') . $e->getMessage()); drupal_set_message(t('error searching ') . $e->getMessage());
} }
@ -224,7 +223,8 @@ function ife_autocomplete($field, $collection, $string='') {
$values[$val] = $val; $values[$val] = $val;
} }
} }
} else { }
else {
$values[$resfield['value']] = $resfield['value']; $values[$resfield['value']] = $resfield['value'];
} }
} }

5
form_elements/includes/creative_commons.inc

@ -1,6 +1,6 @@
<?php <?php
class CreativeCommons
{ class CreativeCommons {
public static $cc_jurisdiction_vals = array( public static $cc_jurisdiction_vals = array(
'' => 'International', '' => 'International',
@ -57,7 +57,6 @@
'scotland' => 'UK:Scotland', 'scotland' => 'UK:Scotland',
'us' => 'UnitedStates', 'us' => 'UnitedStates',
'vn' => 'Vietnam'); 'vn' => 'Vietnam');
public static $cc_versions = array( public static $cc_versions = array(
'' => '3.0', '' => '3.0',
'ar' => '2.5', 'ar' => '2.5',

14
form_elements/includes/filechooser.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
function theme_filechooser($element) { function theme_filechooser($element) {
global $base_url; global $base_url;
@ -31,8 +31,6 @@ function theme_filechooser($element) {
return theme('form_element', $element, $output); return theme('form_element', $element, $output);
} }
function ife_filechooser_get_thumbnail($cp_pid, $cm_pid, $file) { function ife_filechooser_get_thumbnail($cp_pid, $cm_pid, $file) {
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'ContentModel');
@ -67,12 +65,10 @@ function ife_filechooser_get_thumbnail($cp_pid, $cm_pid, $file) {
exit(); exit();
} }
} }
} }
} }
function ife_filechooser_cmp($a,$b)
{ function ife_filechooser_cmp($a, $b) {
return strcmp($a['name'], $b['name']); return strcmp($a['name'], $b['name']);
} }
@ -85,7 +81,8 @@ function ife_filechooser_generate_thumbnails($cp_pid, $cm_pid) {
$cp = CollectionPolicy::loadFromCollection($cp_pid); $cp = CollectionPolicy::loadFromCollection($cp_pid);
if ($cm === FALSE || $cp === FALSE) { if ($cm === FALSE || $cp === FALSE) {
echo '[]'; exit(); echo '[]';
exit();
} }
$mimeClass = new MimeClass(); $mimeClass = new MimeClass();
@ -134,5 +131,4 @@ function ife_filechooser_generate_thumbnails($cp_pid, $cm_pid) {
} }
usort($files, 'ife_filechooser_cmp'); usort($files, 'ife_filechooser_cmp');
echo json_encode($files); echo json_encode($files);
} }

15
form_elements/includes/people.inc

@ -1,6 +1,5 @@
<?php <?php
// $Id$
// this is a bit of a hack. It iterates through the // this is a bit of a hack. It iterates through the
// form and assigns a dummy value to any field in the $post // form and assigns a dummy value to any field in the $post
@ -36,7 +35,6 @@ function _ife_find_people_element($form, &$keys = array()) {
} }
return FALSE; return FALSE;
} }
function ife_people_ahah() { function ife_people_ahah() {
@ -110,7 +108,6 @@ function ife_remove_person_submit($form, &$form_state) {
$form_state['rebuild'] = TRUE; $form_state['rebuild'] = TRUE;
} }
/** /**
* Submit handler for the "Add Person" button. * Submit handler for the "Add Person" button.
*/ */
@ -134,8 +131,8 @@ function ife_add_person_submit($form, &$form_state) {
} }
//only add new person if we are not adding from repository. //only add new person if we are not adding from repository.
$elName = isset($qt_form['entity0']['#parents'][0])?$qt_form['entity0']['#parents'][0]:null; $elName = isset($qt_form['entity0']['#parents'][0]) ? $qt_form['entity0']['#parents'][0] : NULL;
if ($elName == null || !isset($form_state['clicked_button']['#post'][$elName]['add_from_repository']) || trim($form_state['clicked_button']['#post'][$elName]['add_from_repository']) == '') { if ($elName == NULL || !isset($form_state['clicked_button']['#post'][$elName]['add_from_repository']) || trim($form_state['clicked_button']['#post'][$elName]['add_from_repository']) == '') {
$people[] = array('name' => '', 'date' => '', 'role' => '', 'subject' => ''); $people[] = array('name' => '', 'date' => '', 'role' => '', 'subject' => '');
} }
unset($form_state['submit_handlers']); unset($form_state['submit_handlers']);
@ -144,8 +141,6 @@ function ife_add_person_submit($form, &$form_state) {
$form_state['rebuild'] = TRUE; $form_state['rebuild'] = TRUE;
} }
/** /**
* Submit handler for the "Add Person" button. * Submit handler for the "Add Person" button.
*/ */
@ -176,8 +171,6 @@ function ife_add_org_submit($form, &$form_state) {
//$form_state['rebuild'] = TRUE; //$form_state['rebuild'] = TRUE;
} }
/** /**
* Submit handler for the "Add Person" button. * Submit handler for the "Add Person" button.
*/ */
@ -207,8 +200,6 @@ function ife_add_conf_submit($form, &$form_state) {
//$form_state['rebuild'] = TRUE; //$form_state['rebuild'] = TRUE;
} }
function theme_people($element) { function theme_people($element) {
drupal_add_js(drupal_get_path('module', 'islandora_form_elements') . '/js/people_ahah.js'); drupal_add_js(drupal_get_path('module', 'islandora_form_elements') . '/js/people_ahah.js');
if (!empty($element['#collapsible'])) { if (!empty($element['#collapsible'])) {
@ -226,7 +217,6 @@ function theme_people($element) {
return '<fieldset' . drupal_attributes($element['#attributes']) . '>' . ($element['#title'] ? '<legend>' . $element['#title'] . '</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">' . $element['#description'] . '</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . "</fieldset>\n"; return '<fieldset' . drupal_attributes($element['#attributes']) . '>' . ($element['#title'] ? '<legend>' . $element['#title'] . '</legend>' : '') . (isset($element['#description']) && $element['#description'] ? '<div class="description">' . $element['#description'] . '</div>' : '') . (!empty($element['#children']) ? $element['#children'] : '') . "</fieldset>\n";
} }
function theme_people_items($form) { function theme_people_items($form) {
$rows = array(); $rows = array();
$headers = array( $headers = array(
@ -285,4 +275,3 @@ function theme_people_items($form) {
return $output; return $output;
} }

192
form_elements/islandora_form_elements.module

@ -1,6 +1,5 @@
<?php <?php
/** /**
* Implementation of hook_elements(): * Implementation of hook_elements():
* Register the duration widget with the Forms API and set default values. * Register the duration widget with the Forms API and set default values.
@ -91,33 +90,27 @@ function islandora_form_elements_elements() {
return $type; return $type;
} }
function ife_fieldset_process($element,$edit,&$form_state) function ife_fieldset_process($element, $edit, &$form_state) {
{
// echo 'fieldset process '. $element['#collapsible'].'<br/>'; // echo 'fieldset process '. $element['#collapsible'].'<br/>';
if (isset($element['#collapsed']) && ife_fieldset_children_has_value($element)) if (isset($element['#collapsed']) && ife_fieldset_children_has_value($element)) {
{
unset($element['#collapsed']); unset($element['#collapsed']);
} }
return $element; return $element;
} }
function ife_fieldset_children_has_value($el) function ife_fieldset_children_has_value($el) {
{
$ret = false; $ret = false;
if ((isset($el['#default_value']) && !is_array($el['#default_value']) && trim($el['#default_value']) != '') || if ((isset($el['#default_value']) && !is_array($el['#default_value']) && trim($el['#default_value']) != '') ||
(isset($el['#value']) && trim($el['#value']) != '')) (isset($el['#value']) && trim($el['#value']) != '')) {
{
$ret = true; $ret = true;
} else }
{ else {
foreach (element_children($el) as $key) foreach (element_children($el) as $key) {
{
if (!$ret) if (!$ret) {
{
$ret = (isset($_POST[$key]) && (is_array($_POST[$key]) || trim($_POST[$key]) != '')) || ife_fieldset_children_has_value($el[$key]); $ret = (isset($_POST[$key]) && (is_array($_POST[$key]) || trim($_POST[$key]) != '')) || ife_fieldset_children_has_value($el[$key]);
} }
} }
@ -126,9 +119,7 @@ function ife_fieldset_children_has_value($el)
return $ret; return $ret;
} }
function ife_people_process($element, $edit, &$form_state) {
function ife_people_process($element,$edit,&$form_state)
{
$element['#tree'] = TRUE; $element['#tree'] = TRUE;
$element['#prefix'] = '<div class="clear-block" id="ife-people-wrapper">'; $element['#prefix'] = '<div class="clear-block" id="ife-people-wrapper">';
@ -158,8 +149,7 @@ function ife_people_process($element,$edit,&$form_state)
$person = array(); $person = array();
switch ($json->type) switch ($json->type) {
{
case 'personal': case 'personal':
$person['name'] = $json->name; $person['name'] = $json->name;
$person['role'] = $json->role; $person['role'] = $json->role;
@ -182,31 +172,28 @@ function ife_people_process($element,$edit,&$form_state)
$people[] = $person; $people[] = $person;
$form_state['storage']['people'] = $people; $form_state['storage']['people'] = $people;
}
} else if (!isset($form_state['storage']['people']) || empty($form_state['storage']['people'])) elseif (!isset($form_state['storage']['people']) || empty($form_state['storage']['people'])) {
{
if ((!isset($form_state['clicked_button']) || count($form_state['clicked_button']) == 0) && isset($element['#default_value']) && is_array($element['#default_value'])) { if ((!isset($form_state['clicked_button']) || count($form_state['clicked_button']) == 0) && isset($element['#default_value']) && is_array($element['#default_value'])) {
$form_state['storage']['people'] = $element['#default_value']; $form_state['storage']['people'] = $element['#default_value'];
if (count($element['#default_value']) > 0) { if (count($element['#default_value']) > 0) {
$element['#collapsed'] = FALSE; $element['#collapsed'] = FALSE;
} }
}
} else { else {
$form_state['storage']['people'] = array(array('name' => '', 'role' => '', 'date' => '', 'subject' => '')); $form_state['storage']['people'] = array(array('name' => '', 'role' => '', 'date' => '', 'subject' => ''));
} }
} }
$i = 0; $i = 0;
foreach ($form_state['storage']['people'] as $person) foreach ($form_state['storage']['people'] as $person) {
{
$person['delta'] = $i; $person['delta'] = $i;
$type = 'person'; $type = 'person';
if (isset($person['organization'])) if (isset($person['organization'])) {
{
$type = 'organization'; $type = 'organization';
} else if (isset($person['conference'])) }
{ elseif (isset($person['conference'])) {
$type = 'conference'; $type = 'conference';
} }
@ -274,12 +261,10 @@ $element['add_organization'] = array(
return $element; return $element;
} }
function ife_person_process($element) function ife_person_process($element) {
{
$element['#tree'] = TRUE; $element['#tree'] = TRUE;
if (!isset($element['#value'])) if (!isset($element['#value'])) {
{
$element['#value'] = array('name' => ''); $element['#value'] = array('name' => '');
} }
@ -335,13 +320,10 @@ function ife_person_process($element)
return $element; return $element;
} }
function ife_org_process($element) {
function ife_org_process($element)
{
$element['#tree'] = TRUE; $element['#tree'] = TRUE;
if (!isset($element['#value'])) if (!isset($element['#value'])) {
{
$element['#value'] = array('name' => ''); $element['#value'] = array('name' => '');
} }
@ -388,13 +370,10 @@ function ife_org_process($element)
return $element; return $element;
} }
function ife_conf_process($element) {
function ife_conf_process($element)
{
$element['#tree'] = TRUE; $element['#tree'] = TRUE;
if (!isset($element['#value'])) if (!isset($element['#value'])) {
{
$element['#value'] = array('name' => ''); $element['#value'] = array('name' => '');
} }
@ -450,20 +429,17 @@ function ife_conf_process($element)
/** /**
* Our process callback to expand the control. * Our process callback to expand the control.
*/ */
function ife_sticky_textfield_process($element,$edit,&$form_state) function ife_sticky_textfield_process($element, $edit, &$form_state) {
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
{
$element['#type'] = 'sticky_textfield'; $element['#type'] = 'sticky_textfield';
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky'; $stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
{
$form_state['storage'][$element['#name']] = $element['#value']; $form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']])) }
{ elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']]; $element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE; $element['#sticky_on'] = TRUE;
} }
@ -475,19 +451,16 @@ function ife_sticky_textfield_process($element,$edit,&$form_state)
/** /**
* Our process callback to expand the control. * Our process callback to expand the control.
*/ */
function ife_datepicker_process($element,$edit,&$form_state) function ife_datepicker_process($element, $edit, &$form_state) {
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
{
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky'; $stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
{
$form_state['storage'][$element['#name']] = $element['#value']; $form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']])) }
{ elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']]; $element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE; $element['#sticky_on'] = TRUE;
} }
@ -496,25 +469,20 @@ function ife_datepicker_process($element,$edit,&$form_state)
return $element; return $element;
} }
/** /**
* Our process callback to expand the control. * Our process callback to expand the control.
*/ */
function ife_sticky_textarea_process($element,$edit,&$form_state) function ife_sticky_textarea_process($element, $edit, &$form_state) {
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
{
$element['#type'] = 'sticky_textarea'; $element['#type'] = 'sticky_textarea';
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky'; $stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
{
$form_state['storage'][$element['#name']] = $element['#value']; $form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']])) }
{ elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']]; $element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE; $element['#sticky_on'] = TRUE;
} }
@ -523,24 +491,20 @@ function ife_sticky_textarea_process($element,$edit,&$form_state)
return $element; return $element;
} }
/** /**
* Our process callback to expand the control. * Our process callback to expand the control.
*/ */
function ife_sticky_select_process($element,$edit,&$form_state) function ife_sticky_select_process($element, $edit, &$form_state) {
{
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
{
$element['#type'] = 'sticky_select'; $element['#type'] = 'sticky_select';
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky'; $stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
{
$form_state['storage'][$element['#name']] = $element['#value']; $form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']])) }
{ elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']]; $element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE; $element['#sticky_on'] = TRUE;
} }
@ -556,15 +520,13 @@ function ife_copyright_process($element,$edit,&$form_state) {
module_load_include('inc', 'islandora_form_elements', 'includes/creative_commons'); module_load_include('inc', 'islandora_form_elements', 'includes/creative_commons');
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
{
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky'; $stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
{
$form_state['storage'][$element['#name']] = $element['#value']; $form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']])) }
{ elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']]; $element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE; $element['#sticky_on'] = TRUE;
} }
@ -624,15 +586,12 @@ function ife_copyright_process($element,$edit,&$form_state) {
$element['#title'] = ''; $element['#title'] = '';
return $element; return $element;
} }
/** /**
* Our process callback to expand the control. * Our process callback to expand the control.
*/ */
function ife_list_process($element,$edit,&$form_state) function ife_list_process($element, $edit, &$form_state) {
{
if (is_array($element['#default_value'])) { if (is_array($element['#default_value'])) {
$element['#default_value'] = join('; ', $element['#default_value']); $element['#default_value'] = join('; ', $element['#default_value']);
} }
@ -641,15 +600,13 @@ function ife_list_process($element,$edit,&$form_state)
$element['#value'] = join('; ', $element['#value']); $element['#value'] = join('; ', $element['#value']);
} }
if (isset($element['#sticky']) && $element['#sticky'] == TRUE) if (isset($element['#sticky']) && $element['#sticky'] == TRUE) {
{
$stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky'; $stickyName = preg_replace('/\]/', '', array_pop(preg_split('/\[/', $element['#name']))) . '-sticky';
if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') if (isset($element['#post'][$stickyName]) && strtolower($element['#post'][$stickyName]) == 'on') {
{
$form_state['storage'][$element['#name']] = $element['#value']; $form_state['storage'][$element['#name']] = $element['#value'];
} elseif (isset($form_state['storage'][$element['#name']])) }
{ elseif (isset($form_state['storage'][$element['#name']])) {
$element['#value'] = $form_state['storage'][$element['#name']]; $element['#value'] = $form_state['storage'][$element['#name']];
$element['#sticky_on'] = TRUE; $element['#sticky_on'] = TRUE;
} }
@ -668,15 +625,12 @@ function islandora_form_elements_theme() {
'sticky_textfield' => array( 'sticky_textfield' => array(
'arguments' => array('element'), 'arguments' => array('element'),
), ),
'sticky_textarea' => array( 'sticky_textarea' => array(
'arguments' => array('element'), 'arguments' => array('element'),
), ),
'sticky_select' => array( 'sticky_select' => array(
'arguments' => array('element'), 'arguments' => array('element'),
), ),
'filechooser' => array( 'filechooser' => array(
'arguments' => array('element'), 'arguments' => array('element'),
'file' => 'includes/filechooser.inc' 'file' => 'includes/filechooser.inc'
@ -687,7 +641,6 @@ function islandora_form_elements_theme() {
'other_select' => array( 'other_select' => array(
'arguments' => array('element'), 'arguments' => array('element'),
), ),
'people' => array( 'people' => array(
'arguments' => array('element'), 'arguments' => array('element'),
'file' => 'includes/people.inc', 'file' => 'includes/people.inc',
@ -705,18 +658,14 @@ function islandora_form_elements_theme() {
); );
} }
function ife_other_select_process($element, $edit, &$form_state) {
function ife_other_select_process($element,$edit,&$form_state) if (isset($element['#value']) && trim($element['#value']) != '' && !isset($element['#options'][$element['#value']])) {
{
if (isset($element['#value']) && trim($element['#value']) != '' && !isset($element['#options'][$element['#value']]))
{
$element['#options'][$element['#value']] = $element['#value']; $element['#options'][$element['#value']] = $element['#value'];
} }
return $element; return $element;
} }
function theme_copyright($element) function theme_copyright($element) {
{
$path = drupal_get_path('module', 'islandora_form_elements'); $path = drupal_get_path('module', 'islandora_form_elements');
drupal_add_js($path . '/js/copyright.js'); drupal_add_js($path . '/js/copyright.js');
drupal_add_css($path . '/css/copyright.css'); drupal_add_css($path . '/css/copyright.css');
@ -724,8 +673,7 @@ function theme_copyright($element)
return theme('form_element', $element, $element['#children']); return theme('form_element', $element, $element['#children']);
} }
function theme_other_select($element) function theme_other_select($element) {
{
$path = drupal_get_path('module', 'islandora_form_elements'); $path = drupal_get_path('module', 'islandora_form_elements');
drupal_add_js($path . '/js/otherselect.js'); drupal_add_js($path . '/js/otherselect.js');
$select = ''; $select = '';
@ -734,8 +682,7 @@ function theme_other_select($element)
return theme('form_element', $element, '<select name="' . $element['#name'] . '" ' . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . form_select_options($element) . '</select>'); return theme('form_element', $element, '<select name="' . $element['#name'] . '" ' . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . form_select_options($element) . '</select>');
} }
function theme_list($element) function theme_list($element) {
{
$path = drupal_get_path('module', 'islandora_form_elements'); $path = drupal_get_path('module', 'islandora_form_elements');
drupal_add_js($path . '/js/jquery.tag.editor-min.js'); drupal_add_js($path . '/js/jquery.tag.editor-min.js');
drupal_add_js('$(document).ready(function () { $(\'#' . $element['#id'] . '\').tagEditor({ separator: \';\', confirmRemoval: false, completeOnBlur: true }); }); ', 'inline'); drupal_add_js('$(document).ready(function () { $(\'#' . $element['#id'] . '\').tagEditor({ separator: \';\', confirmRemoval: false, completeOnBlur: true }); }); ', 'inline');
@ -774,11 +721,8 @@ function theme_list($element)
return theme('form_element', $element, $output . $sticky) . $extra; return theme('form_element', $element, $output . $sticky) . $extra;
} }
/** /**
* Format a sticky textarea. * Format a sticky textarea.
* *
@ -819,8 +763,6 @@ function theme_sticky_textarea($element) {
return theme('form_element', $element, '<textarea cols="' . $element['#cols'] . '" rows="' . $element['#rows'] . '" name="' . $element['#name'] . '" id="' . $element['#id'] . '" ' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>' . $sticky); return theme('form_element', $element, '<textarea cols="' . $element['#cols'] . '" rows="' . $element['#rows'] . '" name="' . $element['#name'] . '" id="' . $element['#id'] . '" ' . drupal_attributes($element['#attributes']) . '>' . check_plain($element['#value']) . '</textarea>' . $sticky);
} }
/** /**
* Format a sticky select. * Format a sticky select.
* *
@ -846,7 +788,6 @@ function theme_sticky_select($element) {
return theme('form_element', $element, '<select name="' . $element['#name'] . '' . ($multiple ? '[]' : '') . '"' . ($multiple ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . form_select_options($element) . '</select>' . $sticky); return theme('form_element', $element, '<select name="' . $element['#name'] . '' . ($multiple ? '[]' : '') . '"' . ($multiple ? ' multiple="multiple" ' : '') . drupal_attributes($element['#attributes']) . ' id="' . $element['#id'] . '" ' . $size . '>' . form_select_options($element) . '</select>' . $sticky);
} }
/** /**
* Theme function to format the output. * Theme function to format the output.
* *
@ -894,11 +835,8 @@ function theme_datepicker($element) {
return theme('form_element', $element, $output . $sticky) . $extra; return theme('form_element', $element, $output . $sticky) . $extra;
} }
/** /**
* Theme function to format the output. * Theme function to format the output.
* *
@ -908,7 +846,6 @@ function theme_datepicker($element) {
function theme_sticky_textfield($element) { function theme_sticky_textfield($element) {
//echo '<pre>'; var_dump($element); echo '</pre>'; //echo '<pre>'; var_dump($element); echo '</pre>';
//return theme('theme_form_element', $element, '<div class="container-inline mark">' . $element['#children'] . '</div>'); //return theme('theme_form_element', $element, '<div class="container-inline mark">' . $element['#children'] . '</div>');
$size = empty($element['#size']) ? '' : ' size="' . $element['#size'] . '"'; $size = empty($element['#size']) ? '' : ' size="' . $element['#size'] . '"';
$maxlength = empty($element['#maxlength']) ? '' : ' maxlength="' . $element['#maxlength'] . '"'; $maxlength = empty($element['#maxlength']) ? '' : ' maxlength="' . $element['#maxlength'] . '"';
@ -941,28 +878,23 @@ function theme_sticky_textfield($element) {
return theme('form_element', $element, $output . $sticky) . $extra; return theme('form_element', $element, $output . $sticky) . $extra;
} }
function ife_filechooser_validate($element,&$form_state) function ife_filechooser_validate($element, &$form_state) {
{
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
$cp = CollectionPolicy::loadFromCollection($form_state['storage']['collection_pid']); $cp = CollectionPolicy::loadFromCollection($form_state['storage']['collection_pid']);
if ($cp !== false) if ($cp !== false) {
{
$form_state['values'][$element['#name']] = $cp->getStagingArea() . '/' . $element['#value']; $form_state['values'][$element['#name']] = $cp->getStagingArea() . '/' . $element['#value'];
} }
} }
function ife_filechooser_process($element, $edit, &$form_state) function ife_filechooser_process($element, $edit, &$form_state) {
{
$element['#model_pid'] = $form_state['values']['models']; $element['#model_pid'] = $form_state['values']['models'];
return $element; return $element;
} }
function islandora_form_elements_menu() function islandora_form_elements_menu() {
{
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');

56
form_elements/js/copyright.js

@ -1,6 +1,60 @@
$(document).ready(function () { $(document).ready(function () {
var cc_versions = new Array(); cc_versions[""]="3.0"; cc_versions["ar"]="2.5"; cc_versions["au"]="3.0"; cc_versions["at"]="3.0"; cc_versions["be"]="2.0"; cc_versions["br"]="3.0"; cc_versions["bg"]="2.5"; cc_versions["ca"]="2.5"; cc_versions["cl"]="2.0"; cc_versions["cn"]="2.5"; cc_versions["co"]="2.5"; cc_versions["hr"]="3.0"; cc_versions["cz"]="3.0"; cc_versions["dk"]="2.5"; cc_versions["ec"]="3.0"; cc_versions["fi"]="1.0"; cc_versions["fr"]="2.0"; cc_versions["de"]="3.0"; cc_versions["gr"]="3.0"; cc_versions["gt"]="3.0"; cc_versions["hk"]="3.0"; cc_versions["hu"]="2.5"; cc_versions["in"]="2.5"; cc_versions["il"]="2.5"; cc_versions["it"]="2.5"; cc_versions["jp"]="2.0"; cc_versions["kr"]="2.0"; cc_versions["lu"]="3.0"; cc_versions["mk"]="2.5"; cc_versions["my"]="2.5"; cc_versions["mt"]="2.5"; cc_versions["mx"]="2.5"; cc_versions["nl"]="3.0"; cc_versions["nz"]="3.0"; cc_versions["no"]="3.0"; cc_versions["pe"]="2.5"; cc_versions["ph"]="3.0"; cc_versions["pl"]="3.0"; cc_versions["pt"]="2.5"; cc_versions["pr"]="3.0"; cc_versions["ro"]="3.0"; cc_versions["rs"]="3.0"; cc_versions["sg"]="3.0"; cc_versions["si"]="2.5"; cc_versions["za"]="2.5"; cc_versions["es"]="3.0"; cc_versions["se"]="2.5"; cc_versions["ch"]="2.5"; cc_versions["tw"]="3.0"; cc_versions["th"]="3.0"; cc_versions["uk"]="2.0"; cc_versions["scotland"]="2.5"; cc_versions["us"]="3.0"; cc_versions["vn"]="3.0"; var cc_versions = new Array();
cc_versions[""]="3.0";
cc_versions["ar"]="2.5";
cc_versions["au"]="3.0";
cc_versions["at"]="3.0";
cc_versions["be"]="2.0";
cc_versions["br"]="3.0";
cc_versions["bg"]="2.5";
cc_versions["ca"]="2.5";
cc_versions["cl"]="2.0";
cc_versions["cn"]="2.5";
cc_versions["co"]="2.5";
cc_versions["hr"]="3.0";
cc_versions["cz"]="3.0";
cc_versions["dk"]="2.5";
cc_versions["ec"]="3.0";
cc_versions["fi"]="1.0";
cc_versions["fr"]="2.0";
cc_versions["de"]="3.0";
cc_versions["gr"]="3.0";
cc_versions["gt"]="3.0";
cc_versions["hk"]="3.0";
cc_versions["hu"]="2.5";
cc_versions["in"]="2.5";
cc_versions["il"]="2.5";
cc_versions["it"]="2.5";
cc_versions["jp"]="2.0";
cc_versions["kr"]="2.0";
cc_versions["lu"]="3.0";
cc_versions["mk"]="2.5";
cc_versions["my"]="2.5";
cc_versions["mt"]="2.5";
cc_versions["mx"]="2.5";
cc_versions["nl"]="3.0";
cc_versions["nz"]="3.0";
cc_versions["no"]="3.0";
cc_versions["pe"]="2.5";
cc_versions["ph"]="3.0";
cc_versions["pl"]="3.0";
cc_versions["pt"]="2.5";
cc_versions["pr"]="3.0";
cc_versions["ro"]="3.0";
cc_versions["rs"]="3.0";
cc_versions["sg"]="3.0";
cc_versions["si"]="2.5";
cc_versions["za"]="2.5";
cc_versions["es"]="3.0";
cc_versions["se"]="2.5";
cc_versions["ch"]="2.5";
cc_versions["tw"]="3.0";
cc_versions["th"]="3.0";
cc_versions["uk"]="2.0";
cc_versions["scotland"]="2.5";
cc_versions["us"]="3.0";
cc_versions["vn"]="3.0";
function updateCCPreview() function updateCCPreview()
{ {

31
form_elements/js/jcarousellite_1.0.1.js

@ -236,15 +236,32 @@ $.fn.jCarouselLite = function(o) {
var li = $("li", ul), itemLength = li.size(), curr = o.start; var li = $("li", ul), itemLength = li.size(), curr = o.start;
div.css("visibility", "visible"); div.css("visibility", "visible");
li.css({overflow: "hidden", float: o.vertical ? "none" : "left"}); li.css({
ul.css({margin: "0", padding: "0", position: "relative", "list-style-type": "none", "z-index": "1"}); overflow: "hidden",
div.css({overflow: "hidden", position: "relative", "z-index": "2", left: "0px"}); float: o.vertical ? "none" : "left"
});
ul.css({
margin: "0",
padding: "0",
position: "relative",
"list-style-type": "none",
"z-index": "1"
});
div.css({
overflow: "hidden",
position: "relative",
"z-index": "2",
left: "0px"
});
var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation var liSize = o.vertical ? height(li) : width(li); // Full li size(incl margin)-Used for animation
var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items) var ulSize = liSize * itemLength; // size of full ul(total length, not just for the visible items)
var divSize = liSize * v; // size of entire div(total length for just the visible items) var divSize = liSize * v; // size of entire div(total length for just the visible items)
li.css({width: li.width(), height: li.height()}); li.css({
width: li.width(),
height: li.height()
});
ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize)); ul.css(sizeCss, ulSize+"px").css(animCss, -(curr*liSize));
div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images div.css(sizeCss, divSize+"px"); // Width of the DIV. length of visible images
@ -306,7 +323,11 @@ $.fn.jCarouselLite = function(o) {
running = true; running = true;
ul.animate( ul.animate(
animCss == "left" ? { left: -(curr*liSize) } : { top: -(curr*liSize) } , o.speed, o.easing, animCss == "left" ? {
left: -(curr*liSize)
} : {
top: -(curr*liSize)
} , o.speed, o.easing,
function() { function() {
if(o.afterEnd) if(o.afterEnd)
o.afterEnd.call(this, vis()); o.afterEnd.call(this, vis());

39
form_elements/js/jquery.easing.1.1.js

@ -65,23 +65,44 @@ jQuery.easing = {
return jQuery.easing['bounceout'] (x, t*2-d,0, c, d) * .5 + c*.5 + b; return jQuery.easing['bounceout'] (x, t*2-d,0, c, d) * .5 + c*.5 + b;
}, },
elasin: function(x, t, b, c, d) { elasin: function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c; var s=1.70158;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; var p=0;
if (a < Math.abs(c)) { a=c; var s=p/4; } var a=c;
if (t==0) return b;
if ((t/=d)==1) return b+c;
if (!p) p=d*.3;
if (a < Math.abs(c)) {
a=c;
var s=p/4;
}
else var s = p/(2*Math.PI) * Math.asin (c/a); else var s = p/(2*Math.PI) * Math.asin (c/a);
return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; return -(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
}, },
elasout: function(x, t, b, c, d) { elasout: function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c; var s=1.70158;
if (t==0) return b; if ((t/=d)==1) return b+c; if (!p) p=d*.3; var p=0;
if (a < Math.abs(c)) { a=c; var s=p/4; } var a=c;
if (t==0) return b;
if ((t/=d)==1) return b+c;
if (!p) p=d*.3;
if (a < Math.abs(c)) {
a=c;
var s=p/4;
}
else var s = p/(2*Math.PI) * Math.asin (c/a); else var s = p/(2*Math.PI) * Math.asin (c/a);
return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b; return a*Math.pow(2,-10*t) * Math.sin( (t*d-s)*(2*Math.PI)/p ) + c + b;
}, },
elasinout: function(x, t, b, c, d) { elasinout: function(x, t, b, c, d) {
var s=1.70158;var p=0;var a=c; var s=1.70158;
if (t==0) return b; if ((t/=d/2)==2) return b+c; if (!p) p=d*(.3*1.5); var p=0;
if (a < Math.abs(c)) { a=c; var s=p/4; } var a=c;
if (t==0) return b;
if ((t/=d/2)==2) return b+c;
if (!p) p=d*(.3*1.5);
if (a < Math.abs(c)) {
a=c;
var s=p/4;
}
else var s = p/(2*Math.PI) * Math.asin (c/a); else var s = p/(2*Math.PI) * Math.asin (c/a);
if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b; if (t < 1) return -.5*(a*Math.pow(2,10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )) + b;
return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b; return a*Math.pow(2,-10*(t-=1)) * Math.sin( (t*d-s)*(2*Math.PI)/p )*.5 + c + b;

17
form_elements/js/jquery.loadImages.1.0.1.min.js vendored

@ -1 +1,16 @@
(function(c){var h=[];c.loadImages=function(a,d){a instanceof Array||(a=[a]);for(var e=a.length,f=0,g=e;g--;){var b=document.createElement("img");b.onload=function(){f++;f>=e&&c.isFunction(d)&&d()};b.src=a[g];h.push(b)}}})(jQuery); (function(c){
var h=[];
c.loadImages=function(a,d){
a instanceof Array||(a=[a]);
for(var e=a.length,f=0,g=e;g--;){
var b=document.createElement("img");
b.onload=function(){
f++;
f>=e&&c.isFunction(d)&&d()
};
b.src=a[g];
h.push(b)
}
}
})(jQuery);

46
form_elements/js/jquery.mousewheel.min.js vendored

@ -8,4 +8,48 @@
* *
* Requires: 1.2.2+ * Requires: 1.2.2+
*/ */
(function(c){var a=["DOMMouseScroll","mousewheel"];c.event.special.mousewheel={setup:function(){if(this.addEventListener){for(var d=a.length;d;){this.addEventListener(a[--d],b,false)}}else{this.onmousewheel=b}},teardown:function(){if(this.removeEventListener){for(var d=a.length;d;){this.removeEventListener(a[--d],b,false)}}else{this.onmousewheel=null}}};c.fn.extend({mousewheel:function(d){return d?this.bind("mousewheel",d):this.trigger("mousewheel")},unmousewheel:function(d){return this.unbind("mousewheel",d)}});function b(f){var d=[].slice.call(arguments,1),g=0,e=true;f=c.event.fix(f||window.event);f.type="mousewheel";if(f.wheelDelta){g=f.wheelDelta/120}if(f.detail){g=-f.detail/3}d.unshift(f,g);return c.event.handle.apply(this,d)}})(jQuery); (function(c){
var a=["DOMMouseScroll","mousewheel"];
c.event.special.mousewheel={
setup:function(){
if(this.addEventListener){
for(var d=a.length;d;){
this.addEventListener(a[--d],b,false)
}
}else{
this.onmousewheel=b
}
},
teardown:function(){
if(this.removeEventListener){
for(var d=a.length;d;){
this.removeEventListener(a[--d],b,false)
}
}else{
this.onmousewheel=null
}
}
};
c.fn.extend({
mousewheel:function(d){
return d?this.bind("mousewheel",d):this.trigger("mousewheel")
},
unmousewheel:function(d){
return this.unbind("mousewheel",d)
}
});
function b(f){
var d=[].slice.call(arguments,1),g=0,e=true;
f=c.event.fix(f||window.event);
f.type="mousewheel";
if(f.wheelDelta){
g=f.wheelDelta/120
}
if(f.detail){
g=-f.detail/3
}
d.unshift(f,g);
return c.event.handle.apply(this,d)
}
})(jQuery);

146
form_elements/js/jquery.tag.editor-min.js vendored

@ -5,4 +5,148 @@
@license: Creative Commons License - ShareAlike http://creativecommons.org/licenses/by-sa/3.0/ @license: Creative Commons License - ShareAlike http://creativecommons.org/licenses/by-sa/3.0/
@version: 1.4.1 @version: 1.4.1
*/ */
(function(jQuery) { jQuery.fn.tagEditor = function(options) { var defaults = { separator: ",", items: [], className: "tagEditor", confirmRemoval: false, confirmRemovalText: "Do you really want to remove the tag?", completeOnSeparator: false, completeOnBlur: false, tagsBeforeField: false, initialParse: true, imageTag: false, imageTagUrl: "", continuousOutputBuild: false }; options = jQuery.extend(defaults, options); var listBase, textBase = this, hiddenText; var itemBase = []; return this.each(function() { function addTag(tag) { tag = jQuery.trim(tag); for (var i = 0; i < itemBase.length; i++) { if (itemBase[i].toLowerCase() == tag.toLowerCase()) { return false; } } var item = jQuery(document.createElement("li")); item.text(tag); item.attr("title", "Remove tag"); if (options.imageTag) { item.append('<img src="' + options.imageTagUrl + '">'); } item.click(function() { if (options.confirmRemoval) { if (!confirm(options.confirmRemovalText)) { return; } } item.remove(); parse(); }); listBase.append(item); return true; } function resetTags() { itemBase = []; listBase.html(""); textBase.val(""); hiddenText.val(""); for (var i = 0; i < options.items.length; i++) { addTag(jQuery.trim(options.items[i])); } parse(); } function buildArray() { itemBase = []; var items = jQuery("li", listBase); for (var i = 0; i < items.length; i++) { itemBase.push(jQuery.trim(jQuery(items[i]).text())); } if (options.continuousOutputBuild) { hiddenText.val(itemBase.join(options.separator)); } } function parse() { var items = textBase.val().split(options.separator); for (var i = 0; i < items.length; i++) { var trimmedItem = jQuery.trim(items[i]); if (trimmedItem.length > 0) { addTag(trimmedItem); } } textBase.val(""); buildArray(); } function handleKeys(ev) { var keyCode = (ev.which) ? ev.which : ev.keyCode; if (options.completeOnSeparator) { if (String.fromCharCode(keyCode) == options.separator) { parse(); return false; } } switch (keyCode) { case 13: if (jQuery.trim(textBase.val()) != "") { parse(); return false; } return true; default: return true; } } jQuery.fn.extend({ tagEditorGetTags: function() { return itemBase.join(options.separator); }, tagEditorResetTags: function() { resetTags(); }, tagEditorAddTag: function(tag) { return addTag(tag); } }); hiddenText = jQuery(document.createElement("input")); hiddenText.attr("type", "hidden"); if (options.continuousOutputBuild) { hiddenText.attr("name", textBase.attr("name")); textBase.attr("name", textBase.attr("name") + "_old"); } textBase.after(hiddenText); listBase = jQuery(document.createElement("ul")); listBase.attr("class", options.className); if (options.tagsBeforeField) { jQuery(this).before(listBase); } else { jQuery(this).after(listBase); } for (var i = 0; i < options.items.length; i++) { addTag(jQuery.trim(options.items[i])); } if (options.initialParse) { parse(); } if (options.completeOnBlur) { jQuery(this).blur(parse); } buildArray(); jQuery(this).keypress(handleKeys); var form = jQuery(this).parents("form"); if (!options.continuousOutputBuild) { form.submit(function() { parse(); hiddenText.val(itemBase.join(options.separator)); hiddenText.attr("id", textBase.attr("id")); hiddenText.attr("name", textBase.attr("name")); textBase.attr("id", textBase.attr("id") + "_old"); textBase.attr("name", textBase.attr("name") + "_old"); }); } }); }; })(jQuery); (function(jQuery) {
jQuery.fn.tagEditor = function(options) {
var defaults = {
separator: ",",
items: [],
className: "tagEditor",
confirmRemoval: false,
confirmRemovalText: "Do you really want to remove the tag?",
completeOnSeparator: false,
completeOnBlur: false,
tagsBeforeField: false,
initialParse: true,
imageTag: false,
imageTagUrl: "",
continuousOutputBuild: false
};
options = jQuery.extend(defaults, options);
var listBase, textBase = this, hiddenText;
var itemBase = [];
return this.each(function() {
function addTag(tag) {
tag = jQuery.trim(tag);
for (var i = 0; i < itemBase.length; i++) {
if (itemBase[i].toLowerCase() == tag.toLowerCase()) {
return false;
}
}
var item = jQuery(document.createElement("li"));
item.text(tag);
item.attr("title", "Remove tag");
if (options.imageTag) {
item.append('<img src="' + options.imageTagUrl + '">');
}
item.click(function() {
if (options.confirmRemoval) {
if (!confirm(options.confirmRemovalText)) {
return;
}
}
item.remove();
parse();
});
listBase.append(item);
return true;
}
function resetTags() {
itemBase = [];
listBase.html("");
textBase.val("");
hiddenText.val("");
for (var i = 0; i < options.items.length; i++) {
addTag(jQuery.trim(options.items[i]));
}
parse();
}
function buildArray() {
itemBase = [];
var items = jQuery("li", listBase);
for (var i = 0; i < items.length; i++) {
itemBase.push(jQuery.trim(jQuery(items[i]).text()));
}
if (options.continuousOutputBuild) {
hiddenText.val(itemBase.join(options.separator));
}
}
function parse() {
var items = textBase.val().split(options.separator);
for (var i = 0; i < items.length; i++) {
var trimmedItem = jQuery.trim(items[i]);
if (trimmedItem.length > 0) {
addTag(trimmedItem);
}
}
textBase.val("");
buildArray();
}
function handleKeys(ev) {
var keyCode = (ev.which) ? ev.which : ev.keyCode;
if (options.completeOnSeparator) {
if (String.fromCharCode(keyCode) == options.separator) {
parse();
return false;
}
}
switch (keyCode) {
case 13:
if (jQuery.trim(textBase.val()) != "") {
parse();
return false;
}
return true;
default:
return true;
}
}
jQuery.fn.extend({
tagEditorGetTags: function() {
return itemBase.join(options.separator);
},
tagEditorResetTags: function() {
resetTags();
},
tagEditorAddTag: function(tag) {
return addTag(tag);
}
});
hiddenText = jQuery(document.createElement("input"));
hiddenText.attr("type", "hidden");
if (options.continuousOutputBuild) {
hiddenText.attr("name", textBase.attr("name"));
textBase.attr("name", textBase.attr("name") + "_old");
}
textBase.after(hiddenText);
listBase = jQuery(document.createElement("ul"));
listBase.attr("class", options.className);
if (options.tagsBeforeField) {
jQuery(this).before(listBase);
} else {
jQuery(this).after(listBase);
}
for (var i = 0; i < options.items.length; i++) {
addTag(jQuery.trim(options.items[i]));
}
if (options.initialParse) {
parse();
}
if (options.completeOnBlur) {
jQuery(this).blur(parse);
}
buildArray();
jQuery(this).keypress(handleKeys);
var form = jQuery(this).parents("form");
if (!options.continuousOutputBuild) {
form.submit(function() {
parse();
hiddenText.val(itemBase.join(options.separator));
hiddenText.attr("id", textBase.attr("id"));
hiddenText.attr("name", textBase.attr("name"));
textBase.attr("id", textBase.attr("id") + "_old");
textBase.attr("name", textBase.attr("name") + "_old");
});
}
});
};
})(jQuery);

181
form_elements/js/jquery.ui.datepicker.js vendored

@ -12,7 +12,11 @@
*/ */
(function( $, undefined ) { (function( $, undefined ) {
$.extend($.ui, { datepicker: { version: "1.8.4" } }); $.extend($.ui, {
datepicker: {
version: "1.8.4"
}
});
var PROP_NAME = 'datepicker'; var PROP_NAME = 'datepicker';
var dpuuid = new Date().getTime(); var dpuuid = new Date().getTime();
@ -168,12 +172,18 @@ $.extend(Datepicker.prototype, {
/* Create a new instance object. */ /* Create a new instance object. */
_newInst: function(target, inline) { _newInst: function(target, inline) {
var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\$1'); // escape jQuery meta chars var id = target[0].id.replace(/([^A-Za-z0-9_])/g, '\\\\$1'); // escape jQuery meta chars
return {id: id, input: target, // associated target return {
selectedDay: 0, selectedMonth: 0, selectedYear: 0, // current selection id: id,
drawMonth: 0, drawYear: 0, // month being drawn input: target, // associated target
selectedDay: 0,
selectedMonth: 0,
selectedYear: 0, // current selection
drawMonth: 0,
drawYear: 0, // month being drawn
inline: inline, // is datepicker inline or not inline: inline, // is datepicker inline or not
dpDiv: (!inline ? this.dpDiv : // presentation div dpDiv: (!inline ? this.dpDiv : // presentation div
$('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))}; $('<div class="' + this._inlineClass + ' ui-datepicker ui-widget ui-widget-content ui-helper-clearfix ui-corner-all"></div>'))
};
}, },
/* Attach the date picker to an input field. */ /* Attach the date picker to an input field. */
@ -216,10 +226,18 @@ $.extend(Datepicker.prototype, {
var buttonImage = this._get(inst, 'buttonImage'); var buttonImage = this._get(inst, 'buttonImage');
inst.trigger = $(this._get(inst, 'buttonImageOnly') ? inst.trigger = $(this._get(inst, 'buttonImageOnly') ?
$('<img/>').addClass(this._triggerClass). $('<img/>').addClass(this._triggerClass).
attr({ src: buttonImage, alt: buttonText, title: buttonText }) : attr({
src: buttonImage,
alt: buttonText,
title: buttonText
}) :
$('<button type="button"></button>').addClass(this._triggerClass). $('<button type="button"></button>').addClass(this._triggerClass).
html(buttonImage == '' ? buttonText : $('<img/>').attr( html(buttonImage == '' ? buttonText : $('<img/>').attr(
{ src:buttonImage, alt:buttonText, title:buttonText }))); {
src:buttonImage,
alt:buttonText,
title:buttonText
})));
input[isRTL ? 'before' : 'after'](inst.trigger); input[isRTL ? 'before' : 'after'](inst.trigger);
inst.trigger.click(function() { inst.trigger.click(function() {
if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0]) if ($.datepicker._datepickerShowing && $.datepicker._lastInput == input[0])
@ -356,15 +374,22 @@ $.extend(Datepicker.prototype, {
if (nodeName == 'input') { if (nodeName == 'input') {
target.disabled = false; target.disabled = false;
inst.trigger.filter('button'). inst.trigger.filter('button').
each(function() { this.disabled = false; }).end(). each(function() {
filter('img').css({opacity: '1.0', cursor: ''}); this.disabled = false;
}).end().
filter('img').css({
opacity: '1.0',
cursor: ''
});
} }
else if (nodeName == 'div' || nodeName == 'span') { else if (nodeName == 'div' || nodeName == 'span') {
var inline = $target.children('.' + this._inlineClass); var inline = $target.children('.' + this._inlineClass);
inline.children().removeClass('ui-state-disabled'); inline.children().removeClass('ui-state-disabled');
} }
this._disabledInputs = $.map(this._disabledInputs, this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value == target ? null : value); }); // delete entry function(value) {
return (value == target ? null : value);
}); // delete entry
}, },
/* Disable the date picker to a jQuery selection. /* Disable the date picker to a jQuery selection.
@ -379,15 +404,22 @@ $.extend(Datepicker.prototype, {
if (nodeName == 'input') { if (nodeName == 'input') {
target.disabled = true; target.disabled = true;
inst.trigger.filter('button'). inst.trigger.filter('button').
each(function() { this.disabled = true; }).end(). each(function() {
filter('img').css({opacity: '0.5', cursor: 'default'}); this.disabled = true;
}).end().
filter('img').css({
opacity: '0.5',
cursor: 'default'
});
} }
else if (nodeName == 'div' || nodeName == 'span') { else if (nodeName == 'div' || nodeName == 'span') {
var inline = $target.children('.' + this._inlineClass); var inline = $target.children('.' + this._inlineClass);
inline.children().addClass('ui-state-disabled'); inline.children().addClass('ui-state-disabled');
} }
this._disabledInputs = $.map(this._disabledInputs, this._disabledInputs = $.map(this._disabledInputs,
function(value) { return (value == target ? null : value); }); // delete entry function(value) {
return (value == target ? null : value);
}); // delete entry
this._disabledInputs[this._disabledInputs.length] = target; this._disabledInputs[this._disabledInputs.length] = target;
}, },
@ -496,10 +528,12 @@ $.extend(Datepicker.prototype, {
inst._keyEvent = true; inst._keyEvent = true;
if ($.datepicker._datepickerShowing) if ($.datepicker._datepickerShowing)
switch (event.keyCode) { switch (event.keyCode) {
case 9: $.datepicker._hideDatepicker(); case 9:
$.datepicker._hideDatepicker();
handled = false; handled = false;
break; // hide on tab out break; // hide on tab out
case 13: var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv). case 13:
var sel = $('td.' + $.datepicker._dayOverClass, inst.dpDiv).
add($('td.' + $.datepicker._currentClass, inst.dpDiv)); add($('td.' + $.datepicker._currentClass, inst.dpDiv));
if (sel[0]) if (sel[0])
$.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]); $.datepicker._selectDay(event.target, inst.selectedMonth, inst.selectedYear, sel[0]);
@ -507,23 +541,29 @@ $.extend(Datepicker.prototype, {
$.datepicker._hideDatepicker(); $.datepicker._hideDatepicker();
return false; // don't submit the form return false; // don't submit the form
break; // select the value on enter break; // select the value on enter
case 27: $.datepicker._hideDatepicker(); case 27:
$.datepicker._hideDatepicker();
break; // hide on escape break; // hide on escape
case 33: $.datepicker._adjustDate(event.target, (event.ctrlKey ? case 33:
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
-$.datepicker._get(inst, 'stepBigMonths') : -$.datepicker._get(inst, 'stepBigMonths') :
-$.datepicker._get(inst, 'stepMonths')), 'M'); -$.datepicker._get(inst, 'stepMonths')), 'M');
break; // previous month/year on page up/+ ctrl break; // previous month/year on page up/+ ctrl
case 34: $.datepicker._adjustDate(event.target, (event.ctrlKey ? case 34:
$.datepicker._adjustDate(event.target, (event.ctrlKey ?
+$.datepicker._get(inst, 'stepBigMonths') : +$.datepicker._get(inst, 'stepBigMonths') :
+$.datepicker._get(inst, 'stepMonths')), 'M'); +$.datepicker._get(inst, 'stepMonths')), 'M');
break; // next month/year on page down/+ ctrl break; // next month/year on page down/+ ctrl
case 35: if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target); case 35:
if (event.ctrlKey || event.metaKey) $.datepicker._clearDate(event.target);
handled = event.ctrlKey || event.metaKey; handled = event.ctrlKey || event.metaKey;
break; // clear on ctrl or command +end break; // clear on ctrl or command +end
case 36: if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target); case 36:
if (event.ctrlKey || event.metaKey) $.datepicker._gotoToday(event.target);
handled = event.ctrlKey || event.metaKey; handled = event.ctrlKey || event.metaKey;
break; // current on ctrl or command +home break; // current on ctrl or command +home
case 37: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D'); case 37:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? +1 : -1), 'D');
handled = event.ctrlKey || event.metaKey; handled = event.ctrlKey || event.metaKey;
// -1 day on ctrl or command +left // -1 day on ctrl or command +left
if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
@ -531,10 +571,12 @@ $.extend(Datepicker.prototype, {
-$.datepicker._get(inst, 'stepMonths')), 'M'); -$.datepicker._get(inst, 'stepMonths')), 'M');
// next month/year on alt +left on Mac // next month/year on alt +left on Mac
break; break;
case 38: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D'); case 38:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, -7, 'D');
handled = event.ctrlKey || event.metaKey; handled = event.ctrlKey || event.metaKey;
break; // -1 week on ctrl or command +up break; // -1 week on ctrl or command +up
case 39: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D'); case 39:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, (isRTL ? -1 : +1), 'D');
handled = event.ctrlKey || event.metaKey; handled = event.ctrlKey || event.metaKey;
// +1 day on ctrl or command +right // +1 day on ctrl or command +right
if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ? if (event.originalEvent.altKey) $.datepicker._adjustDate(event.target, (event.ctrlKey ?
@ -542,10 +584,12 @@ $.extend(Datepicker.prototype, {
+$.datepicker._get(inst, 'stepMonths')), 'M'); +$.datepicker._get(inst, 'stepMonths')), 'M');
// next month/year on alt +right // next month/year on alt +right
break; break;
case 40: if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D'); case 40:
if (event.ctrlKey || event.metaKey) $.datepicker._adjustDate(event.target, +7, 'D');
handled = event.ctrlKey || event.metaKey; handled = event.ctrlKey || event.metaKey;
break; // +1 week on ctrl or command +down break; // +1 week on ctrl or command +down
default: handled = false; default:
handled = false;
} }
else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home else if (event.keyCode == 36 && event.ctrlKey) // display the date picker on ctrl+home
$.datepicker._showDatepicker(this); $.datepicker._showDatepicker(this);
@ -622,17 +666,28 @@ $.extend(Datepicker.prototype, {
$.datepicker._pos[0] -= document.documentElement.scrollLeft; $.datepicker._pos[0] -= document.documentElement.scrollLeft;
$.datepicker._pos[1] -= document.documentElement.scrollTop; $.datepicker._pos[1] -= document.documentElement.scrollTop;
} }
var offset = {left: $.datepicker._pos[0], top: $.datepicker._pos[1]}; var offset = {
left: $.datepicker._pos[0],
top: $.datepicker._pos[1]
};
$.datepicker._pos = null; $.datepicker._pos = null;
// determine sizing offscreen // determine sizing offscreen
inst.dpDiv.css({position: 'absolute', display: 'block', top: '-1000px'}); inst.dpDiv.css({
position: 'absolute',
display: 'block',
top: '-1000px'
});
$.datepicker._updateDatepicker(inst); $.datepicker._updateDatepicker(inst);
// fix width for dynamic number of date pickers // fix width for dynamic number of date pickers
// and adjust position before showing // and adjust position before showing
offset = $.datepicker._checkOffset(inst, offset, isFixed); offset = $.datepicker._checkOffset(inst, offset, isFixed);
inst.dpDiv.css({position: ($.datepicker._inDialog && $.blockUI ? inst.dpDiv.css({
'static' : (isFixed ? 'fixed' : 'absolute')), display: 'none', position: ($.datepicker._inDialog && $.blockUI ?
left: offset.left + 'px', top: offset.top + 'px'}); 'static' : (isFixed ? 'fixed' : 'absolute')),
display: 'none',
left: offset.left + 'px',
top: offset.top + 'px'
});
if (!inst.inline) { if (!inst.inline) {
var showAnim = $.datepicker._get(inst, 'showAnim'); var showAnim = $.datepicker._get(inst, 'showAnim');
var duration = $.datepicker._get(inst, 'duration'); var duration = $.datepicker._get(inst, 'duration');
@ -640,8 +695,12 @@ $.extend(Datepicker.prototype, {
$.datepicker._datepickerShowing = true; $.datepicker._datepickerShowing = true;
var borders = $.datepicker._getBorders(inst.dpDiv); var borders = $.datepicker._getBorders(inst.dpDiv);
inst.dpDiv.find('iframe.ui-datepicker-cover'). // IE6- only inst.dpDiv.find('iframe.ui-datepicker-cover'). // IE6- only
css({left: -borders[0], top: -borders[1], css({
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()}); left: -borders[0],
top: -borders[1],
width: inst.dpDiv.outerWidth(),
height: inst.dpDiv.outerHeight()
});
}; };
inst.dpDiv.zIndex($(input).zIndex()+1); inst.dpDiv.zIndex($(input).zIndex()+1);
if ($.effects && $.effects[showAnim]) if ($.effects && $.effects[showAnim])
@ -662,8 +721,12 @@ $.extend(Datepicker.prototype, {
var borders = $.datepicker._getBorders(inst.dpDiv); var borders = $.datepicker._getBorders(inst.dpDiv);
inst.dpDiv.empty().append(this._generateHTML(inst)) inst.dpDiv.empty().append(this._generateHTML(inst))
.find('iframe.ui-datepicker-cover') // IE6- only .find('iframe.ui-datepicker-cover') // IE6- only
.css({left: -borders[0], top: -borders[1], .css({
width: inst.dpDiv.outerWidth(), height: inst.dpDiv.outerHeight()}) left: -borders[0],
top: -borders[1],
width: inst.dpDiv.outerWidth(),
height: inst.dpDiv.outerHeight()
})
.end() .end()
.find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a') .find('button, .ui-datepicker-prev, .ui-datepicker-next, .ui-datepicker-calendar td a')
.bind('mouseout', function(){ .bind('mouseout', function(){
@ -704,7 +767,12 @@ $.extend(Datepicker.prototype, {
@return (number[2]) the left and top borders */ @return (number[2]) the left and top borders */
_getBorders: function(elem) { _getBorders: function(elem) {
var convert = function(value) { var convert = function(value) {
return {thin: 1, medium: 2, thick: 3}[value] || value; return {
thin: 1,
medium: 2,
thick: 3
}
[value] || value;
}; };
return [parseFloat(convert(elem.css('border-left-width'))), return [parseFloat(convert(elem.css('border-left-width'))),
parseFloat(convert(elem.css('border-top-width')))]; parseFloat(convert(elem.css('border-top-width')))];
@ -770,7 +838,11 @@ $.extend(Datepicker.prototype, {
this._datepickerShowing = false; this._datepickerShowing = false;
this._lastInput = null; this._lastInput = null;
if (this._inDialog) { if (this._inDialog) {
this._dialogInput.css({ position: 'absolute', left: '0', top: '-100px' }); this._dialogInput.css({
position: 'absolute',
left: '0',
top: '-100px'
});
if ($.blockUI) { if ($.blockUI) {
$.unblockUI(); $.unblockUI();
$('body').append(this.dpDiv); $('body').append(this.dpDiv);
@ -906,7 +978,9 @@ $.extend(Datepicker.prototype, {
var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat'); var altFormat = this._get(inst, 'altFormat') || this._get(inst, 'dateFormat');
var date = this._getDate(inst); var date = this._getDate(inst);
var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst)); var dateStr = this.formatDate(altFormat, date, this._getFormatConfig(inst));
$(altField).each(function() { $(this).val(dateStr); }); $(altField).each(function() {
$(this).val(dateStr);
});
} }
}, },
@ -1284,9 +1358,11 @@ $.extend(Datepicker.prototype, {
while (matches) { while (matches) {
switch (matches[2] || 'd') { switch (matches[2] || 'd') {
case 'd' : case 'D' : case 'd' : case 'D' :
day += parseInt(matches[1],10); break; day += parseInt(matches[1],10);
break;
case 'w' : case 'W' : case 'w' : case 'W' :
day += parseInt(matches[1],10) * 7; break; day += parseInt(matches[1],10) * 7;
break;
case 'm' : case 'M' : case 'm' : case 'M' :
month += parseInt(matches[1],10); month += parseInt(matches[1],10);
day = Math.min(day, $.datepicker._getDaysInMonth(year, month)); day = Math.min(day, $.datepicker._getDaysInMonth(year, month));
@ -1438,11 +1514,18 @@ $.extend(Datepicker.prototype, {
calender += '<div class="ui-datepicker-group'; calender += '<div class="ui-datepicker-group';
if (numMonths[1] > 1) if (numMonths[1] > 1)
switch (col) { switch (col) {
case 0: calender += ' ui-datepicker-group-first'; case 0:
cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left'); break; calender += ' ui-datepicker-group-first';
case numMonths[1]-1: calender += ' ui-datepicker-group-last'; cornerClass = ' ui-corner-' + (isRTL ? 'right' : 'left');
cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right'); break; break;
default: calender += ' ui-datepicker-group-middle'; cornerClass = ''; break; case numMonths[1]-1:
calender += ' ui-datepicker-group-last';
cornerClass = ' ui-corner-' + (isRTL ? 'left' : 'right');
break;
default:
calender += ' ui-datepicker-group-middle';
cornerClass = '';
break;
} }
calender += '">'; calender += '">';
} }
@ -1658,9 +1741,13 @@ $.extend(Datepicker.prototype, {
var shortYearCutoff = this._get(inst, 'shortYearCutoff'); var shortYearCutoff = this._get(inst, 'shortYearCutoff');
shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff : shortYearCutoff = (typeof shortYearCutoff != 'string' ? shortYearCutoff :
new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10)); new Date().getFullYear() % 100 + parseInt(shortYearCutoff, 10));
return {shortYearCutoff: shortYearCutoff, return {
dayNamesShort: this._get(inst, 'dayNamesShort'), dayNames: this._get(inst, 'dayNames'), shortYearCutoff: shortYearCutoff,
monthNamesShort: this._get(inst, 'monthNamesShort'), monthNames: this._get(inst, 'monthNames')}; dayNamesShort: this._get(inst, 'dayNamesShort'),
dayNames: this._get(inst, 'dayNames'),
monthNamesShort: this._get(inst, 'monthNamesShort'),
monthNames: this._get(inst, 'monthNames')
};
}, },
/* Format the given date for display. */ /* Format the given date for display. */

8
form_elements/js/people_ahah.js

@ -47,7 +47,13 @@ Drupal.ahah.prototype.success = function (response, status) {
wrapper[this.method](new_content); wrapper[this.method](new_content);
} }
$('.datepicker').datepicker({ buttonImage: '/misc/date.png', constrainInput: false, showOn: 'button', changeMonth: true, changeYear: true }); $('.datepicker').datepicker({
buttonImage: '/misc/date.png',
constrainInput: false,
showOn: 'button',
changeMonth: true,
changeYear: true
});
// Immediately hide the new content if we're using any effects. // Immediately hide the new content if we're using any effects.
if (this.showEffect != 'show') { if (this.showEffect != 'show') {

36
form_elements/xml/gacs.xml

@ -443,7 +443,8 @@
<name authorized="yes">Transcaucasia</name> <name authorized="yes">Transcaucasia</name>
<note> <note>
<text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia <text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia
(Republic)) before June 1998]</text> (Republic)) before June 1998]
</text>
</note> </note>
</uf> </uf>
<uf> <uf>
@ -552,7 +553,8 @@
<name authorized="yes">Transcaucasia</name> <name authorized="yes">Transcaucasia</name>
<note> <note>
<text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia <text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia
(Republic)) before June 1998]</text> (Republic)) before June 1998]
</text>
</note> </note>
</uf> </uf>
<uf> <uf>
@ -1385,7 +1387,8 @@
<code>a-em</code> <code>a-em</code>
<note> <note>
<text>Coded [a-pt] (Portuguese Timor) before April 21, 1980; coded [a-io] (Indonesia) from <text>Coded [a-pt] (Portuguese Timor) before April 21, 1980; coded [a-io] (Indonesia) from
1980-Sept. 2002]</text> 1980-Sept. 2002]
</text>
</note> </note>
<uf> <uf>
<name authorized="yes">Lesser Sunda Islands (Indonesia and East Timor)</name> <name authorized="yes">Lesser Sunda Islands (Indonesia and East Timor)</name>
@ -1771,7 +1774,8 @@
<name authorized="yes">Transcaucasia</name> <name authorized="yes">Transcaucasia</name>
<note> <note>
<text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia <text>Coded [e-ur-ai] (Armenia (Republic)), [e-ur-aj] (Azerbaijan), [e-ur-gs] (Georgia
(Republic)) before June 1998]</text> (Republic)) before June 1998]
</text>
</note> </note>
</uf> </uf>
<uf> <uf>
@ -1787,13 +1791,15 @@
<code>e-gx</code> <code>e-gx</code>
<note> <note>
<text>For Germany as a whole regardless of time period; includes Germany (East) and Germany <text>For Germany as a whole regardless of time period; includes Germany (East) and Germany
(West) as a whole between 1949 and 1990]</text> (West) as a whole between 1949 and 1990]
</text>
</note> </note>
<uf> <uf>
<name authorized="yes">Berlin (Germany)</name> <name authorized="yes">Berlin (Germany)</name>
<note> <note>
<text>Coded [e-gx] (Germany) for Berlin as a whole; [e-ge] (Germany (East)) for East <text>Coded [e-gx] (Germany) for Berlin as a whole; [e-ge] (Germany (East)) for East
Berlin; or [e-gw] (Germany (West)) for West Berlin before Jan. 1991]</text> Berlin; or [e-gw] (Germany (West)) for West Berlin before Jan. 1991]
</text>
</note> </note>
<uf> <uf>
<name>East Berlin</name> <name>East Berlin</name>
@ -1824,7 +1830,8 @@
<code>e-ge</code> <code>e-ge</code>
<note> <note>
<text>For the eastern part of Germany before 1949 or after 1990 and for the German <text>For the eastern part of Germany before 1949 or after 1990 and for the German
Democratic Republic between 1949-1990]</text> Democratic Republic between 1949-1990]
</text>
</note> </note>
<uf> <uf>
<name>Democratic German Republic</name> <name>Democratic German Republic</name>
@ -1845,7 +1852,8 @@
<code>e-gw</code> <code>e-gw</code>
<note> <note>
<text>For the western part of Germany before 1949 or after 1990 and for the Federal Republic <text>For the western part of Germany before 1949 or after 1990 and for the Federal Republic
of Germany between 1949-1990</text> of Germany between 1949-1990
</text>
</note> </note>
<uf> <uf>
<name>Federal German Republic</name> <name>Federal German Republic</name>
@ -2551,7 +2559,8 @@
<code>pokb</code> <code>pokb</code>
<note> <note>
<text>Coded [pogn] (Gilbert and Ellice Islands) or [poln] (Line Islands) before Mar. <text>Coded [pogn] (Gilbert and Ellice Islands) or [poln] (Line Islands) before Mar.
1988</text> 1988
</text>
</note> </note>
<uf> <uf>
<name authorized="yes">Banaba (Kiribati)</name> <name authorized="yes">Banaba (Kiribati)</name>
@ -2620,7 +2629,8 @@
<code>e-kv</code> <code>e-kv</code>
<note> <note>
<text>Coded [e-rb] (Serbia) before May 2008 and [e-yu] (Serbia and Montenegro) before April <text>Coded [e-rb] (Serbia) before May 2008 and [e-yu] (Serbia and Montenegro) before April
2007</text> 2007
</text>
</note> </note>
</gac> </gac>
<gac> <gac>
@ -5052,7 +5062,8 @@
<code>poup</code> <code>poup</code>
<note> <note>
<text>Includes American Samoa, Guam, Pacific Islands (Trust Territory) treated <text>Includes American Samoa, Guam, Pacific Islands (Trust Territory) treated
collectively</text> collectively
</text>
</note> </note>
<uf> <uf>
<name authorized="yes">Pacific Islands (Trust Territory)</name> <name authorized="yes">Pacific Islands (Trust Territory)</name>
@ -5456,7 +5467,8 @@
<name authorized="yes">Socotra (Yemen)</name> <name authorized="yes">Socotra (Yemen)</name>
<note> <note>
<text>Coded [i-xo] (Socotra Island) before Mar. 1988; Coded [a-ys] (Yemen (People's <text>Coded [i-xo] (Socotra Island) before Mar. 1988; Coded [a-ys] (Yemen (People's
Democratic Republic) before Oct. 1992</text> Democratic Republic) before Oct. 1992
</text>
</note> </note>
<uf> <uf>
<name>Sokotra (Yemen)</name> <name>Sokotra (Yemen)</name>

6
form_elements/xml/languages.xml

@ -4874,7 +4874,8 @@
<code>cai</code> <code>cai</code>
<note> <note>
<text>Use for the other languages of Central America and Mexico, as well as for the <text>Use for the other languages of Central America and Mexico, as well as for the
languages of the Azteco-Tanoan language phylum.</text> languages of the Azteco-Tanoan language phylum.
</text>
</note> </note>
<uf> <uf>
<name authorized="yes">Amuzgo</name> <name authorized="yes">Amuzgo</name>
@ -12732,7 +12733,8 @@
<code>nai</code> <code>nai</code>
<note> <note>
<text>Use for the other languages of North America north of Mexico excluding the <text>Use for the other languages of North America north of Mexico excluding the
languages of the Azteco-Tanoan language phylum.</text> languages of the Azteco-Tanoan language phylum.
</text>
</note> </note>
<uf> <uf>
<name authorized="yes">Alabama</name> <name authorized="yes">Alabama</name>

2
ilives/book.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
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

7
ilives/image_rotator_tagger_block.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* @file image_rotator_tagger_block.inc * @file image_rotator_tagger_block.inc
@ -42,10 +43,8 @@ and $object <dc:title> $title';
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');
@ -78,7 +77,6 @@ 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');
@ -104,4 +102,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);
} }
} }

6
ilives/tests/fedora_ilives.test

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Tests the functions of the Fedora Repository module. * Tests the functions of the Fedora Repository module.
@ -31,7 +32,6 @@ class FedoraBookTestCase extends DrupalWebTestCase {
$this->drupalLogin($repository_user); $this->drupalLogin($repository_user);
} }
public function testBookCModel() { public function testBookCModel() {
@ -73,7 +73,6 @@ 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()) {
@ -130,3 +129,4 @@ class FedoraBookTestCase extends DrupalWebTestCase {
} }
} }

3
ilives/xml/ilives_CollectionModel.xml

@ -128,7 +128,8 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
<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>

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'] ">

163
ilives/xsl/book_view.xsl

@ -14,52 +14,161 @@
<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></xsl:if>
<div> <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> <a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/ilives_book_viewer/
<xsl:value-of select="$PID"/>
</xsl:attribute>Read
</a>
</div>
</xsl:if>
<div>
<a>
<xsl:attribute name="href">http://islandpines.roblib.upei.ca/opac/en-CA/skin/roblib/xml/rdetail.xml?r=
<xsl:value-of select="$RECORDID"/>
</xsl:attribute>
Checkout 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>
<a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>fedora/repository/
<xsl:value-of select="$PID"/>/PDF/
<xsl:value-of select="$PID"/>.pdf
</xsl:attribute>Download
</a>
</div>
</xsl:if>
<xsl:if test="($USER > 0) and ($INGESTED = 'true')"> <xsl:if test="($USER > 0) and ($INGESTED = 'true')">
<div> <div>
<a><xsl:attribute name="href"><xsl:copy-of select="$OBJECTSPAGE"/>teieditor/<xsl:value-of select="$PID"/></xsl:attribute>Edit</a> <a>
<xsl:attribute name="href">
<xsl:copy-of select="$OBJECTSPAGE"/>teieditor/
<xsl:value-of select="$PID"/>
</xsl:attribute>Edit
</a>
</div> </div>
</xsl:if> </xsl:if>
</td></tr></table> </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 />

105
ilives/xsl/results.xsl

@ -41,8 +41,12 @@
<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>
@ -89,15 +102,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>
@ -111,12 +133,21 @@
<h2>Your search yielded no results</h2> <h2>Your search yielded no results</h2>
<div class="content"><ul> <div class="content">
<ul>
<li>Check if your spelling is correct.</li> <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>
@ -126,12 +157,15 @@
<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,7 +190,8 @@
</xsl:for-each> </xsl:for-each>
</div></table> </div>
</table>
</xsl:template> </xsl:template>
<xsl:template name="splitBySpace"> <xsl:template name="splitBySpace">
@ -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>

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>

4
js/AC_Quicktime.js

@ -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)
{ {

13
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;
if(!target || target.childNodes.length === 0) {
alert("Nothing to Print");
return;
} }
var content = target.innerHTML; var content = target.innerHTML;
var text = '<html><head><title>' + title + var text = '<html><head><title>' + title +
'</title><body>' + content +'</body></html>'; '</title><body>' + content +'</body></html>';
printerWindow = window.open('', '', PrinterTool.windowSettings); printerWindow.document.open(); printerWindow.document.write(text); printerWindow.document.close(); printerWindow = window.open('', '', PrinterTool.windowSettings);
printerWindow.document.open();
printerWindow.document.write(text);
printerWindow.document.close();
printerWindow.print(); 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;

6
plugins/CollectionFormBuilder.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
/* /*
@ -9,7 +10,9 @@ 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 {
function CollectionFormBuilder() { function CollectionFormBuilder() {
module_load_include('inc', 'CollectionFormBuilder', ''); module_load_include('inc', 'CollectionFormBuilder', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -42,4 +45,5 @@ class CollectionFormBuilder extends FormBuilder {
$ds1v->appendChild($ds1content); $ds1v->appendChild($ds1content);
$rootElement->appendChild($ds1); $rootElement->appendChild($ds1);
} }
} }

7
plugins/CreateCollection.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* *
@ -8,8 +9,8 @@
*/ */
class CreateCollection { class CreateCollection {
function CreateCollection() {
function CreateCollection() {
} }
@ -17,6 +18,4 @@ class CreateCollection {
return TRUE; //nothing needed here as we are not transforming any files return TRUE; //nothing needed here as we are not transforming any files
} }
} }

9
plugins/DarwinCore.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
class DarwinCore { class DarwinCore {
@ -226,8 +226,7 @@ class DarwinCore {
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
} } catch (Exception $e) {
catch (Exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error'); drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
return " "; return " ";
} }
@ -256,9 +255,7 @@ class DarwinCore {
'MachineObservation' => 'MachineObservation', 'MachineObservation' => 'MachineObservation',
'NomenclaturalChecklist' => 'NomenclaturalChecklist', 'NomenclaturalChecklist' => 'NomenclaturalChecklist',
), ),
); );
public $dwcFields = array( public $dwcFields = array(
'dc:type', 'dc:type',
'dc:language', 'dc:language',
@ -283,8 +280,6 @@ class DarwinCore {
'dwc:eventDate', 'dwc:eventDate',
'dwc:eventTime', 'dwc:eventTime',
); );
public $darwinCoreXML = ' public $darwinCoreXML = '
<SimpleDarwinRecordSet xmlns="http://rs.tdwg.org/dwc/xsd/simpledarwincore/" xmlns:dc="http://purl.org/dc/terms/" xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rs.tdwg.org/dwc/xsd/simpledarwincore/ http://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd"> <SimpleDarwinRecordSet xmlns="http://rs.tdwg.org/dwc/xsd/simpledarwincore/" xmlns:dc="http://purl.org/dc/terms/" xmlns:dwc="http://rs.tdwg.org/dwc/terms/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://rs.tdwg.org/dwc/xsd/simpledarwincore/ http://rs.tdwg.org/dwc/xsd/tdwg_dwc_simple.xsd">
<SimpleDarwinRecord> <SimpleDarwinRecord>

6
plugins/DemoFormBuilder.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
/* /*
@ -9,7 +10,9 @@ 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 {
function DemoFormBuilder() { function DemoFormBuilder() {
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -73,5 +76,6 @@ class DemoFormBuilder extends FormBuilder {
} }
} }
} }
} }

6
plugins/DocumentConverter.inc

@ -1,13 +1,12 @@
<?php <?php
// $Id$
/** /**
* *
* This class implements document (doc, odt, pdf, etc.) conversion for a generic * This class implements document (doc, odt, pdf, etc.) conversion for a generic
* multi-format document collection. * multi-format document collection.
*/ */
class DocumentConverter { class DocumentConverter {
private $converter_service_url = "http://localhost:8080/converter/service"; private $converter_service_url = "http://localhost:8080/converter/service";
@ -69,11 +68,12 @@ class DocumentConverter {
return FALSE; return FALSE;
} }
} }
} }
/* /*
$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);
/* */ /* */

3
plugins/Exiftool.inc

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

12
plugins/Ffmpeg.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* *
@ -8,11 +9,13 @@
*/ */
class Ffmpeg { class Ffmpeg {
function Ffmpeg() { function Ffmpeg() {
} }
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;
@ -20,16 +23,17 @@ 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;
return TRUE; return TRUE;
} }
} }

13
plugins/Flv.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on 19-Feb-08 * Created on 19-Feb-08
@ -8,6 +9,7 @@
* implements method from content model ingest form xml * implements method from content model ingest form xml
*/ */
class FormBuilder { class FormBuilder {
function FormBuilder() { function FormBuilder() {
module_load_include('inc', 'Flv', ''); module_load_include('inc', 'Flv', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -52,8 +54,7 @@ class FormBuilder {
$previousElement = $dom->createElement($key, $value); $previousElement = $dom->createElement($key, $value);
$oai->appendChild($previousElement); $oai->appendChild($previousElement);
} }
} } catch (exception $e) {
catch (exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error'); drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
continue; continue;
} }
@ -102,8 +103,7 @@ class FormBuilder {
} }
unlink($form_values['fullpath']); unlink($form_values['fullpath']);
} }
} } 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');
return; return;
} }
@ -190,7 +190,6 @@ class FormBuilder {
$rdf->appendChild($rdfdesc); $rdf->appendChild($rdfdesc);
$rdfdesc->appendChild($member); $rdfdesc->appendChild($member);
$rootElement->appendChild($drdf); $rootElement->appendChild($drdf);
} }
/** /**
@ -222,7 +221,6 @@ class FormBuilder {
$rootElement->appendChild($objproperties); $rootElement->appendChild($objproperties);
} }
function buildQDCForm(&$form, $ingest_form_definition, &$form_values) { function buildQDCForm(&$form, $ingest_form_definition, &$form_values) {
$form['indicator2'] = array( $form['indicator2'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
@ -253,7 +251,6 @@ class FormBuilder {
'#type' => $type, '#type' => $type,
'#options' => $options, '#options' => $options,
); );
} }
else { else {
$form['indicator2']["$name"] = array( $form['indicator2']["$name"] = array(

7
plugins/FlvFormBuilder.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
@ -7,7 +8,9 @@ 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 {
function FlvFormBuilder() { function FlvFormBuilder() {
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -16,6 +19,7 @@ class FlvFormBuilder extends FormBuilder {
/* /*
* method overrides method in FormBuilder. We changed the dsid from OBJ to FLV and added the TN datastream * method overrides method in FormBuilder. We changed the dsid from OBJ to FLV and added the TN datastream
*/ */
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;
@ -60,5 +64,6 @@ class FlvFormBuilder extends FormBuilder {
$ds1v->appendChild($ds1content); $ds1v->appendChild($ds1content);
$rootElement->appendChild($ds1); $rootElement->appendChild($ds1);
} }
} }

26
plugins/FormBuilder.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on 19-Feb-08 * Created on 19-Feb-08
@ -10,6 +10,7 @@
* builds a dc metadata form * builds a dc metadata form
*/ */
class FormBuilder { class FormBuilder {
function FormBuilder() { function FormBuilder() {
module_load_include('inc', 'FormBuilder', ''); module_load_include('inc', 'FormBuilder', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
@ -55,15 +56,13 @@ class FormBuilder {
$previousElement = $dom->createElement($key, $value); $previousElement = $dom->createElement($key, $value);
$oai->appendChild($previousElement); $oai->appendChild($previousElement);
} }
} } catch (exception $e) {
catch (exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error'); drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
continue; continue;
} }
} }
$rootElement->appendChild($datastream); $rootElement->appendChild($datastream);
} }
} }
//create the security Policy //create the security Policy
@ -78,8 +77,7 @@ class FormBuilder {
} }
try { try {
$xml = new SimpleXMLElement($policyStreamDoc); $xml = new SimpleXMLElement($policyStreamDoc);
} } catch (Exception $e) {
catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("Problem getting security policy."), NULL, WATCHDOG_ERROR); watchdog(t("Fedora_Repository"), t("Problem getting security policy."), NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem getting security policy: !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Problem getting security policy: !e', array('!e' => $e->getMessage())), 'error');
return FALSE; return FALSE;
@ -114,7 +112,6 @@ class FormBuilder {
return TRUE; return TRUE;
} }
function handleQDCForm($form_values) { function handleQDCForm($form_values) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
@ -162,8 +159,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"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
return; return;
@ -250,7 +246,6 @@ class FormBuilder {
} }
} }
/** /**
* Creates the RELS-EXT for the foxml * Creates the RELS-EXT for the foxml
*/ */
@ -293,7 +288,6 @@ class FormBuilder {
$rootElement->appendChild($drdf); $rootElement->appendChild($drdf);
} }
/** /**
* Creates the standard foxml properties * Creates the standard foxml properties
*/ */
@ -315,7 +309,6 @@ class FormBuilder {
$rootElement->appendChild($objproperties); $rootElement->appendChild($objproperties);
} }
function buildQDCForm(&$form, $elements, &$form_values) { function buildQDCForm(&$form, $elements, &$form_values) {
$form['#multistep'] = TRUE; // used so that it triggers a form rebuild every time. $form['#multistep'] = TRUE; // used so that it triggers a form rebuild every time.
$form['indicator2'] = array( $form['indicator2'] = array(
@ -327,7 +320,8 @@ class FormBuilder {
if ($element['type'] == 'markup') { if ($element['type'] == 'markup') {
$el = array('#value' => $element['description']); $el = array('#value' => $element['description']);
} else { }
else {
$el = array( $el = array(
'#title' => $element['label'], '#title' => $element['label'],
'#required' => ($element['required'] ? 1 : 0), '#required' => ($element['required'] ? 1 : 0),
@ -347,9 +341,11 @@ class FormBuilder {
foreach ($element['parameters'] as $key => $val) { foreach ($element['parameters'] as $key => $val) {
if ($key == '#autocomplete_path') { if ($key == '#autocomplete_path') {
$autocomplete_path = $val; $autocomplete_path = $val;
} elseif ($key == '#autocomplete_omit_collection') { }
elseif ($key == '#autocomplete_omit_collection') {
$autocomplete_omit_collection = TRUE; $autocomplete_omit_collection = TRUE;
} else { }
else {
$el[$key] = $val; $el[$key] = $val;
} }
} }

5
plugins/ImageManipulation.inc

@ -1,6 +1,6 @@
<?php <?php
// $Id$
/* /*
* *
@ -21,7 +21,8 @@ class ImageManipulation {
if (!isset($parameterArray['height'])) { if (!isset($parameterArray['height'])) {
$height = $width; $height = $width;
} else { }
else {
$height = $parameterArray['height']; $height = $parameterArray['height'];
} }

108
plugins/ModsFormBuilder.inc

@ -1,19 +1,19 @@
<?php <?php
// $Id$
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
class ModsFormBuilder extends FormBuilder { class ModsFormBuilder extends FormBuilder {
static $MODS_NS = 'http://www.loc.gov/mods/v3'; static $MODS_NS = 'http://www.loc.gov/mods/v3';
protected $cm; protected $cm;
protected $item; protected $item;
protected $pid; protected $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');
@ -23,8 +23,7 @@ class ModsFormBuilder extends FormBuilder {
} }
} }
function handleEditMetadataForm(&$form_id, &$form_values, &$soap_client) function handleEditMetadataForm(&$form_id, &$form_values, &$soap_client) {
{
$dom = new DomDocument("1.0", "UTF-8"); $dom = new DomDocument("1.0", "UTF-8");
$dom->formatOutput = TRUE; $dom->formatOutput = TRUE;
$mods = $this->modsFromForm($form_values, $dom); $mods = $this->modsFromForm($form_values, $dom);
@ -36,8 +35,7 @@ class ModsFormBuilder extends FormBuilder {
drupal_goto('/fedora/repository/' . $this->pid); drupal_goto('/fedora/repository/' . $this->pid);
} }
function buildEditMetadataForm() function buildEditMetadataForm() {
{
$form['#multistep'] = TRUE; // used so that it triggers a form rebuild every time. $form['#multistep'] = TRUE; // used so that it triggers a form rebuild every time.
$form['indicator2'] = array( $form['indicator2'] = array(
'#type' => 'fieldset', '#type' => 'fieldset',
@ -68,7 +66,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) {
@ -92,25 +90,24 @@ class ModsFormBuilder extends FormBuilder {
// echo $nodeList->item(0)->nodeValue.' '; // echo $nodeList->item(0)->nodeValue.' ';
// echo '<br/>'; // echo '<br/>';
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++) {
$values[] = $nodeList->item($i)->nodeValue; $values[] = $nodeList->item($i)->nodeValue;
} }
$el['#default_value'] = join('; ', $values); $el['#default_value'] = join('; ', $values);
} else { }
else {
$el['#default_value'] = $nodeList->item(0)->nodeValue; $el['#default_value'] = $nodeList->item(0)->nodeValue;
} }
} }
@ -120,11 +117,9 @@ class ModsFormBuilder extends FormBuilder {
if ($key != '#sticky') { if ($key != '#sticky') {
$el[$key] = $val; $el[$key] = $val;
} }
} }
if ($element['type'] == 'people') if ($element['type'] == 'people') {
{
$names = $xpath->evaluate('/mods:mods/mods:name'); $names = $xpath->evaluate('/mods:mods/mods:name');
$people = array(); $people = array();
@ -134,20 +129,23 @@ class ModsFormBuilder extends FormBuilder {
$role = $mname->getElementsByTagName('roleTerm')->item(0)->nodeValue; $role = $mname->getElementsByTagName('roleTerm')->item(0)->nodeValue;
$nameParts = $mname->getElementsByTagName('namePart'); $nameParts = $mname->getElementsByTagName('namePart');
foreach ($nameParts as $namePart) foreach ($nameParts as $namePart) {
{
switch ($namePart->getAttribute('type')) { switch ($namePart->getAttribute('type')) {
case 'given': $given = $namePart->nodeValue; break; case 'given': $given = $namePart->nodeValue;
case 'family': $family = $namePart->nodeValue; break; break;
case 'termsOfAddress': $title = $namePart->nodeValue; break; case 'family': $family = $namePart->nodeValue;
case 'date': $date = $namePart->nodeValue; break; break;
default: $name = $namePart->nodeValue; break; case 'termsOfAddress': $title = $namePart->nodeValue;
break;
case 'date': $date = $namePart->nodeValue;
break;
default: $name = $namePart->nodeValue;
break;
} }
} }
$person = array('role' => $role); $person = array('role' => $role);
switch ($type) switch ($type) {
{
case 'personal': case 'personal':
if (isset($given) && isset($family) && !isset($name)) { if (isset($given) && isset($family) && !isset($name)) {
$name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $family; $name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $family;
@ -172,20 +170,23 @@ class ModsFormBuilder extends FormBuilder {
$type = $mname->getAttribute('type'); $type = $mname->getAttribute('type');
$nameParts = $mname->getElementsByTagName('namePart'); $nameParts = $mname->getElementsByTagName('namePart');
foreach ($nameParts as $namePart) foreach ($nameParts as $namePart) {
{
switch ($namePart->getAttribute('type')) { switch ($namePart->getAttribute('type')) {
case 'given': $given = $namePart->nodeValue; break; case 'given': $given = $namePart->nodeValue;
case 'family': $family = $namePart->nodeValue; break; break;
case 'termsOfAddress': $title = $namePart->nodeValue; break; case 'family': $family = $namePart->nodeValue;
case 'date': $date = $namePart->nodeValue; break; break;
default: $name = $namePart->nodeValue; break; case 'termsOfAddress': $title = $namePart->nodeValue;
break;
case 'date': $date = $namePart->nodeValue;
break;
default: $name = $namePart->nodeValue;
break;
} }
} }
$person = array('subject' => 1); $person = array('subject' => 1);
switch ($type) switch ($type) {
{
case 'personal': case 'personal':
if (isset($given) && isset($family) && !isset($name)) { if (isset($given) && isset($family) && !isset($name)) {
$name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $family; $name = (isset($title) ? $title . ' ' : '') . $family . ', ' . $family;
@ -205,7 +206,6 @@ class ModsFormBuilder extends FormBuilder {
} }
$el['#default_value'] = $people; $el['#default_value'] = $people;
} }
@ -225,10 +225,8 @@ class ModsFormBuilder extends FormBuilder {
); );
return $form; return $form;
} }
} }
} }
function handleModsForm(&$form_values, &$form_state) { function handleModsForm(&$form_values, &$form_state) {
@ -291,15 +289,13 @@ 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"), t("Error ingesting object: !e", array('!e' => $e->getMessage())), NULL, WATCHDOG_ERROR);
return; return;
} }
} }
function createCollectionPolicy($form_values, &$dom, &$rootElement) { function createCollectionPolicy($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$model = new fedora_item($form_values['content_model_pid']); $model = new fedora_item($form_values['content_model_pid']);
@ -378,9 +374,7 @@ class ModsFormBuilder extends FormBuilder {
$rootElement->appendChild($datastream); $rootElement->appendChild($datastream);
} }
function modsFromForm(&$form_values, &$dom) {
function modsFromForm(&$form_values,&$dom)
{
///begin writing MODS ///begin writing MODS
$mods = $dom->createElement("mods:mods"); $mods = $dom->createElement("mods:mods");
@ -489,7 +483,8 @@ class ModsFormBuilder extends FormBuilder {
} }
$originInfo->appendChild($date); $originInfo->appendChild($date);
$addOriginInfo = TRUE; $addOriginInfo = TRUE;
} else { }
else {
if (isset($form_values['mods_createdDate'])) { if (isset($form_values['mods_createdDate'])) {
$date = $dom->createElement('mods:createdDate', htmlspecialchars(trim($form_values['mods_createdDate']))); $date = $dom->createElement('mods:createdDate', htmlspecialchars(trim($form_values['mods_createdDate'])));
$originInfo->appendChild($date); $originInfo->appendChild($date);
@ -513,7 +508,6 @@ class ModsFormBuilder extends FormBuilder {
$originInfo->appendChild($date); $originInfo->appendChild($date);
$addOriginInfo = TRUE; $addOriginInfo = TRUE;
} }
} }
if (isset($form_values['mods_pubinfo_journalFreq']) && trim($form_values['mods_pubinfo_journalFreq']) != '') { if (isset($form_values['mods_pubinfo_journalFreq']) && trim($form_values['mods_pubinfo_journalFreq']) != '') {
@ -550,11 +544,9 @@ class ModsFormBuilder extends FormBuilder {
} }
if (isset($form_values['mods_language']) && trim($form_values['mods_language']) != '') if (isset($form_values['mods_language']) && trim($form_values['mods_language']) != '') {
{
$languageList = explode(';', htmlspecialchars($form_values['mods_language'])); $languageList = explode(';', htmlspecialchars($form_values['mods_language']));
foreach ($languageList as $lang) foreach ($languageList as $lang) {
{
$language = $dom->createElement('mods:language'); $language = $dom->createElement('mods:language');
$langTerm = $dom->createElement('mods:languageTerm', htmlspecialchars($lang)); $langTerm = $dom->createElement('mods:languageTerm', htmlspecialchars($lang));
$langTerm->setAttribute('type', 'text'); $langTerm->setAttribute('type', 'text');
@ -648,8 +640,6 @@ class ModsFormBuilder extends FormBuilder {
$accessCondition = $dom->createElement('mods:accessCondition', htmlspecialchars($license)); $accessCondition = $dom->createElement('mods:accessCondition', htmlspecialchars($license));
$accessCondition->setAttribute('type', 'Creative Commons License'); $accessCondition->setAttribute('type', 'Creative Commons License');
$mods->appendChild($accessCondition); $mods->appendChild($accessCondition);
} }
if (isset($form_values['mods_rights']) && trim($form_values['mods_rights']) != '') { if (isset($form_values['mods_rights']) && trim($form_values['mods_rights']) != '') {
@ -706,11 +696,11 @@ class ModsFormBuilder extends FormBuilder {
if (isset($val['subject'])) { if (isset($val['subject'])) {
$subject->appendChild($name); $subject->appendChild($name);
$hasSubject = TRUE; $hasSubject = TRUE;
} else { }
else {
$mods->appendChild($name); $mods->appendChild($name);
} }
} }
} }
} }

11
plugins/PersonalCollectionClass.inc

@ -1,7 +1,9 @@
<?php <?php
// $Id$
class PersonalCollectionClass { class PersonalCollectionClass {
function PersonalCollectionClass() { function PersonalCollectionClass() {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
} }
@ -36,9 +38,7 @@ class PersonalCollectionClass {
$object = $soapClient->__soapCall('ingest', array( $object = $soapClient->__soapCall('ingest', array(
$params $params
)); ));
} catch (exception $e) {
}
catch (exception $e) {
drupal_set_message(t('Error ingesting personal collection object: !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error ingesting personal collection object: !e', array('!e' => $e->getMessage())), 'error');
return FALSE; return FALSE;
} }
@ -49,8 +49,7 @@ class PersonalCollectionClass {
$collectionTemplate = file_get_contents(drupal_get_path('module', 'Fedora_Repository') . '/collection_policies/PERSONAL-COLLECTION-POLICY.xml'); $collectionTemplate = file_get_contents(drupal_get_path('module', 'Fedora_Repository') . '/collection_policies/PERSONAL-COLLECTION-POLICY.xml');
try { try {
$xml = new SimpleXMLElement($collectionTemplate); $xml = new SimpleXMLElement($collectionTemplate);
} } catch (Exception $e) {
catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("Problem creating personal collection policy, could not parse collection policy stream."), NULL, WATCHDOG_ERROR); watchdog(t("Fedora_Repository"), t("Problem creating personal collection policy, could not parse collection policy stream."), NULL, WATCHDOG_ERROR);
drupal_set_message(t('Problem creating personal collection policy, could not parse collection policy stream: !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Problem creating personal collection policy, could not parse collection policy stream: !e', array('!e' => $e->getMessage())), 'error');
return FALSE; return FALSE;

11
plugins/QtFormBuilder.php

@ -1,4 +1,5 @@
<?php <?php
module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder'); module_load_include('inc', 'fedora_repository', 'plugins/FormBuilder');
/* /*
* *
@ -7,16 +8,18 @@ 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 QtFormBuilder extends FormBuilder { class QtFormBuilder extends FormBuilder {
function QtFormBuilder() { function QtFormBuilder() {
module_load_include('php', 'Fedora_Repository', 'plugins/FormBuilder'); module_load_include('php', 'Fedora_Repository', 'plugins/FormBuilder');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
} }
/* /*
* method overrides method in FormBuilder. We changed the dsid from OBJ to OBJ and added the TN datastream * method overrides method in FormBuilder. We changed the dsid from OBJ to OBJ and added the TN datastream
*/ */
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;
@ -91,12 +94,8 @@ if(empty($_SESSION['fedora_ingest_files']) || !isset($_SESSION['fedora_ingest_fi
$rootElement->appendChild($ds1); $rootElement->appendChild($ds1);
} }
} }
} }
} }
?> ?>

13
plugins/Refworks.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on 26-Feb-08 * Created on 26-Feb-08
@ -10,6 +11,7 @@
module_load_include('inc', 'fedora_repository', 'SecurityClass'); module_load_include('inc', 'fedora_repository', 'SecurityClass');
class Refworks { class Refworks {
private $romeoUrlString = ""; private $romeoUrlString = "";
private $referenceList; private $referenceList;
private $securityHelper; private $securityHelper;
@ -68,8 +70,7 @@ class Refworks {
//$xml=simplexml_load_string(trim(file_get_contents($file),NULL,TRUE)); //$xml=simplexml_load_string(trim(file_get_contents($file),NULL,TRUE));
//$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;
} }
@ -278,8 +279,7 @@ class Refworks {
if ($deleteFiles > 0) { if ($deleteFiles > 0) {
unlink($form_values['fullpath']); unlink($form_values['fullpath']);
} }
} } catch (exception $e) {
catch (exception $e) {
$errors++; $errors++;
$errorMessage = 'yes'; $errorMessage = 'yes';
watchdog(t("FEDORA_REPOSITORY"), t("Error during ingest !it !e", array('!it' => $item_title, '!e' => $e)), NULL, WATCHDOG_ERROR); watchdog(t("FEDORA_REPOSITORY"), t("Error during ingest !it !e", array('!it' => $item_title, '!e' => $e)), NULL, WATCHDOG_ERROR);
@ -326,7 +326,6 @@ class Refworks {
$rdfdesc->appendChild($member); $rdfdesc->appendChild($member);
$rdfdesc->appendChild($model); $rdfdesc->appendChild($model);
$rootElement->appendChild($drdf); $rootElement->appendChild($drdf);
} }
function createRomeoDataStream(&$dom, &$rootElement) { function createRomeoDataStream(&$dom, &$rootElement) {
@ -397,7 +396,6 @@ class Refworks {
$rootElement->appendChild($objproperties); $rootElement->appendChild($objproperties);
} }
/** /**
* Read the list of Users from the U1 field and Roles from the U2 field and add elements * Read the list of Users from the U1 field and Roles from the U2 field and add elements
* to the security policy record for this item, then add the record as the security policy datastream. * to the security policy record for this item, then add the record as the security policy datastream.
@ -446,4 +444,5 @@ class Refworks {
$rootElement->appendChild($ds1); $rootElement->appendChild($ds1);
$ds1content->appendChild($dom->importNode(dom_import_simplexml($custom_policy_sxe), TRUE)); $ds1content->appendChild($dom->importNode(dom_import_simplexml($custom_policy_sxe), TRUE));
} }
} }

6
plugins/ShowDemoStreamsInFieldSets.inc

@ -1,5 +1,6 @@
<?php <?php
// $Id$
/* /*
* Created on 17-Apr-08 * Created on 17-Apr-08
@ -7,7 +8,9 @@
* *
*/ */
class ShowDemoStreamsInFieldSets { class ShowDemoStreamsInFieldSets {
private $pid = NULL; private $pid = NULL;
function ShowDemoStreamsInFieldSets($pid) { function ShowDemoStreamsInFieldSets($pid) {
//drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); //drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
$this->pid = $pid; $this->pid = $pid;
@ -22,4 +25,5 @@ class ShowDemoStreamsInFieldSets {
); );
return theme('fieldset', $collection_fieldset); return theme('fieldset', $collection_fieldset);
} }
} }

16
plugins/ShowStreamsInFieldSets.inc

@ -1,11 +1,14 @@
<?php <?php
// $Id$
/* /*
* Created on 17-Apr-08 * Created on 17-Apr-08
*/ */
class ShowStreamsInFieldSets { class ShowStreamsInFieldSets {
private $pid = NULL; private $pid = NULL;
function ShowStreamsInFieldSets($pid) { function ShowStreamsInFieldSets($pid) {
$this->pid = $pid; $this->pid = $pid;
} }
@ -41,7 +44,6 @@ class ShowStreamsInFieldSets {
return theme('fieldset', $collection_fieldset); return theme('fieldset', $collection_fieldset);
} }
// Same as showTN but artinventory stores the image in a dsid of IMAGE instead of OBJ // Same as showTN but artinventory stores the image in a dsid of IMAGE instead of OBJ
function showArtInventoryTN() { function showArtInventoryTN() {
global $base_url; global $base_url;
@ -109,7 +111,6 @@ class ShowStreamsInFieldSets {
return $tabset; return $tabset;
} }
function showQdc() { function showQdc() {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper(); $objectHelper = new ObjectHelper();
@ -131,8 +132,6 @@ class ShowStreamsInFieldSets {
return "<a href='" . $base_url . "/fedora/repository/" . $this->pid . "/OBJ/" . $streams['OBJ']['label'] . "'>" . $streams['OBJ']['label'] . "</a>"; return "<a href='" . $base_url . "/fedora/repository/" . $this->pid . "/OBJ/" . $streams['OBJ']['label'] . "'>" . $streams['OBJ']['label'] . "</a>";
} }
function showRefworks() { function showRefworks() {
$path = drupal_get_path('module', 'fedora_repository'); $path = drupal_get_path('module', 'fedora_repository');
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
@ -144,8 +143,7 @@ class ShowStreamsInFieldSets {
} }
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
} } catch (Exception $e) {
catch (Exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error'); drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
return " "; return " ";
} }
@ -189,8 +187,7 @@ class ShowStreamsInFieldSets {
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
} } catch (Exception $e) {
catch (Exception $e) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error'); drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
return; return;
} }
@ -210,4 +207,5 @@ class ShowStreamsInFieldSets {
); );
return theme('fieldset', $collection_fieldset); return theme('fieldset', $collection_fieldset);
} }
} }

2
plugins/fedoraObject.inc

@ -1,6 +1,7 @@
<?php <?php
class FedoraObject { class FedoraObject {
function __construct($pid = '') { function __construct($pid = '') {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
if (!empty($pid)) { if (!empty($pid)) {
@ -47,4 +48,5 @@ class FedoraObject {
return $tabset; return $tabset;
} }
} }

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

Loading…
Cancel
Save