Browse Source

Merge branch '6.x' of github.com:Islandora/islandora into 6.x

Conflicts:
	ObjectHelper.inc - fix content size acquisition
pull/101/head
Adam Vessey 13 years ago
parent
commit
27fdb97f2d
  1. 448
      CollectionClass.inc
  2. 95
      CollectionPolicy.inc
  3. 67
      ConnectionHelper.inc
  4. 349
      ContentModel.inc
  5. 28
      MimeClass.inc
  6. 758
      ObjectHelper.inc
  7. 4
      README
  8. 129
      SearchClass.inc
  9. 88
      SecurityClass.inc
  10. 34
      XMLDatastream.inc
  11. 21
      api/dublin_core.inc
  12. 28
      api/fedora_collection.inc
  13. 94
      api/fedora_export.inc
  14. 623
      api/fedora_item.inc
  15. 231
      api/fedora_utils.inc
  16. 21
      api/rels-ext.inc
  17. 27
      api/tagging.inc
  18. 1
      collection_policies/COLLECTION-COLLECTION POLICY.xml
  19. 25
      collection_policies/PDF-COLLECTION POLICY.xml
  20. 1
      collection_policies/PERSONAL-COLLECTION-POLICY.xml
  21. 1
      collection_policies/book_collection_policy.xml
  22. 39
      collection_policies/qt_collection_policy.xml
  23. 1
      collection_policy.xsd
  24. 7
      collection_views/Coverflow_Collection_View.xsl
  25. 7
      collection_views/Coverflow_PRE_Collection_View.xsl
  26. 143
      collection_views/FLV-COLLECTION VIEW(2).xml
  27. 131
      collection_views/REFWORKS-COLLECTION_VIEW.xml
  28. 145
      collection_views/SIMPLE-COLLECTION_VIEW.xml
  29. 4
      collection_views/SmileyStuff-COLLECTION_VIEW.xml
  30. 4
      collection_views/Video-COLLECTION_VIEW.xml
  31. 125
      collection_views/default-sparqltoHtml.xsl
  32. 4
      collection_views/simple_list_view.xml
  33. 4
      collection_views/standard_jpeg_collection_view.xml
  34. 88
      collection_views/yui_coverflow/js/CoverFlow.js
  35. 75
      collection_views/yui_coverflow/js/test.js
  36. 218
      content_models/BASIC_AUDIO.xml
  37. 218
      content_models/BASIC_VIDEO.xml
  38. 1
      content_models/COLLECTIONCM.xml
  39. 105
      content_models/CRITTERS.xml
  40. 166
      content_models/FAS_slideCModel.xml
  41. 76
      content_models/REFWORKSCM.xml
  42. 76
      content_models/REFWORKSCM_1.xml
  43. 95
      content_models/STANDARD JPG.xml
  44. 236
      content_models/STANDARD PDF.xml
  45. 218
      content_models/STANDARD_FLVCM.xml
  46. 271
      content_models/STANDARD_IMAGECM.xml
  47. 95
      content_models/STANDARD_JPG.xml
  48. 137
      content_models/STANDARD_QT.xml
  49. 107
      content_models/STRICT_PDFCM.xml
  50. 65
      content_models/demo_Collection.xml
  51. 196
      content_models/demo_CollectionImpl.xml
  52. 76
      content_models/demo_DualResImage.xml
  53. 73
      content_models/demo_DualResImageCollection.xml
  54. 162
      content_models/demo_DualResImageImpl.xml
  55. 65
      content_models/demo_DualResolution.xml
  56. 675
      content_models/ilives_bookCModel.xml
  57. 73
      content_models/ilives_jp2Sdef.xml
  58. 179
      content_models/ilives_jp2Sdep-pageCModel.xml
  59. 72
      content_models/ilives_tei2htmlSdef.xml
  60. 234
      content_models/ilives_tei2htmlSdep-pageCModel.xml
  61. 72
      content_models/ilives_viewerSdef.xml
  62. 157
      content_models/ilives_viewerSdep-bookCModel.xml
  63. 584
      content_models/islandora_collectionCModel.xml
  64. 1851
      content_models/islandora_herbCModel.xml
  65. 277
      content_models/islandora_jp2Sdep-slideCModel.xml
  66. 247
      content_models/islandora_largeimages.xml
  67. 366
      content_models/islandora_mapCModel.xml
  68. 110
      content_models/islandora_mods2htmlSdef.xml
  69. 464
      content_models/islandora_mods2htmlSdep.xml
  70. 163
      content_models/islandora_qtCModel.xml
  71. 1466
      content_models/islandora_slideCModel.xml
  72. 311
      content_models/islandora_viewerSdep-slideCModel.xml
  73. 146
      example_collection_views/MHL-sparqltoHtml.xsl
  74. 95
      example_collection_views/critter.xsl
  75. 143
      example_collection_views/flv-sparqltoHtml.xsl
  76. 139
      example_collection_views/mlp-sparqltoHtml.xsl
  77. 174
      example_collection_views/refworks.xsl
  78. 148
      example_collection_views/riri-sparqltoHtml.xsl
  79. 125
      example_collection_views/sparqltoHtml.xsl
  80. 8
      fedora_repository.info
  81. 78
      fedora_repository.install
  82. 863
      fedora_repository.module
  83. 58
      fedora_repository.solutionpacks.inc
  84. 474
      formClass.inc
  85. 7
      form_elements/css/copyright.css
  86. 93
      form_elements/css/filechooser.css
  87. 25
      form_elements/css/list.css
  88. 137
      form_elements/css/people.css
  89. 18
      form_elements/css/sticky.css
  90. BIN
      form_elements/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png
  91. BIN
      form_elements/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png
  92. BIN
      form_elements/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png
  93. BIN
      form_elements/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png
  94. BIN
      form_elements/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png
  95. BIN
      form_elements/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png
  96. BIN
      form_elements/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png
  97. BIN
      form_elements/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png
  98. BIN
      form_elements/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png
  99. BIN
      form_elements/css/ui-lightness/images/ui-icons_222222_256x240.png
  100. BIN
      form_elements/css/ui-lightness/images/ui-icons_228ef1_256x240.png
  101. Some files were not shown because too many files have changed in this diff Show More

448
CollectionClass.inc

@ -1,16 +1,17 @@
<?php <?php
// $Id$ /**
* @file
/*
* Created on 18-Feb-08
* *
* To change the template for this generated file go to * Collection Class Class
* Window - Preferences - PHPeclipse - PHP - Code Templates */
/**
* This CLASS caches the streams so once you call a getstream once it will always return
* the same stream as long as you are using the instance of this class. Cached to
* prevent mutiple hits to fedora. maybe a bit confusing though if this class is used in
* a different context.
*/ */
// module_load_include('nc', 'CollectionClass', '');
// This CLASS caches the streams so once you call a getstream once it will always return the same stream as long as you are using the
// instance of this class. Cached to prevent mutiple hits to fedora. maybe a bit confusing though if this class is used in a different context.
class CollectionClass { class CollectionClass {
public static $COLLECTION_CLASS_COLLECTION_POLICY_STREAM = 'COLLECTION_POLICY'; public static $COLLECTION_CLASS_COLLECTION_POLICY_STREAM = 'COLLECTION_POLICY';
@ -34,45 +35,29 @@ class CollectionClass {
} }
} }
/* gets objects related to this object. must include offset and limit public static function getCollectionQuery($pid) {
* calls getRelatedItems but enforces limit and offset if ($query = self::getCollectionQueryFromStream($pid)) {
*/ return $query;
}
function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) { else {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); return self::getDefaultCollectionQuery($pid);
$objectHelper = new ObjectHelper();
if (!isset($itqlquery)) {
// $query_string = $objectHelper->getStream($pid, 'QUERY', 0);
$itqlquery = $objectHelper->getStream($pid, 'QUERY', 0);
} }
return $this->getRelatedItems($pid, $itqlquery, $limit, $offset);
} }
/** protected static function getCollectionQueryFromStream($pid) {
* Gets objects related to this item. It will query the object for a Query stream and use that as a itql query module_load_include('inc', 'fedora_repository', 'api/fedora_item');
* or if there is no query stream it will use the default. If you pass a query to this method it will use the passed in query no matter what $item = new Fedora_Item($pid);
*/ if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) {
function getRelatedItems($pid, $itqlquery = NULL, $limit = NULL, $offset = NULL) { return $item->get_datastream_dissemination('QUERY');
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!isset($limit)) {
$limit = 1000;
} }
if (!isset($offset)) { else {
$offset = 0; return FALSE;
} }
global $user;
if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied."), 'error');
return ' ';
} }
$objectHelper = new ObjectHelper();
$query_string = $itqlquery; protected static function getDefaultCollectionQuery($pid) {
if (!isset($query_string)) { return 'select $object $title $content from <#ri>
$query_string = $objectHelper->getStream($pid, 'QUERY', 0); where ($object <fedora-model:label> $title
if ($query_string == NULL) {
$query_string = 'select $object $title $content from <#ri>
where ($object <dc:title> $title
and $object <fedora-model:hasModel> $content and $object <fedora-model:hasModel> $content
and ($object <fedora-rels-ext:isMemberOfCollection> <info:fedora/' . $pid . '> and ($object <fedora-rels-ext:isMemberOfCollection> <info:fedora/' . $pid . '>
or $object <fedora-rels-ext:isMemberOf> <info:fedora/' . $pid . '>) or $object <fedora-rels-ext:isMemberOf> <info:fedora/' . $pid . '>)
@ -80,22 +65,87 @@ class CollectionClass {
minus $content <mulgara:is> <info:fedora/fedora-system:FedoraObject-3.0> minus $content <mulgara:is> <info:fedora/fedora-system:FedoraObject-3.0>
order by $title'; order by $title';
} }
/**
* Gets objects related to this object. Must include offset and limit!
*
* Calls self::getRelatedItems() but requires limit and offset.
*
* @param $pid string
* A string containing a Fedora PID.
* @param $limit
* An integer
* @param type $offset
* @param type $itqlquery
* @return type
*/
function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) {
return $this->getRelatedItems($pid, $itqlquery, $limit, $offset);
} }
else {
// Replace %parent_collection% with the actual collection PID /**
$query_string = preg_replace("/\%parent_collection\%/", "<info:fedora/$pid>", $query_string); * Gets objects related to this item.
*
* Query the resource index using the provided iTQL query. If no query is
* provided, one should be obtained via self::getCollectionQuery() which
* grabs the child objects.
*
* @param $pid string
* A string containing a PID which may be substituted into the query,
* in place of the %parent_collection% placeholder.
* @param $query_string string
* An optional iTQL query.
* @param $limit int
* An optional integer to limit the number of results returned.
* @param int $offset
* An optional integer used to offset the results returned. (Query should
* involve a sort to maintain consistency.
* @return string
* Sparql XML results from the resource index.
*/
function getRelatedItems($pid, $query_string = NULL, $limit = NULL, $offset = NULL) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid)) {
drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied."), 'error');
return ' ';
}
if ($query_string === NULL) {
$query_string = self::getCollectionQuery($pid);
} }
$query_string = htmlentities(urlencode($query_string)); // Replace %parent_collection% with the actual collection PID
$query_string = preg_replace("/\%parent_collection\%/", "<info:fedora/$pid>", $query_string);
$content = '';
$url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'); $url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch');
$url .= "?type=tuples&flush=TRUE&format=Sparql&limit=$limit&offset=$offset&lang=itql&stream=on&query=" . $query_string;
$content .= do_curl($url);
$settings = array(
'type' => 'tuples',
'flush' => TRUE,
'format' => 'Sparql',
'lang' => 'itql',
'stream' => 'on',
'query' => $query_string
);
if ($limit > 0) {
$settings['limit'] = $limit;
}
if ($offset > 0) {
$settings['offset'] = $offset;
}
$url .= '?' . http_build_query($settings, NULL, '&');
$content = do_curl($url);
return $content; return $content;
} }
/**
* get Collection Policy Stream ?
* @param type $collection_pid
* @return type
*/
function getCollectionPolicyStream($collection_pid) { function getCollectionPolicyStream($collection_pid) {
if ($this->collectionPolicyStream != NULL) { if ($this->collectionPolicyStream != NULL) {
return $this->collectionPolicyStream; return $this->collectionPolicyStream;
@ -104,35 +154,58 @@ class CollectionClass {
return $this->collectionPolicyStream; return $this->collectionPolicyStream;
} }
/**
* get Relationship element ?
* @param type $collection_pid
* @return type
*/
function getRelationshipElement($collection_pid) { function getRelationshipElement($collection_pid) {
$stream = $this->getCollectionPolicyStream($collection_pid); $stream = $this->getCollectionPolicyStream($collection_pid);
try { try {
$xml = new SimpleXMLElement($stream); $xml = new SimpleXMLElement($stream);
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error getting relationship element from policy stream !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error getting relationship element from policy stream @e', array('@e' => check_plain($e->getMessage()))), 'error');
return; return;
} }
$relationship = $xml->relationship[0]; $relationship = $xml->relationship[0];
return $relationship; return $relationship;
} }
/**
* get Collection View Stream ?
* @param type $collection_pid
* @return type
*/
function getCollectionViewStream($collection_pid) { function getCollectionViewStream($collection_pid) {
$this->collectionViewStream = $this->getStream($collection_pid, CollectionClass :: $COLLECTION_CLASS_COLLECTION_VIEW_STREAM, 0); $this->collectionViewStream = $this->getStream($collection_pid, CollectionClass :: $COLLECTION_CLASS_COLLECTION_VIEW_STREAM, 0);
return $this->collectionViewStream; return $this->collectionViewStream;
} }
/**
* get Stream ?
* @param type $pid
* @param type $dsid
* @param type $showError
* @return type
*/
function getStream($pid, $dsid, $showError = 1) { function getStream($pid, $dsid, $showError = 1) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new fedora_item($pid); $item = new fedora_item($pid);
return isset($item->datastreams[$dsid]) ? $item->get_datastream_dissemination($dsid) : NULL; return isset($item->datastreams[$dsid]) ? $item->get_datastream_dissemination($dsid) : NULL;
} }
/**
* get Pid name space ?
* @param type $pid
* @param type $dsid
* @return type
*/
function getPidNameSpace($pid, $dsid) { function getPidNameSpace($pid, $dsid) {
$stream = $this->getCollectionPolicyStream($pid); $stream = $this->getCollectionPolicyStream($pid);
try { try {
$xml = new SimpleXMLElement($stream); $xml = new SimpleXMLElement($stream);
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error getting PID namespace !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error getting PID namespace @e', array('@e' => check_plain($e->getMessage()))), 'error');
return; return;
} }
foreach ($xml->contentmodels->contentmodel as $contentModel) { foreach ($xml->contentmodels->contentmodel as $contentModel) {
@ -148,6 +221,9 @@ class CollectionClass {
/** /**
* gets a list of content models from a collection policy * gets a list of content models from a collection policy
* @param type $collection_pid
* @param type $showError
* @return ContentModel
*/ */
function getContentModels($collection_pid, $showError = TRUE) { function getContentModels($collection_pid, $showError = TRUE) {
module_load_include('inc', 'Fedora_Repository', 'ContentModel'); module_load_include('inc', 'Fedora_Repository', 'ContentModel');
@ -156,7 +232,7 @@ class CollectionClass {
$xml = new SimpleXMLElement($collection_stream); $xml = new SimpleXMLElement($collection_stream);
} catch (Exception $e) { } catch (Exception $e) {
if ($showError) { if ($showError) {
drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('@e', array('@e' => check_plain($e->getMessage()))), 'error');
} }
return NULL; return NULL;
} }
@ -196,7 +272,7 @@ class CollectionClass {
try { try {
$xml = new SimpleXMLElement($stream); $xml = new SimpleXMLElement($stream);
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error Getting FormHandler: !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error Getting FormHandler: @e', array('@e' => check_plain($e->getMessage()))), 'error');
return NULL; return NULL;
} }
$formHandler = $xml->ingest_form; $formHandler = $xml->ingest_form;
@ -218,12 +294,18 @@ class CollectionClass {
return NULL; return NULL;
} }
/**
* get Allowed Mime Types
* @param type $contentModelPid
* @param type $contentModel_dsid
* @return type
*/
function getAllowedMimeTypes($contentModelPid, $contentModel_dsid) { function getAllowedMimeTypes($contentModelPid, $contentModel_dsid) {
$stream = $this->getContentModelStream($contentModelPid, $contentModel_dsid); $stream = $this->getContentModelStream($contentModelPid, $contentModel_dsid);
try { try {
$xml = new SimpleXMLElement($stream); $xml = new SimpleXMLElement($stream);
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error getting content model stream for mime types !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error getting content model stream for mime types @e', array('@e' => check_plain($e->getMessage()))), 'error');
return; return;
} }
foreach ($xml->mimetypes->type as $type) { foreach ($xml->mimetypes->type as $type) {
@ -235,6 +317,12 @@ class CollectionClass {
/** /**
* Grabs the rules from the content model stream * Grabs the rules from the content model stream
* file the file that has been uploaded * file the file that has been uploaded
*
* @param type $file
* @param type $mimetype
* @param type $pid
* @param type $dsid
* @return type
*/ */
function getAndDoRules($file, $mimetype, $pid, $dsid) { function getAndDoRules($file, $mimetype, $pid, $dsid) {
if (!user_access('ingest new fedora objects')) { if (!user_access('ingest new fedora objects')) {
@ -247,7 +335,7 @@ class CollectionClass {
try { try {
$xml = new SimpleXMLElement($stream); $xml = new SimpleXMLElement($stream);
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error getting content model stream !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error getting content model stream @e', array('@e' => check_plain($e->getMessage()))), 'error');
return FALSE; return FALSE;
} }
foreach ($xml->ingest_rules->rule as $rule) { foreach ($xml->ingest_rules->rule as $rule) {
@ -262,6 +350,10 @@ class CollectionClass {
/** /**
* calls the methods defined in the content model rules .xml file stored in a Fedora object * calls the methods defined in the content model rules .xml file stored in a Fedora object
*
* @param type $file
* @param type $methods
* @return type
*/ */
function callMethods($file, $methods) { function callMethods($file, $methods) {
foreach ($methods as $method) { foreach ($methods as $method) {
@ -284,7 +376,7 @@ class CollectionClass {
$thisClass = new $phpClass (); $thisClass = new $phpClass ();
$returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext); $returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
if (!$returnValue) { if (!$returnValue) {
drupal_set_message('Error! Failed running content model method !m !rv', array('!m' => $phpMethod, '!rv' => $returnValue)); drupal_set_message(t('Error! Failed running content model method !m !rv', array('!m' => $phpMethod, '!rv' => $returnValue)));
return FALSE; return FALSE;
} }
} }
@ -294,13 +386,19 @@ class CollectionClass {
/** /**
* grabs a xml form definition from a content model and builds * grabs a xml form definition from a content model and builds
* the form using drupals forms api * the form using drupals forms api
*
* @param type $form
* @param type $form_state
* @param type $contentModelPid
* @param type $contentModelDsid
* @return type
*/ */
function build_ingest_form(&$form, &$form_state, $contentModelPid, $contentModelDsid) { function build_ingest_form(&$form, &$form_state, $contentModelPid, $contentModelDsid) {
$stream = $this->getContentModelStream($contentModelPid, $contentModelDsid); $stream = $this->getContentModelStream($contentModelPid, $contentModelDsid);
try { try {
$xml = new SimpleXMLElement($stream); $xml = new SimpleXMLElement($stream);
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error getting ingest form stream !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error getting ingest form stream @e', array('@e' => check_plain($e->getMessage()))), 'error');
return FALSE; return FALSE;
} }
$docRoot = $_SERVER['DOCUMENT_ROOT']; $docRoot = $_SERVER['DOCUMENT_ROOT'];
@ -357,8 +455,13 @@ class CollectionClass {
return $thisClass->$phpMethod($form, $ingest_form, $form_state['values'], $form_state); return $thisClass->$phpMethod($form, $ingest_form, $form_state['values'], $form_state);
} }
//this will also create a personal collection for an existing user if they don't have one /**
//not using this function currently * this will also create a personal collection for an existing user if they don't have one
* not using this function currently
*
* @param type $user
* @return type
*/
function createUserCollection(& $user) { function createUserCollection(& $user) {
if (isset($user->fedora_personal_pid)) { if (isset($user->fedora_personal_pid)) {
return; return;
@ -370,7 +473,7 @@ class CollectionClass {
module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
$connectionHelper = new ConnectionHelper(); $connectionHelper = new ConnectionHelper();
try { try {
$soapClient = $connectionHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl')); $soapClient = $connectionHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M'));
$pidNameSpace = variable_get('fedora_repository_pid', 'vre:'); $pidNameSpace = variable_get('fedora_repository_pid', 'vre:');
$pidNameSpace = substr($pidNameSpace, 0, strpos($pidNameSpace, ":")); $pidNameSpace = substr($pidNameSpace, 0, strpos($pidNameSpace, ":"));
$params = array( $params = array(
@ -381,7 +484,7 @@ class CollectionClass {
$params $params
)); ));
} catch (exception $e) { } catch (exception $e) {
drupal_set_message(t('Error getting Next PID: !e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(t('Error getting Next PID: @e', array('@e' => check_plain($e->getMessage()))), 'error');
return FALSE; return FALSE;
} }
$pid = implode(get_object_vars($object)); $pid = implode(get_object_vars($object));
@ -393,7 +496,7 @@ class CollectionClass {
module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass'); module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass');
$personalCollectionClass = new PersonalCollectionClass(); $personalCollectionClass = new PersonalCollectionClass();
if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) { if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) {
drupal_set_message("Did not create a personal collection object for !u", array('!u' => $user->name)); drupal_set_message(t("Did not create a personal collection object for !u", array('!u' => $user->name)));
return FALSE; //creation failed don't save the collection pid in drupal db return FALSE; //creation failed don't save the collection pid in drupal db
} }
user_save($user, $personal_collection_pid); user_save($user, $personal_collection_pid);
@ -403,59 +506,94 @@ class CollectionClass {
/** /**
* Queries a collection object for an xslt to format how the * Queries a collection object for an xslt to format how the
* collection of objects is displayed. * collection of objects is displayed.
*
* @param type $pid
* @param type $path
* @param type $canUseDefault
* @return type
*/ */
function getXslContent($pid, $path, $canUseDefault = TRUE) { function getXslContent($pid, $path, $canUseDefault = TRUE) {
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');
$collectionClass = new CollectionClass(); $collectionClass = new CollectionClass();
$xslContent = $collectionClass->getCollectionViewStream($pid); $xslContent = $collectionClass->getCollectionViewStream($pid);
if (!$xslContent && $canUseDefault) { //no xslt so we will use the default sent with the module
//If there's no XSLT from the object, then check if the one which used to exist, does...
if (!$xslContent && $canUseDefault && file_exists($path . '/xsl/sparql_to_html.xsl')) {
$xslContent = file_get_contents($path . '/xsl/sparql_to_html.xsl'); $xslContent = file_get_contents($path . '/xsl/sparql_to_html.xsl');
} }
return $xslContent; return $xslContent;
} }
/**
* show field sets ?
* @global type $base_url
* @global type $user
* @param type $page_number
* @return string
*/
function showFieldSets($page_number) { function showFieldSets($page_number) {
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', 'BatchIngest'); //Legacy code?
global $base_url; global $base_url;
global $user;
$tabset = array(); $tabset = array();
global $user;
$objectHelper = new ObjectHelper();
$item = new Fedora_Item($this->pid);
$query = NULL; $query = NULL;
$item = new Fedora_Item($this->pid);
if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) { if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) {
$query = $item->get_datastream_dissemination('QUERY'); $query = $item->get_datastream_dissemination('QUERY');
} }
$results = $this->getRelatedItems($this->pid, $query); $results = $this->getRelatedItems($this->pid, $query);
$collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number); $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number);
$collection_item = new Fedora_Item($this->pid);
$show_batch_tab = FALSE;
$policy = CollectionPolicy::loadFromCollection($this->pid, TRUE);
if (!empty($policy)) {
$content_models = $policy->getContentModels();
}
if (count($content_models) == 1 && $content_models[0]->pid == "islandora:collectionCModel") {
$show_batch_tab = FALSE;
}
// Check the form post to see if we are in the middle of an ingest operation. // Check the form post to see if we are in the middle of an ingest operation.
$show_ingest_tab = (!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form'); $add_selected = ((!empty($_POST['form_id']) && $_POST['form_id'] == 'fedora_repository_ingest_form') || !$collection_items);
$add_to_collection = $this->getIngestInterface(); $view_selected = !$add_selected;
$tabset['view_tab'] = array( $tabset['view_tab'] = array(
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => 'View', '#title' => t('View'),
'#content' => $collection_items '#selected' => $view_selected,
'#content' => $collection_items,
'#tab_name' => 'view-tab',
); );
$add_to_collection = $this->getIngestInterface();
if (!empty($add_to_collection)) {
$tabset['add_tab'] = array( $tabset['add_tab'] = array(
// #type and #title are the minimum requirements.
'#type' => 'tabpage', '#type' => 'tabpage',
'#title' => t('Add'), '#title' => t('Add'),
'#selected' => $show_ingest_tab, '#selected' => $add_selected,
// This will be the content of the tab. // This will be the content of the tab.
'#content' => $add_to_collection, '#content' => $add_to_collection,
'#tab_name' => 'add-tab',
); );
}
return $tabset; return $tabset;
} }
/**
* get Ingest Interface ??
* @global type $base_url
* @return string
*/
function getIngestInterface() { function getIngestInterface() {
global $base_url;
$objectHelper = new ObjectHelper();
module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy'); module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy');
$collectionPolicyExists = $objectHelper->getMimeType($this->pid, CollectionPolicy::getDefaultDSID()); $collectionPolicyExists = $this->collectionObject->getMimeType($this->pid, CollectionPolicy::getDefaultDSID());
if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) { if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) {
if (!empty($collectionPolicyExists)) { if (!empty($collectionPolicyExists)) {
$allow = TRUE; $allow = TRUE;
@ -474,45 +612,162 @@ class CollectionClass {
return $ingestObject; return $ingestObject;
} }
function renderCollection($content, $pid, $dsId, $collection, $pageNumber = NULL) { /**
* Unfortunate function, I know...
*
* Does just what it says: Hacks the default Drupal pager such that it might
* be rendered, likely with: theme('pager', array(), $per_page, $pager_name)
* (I reccomend seeing the real documentation for more detail, but the first
* array can be a list of the tags to use for first, previous, next and last
* (text in the pager), I don't believe per_page is actually used in the theme
* function, and $pager_name is an integer used to identify the pager (such
* that there can be more than one--that is, tracking different lists of
* content on a single page. You can render the exact same pager multiple
* times, say if you want one at the top and bottom of a list, using the same
* ID/pager_name.
*
* @global $pager_total array
* Numerically indexed array, where keys are the $pager_names and values
* are the number of pages in the given set, based on: ceil($total_items/$per_page);
* @global $pager_page_array array
* Numerically indexed array, where keys are the $pager_names and values
* are the page selected in the relevant set.
* @param $pager_name int
* An integer to identify the pager to affect. Do note that paging in using
* this function will add the 'page' HTTP GET parameter to the URL, with
* the value containing a comma-separated list with max($pager_name + 1)
* values--that is, if you create a single pager named '10', the 'next'
* link will look something like: 0,0,0,0,0,0,0,0,0,0,1
* @param $per_page int
* An integer representing the number of items per page.
* @param $total_items int
* An integer representing the total number of items in the set.
* @return int
* An integer representing what the current page should be.
*/
protected static function hackPager($pager_name, $per_page = NULL, $total_items = NULL) {
global $pager_total, $pager_page_array;
if ($per_page !== NULL && $total_items !== NULL) {
$pager_total[$pager_name] = ceil($total_items / $per_page);
}
//XXX: Don't know that this is neccessary, to try to load all the time, or
// whether Drupal will load it automatically somewhere... Docs seems a
// a little sparse.
$page_info = explode(',', isset($_GET['page']) ? $_GET['page'] : '');
$page = $page_info[$pager_name];
if ($page < 0) {
$page = 0;
}
if (!isset($pager_page_array)) {
$pager_page_array = pager_load_array($page, $pager_name, $page_info);
}
else {
$pager_page_array = pager_load_array($page, $pager_name, $pager_page_array);
}
$page = $pager_page_array[$pager_name];
return $page;
}
/**
* render collection
* @global type $base_url
* @param type $content
* @param type $pid
* @param type $dsId
* @param type $collection
* @param int $pageNumber
* @return type
*/
function renderCollection($content, $pid, $dsId, $collectionName, $pageNumber = NULL) {
$path = drupal_get_path('module', 'fedora_repository'); $path = drupal_get_path('module', 'fedora_repository');
global $base_url; global $base_url;
$collection_pid = $pid; //we will be changing the pid later maybe $collection_pid = $pid; //we will be changing the pid later maybe
$objectHelper = new ObjectHelper();
$parsedContent = NULL; $parsedContent = NULL;
$contentModels = $objectHelper->get_content_models_list($pid); $contentModels = $this->collectionObject->get_content_models_list($pid);
$isCollection = FALSE; $isCollection = FALSE;
//if this is a collection object store the $pid in the session as it will come in handy //if this is a collection object store the $pid in the session as it will come in handy
//after a purge or ingest to return to the correct collection. //after a purge or ingest to return to the correct collection.
$fedoraItem = NULL; $fedoraItem = NULL;
if (empty($collectionName)) {
$collectionName = menu_get_active_title();
}
$xslContent = $this->getXslContent($pid, $path);
$collectionName = $collection; $objectList = '';
if (isset($content) && $content != FALSE) {
if (!$xslContent) { //Didn't find an XSLT.
$intermediate_results = ObjectHelper::parse_sparql_results($content);
unset($content);
$per_page = 20; //XXX: Make this configurable.
$pager_name = 0;
$total = count($intermediate_results);
$pager_page = self::hackPager($pager_name, $per_page, $total);
$results = array();
foreach (array_slice($intermediate_results, $per_page * $pager_page, $per_page) as $result) {
$title = $result['title'];
$obj_path = "fedora/repository/{$result['object']}";
$thumbnail = theme('image', "$obj_path/TN", $title, $title, array(), FALSE);
$results[] = array(
'data' => l($thumbnail, $obj_path, array(
'html' => TRUE,
'attributes' => array(
'class' => 'results-image',
),
)) . l($title, $obj_path, array('attributes' => array('class' => 'results-text'))),
);
}
if (!$results) {
drupal_set_message(t("No objects in this collection (or bad query)."));
}
else {
$first = $per_page * $pager_page;
$last = (($total - $first) > $per_page)?
($first + $per_page):
$total;
$results_range_text = t('Results @first to @last of @total', array(
'@first' => $first + 1,
'@last' => $last,
'@total' => $total,
));
//$objectList = '<h3>' . $results_range_text . '</h3>';
$objectList .= theme('pager', array(), $per_page, $pager_name);
$objectList .= theme('item_list', $results, $result_range_text, 'ul', array(
'class' => 'islandora-collection-results-list',
));
$objectList .= theme('pager', array(), $per_page, $pager_name);
}
}
else {
if (!$pageNumber) { if (!$pageNumber) {
$pageNumber = 1; $pageNumber = 1;
} }
if (!isset($collectionName)) {
$collectionName = variable_get('fedora_repository_name', 'Collection');
}
$xslContent = $this->getXslContent($pid, $path);
//get collection list and display using xslt------------------------------------------- //get collection list and display using xslt-------------------------------------------
$objectList = '';
if (isset($content) && $content != FALSE) {
$input = new DomDocument(); $input = new DomDocument();
$input->loadXML(trim($content)); $input->loadXML(trim($content));
$results = $input->getElementsByTagName('result'); $results = $input->getElementsByTagName('result');
if ($results->length > 0) { if ($results->length > 0) {
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
$proc->setParameter('', 'collectionPid', $collection_pid); $options = array( //Could make this the return of a hook?
$proc->setParameter('', 'collectionTitle', $collectionName); 'collectionPid' => $collection_pid,
$proc->setParameter('', 'baseUrl', $base_url); 'collectionTitle' => $collectionName,
$proc->setParameter('', 'path', $base_url . '/' . $path); 'baseUrl' => $base_url,
$proc->setParameter('', 'hitPage', $pageNumber); 'path' => "$base_url/$path",
'hitPage' => $pageNumber,
);
$proc->setParameter('', $options);
$proc->registerPHPFunctions(); $proc->registerPHPFunctions();
$xsl = new DomDocument(); $xsl = new DomDocument();
$xsl->loadXML($xslContent); $xsl->loadXML($xslContent);
@ -523,19 +778,20 @@ class CollectionClass {
$xsl = $proc->importStylesheet($xsl); $xsl = $proc->importStylesheet($xsl);
$newdom = $proc->transformToDoc($input); $newdom = $proc->transformToDoc($input);
$objectList = $newdom->saveXML(); //is the xml transformed to html as defined in the xslt associated with the collection object $objectList = $newdom->saveHTML(); //is the xml transformed to html as defined in the xslt associated with the collection object
if (!$objectList) { if (!$objectList) {
throw new Exception("Invalid XML."); throw new Exception("Invalid XML.");
} }
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('!e', array('!e' => $e->getMessage())), 'error'); drupal_set_message(check_plain($e->getMessage()), 'error');
return ''; return '';
} }
} }
} }
}
else { else {
drupal_set_message(t("No Objects in this collection or bad query.")); drupal_set_message(t("No objects in this collection (or bad query)."));
} }
return $objectList; return $objectList;
} }

95
CollectionPolicy.inc

@ -1,14 +1,18 @@
<?php <?php
// $Id$ /**
* @file
* Collection Policy Class
*/
module_load_include('inc', 'fedora_repository', 'XMLDatastream'); module_load_include('inc', 'fedora_repository', 'XMLDatastream');
/**
* Collection Policy class ??
*/
class CollectionPolicy extends XMLDatastream { 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;
/** /**
@ -35,24 +39,27 @@ class CollectionPolicy extends XMLDatastream {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
try { try {
if (self::validPid($pid)) { if (self::valid_pid($pid)) {
$dsid = CollectionPolicy::getDefaultDSID(); $dsid = CollectionPolicy::getDefaultDSID();
if ($preFetch) { if ($preFetch) {
$fedoraItem = new Fedora_Item($pid); $fedoraItem = new Fedora_Item($pid);
if (array_key_exists($dsid, $fedoraItem->get_datastreams_list_as_array())) {
$ds = $fedoraItem->get_datastream_dissemination($dsid); $ds = $fedoraItem->get_datastream_dissemination($dsid);
} else {
$ds=null;
} }
else { //No collection policy stream (of the default name, anyway)
return FALSE;
}
}
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;
} }
return $ret; return $ret;
@ -61,7 +68,7 @@ class CollectionPolicy extends XMLDatastream {
/** /**
* Ingests a new Collection Policy datastream to the specified * Ingests a new Collection Policy datastream to the specified
* PID with the DSID specified. The file should be a valid collection * PID with the DSID specified. The file should be a valid collection
* policy XML. Returns false on failure. * policy XML. Returns FALSE on failure.
* *
* @param string $pid * @param string $pid
* @param string $name * @param string $name
@ -89,7 +96,7 @@ class CollectionPolicy extends XMLDatastream {
/** /**
* Ingests a new Collection Policy datastream to the specified * Ingests a new Collection Policy datastream to the specified
* PID with the DSID specified. Clones the collection policy from the * PID with the DSID specified. Clones the collection policy from the
* source collection pid. Returns false on failure. * source collection pid. Returns FALSE on failure.
* *
* @param string $pid * @param string $pid
* @param string $name * @param string $name
@ -119,7 +126,7 @@ class CollectionPolicy extends XMLDatastream {
/** /**
* Ingests a new minimum Collection Policy datastream to the specified * Ingests a new minimum Collection Policy datastream to the specified
* PID with the DSID specified. Initializes the policy with the specified values. * PID with the DSID specified. Initializes the policy with the specified values.
* Returns false on failure * Returns FALSE on failure
* *
* @param string $pid * @param string $pid
* @param string $name * @param string $name
@ -175,13 +182,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.
@ -233,7 +238,7 @@ class CollectionPolicy extends XMLDatastream {
$termEl = $newDom->createElement('term', $term->value); $termEl = $newDom->createElement('term', $term->value);
$termEl->setAttribute('field', $term->field); $termEl->setAttribute('field', $term->field);
if (strval($sXml->search_terms->default) == $term->field) { if (strval($sXml->search_terms->default) == $term->field) {
$termEl->setAttribute('default', 'true'); $termEl->setAttribute('default', 'TRUE');
} }
$search_termsEl->appendChild($termEl); $search_termsEl->appendChild($termEl);
} }
@ -243,11 +248,10 @@ class CollectionPolicy extends XMLDatastream {
$rootEl->appendChild($relationshipEl); $rootEl->appendChild($relationshipEl);
$newDom->appendChild($rootEl); $newDom->appendChild($rootEl);
$this->xml = new DOMDocument();
$this->xml = DOMDocument::loadXML($newDom->saveXml()); $this->xml->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 +301,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,14 +319,13 @@ class CollectionPolicy extends XMLDatastream {
} }
$ret = $this->staging_area; $ret = $this->staging_area;
} }
return $ret; return $ret;
} }
/** /**
* Sets the path to the staging area to use for this * Sets the path to the staging area to use for this
* collection. If specified path is blank (or false) it will * collection. If specified path is blank (or FALSE) it will
* remove the staging are path element from the collection policy. * remove the staging are path element from the collection policy.
* *
* @param string $path * @param string $path
@ -352,7 +356,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
@ -361,13 +364,14 @@ class CollectionPolicy extends XMLDatastream {
* @param string $dsid * @param string $dsid
* @return string $nextPid * @return string $nextPid
*/ */
public function getNextPid($dsid) { public function getNextPid($dsid, $content_model = null) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) {
if (self::valid_dsid($dsid) && $this->validate()) {
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model'); $content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
$namespace = FALSE; $namespace = FALSE;
for ($i = 0; $namespace === FALSE && $i < $content_models->length; $i++) { for ($i = 0; $namespace === FALSE && $i < $content_models->length; $i++) {
if (strtolower($content_models->item($i)->getAttribute('dsid')) == strtolower($dsid)) { if (strtolower($content_models->item($i)->getAttribute('dsid')) == strtolower($dsid) && (strtolower($content_models->item($i)->getAttribute('pid') == $content_model) || $content_model == null)) {
$namespace = $content_models->item($i)->getAttribute('namespace'); $namespace = $content_models->item($i)->getAttribute('namespace');
} }
} }
@ -399,14 +403,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,12 +425,14 @@ 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);
$ds = $fedoraItem->get_datastream_dissemination($this->dsid); $ds = $fedoraItem->get_datastream_dissemination($this->dsid);
$this->xml = DOMDocument::loadXML($ds); $this->xml = new DOMDocument();
$this->xml->loadXML($ds);
} }
@ -438,7 +441,7 @@ class CollectionPolicy extends XMLDatastream {
$terms = $this->xml->getElementsByTagName('search_terms')->item(0)->getElementsByTagName('term'); $terms = $this->xml->getElementsByTagName('search_terms')->item(0)->getElementsByTagName('term');
for ($i = 0; $i < $terms->length; $i++) { for ($i = 0; $i < $terms->length; $i++) {
$default = $terms->item($i)->attributes->getNamedItem('default'); $default = $terms->item($i)->attributes->getNamedItem('default');
$default = ($default !== NULL) ? (strtolower($default->nodeValue) == 'true') : FALSE; $default = ($default !== NULL) ? (strtolower($default->nodeValue) == 'TRUE') : FALSE;
$ret[] = ($asArray) ? array('value' => $terms->item($i)->nodeValue, $ret[] = ($asArray) ? array('value' => $terms->item($i)->nodeValue,
'field' => $terms->item($i)->getAttribute('field'), 'field' => $terms->item($i)->getAttribute('field'),
'default' => $default) : $terms->item($i)->nodeValue; 'default' => $default) : $terms->item($i)->nodeValue;
@ -460,13 +463,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 +524,11 @@ class CollectionPolicy extends XMLDatastream {
return $ret; return $ret;
} }
/**
* setDefaultTerm ??
* @param type $field
* @return boolean
*/
function setDefaultTerm($field) { function setDefaultTerm($field) {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
@ -541,18 +546,17 @@ class CollectionPolicy extends XMLDatastream {
if ($terms->item($i)->attributes->getNamedItem('default') !== NULL) { if ($terms->item($i)->attributes->getNamedItem('default') !== NULL) {
$terms->item($i)->removeAttribute('default'); $terms->item($i)->removeAttribute('default');
} }
$found->setAttribute('default', 'true'); $found->setAttribute('default', 'TRUE');
$ret = TRUE; $ret = TRUE;
} }
} }
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
* a valid ContentModel object. Returns false on failure or when the CM was not found in * a valid ContentModel object. Returns FALSE on failure or when the CM was not found in
* the collection policy. * the collection policy.
* *
* @param ContentModel $cm * @param ContentModel $cm
@ -578,12 +582,15 @@ class CollectionPolicy extends XMLDatastream {
return $ret; return $ret;
} }
/**
* addModel ??
* @param ContentModel $cm
* @param type $namespace
* @return type
*/
function addModel($cm, $namespace) { function addModel($cm, $namespace) {
$ret = FALSE; $ret = FALSE;
if (self::validPid($namespace) && $this->validate() && $cm->validate()) { if (self::valid_pid($namespace) && $this->validate() && $cm->validate()) {
$contentmodelsEl = $this->xml->getElementsByTagName('content_models'); $contentmodelsEl = $this->xml->getElementsByTagName('content_models');
$models = $contentmodelsEl->item(0)->getElementsByTagName('content_model'); $models = $contentmodelsEl->item(0)->getElementsByTagName('content_model');
$found = FALSE; $found = FALSE;
@ -606,6 +613,10 @@ class CollectionPolicy extends XMLDatastream {
return $ret; return $ret;
} }
/**
* getName ??
* @return type
*/
function getName() { function getName() {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {

67
ConnectionHelper.inc

@ -1,19 +1,30 @@
<?php <?php
// $Id$
/* /**
* Created on Jan 24, 2008 * @file
* * Connection Helper Class
* To change the template for this generated file go to
* Window - Preferences - PHPeclipse - PHP - Code Templates
*/ */
module_load_include('inc', 'ConnectionHelper', ''); module_load_include('inc', 'ConnectionHelper', '');
/**
* Connection Helper Class ??
*/
class ConnectionHelper { class ConnectionHelper {
/**
* Constructor
*/
function ConnectionHelper() { function ConnectionHelper() {
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
} }
/**
* fixURL ??
* @param type $url
* @param type $_name
* @param type $_pass
* @return string
*/
function _fixURL($url, $_name, $_pass) { function _fixURL($url, $_name, $_pass) {
if (empty($url)) { if (empty($url)) {
$url = variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'); $url = variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl');
@ -35,6 +46,13 @@ class ConnectionHelper {
return $new_url; return $new_url;
} }
/**
* getSoapClient
* @global type $user
* @param type $url
* @param type $exceptions
* @return SoapClient
*/
function getSoapClient($url = NULL, $exceptions = TRUE) { function getSoapClient($url = NULL, $exceptions = TRUE) {
if (empty($url)) { if (empty($url)) {
$url = variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'); $url = variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl');
@ -45,31 +63,50 @@ class ConnectionHelper {
//anonymous user. We will need an entry in the fedora users.xml file //anonymous user. We will need an entry in the fedora users.xml file
//with the appropriate entry for a username of anonymous password of anonymous //with the appropriate entry for a username of anonymous password of anonymous
try { try {
$client = new SoapClient($this->_fixURL($url, 'anonymous', 'anonymous'), array( $client = new SoapClient($url, array(
'login' => 'anonymous', 'login' => 'anonymous',
'password' => 'anonymous', 'password' => 'anonymous',
'exceptions' => $exceptions, 'exceptions' => $exceptions,
'authentication' => SOAP_AUTHENTICATION_BASIC
)); ));
} } catch (SoapFault $e) {
catch (SoapFault $e) { drupal_set_message(t('@e', array('@e' => check_plain($e->getMessage()))));
drupal_set_message(t("!e", array('!e' => $e->getMessage())));
return NULL; return NULL;
} }
} }
else { else {
try { try {
$client = new SoapClient($this->_fixURL($url, $user->name, $user->pass), array( $client = new SoapClient($url, array(
'login' => $user->name, 'login' => $user->name,
'password' => $user->pass, 'password' => $user->pass,
'exceptions' => TRUE, 'exceptions' => TRUE,
'authentication' => SOAP_AUTHENTICATION_BASIC,
'cache_wsdl' => WSDL_CACHE_MEMORY
)); ));
} } catch (SoapFault $e) {
catch (SoapFault $e) { drupal_set_message(t('@e', array('@e' => check_plain($e->getMessage()))));
drupal_set_message(t("!e", array('!e' => $e->getMessage())));
return NULL; return NULL;
} }
} }
if (isset($_SESSION['islandora_soapcookies'])) {
// just set the cookies
$client->_cookies = ($_SESSION['islandora_soapcookies']);
}
else {
try {
//we need to make a call to set the cookie this extra call would only happen once per session
$client->__soapCall('describeRepository', array());
$_SESSION['islandora_soapcookies'] = $client->_cookies;
} catch (exception $e) {
//connection is tested elsewhere so eat this for now here we just want the cookie
}
}
return $client; return $client;
} }
} }

349
ContentModel.inc

@ -1,13 +1,22 @@
<?php <?php
// $Id$ /**
* @file
*
*/
/**
* @file
* Content Model Class
*/
module_load_include('inc', 'fedora_repository', 'XMLDatastream'); module_load_include('inc', 'fedora_repository', 'XMLDatastream');
/**
* Conent Model ??
*/
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;
@ -25,13 +34,13 @@ class ContentModel extends XMLDatastream {
/** /**
* Constructs a ContentModel object from a Fedora item * Constructs a ContentModel object from a Fedora item
* by getting the first content model from the hasModel relationship. * by getting the first content model from the hasModel relationship.
* Returns false on failure. * Returns FALSE on failure.
* @param string $pid * @param string $pid
* @return ContentModel $cm * @return ContentModel $cm
*/ */
public static function loadFromObject($pid) { public static function loadFromObject($pid) {
$ret = FALSE; $ret = FALSE;
if (self::validPid($pid)) { if (self::valid_pid($pid)) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper(); $objectHelper = new ObjectHelper();
@ -48,7 +57,7 @@ class ContentModel extends XMLDatastream {
/** /**
* Ingests a Content Model from a file to the specified pid/dsid . * Ingests a Content Model from a file to the specified pid/dsid .
* Returns false on failure. * Returns FALSE on failure.
* *
* @param string $pid * @param string $pid
* @param string $name * @param string $name
@ -73,10 +82,9 @@ 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.
* *
* @param string $pid * @param string $pid
* @param string $name * @param string $name
@ -103,10 +111,9 @@ 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.
* *
* @param string $pid * @param string $pid
* @param string $name * @param string $name
@ -146,8 +153,8 @@ class ContentModel extends XMLDatastream {
$ingestFormEl = $newDom->createElement('ingest_form'); $ingestFormEl = $newDom->createElement('ingest_form');
$ingestFormEl->setAttribute('dsid', $ingestFormDsid); $ingestFormEl->setAttribute('dsid', $ingestFormDsid);
$ingestFormEl->setAttribute('page', $ingestFormPage); $ingestFormEl->setAttribute('page', $ingestFormPage);
if ($ingestFormHideChooser == 'true') { if ($ingestFormHideChooser == 'TRUE') {
$ingestFormEl->setAttribute('hide_file_chooser', 'true'); $ingestFormEl->setAttribute('hide_file_chooser', 'TRUE');
} }
$builderEl = $newDom->createElement('form_builder_method'); $builderEl = $newDom->createElement('form_builder_method');
@ -174,13 +181,12 @@ 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
* use the default (usually ISLANDORACM). PID_NAMESPACE and name can also be initialized * use the default (usually ISLANDORACM). PID_NAMESPACE and name can also be initialized
* from the collection policy. * from the collection policy.
* Returns false on failure. * Returns FALSE on failure.
* *
* NOTE: $name will be overwritten with the content model name found in the datastream * NOTE: $name will be overwritten with the content model name found in the datastream
* when the model is first validated.\ * when the model is first validated.\
@ -195,16 +201,18 @@ class ContentModel extends XMLDatastream {
$ret = FALSE; $ret = FALSE;
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
try { try {
if (self::validPid($pid)) { if (self::valid_pid($pid)) {
$fedoraItem = new Fedora_Item($pid); $fedoraItem = new Fedora_Item($pid);
$dsid = ($dsid != NULL && self::validDsid($dsid)) ? $dsid : ContentModel::getDefaultDSID(); if (!$name) {
$name = $fedoraItem->objectProfile->objLabel;
}
$dsid = ($dsid != NULL && self::valid_dsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
$ds = $fedoraItem->get_datastream_dissemination($dsid); $ds = $fedoraItem->get_datastream_dissemination($dsid);
if (!empty($ds)) { if (!empty($ds)) {
$ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name); $ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name);
} }
} }
} } catch (SOAPException $e) {
catch (SOAPException $e) {
$ret = FALSE; $ret = FALSE;
} }
return $ret; return $ret;
@ -287,7 +295,6 @@ class ContentModel extends XMLDatastream {
$ruleEl->appendChild($methodsEl); $ruleEl->appendChild($methodsEl);
$ingestRulesEl->appendChild($ruleEl); $ingestRulesEl->appendChild($ruleEl);
} }
} }
$rootEl->appendChild($ingestRulesEl); $rootEl->appendChild($ingestRulesEl);
@ -337,7 +344,7 @@ class ContentModel extends XMLDatastream {
$ingest_formEl->setAttribute('dsid', $sXml->ingest_form['dsid']); $ingest_formEl->setAttribute('dsid', $sXml->ingest_form['dsid']);
$ingest_formEl->setAttribute('page', $sXml->ingest_form['page']); $ingest_formEl->setAttribute('page', $sXml->ingest_form['page']);
if (isset($sXml->ingest_form['hide_file_chooser'])) { if (isset($sXml->ingest_form['hide_file_chooser'])) {
$ingest_formEl->setAttribute('hide_file_chooser', (strtolower($sXml->ingest_form['hide_file_chooser']) == 'true') ? 'true' : 'false'); $ingest_formEl->setAttribute('hide_file_chooser', (strtolower($sXml->ingest_form['hide_file_chooser']) == 'TRUE') ? 'TRUE' : 'FALSE');
} }
$form_builderEl = $newDom->createElement('form_builder_method'); $form_builderEl = $newDom->createElement('form_builder_method');
@ -366,8 +373,8 @@ class ContentModel extends XMLDatastream {
$elEl->setAttribute('label', $element->label); $elEl->setAttribute('label', $element->label);
$elEl->setAttribute('name', $element->name); $elEl->setAttribute('name', $element->name);
$elEl->setAttribute('type', $element->type); $elEl->setAttribute('type', $element->type);
if (strtolower($element->required) == 'true') { if (strtolower($element->required) == 'TRUE') {
$elEl->setAttribute('required', 'true'); $elEl->setAttribute('required', 'TRUE');
} }
if (isset($element->description) && trim($element->description) != '') { if (isset($element->description) && trim($element->description) != '') {
$descEl = $newDom->createElement('description', trim($element->description)); $descEl = $newDom->createElement('description', trim($element->description));
@ -411,7 +418,6 @@ class ContentModel extends XMLDatastream {
$newDom->appendChild($rootEl); $newDom->appendChild($rootEl);
$this->xml = DOMDocument::loadXML($newDom->saveXml()); $this->xml = DOMDocument::loadXML($newDom->saveXml());
} }
/** /**
@ -423,7 +429,7 @@ class ContentModel extends XMLDatastream {
*/ */
public function getServices() { public function getServices() {
$query = 'select $object $title from <#ri> $query = 'select $object $title from <#ri>
where ($object <dc:title> $title where ($object <fedora-model:label> $title
and $object <fedora-model:isDeploymentOf> $deploymentOf and $object <fedora-model:isDeploymentOf> $deploymentOf
and $object <fedora-model:hasModel> <info:fedora/fedora-system:ServiceDeployment-3.0> and $object <fedora-model:hasModel> <info:fedora/fedora-system:ServiceDeployment-3.0>
and $object <fedora-model:isContractorOf> <info:fedora/' . $this->pid . '> and $object <fedora-model:isContractorOf> <info:fedora/' . $this->pid . '>
@ -447,7 +453,7 @@ class ContentModel extends XMLDatastream {
/** /**
* Gets the name of the ContentModel * Gets the name of the ContentModel
* Returns false on failure. * Returns FALSE on failure.
* *
* @return String $name * @return String $name
*/ */
@ -464,7 +470,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.
@ -475,7 +480,7 @@ class ContentModel extends XMLDatastream {
*/ */
private function getDSModel($dsid) { private function getDSModel($dsid) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) { if (self::valid_dsid($dsid) && $this->validate()) {
$result = $this->xml->getElementsByTagName('datastreams'); $result = $this->xml->getElementsByTagName('datastreams');
if ($result->length > 0) { if ($result->length > 0) {
$result = $result->item(0)->getElementsByTagName('datastream'); $result = $result->item(0)->getElementsByTagName('datastream');
@ -488,6 +493,22 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* Gets the DSID of the default datastream
* from the <datastreams> element of the schema.
* Returns FALSE on failure.
*
* @return String
*/
public function getDatastreamNameDSID() {
$datastreams = $this->xml->getElementsByTagName('datastreams');
$datastream = $datastreams->item(0);
if ($datastreams->length > 0) {
$datastream = $datastreams->item(0)->getElementsByTagName('datastream');
return $datastream->item(0)->getAttribute('dsid');
}
}
/** /**
* Gets an array of form elements to use in the ingest form. The results of this array are passed * Gets an array of form elements to use in the ingest form. The results of this array are passed
* to the specified ingest form builder. The form builder can optionally not use the elements as defined * to the specified ingest form builder. The form builder can optionally not use the elements as defined
@ -518,7 +539,7 @@ class ContentModel extends XMLDatastream {
$element = array('name' => $elements->item($i)->getAttribute('name'), $element = array('name' => $elements->item($i)->getAttribute('name'),
'label' => $label, 'label' => $label,
'type' => $elements->item($i)->getAttribute('type'), 'type' => $elements->item($i)->getAttribute('type'),
'required' => ($elements->item($i)->getAttribute('required') == 'true') ? TRUE : FALSE, 'required' => ($elements->item($i)->getAttribute('required') == 'TRUE') ? TRUE : FALSE,
'description' => $desc 'description' => $desc
); );
@ -540,7 +561,7 @@ class ContentModel extends XMLDatastream {
$items = $params->item(0)->getElementsByTagName('parameter'); $items = $params->item(0)->getElementsByTagName('parameter');
for ($j = 0; $j < $items->length; $j++) { for ($j = 0; $j < $items->length; $j++) {
$value = $items->item($j)->nodeValue; $value = $items->item($j)->nodeValue;
$list[$items->item($j)->getAttribute('name')] = (strtolower($value) == 'true' ? TRUE : (strtolower($value) == 'false' ? FALSE : $value)); $list[$items->item($j)->getAttribute('name')] = (strtolower($value) == 'TRUE' ? TRUE : (strtolower($value) == 'FALSE' ? FALSE : $value));
} }
} }
$element['parameters'] = $list; $element['parameters'] = $list;
@ -586,23 +607,23 @@ class ContentModel extends XMLDatastream {
$elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0); $elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
$elements = $elementsEl->getElementsByTagName('element'); $elements = $elementsEl->getElementsByTagName('element');
$found = FALSE; $found = FALSE;
$refEl = FALSE; $ref_el = FALSE;
for ($i = 0; $found === FALSE && $i < $elements->length; $i++) { for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
if ($elements->item($i)->getAttribute('name') == trim($name)) { if ($elements->item($i)->getAttribute('name') == trim($name)) {
if ($reorder == 'inc') { if ($reorder == 'inc') {
$found = $elements->item($i); $found = $elements->item($i);
$refEl = ($i > 0)?$elements->item($i-1):false; $ref_el = ($i > 0) ? $elements->item($i - 1) : FALSE;
} }
else { else {
$found = ($i + 1 < $elements->length) ? $elements->item($i + 1) : FALSE; $found = ($i + 1 < $elements->length) ? $elements->item($i + 1) : FALSE;
$refEl = $elements->item($i); $ref_el = $elements->item($i);
} }
} }
} }
if ($found !== FALSE) { if ($found !== FALSE) {
$elementsEl->removeChild($found); $elementsEl->removeChild($found);
$elementsEl->insertBefore($found, $refEl); $elementsEl->insertBefore($found, $ref_el);
$ret = TRUE; $ret = TRUE;
} }
} }
@ -636,7 +657,7 @@ class ContentModel extends XMLDatastream {
/** /**
* Sets a parameter of an ingest form element. If the value of the element is FALSE the parameter * Sets a parameter of an ingest form element. If the value of the element is FALSE the parameter
* will be removed entirely (if you want to store false as a value, then send the String "false"). * will be removed entirely (if you want to store FALSE as a value, then send the String "FALSE").
* *
* @param String $elementName * @param String $elementName
* @param String $paramName * @param String $paramName
@ -706,7 +727,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.
* *
@ -766,7 +786,7 @@ class ContentModel extends XMLDatastream {
$found->setAttribute('name', $name); $found->setAttribute('name', $name);
$found->setAttribute('type', $type); $found->setAttribute('type', $type);
$found->setAttribute('required', $required ? 'true' : 'false'); $found->setAttribute('required', $required ? 'TRUE' : 'FALSE');
if (trim($label) != '' && trim($label) != trim($name)) { if (trim($label) != '' && trim($label) != trim($name)) {
$found->setAttribute('label', $label); $found->setAttribute('label', $label);
} }
@ -801,7 +821,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.
* *
@ -819,7 +838,7 @@ class ContentModel extends XMLDatastream {
$elementEl = $this->xml->createElement('element'); $elementEl = $this->xml->createElement('element');
$elementEl->setAttribute('name', $name); $elementEl->setAttribute('name', $name);
$elementEl->setAttribute('type', $type); $elementEl->setAttribute('type', $type);
$elementEl->setAttribute('required', $requiredi ? 'true' : 'false'); $elementEl->setAttribute('required', $requiredi ? 'TRUE' : 'FALSE');
if (trim($label) != '' && trim($label) != trim($name)) { if (trim($label) != '' && trim($label) != trim($name)) {
$elementEl->setAttribute('label', $label); $elementEl->setAttribute('label', $label);
} }
@ -876,23 +895,23 @@ class ContentModel extends XMLDatastream {
$items = $authListEl->getElementsByTagName('item'); $items = $authListEl->getElementsByTagName('item');
$found = FALSE; $found = FALSE;
$refEl = FALSE; $ref_el = FALSE;
for ($i = 0; $found === FALSE && $i < $items->length; $i++) { for ($i = 0; $found === FALSE && $i < $items->length; $i++) {
if ($items->item($i)->nodeValue == $value) { if ($items->item($i)->nodeValue == $value) {
if ($reorder == 'inc') { if ($reorder == 'inc') {
$refEl = ($i > 0) ? $items->item($i - 1) : FALSE; $ref_el = ($i > 0) ? $items->item($i - 1) : FALSE;
$found = $items->item($i); $found = $items->item($i);
} }
else { else {
$refEl = $items->item($i); $ref_el = $items->item($i);
$found = ($i + 1 < $items->length) ? $items->item($i + 1) : FALSE; $found = ($i + 1 < $items->length) ? $items->item($i + 1) : FALSE;
} }
} }
} }
if ($found !== FALSE && $refEl !== FALSE) { if ($found !== FALSE && $ref_el !== FALSE) {
$authListEl->removeChild($found); $authListEl->removeChild($found);
$authListEl->insertBefore($found, $refEl); $authListEl->insertBefore($found, $ref_el);
$ret = TRUE; $ret = TRUE;
} }
} }
@ -903,9 +922,9 @@ class ContentModel extends XMLDatastream {
/** /**
* Removes an authority list item from a form element. * Removes an authority list item from a form element.
@param String $elementName * @param String $elementName
@param String $value * @param String $value
@return boolean $success * @return boolean $success
*/ */
public function removeAuthListItem($elementName, $value) { public function removeAuthListItem($elementName, $value) {
$ret = FALSE; $ret = FALSE;
@ -948,10 +967,10 @@ class ContentModel extends XMLDatastream {
/** /**
* Adds an authority list item to a form element. * Adds an authority list item to a form element.
@param String $elementName * @param String $elementName
@param String $value * @param String $value
@param String $label (optional) * @param String $label (optional)
@return boolean $success * @return boolean $success
*/ */
public function addAuthListItem($elementName, $value, $label = '') { public function addAuthListItem($elementName, $value, $label = '') {
$ret = FALSE; $ret = FALSE;
@ -991,7 +1010,6 @@ class ContentModel extends XMLDatastream {
$ret = TRUE; $ret = TRUE;
} }
} }
} }
return $ret; return $ret;
} }
@ -1044,7 +1062,7 @@ class ContentModel extends XMLDatastream {
$ingest_form = $this->xml->getElementsByTagName('ingest_form')->item(0); $ingest_form = $this->xml->getElementsByTagName('ingest_form')->item(0);
if (!empty($ingest_form)) { if (!empty($ingest_form)) {
if (strtolower($ingest_form->getAttribute('hide_file_chooser')) == 'true') { if (strtolower($ingest_form->getAttribute('hide_file_chooser')) == 'TRUE') {
$form['indicator']['ingest-file-location']['#type'] = 'hidden'; $form['indicator']['ingest-file-location']['#type'] = 'hidden';
} }
} }
@ -1080,14 +1098,14 @@ class ContentModel extends XMLDatastream {
/** /**
* Builds an edit metadata form using the method specified in the <edit_metadata_method> element * Builds an edit metadata form using the method specified in the <edit_metadata_method> element
= * The DSID specified must match the DSID attribute of <edit_metadata_method>. Returns FALSE on failure. * The DSID specified must match the DSID attribute of <edit_metadata_method>. Returns FALSE on failure.
* *
* @param string $dsid * @param string $dsid
* @return $form * @return $form
*/ */
public function buildEditMetadataForm($pid, $dsid) { public function buildEditMetadataForm($pid, $dsid) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) { if (self::valid_dsid($dsid) && $this->validate()) {
$method = $this->xml->getElementsByTagName('edit_metadata_method'); $method = $this->xml->getElementsByTagName('edit_metadata_method');
if ($method->length > 0 && $method->item(0)->getAttribute('dsid') == $dsid) { if ($method->length > 0 && $method->item(0)->getAttribute('dsid') == $dsid) {
$method = $method->item(0); $method = $method->item(0);
@ -1162,14 +1180,13 @@ class ContentModel extends XMLDatastream {
module_load_include('inc', 'fedora_repository', 'formClass'); module_load_include('inc', 'fedora_repository', 'formClass');
$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['storage'] = NULL;
$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'
@ -1222,7 +1239,7 @@ class ContentModel extends XMLDatastream {
*/ */
public function updateEditMetadataMethod($module, $file, $class, $method, $handler, $dsid) { public function updateEditMetadataMethod($module, $file, $class, $method, $handler, $dsid) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) { if (self::valid_dsid($dsid) && $this->validate()) {
$methodEl = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method'); $methodEl = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method');
if ($methodEl->length > 0) { if ($methodEl->length > 0) {
$methodEl = $methodEl->item(0); $methodEl = $methodEl->item(0);
@ -1252,7 +1269,7 @@ class ContentModel extends XMLDatastream {
*/ */
public function execAddDatastreamMethods($dsid, $file) { public function execAddDatastreamMethods($dsid, $file) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) { if (self::valid_dsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$addMethod = $ds->getElementsByTagName('add_datastream_method'); $addMethod = $ds->getElementsByTagName('add_datastream_method');
if ($addMethod->length > 0) { if ($addMethod->length > 0) {
$addMethod = $addMethod->item(0); $addMethod = $addMethod->item(0);
@ -1348,7 +1365,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;
@ -1356,6 +1374,7 @@ class ContentModel extends XMLDatastream {
else { else {
$status = $class->$methodName($param_array, $method->getAttribute('dsid'), $file, $method->getAttribute('modified_files_ext')); $status = $class->$methodName($param_array, $method->getAttribute('dsid'), $file, $method->getAttribute('modified_files_ext'));
if ($status !== TRUE) { if ($status !== TRUE) {
self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' failed.';
$ret = FALSE; $ret = FALSE;
} }
} }
@ -1365,7 +1384,6 @@ class ContentModel extends XMLDatastream {
} }
} }
} }
} }
return $ret; return $ret;
} }
@ -1447,7 +1465,7 @@ class ContentModel extends XMLDatastream {
$datastreams = $datastreams->item(0)->getElementsByTagName('datastream'); $datastreams = $datastreams->item(0)->getElementsByTagName('datastream');
for ($i = 0; $i < $datastreams->length; $i++) { for ($i = 0; $i < $datastreams->length; $i++) {
$ds = $datastreams->item($i); $ds = $datastreams->item($i);
if ($ds->attributes->getNamedItem('display_in_fieldset') == NULL || strtolower($ds->getAttribute('display_in_fieldset')) != 'false' ) { if ($ds->attributes->getNamedItem('display_in_fieldset') == NULL || strtolower($ds->getAttribute('display_in_fieldset')) != 'FALSE') {
$dispMethods = $ds->getElementsByTagName('display_method'); $dispMethods = $ds->getElementsByTagName('display_method');
for ($j = 0; $j < $dispMethods->length; $j++) { for ($j = 0; $j < $dispMethods->length; $j++) {
$method = $dispMethods->item($j); $method = $dispMethods->item($j);
@ -1531,7 +1549,6 @@ class ContentModel extends XMLDatastream {
$mimetypesEl->appendChild($newTypeEl); $mimetypesEl->appendChild($newTypeEl);
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
@ -1557,11 +1574,15 @@ class ContentModel extends XMLDatastream {
$mimetypesEl->removeChild($found); $mimetypesEl->removeChild($found);
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
/**
* getDisplayMethods ??
* @param type $ds
* @return type
*/
public function getDisplayMethods($ds) { public function getDisplayMethods($ds) {
$ret = FALSE; $ret = FALSE;
if (($ds = $this->getDSModel($ds)) !== FALSE) { if (($ds = $this->getDSModel($ds)) !== FALSE) {
@ -1572,16 +1593,22 @@ class ContentModel extends XMLDatastream {
'file' => $dispMethods->item($i)->getAttribute('file'), 'file' => $dispMethods->item($i)->getAttribute('file'),
'class' => $dispMethods->item($i)->getAttribute('class'), 'class' => $dispMethods->item($i)->getAttribute('class'),
'method' => $dispMethods->item($i)->getAttribute('method'), 'method' => $dispMethods->item($i)->getAttribute('method'),
'default' => ($dispMethods->item($i)->attributes->getNamedItem('default') !== NULL ? strtolower($dispMethods->item($i)->getAttribute('default')) == 'true' : FALSE)); 'default' => ($dispMethods->item($i)->attributes->getNamedItem('default') !== NULL ? strtolower($dispMethods->item($i)->getAttribute('default')) == 'TRUE' : FALSE));
} }
} }
return $ret; return $ret;
} }
/**
* addDs ??
* @param type $dsid
* @param type $display_in_fieldset
* @return boolean
*/
public function addDs($dsid, $display_in_fieldset = FALSE) { public function addDs($dsid, $display_in_fieldset = FALSE) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) { if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) {
$datastreamsEl = $this->xml->getElementsByTagName('datastreams'); $datastreamsEl = $this->xml->getElementsByTagName('datastreams');
if ($datastreamsEl->length > 0) { if ($datastreamsEl->length > 0) {
$datastreamsEl = $datastreamsEl->item(0); $datastreamsEl = $datastreamsEl->item(0);
@ -1594,7 +1621,7 @@ class ContentModel extends XMLDatastream {
$dsEl = $this->xml->createElement('datastream'); $dsEl = $this->xml->createElement('datastream');
$dsEl->setAttribute('dsid', $dsid); $dsEl->setAttribute('dsid', $dsid);
if ($display_in_fieldset == TRUE) { if ($display_in_fieldset == TRUE) {
$dsEl->setAttribute('display_in_fieldset', 'true'); $dsEl->setAttribute('display_in_fieldset', 'TRUE');
} }
$datastreamsEl->appendChild($dsEl); $datastreamsEl->appendChild($dsEl);
$ret = TRUE; $ret = TRUE;
@ -1602,10 +1629,15 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* removeDs ??
* @param type $dsid
* @return boolean
*/
public function removeDs($dsid) { public function removeDs($dsid) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) { if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$datastreamsEl = $this->xml->getElementsByTagName('datastreams')->item(0); $datastreamsEl = $this->xml->getElementsByTagName('datastreams')->item(0);
$datastreamsEl->removeChild($ds); $datastreamsEl->removeChild($ds);
$ret = TRUE; $ret = TRUE;
@ -1613,33 +1645,53 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* displayInFieldset ??
* @param type $dsid
* @return type
*/
public function displayInFieldset($dsid) { public function displayInFieldset($dsid) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) { if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$ret = strtolower($ds->getAttribute('display_in_fieldset')) == 'true'; $ret = strtolower($ds->getAttribute('display_in_fieldset')) == 'TRUE';
} }
return $ret; return $ret;
} }
/**
* setDisplayInFieldset ??
* @param type $dsid
* @param type $value
* @return boolean
*/
public function setDisplayInFieldset($dsid, $value = TRUE) { public function setDisplayInFieldset($dsid, $value = TRUE) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) { if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
if ($value == FALSE && $ds->attributes->getNamedItem('display_in_fieldset') !== NULL) { if ($value == FALSE && $ds->attributes->getNamedItem('display_in_fieldset') !== NULL) {
$ds->removeAttribute('display_in_fieldset'); $ds->removeAttribute('display_in_fieldset');
$ret = TRUE; $ret = TRUE;
} }
elseif ($value == TRUE) { elseif ($value == TRUE) {
$ds->setAttribute('display_in_fieldset', 'true'); $ds->setAttribute('display_in_fieldset', 'TRUE');
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
/**
* setDefaultDispMeth ??
* @param type $dsid
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @return boolean
*/
public function setDefaultDispMeth($dsid, $module, $file, $class, $method) { public function setDefaultDispMeth($dsid, $module, $file, $class, $method) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) { if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$found = FALSE; $found = FALSE;
$dispMethods = $ds->getElementsByTagName('display_method'); $dispMethods = $ds->getElementsByTagName('display_method');
for ($i = 0; !$found && $i < $dispMethods->length; $i++) { for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
@ -1659,17 +1711,25 @@ class ContentModel extends XMLDatastream {
} }
} }
$found->setAttribute('default', 'true'); $found->setAttribute('default', 'TRUE');
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
/**
* removeDispMeth ??
* @param type $dsid
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @return boolean
*/
public function removeDispMeth($dsid, $module, $file, $class, $method) { public function removeDispMeth($dsid, $module, $file, $class, $method) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) { if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$found = FALSE; $found = FALSE;
$dispMethods = $ds->getElementsByTagName('display_method'); $dispMethods = $ds->getElementsByTagName('display_method');
for ($i = 0; !$found && $i < $dispMethods->length; $i++) { for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
@ -1685,14 +1745,23 @@ class ContentModel extends XMLDatastream {
$ds->removeChild($found); $ds->removeChild($found);
$ret = TRUE; $ret = TRUE;
} }
} }
return $ret; return $ret;
} }
/**
* addDispMeth ??
* @param type $dsid
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @param type $default
* @return boolean
*/
public function addDispMeth($dsid, $module, $file, $class, $method, $default = FALSE) { public function addDispMeth($dsid, $module, $file, $class, $method, $default = FALSE) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid))!==FALSE) { if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
$dispMethEl = $this->xml->createElement('display_method'); $dispMethEl = $this->xml->createElement('display_method');
$dispMethEl->setAttribute('module', $module); $dispMethEl->setAttribute('module', $module);
$dispMethEl->setAttribute('file', $file); $dispMethEl->setAttribute('file', $file);
@ -1707,6 +1776,11 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* getAddDsMethod ??
* @param type $ds
* @return type
*/
public function getAddDsMethod($ds) { public function getAddDsMethod($ds) {
$ret = FALSE; $ret = FALSE;
if (($ds = $this->getDSModel($ds)) !== FALSE) { if (($ds = $this->getDSModel($ds)) !== FALSE) {
@ -1724,6 +1798,11 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* getIngestRule ??
* @param type $rule_id
* @return type
*/
public function getIngestRule($rule_id) { public function getIngestRule($rule_id) {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
@ -1734,6 +1813,12 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* removeAppliesTo ??
* @param type $rule_id
* @param type $type
* @return boolean
*/
public function removeAppliesTo($rule_id, $type) { public function removeAppliesTo($rule_id, $type) {
$ret = FALSE; $ret = FALSE;
if (($rule = $this->getIngestRule($rule_id)) !== FALSE) { if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
@ -1753,6 +1838,12 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* addAppliesTo ??
* @param type $rule_id
* @param type $type
* @return boolean
*/
public function addAppliesTo($rule_id, $type) { public function addAppliesTo($rule_id, $type) {
$ret = FALSE; $ret = FALSE;
if (($rule = $this->getIngestRule($rule_id)) !== FALSE) { if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
@ -1771,9 +1862,20 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* addIngestMethods ??
* @param type $rule_id
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @param type $dsid
* @param type $modified_files_ext
* @return boolean
*/
public function addIngestMethod($rule_id, $module, $file, $class, $method, $dsid, $modified_files_ext) { public function addIngestMethod($rule_id, $module, $file, $class, $method, $dsid, $modified_files_ext) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && ($rule=$this->getIngestRule($rule_id))!==FALSE) { if (self::valid_dsid($dsid) && ($rule = $this->getIngestRule($rule_id)) !== FALSE) {
$methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0); $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
$meth = $this->xml->createElement('ingest_method'); $meth = $this->xml->createElement('ingest_method');
$meth->setAttribute('module', $module); $meth->setAttribute('module', $module);
@ -1789,6 +1891,15 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* removeIngestMethod ??
* @param type $rule_id
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @return boolean
*/
public function removeIngestMethod($rule_id, $module, $file, $class, $method) { public function removeIngestMethod($rule_id, $module, $file, $class, $method) {
$ret = FALSE; $ret = FALSE;
if (($rule = $this->getIngestRule($rule_id)) !== FALSE) { if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
@ -1809,6 +1920,17 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* addIngestMethodParam ??
* @param type $rule_id
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @param type $name
* @param type $value
* @return boolean
*/
public function addIngestMethodParam($rule_id, $module, $file, $class, $method, $name, $value) { public function addIngestMethodParam($rule_id, $module, $file, $class, $method, $name, $value) {
$ret = FALSE; $ret = FALSE;
if (($rule = $this->getIngestRule($rule_id)) !== FALSE) { if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
@ -1851,6 +1973,16 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* removeIngestMethodParam ??
* @param type $rule_id
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @param type $name
* @return boolean
*/
public function removeIngestMethodParam($rule_id, $module, $file, $class, $method, $name) { public function removeIngestMethodParam($rule_id, $module, $file, $class, $method, $name) {
$ret = FALSE; $ret = FALSE;
if (($rule = $this->getIngestRule($rule_id)) !== FALSE) { if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
@ -1884,12 +2016,16 @@ class ContentModel extends XMLDatastream {
$ret = TRUE; $ret = TRUE;
} }
} }
} }
} }
return $ret; return $ret;
} }
/**
* removeIngestRule ??
* @param type $rule_id
* @return type
*/
public function removeIngestRule($rule_id) { public function removeIngestRule($rule_id) {
$ret = FALSE; $ret = FALSE;
if (($rule = $this->getIngestRule($rule_id)) !== FALSE) { if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
@ -1898,9 +2034,20 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* addIngestRule ??
* @param type $applies_to
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @param type $dsid
* @param type $modified_files_ext
* @return type
*/
public function addIngestRule($applies_to, $module, $file, $class, $method, $dsid, $modified_files_ext) { public function addIngestRule($applies_to, $module, $file, $class, $method, $dsid, $modified_files_ext) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) { if (self::valid_dsid($dsid) && $this->validate()) {
$ingestRulesEl = $this->xml->getElementsByTagName('ingest_rules')->item(0); $ingestRulesEl = $this->xml->getElementsByTagName('ingest_rules')->item(0);
$rule = $this->xml->createElement('rule'); $rule = $this->xml->createElement('rule');
$ingestMethodsEl = $this->xml->createElement('ingest_methods'); $ingestMethodsEl = $this->xml->createElement('ingest_methods');
@ -1912,6 +2059,10 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* getIngestRules ??
* @return type
*/
public function getIngestRules() { public function getIngestRules() {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
@ -1944,7 +2095,6 @@ class ContentModel extends XMLDatastream {
} }
$rule['ingest_methods'][] = $method; $rule['ingest_methods'][] = $method;
} }
$ret[] = $rule; $ret[] = $rule;
@ -1953,33 +2103,44 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* getIngestFormAttributes ??
* @return type
*/
public function getIngestFormAttributes() { public function getIngestFormAttributes() {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
$ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0); $ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
$ret = array('dsid' => $ingest_formEl->getAttribute('dsid'), $ret = array('dsid' => $ingest_formEl->getAttribute('dsid'),
'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;
} }
/**
* editIngestFormAttributes ??
* @param type $dsid
* @param type $page
* @param type $hide_file_chooser
* @param type $redirect
* @return boolean
*/
public function editIngestFormAttributes($dsid, $page, $hide_file_chooser = FALSE, $redirect = TRUE) { public function editIngestFormAttributes($dsid, $page, $hide_file_chooser = FALSE, $redirect = TRUE) {
$ret = FALSE; $ret = FALSE;
if (self::validDsid($dsid) && $this->validate()) { if (self::valid_dsid($dsid) && $this->validate()) {
$ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0); $ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
$ingest_formEl->setAttribute('dsid', $dsid); $ingest_formEl->setAttribute('dsid', $dsid);
$ingest_formEl->setAttribute('page', $page); $ingest_formEl->setAttribute('page', $page);
if (!$redirect) { if (!$redirect) {
$ingest_formEl->setAttribute('redirect', 'false'); $ingest_formEl->setAttribute('redirect', 'FALSE');
} }
else { else {
$ingest_formEl->removeAttribute('redirect'); $ingest_formEl->removeAttribute('redirect');
} }
if ($hide_file_chooser) { if ($hide_file_chooser) {
$ingest_formEl->setAttribute('hide_file_chooser', 'true'); $ingest_formEl->setAttribute('hide_file_chooser', 'TRUE');
} }
else { else {
$ingest_formEl->removeAttribute('hide_file_chooser'); $ingest_formEl->removeAttribute('hide_file_chooser');
@ -1989,6 +2150,10 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* getIngestFormBuilderMethod
* @return type
*/
public function getIngestFormBuilderMethod() { public function getIngestFormBuilderMethod() {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
@ -2002,6 +2167,15 @@ class ContentModel extends XMLDatastream {
return $ret; return $ret;
} }
/**
* editIngestFormBuilderMethod ??
* @param type $module
* @param type $file
* @param type $class
* @param type $method
* @param type $handler
* @return boolean
*/
public function editIngestFormBuilderMethod($module, $file, $class, $method, $handler) { public function editIngestFormBuilderMethod($module, $file, $class, $method, $handler) {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
@ -2130,7 +2304,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.
* *

28
MimeClass.inc

@ -1,8 +1,9 @@
<?php <?php
// $Id$
/** /**
* * @file
* This class inspired by Chris Jean's work, here: * This class inspired by Chris Jean's work, here:
* http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/ * http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/
* *
@ -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,12 +191,14 @@ 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;
private $etc_mime_types = '/etc/mime.types'; private $etc_mime_types = '/etc/mime.types';
/**
* Construtor
*/
public function __construct() { public function __construct() {
// populate the reverse shortlist: // populate the reverse shortlist:
@ -205,13 +208,15 @@ class MimeClass {
if (is_readable('mime.types')) { if (is_readable('mime.types')) {
$this->etc_mime_types = 'mime.types'; $this->etc_mime_types = 'mime.types';
} }
} }
/** /**
* function: getType * function: getType
* description: An alias to get_mimetype, * description: An alias to get_mimetype,
* for backwards-compatibility with our old mimetype class. * for backwards-compatibility with our old mimetype class.
*
* @param type $filename
* @return type
*/ */
public function getType($filename) { public function getType($filename) {
return $this->get_mimetype($filename); return $this->get_mimetype($filename);
@ -220,6 +225,10 @@ class MimeClass {
/** /**
* function: get_mimetype * function: get_mimetype
* description: returns a mimetype associated with the file extension of $filename * description: returns a mimetype associated with the file extension of $filename
*
* @param type $filename
* @param type $debug
* @return type
*/ */
public function get_mimetype($filename, $debug = FALSE) { public function get_mimetype($filename, $debug = FALSE) {
@ -252,12 +261,15 @@ 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';
} }
/** /**
* function: get_extension * function: get_extension
* description: returns *one* valid file extension for a given $mime_type * description: returns *one* valid file extension for a given $mime_type
*
* @param type $mime_type
* @param type $debug
* @return type
*/ */
public function get_extension($mime_type, $debug = FALSE) { public function get_extension($mime_type, $debug = FALSE) {
@ -289,6 +301,7 @@ class MimeClass {
*/ */
private function system_mime_type_extensions() { private function system_mime_type_extensions() {
$out = array(); $out = array();
if (file_exists($this->etc_mime_types)) {
$file = fopen($this->etc_mime_types, 'r'); $file = fopen($this->etc_mime_types, 'r');
while (($line = fgets($file)) !== FALSE) { while (($line = fgets($file)) !== FALSE) {
$line = trim(preg_replace('/#.*/', '', $line)); $line = trim(preg_replace('/#.*/', '', $line));
@ -304,6 +317,7 @@ class MimeClass {
// We take the first ext from the line if many are present. // We take the first ext from the line if many are present.
} }
fclose($file); fclose($file);
}
return $out; return $out;
} }
@ -316,6 +330,7 @@ class MimeClass {
*/ */
private function system_extension_mime_types() { private function system_extension_mime_types() {
$out = array(); $out = array();
if (file_exists($this->etc_mime_types)) {
$file = fopen($this->etc_mime_types, 'r'); $file = fopen($this->etc_mime_types, 'r');
while (($line = fgets($file)) !== FALSE) { while (($line = fgets($file)) !== FALSE) {
$line = trim(preg_replace('/#.*/', '', $line)); $line = trim(preg_replace('/#.*/', '', $line));
@ -330,6 +345,7 @@ class MimeClass {
$out[$part] = $type; $out[$part] = $type;
} }
fclose($file); fclose($file);
}
return $out; return $out;
} }

758
ObjectHelper.inc

File diff suppressed because it is too large Load Diff

4
README

@ -4,10 +4,6 @@ For installation and customization instructions please see the documentation and
https://wiki.duraspace.org/display/ISLANDORA/Islandora https://wiki.duraspace.org/display/ISLANDORA/Islandora
Specifically the Islandora Guide:
https://wiki.duraspace.org/display/ISLANDORA/Islandora+Guide
All bugs, feature requests and improvement suggestions are tracked at the DuraSpace JIRA: All bugs, feature requests and improvement suggestions are tracked at the DuraSpace JIRA:
https://jira.duraspace.org/browse/ISLANDORA https://jira.duraspace.org/browse/ISLANDORA

129
SearchClass.inc

@ -1,24 +1,54 @@
<?php <?php
// $Id$
/**
* @file
* SearchClass Class
*/
/**
* SearchClass ??
*/
class SearchClass { class SearchClass {
public static $SEARCH_CLASS_ADVANCED_SEARCH_NUMBER_FIELDS = 5; public static $SEARCH_CLASS_ADVANCED_SEARCH_NUMBER_FIELDS = 5;
/**
* solr_search ??
* @param type $query
* @param type $startPage
* @param type $fq
* @param type $dismax
* @return type
*/
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
// Don't let us bust out of fedora_repository modules directory when looking for a handler
if (strpos($solrField, '../')) {
drupal_set_message(t('You have illegal characters in your solr handler function in the Islandora solr block config.'), 'error'); drupal_set_message(t('You have illegal characters in your solr handler function in the Islandora solr block config.'), 'error');
} }
$solrClass = trim(variable_get('islandora_solr_search_block_handler_class', 'SolrResults')); $solrClass = trim(variable_get('islandora_solr_search_block_handler_class', 'SolrResults'));
$solrFunction = trim(variable_get('islandora_solr_search_block_handler_function', 'SearchAndDisplay')); $solrFunction = trim(variable_get('islandora_solr_search_block_handler_function', 'SearchAndDisplay'));
require_once(drupal_get_path('module', 'fedora_repository') . '/' . $solrFile); require_once(drupal_get_path('module', 'fedora_repository') . '/' . $solrFile);
try { try {
$implementation = new $solrClass(); $implementation = new $solrClass();
} catch (Exception $e) { } catch (Exception $e) {
watchdog(t("Fedora_Repository"), t("Error getting solr search results class: !message", array('!message' => $e->getMessage())), NULL, WATCHDOG_ERROR); watchdog(t("Fedora_Repository"), "Error getting solr search results class: !message", array('!message' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return 'Error getting solr search results class. Check watchdog for more info.'; return 'Error getting solr search results class. Check watchdog for more info.';
} }
return $implementation->$solrFunction($query, $startPage, $fq, $dismax); return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
} }
/**
* build solr search form ??
* @param type $repeat
* @param type $pathToSearchTerms
* @param type $query
* @return type
*/
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;
@ -100,6 +130,10 @@ class SearchClass {
return $form; return $form;
} }
/**
* build simple solr form ??
* @return string
*/
function build_simple_solr_form() { function build_simple_solr_form() {
//$form = array(); //$form = array();
$form["search_query"] = array( $form["search_query"] = array(
@ -114,6 +148,12 @@ class SearchClass {
); );
return $form; return $form;
} }
/**
* theme solr search form ??
* @param type $form
* @return type
*/
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 +173,17 @@ class SearchClass {
$output .= drupal_render($form['submit']); $output .= drupal_render($form['submit']);
$output .= drupal_render($form); $output .= drupal_render($form);
return $output; return $output;
} }
/**
* quick search ??
* @param type $type
* @param type $query
* @param type $showForm
* @param type $orderBy
* @param type $userArray
* @return type
*/
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,8 +229,13 @@ 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
* @param type $fieldName
* @param type $startTerm
* @param type $displayName
* @return type
*/
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');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
@ -205,11 +258,16 @@ 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;
} }
/**
* custom search ??
* @param type $query
* @param type $startPage
* @param type $xslt
* @param type $numberOfHistPerPage
* @return type
*/
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 +300,14 @@ class SearchClass {
} }
} }
/**
* apply specified xslt ??
* @global type $user
* @param type $resultData
* @param type $pathToXSLT
* @param type $displayName
* @return type
*/
function applySpecifiedXSLT($resultData, $pathToXSLT, $displayName = NULL) { function applySpecifiedXSLT($resultData, $pathToXSLT, $displayName = NULL) {
$proc = NULL; $proc = NULL;
global $user; global $user;
@ -252,8 +317,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 +355,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 +370,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;
@ -329,7 +393,7 @@ class SearchClass {
$proc->setParameter('', 'searchToken', drupal_get_token('fedora_repository_advanced_search')); //token generated by Drupal, keeps tack of what tab etc we are on $proc->setParameter('', 'searchToken', drupal_get_token('fedora_repository_advanced_search')); //token generated by Drupal, keeps tack of what tab etc we are on
$proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl $proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl
$proc->setParameter('', 'objectsPage', base_path()); $proc->setParameter('', 'objectsPage', base_path());
$proc->setParameter('', 'allowedPidNameSpaces', variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: ')); $proc->setParameter('', 'allowedPidNameSpaces', variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: '));
$proc->setParameter('', 'hitPageStart', $startPage); $proc->setParameter('', 'hitPageStart', $startPage);
$proc->registerPHPFunctions(); $proc->registerPHPFunctions();
$xsl = new DomDocument(); $xsl = new DomDocument();
@ -354,7 +418,12 @@ class SearchClass {
} }
} }
//xslt for islandscholar these xslt functions can probably be pulled into one /**
* xslt for islandscholar these xslt functions can probably be pulled into one
* @param type $resultData
* @param type $orderBy
* @return type
*/
function applyXSLT($resultData, $orderBy = 0) { function applyXSLT($resultData, $orderBy = 0) {
$path = drupal_get_path('module', 'Fedora_Repository'); $path = drupal_get_path('module', 'Fedora_Repository');
$proc = NULL; $proc = NULL;
@ -365,7 +434,7 @@ class SearchClass {
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
} catch (Exception $e) { } catch (Exception $e) {
drupal_set_message(t('Error loading results xslt! ') . $e->getMessage()); drupal_set_message(t('Error loading results xslt!') . " " . $e->getMessage());
return ' '; return ' ';
} }
@ -374,7 +443,7 @@ class SearchClass {
$proc->setParameter('', 'userID', $user->uid); $proc->setParameter('', 'userID', $user->uid);
$proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl $proc->setParameter('', 'searchUrl', url('search') . '/fedora_repository'); //needed in our xsl
$proc->setParameter('', 'objectsPage', base_path()); $proc->setParameter('', 'objectsPage', base_path());
$proc->setParameter('', 'allowedPidNameSpaces', variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: ')); $proc->setParameter('', 'allowedPidNameSpaces', variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: '));
$proc->setParameter('', 'orderBy', $orderBy); $proc->setParameter('', 'orderBy', $orderBy);
$xsl = new DomDocument(); $xsl = new DomDocument();
@ -398,6 +467,12 @@ class SearchClass {
} }
} }
/**
* theme advanced search form ??
* @param type $form
* @param type $repeat
* @return type
*/
function theme_advanced_search_form($form, $repeat=NULL) { function theme_advanced_search_form($form, $repeat=NULL) {
if (!isset($repeat)) { if (!isset($repeat)) {
$repeat = variable_get('fedora_repository_advanced_block_repeat', t('3')); $repeat = variable_get('fedora_repository_advanced_block_repeat', t('3'));
@ -419,7 +494,13 @@ class SearchClass {
return $output; return $output;
} }
//build search form, custom blocks should set the number of repeats or it will use the default /**
* build search form, custom blocks should set the number of repeats or it will use the default
* @param type $repeat
* @param type $pathToSearchTerms
* @param type $query
* @return string
*/
function build_advanced_search_form($repeat = NULL, $pathToSearchTerms = NULL, $query = NULL) { function build_advanced_search_form($repeat = NULL, $pathToSearchTerms = NULL, $query = NULL) {
$types = $this->get_search_terms_array($pathToSearchTerms); $types = $this->get_search_terms_array($pathToSearchTerms);
$queryArray = NULL; $queryArray = NULL;
@ -501,7 +582,12 @@ class SearchClass {
return $form; return $form;
} }
/**
* get search terms array
* @param type $path
* @param string $file
* @return type
*/
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 +608,5 @@ class SearchClass {
} }
return $types; return $types;
} }
} }

88
SecurityClass.inc

@ -1,27 +1,39 @@
<?php <?php
// $Id$
/*
* Created on 22-Oct-08
* /**
* To change the template for this generated file go to * @file
* Window - Preferences - PHPeclipse - PHP - Code Templates * SecurityClass Class
*/ */
/**
* SecurityClass ??
*/
class SecurityClass { class SecurityClass {
public static $SECURITY_CLASS_SECURITY_STREAM = 'POLICY'; public static $SECURITY_CLASS_SECURITY_STREAM = 'POLICY';
/**
* Constructor
*/
function SecurityClass() { function SecurityClass() {
module_load_include('inc', 'SecurityClass', ''); module_load_include('inc', 'SecurityClass', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
} }
/**
* canIngestHere ??
* @global type $user
* @param type $collection_pid
* @return type
*/
function canIngestHere($collection_pid) { function canIngestHere($collection_pid) {
global $user; global $user;
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$objectHelper = new ObjectHelper(); $objectHelper = new ObjectHelper();
// get the childsecurity policy from the collection. // get the childsecurity policy from the collection.
$policyStream = $objectHelper->getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE); $policyStream = $objectHelper->getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE);
if ($policyStream == NULL) { if ($policyStream == NULL) {
// no child policy stream so collection is wide open to anyone to ingest, that has the permission ingest in Drupal. // no child policy stream so collection is wide open to anyone to ingest, that has the permission ingest in Drupal.
// maybe we should return FALSE here?? would be more secure. // maybe we should return FALSE here?? would be more secure.
@ -47,63 +59,58 @@ class SecurityClass {
return FALSE; return FALSE;
} }
//parses our simple xacml policies checking for users or roles that are allowed to ingest /**
* parses our simple xacml policies checking for users or roles that are allowed to ingest
* @param type $policyStream
* @return type
*/
function getAllowedUsersAndRoles($policyStream) { function getAllowedUsersAndRoles($policyStream) {
$allowedRoles = array(); $allowedRoles = array();
$allowedUsers = array(); $allowedUsers = array();
$usersAndRoles = array(); $usersAndRoles = array();
try { try {
$xml = new SimpleXMLElement($policyStream); $xml = new SimpleXMLElement($policyStream);
} } catch (Exception $e) {
catch (Exception $e) { watchdog(t("Fedora_Repository"), "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' => check_plain($e->getMessage()))), 'error');
return NULL; return NULL;
} }
$xml->registerXPathNamespace('default', 'urn:oasis:names:tc:xacml:1.0:policy'); $xml->registerXPathNamespace('default', 'urn:oasis:names:tc:xacml:1.0:policy');
$conditions = $xml->xpath("//default:Condition"); $roles = $xml->xpath('//default:SubjectAttributeDesignator[@AttributeId="fedoraRole"]/../default:Apply/default:AttributeValue');
$users = $xml->xpath('//default:SubjectAttributeDesignator[@AttributeId="urn:fedora:names:fedora:2.1:subject:loginId"]/../default:Apply/default:AttributeValue');
foreach ($conditions as $condition) { if($roles) {
$designator = $condition->Apply->SubjectAttributeDesignator; foreach($roles as $role) {
if (empty($designator)) {//$disignator may be wrapped by an or $allowedRoles[] = (string)$role;
$designator=$condition->Apply->Apply->SubjectAttributeDesignator;
}
$attributeId = strip_tags($designator['AttributeId']);
if ($attributeId == "fedoraRole") {
foreach ($condition->Apply->Apply->AttributeValue as $attributeValue) {
$allowedRoles[] = strip_tags($attributeValue->asXML());
}
foreach ($condition->Apply->Apply->Apply->AttributeValue as $attributeValue) {
$allowedRoles[] = strip_tags($attributeValue->asXML());
} }
} }
if ($attributeId == "urn:fedora:names:fedora:2.1:subject:loginId") { if($users) {
foreach ($condition->Apply->Apply->AttributeValue as $attributeValue) { foreach($users as $user) {
$allowedUsers[] = strip_tags($attributeValue->asXML()); $allowedUsers[] = (string)$user;
}
foreach ($condition->Apply->Apply->Apply->AttributeValue as $attributeValue) {
$allowedUsers[] = strip_tags($attributeValue->asXML());
}
} }
} }
$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
// 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. * 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
* it probably would not be.
* @param type $user
* @return DOMDocument
*/
function createPersonalPolicy($user) { function createPersonalPolicy($user) {
$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"), "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');
foreach ($conditions as $condition) { foreach ($conditions as $condition) {
@ -200,4 +207,5 @@ class SecurityClass {
// $this->collection_policy_stream = $dom->saveXML(); // $this->collection_policy_stream = $dom->saveXML();
return $dom->saveXML(); return $dom->saveXML();
} }
} }

34
XMLDatastream.inc

@ -1,7 +1,18 @@
<?php <?php
// $Id$ /**
* @file
*
*/
/**
* @file
* XMLDatastream Abstract Class
*/
/**
* XMLDatastream class ??
*/
abstract class XMLDatastream { abstract class XMLDatastream {
static $XMLNS = 'http://www.islandora.ca'; static $XMLNS = 'http://www.islandora.ca';
@ -23,7 +34,7 @@ abstract class XMLDatastream {
} }
/** /**
* validPid * valid_pid
* Validates a fedora PID based on the regexp provided in the fedora * Validates a fedora PID based on the regexp provided in the fedora
* 3.3 documentation. * 3.3 documentation.
* http://www.fedora-commons.org/confluence/display/FCR30/Fedora+Identifiers * http://www.fedora-commons.org/confluence/display/FCR30/Fedora+Identifiers
@ -31,7 +42,7 @@ abstract class XMLDatastream {
* @param String $pid * @param String $pid
* @return boolean $valid * @return boolean $valid
*/ */
public static function validPid($pid) { public static function valid_pid($pid) {
$valid = FALSE; $valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) { if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE; $valid = TRUE;
@ -41,7 +52,7 @@ abstract class XMLDatastream {
} }
/** /**
* validDsid * valid_dsid
* Validates a fedora Dsid based on the the allowed XML standard NCName. * Validates a fedora Dsid based on the the allowed XML standard NCName.
* The regexp is a "regular" subset of names allowed, it excludes some extended hex characters that are * The regexp is a "regular" subset of names allowed, it excludes some extended hex characters that are
* technically permitted. * technically permitted.
@ -50,7 +61,7 @@ abstract class XMLDatastream {
* @param String $pid * @param String $pid
* @return boolean $valid * @return boolean $valid
*/ */
public static function validDsid($dsid) { public static function valid_dsid($dsid) {
$valid = FALSE; $valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) { if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE; $valid = TRUE;
@ -91,7 +102,7 @@ abstract class XMLDatastream {
* @return XMLDatastream $cm * @return XMLDatastream $cm
*/ */
public function __construct($xmlStr, $pid = NULL, $dsid = NULL) { public function __construct($xmlStr, $pid = NULL, $dsid = NULL) {
libxml_use_internal_errors(true); libxml_use_internal_errors(TRUE);
$this->pid = $pid; $this->pid = $pid;
$this->dsid = $dsid; $this->dsid = $dsid;
@ -180,7 +191,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 +205,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.';
} }
@ -239,7 +253,7 @@ abstract class XMLDatastream {
/** /**
* Gets the history of the datastream from fedora. * Gets the history of the datastream from fedora.
* Returns false on failure. * Returns FALSE on failure.
* *
* @return string[] $ret * @return string[] $ret
*/ */

21
api/dublin_core.inc

@ -1,13 +1,19 @@
<?php <?php
// $Id$
/*
/**
* @file
* 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
* back to XML. Inspiration and design shamelessly stolen from the pyfedora * back to XML. Inspiration and design shamelessly stolen from the pyfedora
* project at http://pypi.python.org/pypi/pyfedora/0.1.0 * project at http://pypi.python.org/pypi/pyfedora/0.1.0
*/ */
/**
* Dublin Core Class
*/
class Dublin_Core { class Dublin_Core {
public $dc = array( public $dc = array(
'dc:title' => array(), 'dc:title' => array(),
'dc:creator' => array(), 'dc:creator' => array(),
@ -41,7 +47,7 @@ class Dublin_Core {
} }
/** /**
* * Add Elements
* @param <type> $element_name * @param <type> $element_name
* @param <type> $value * @param <type> $value
*/ */
@ -67,6 +73,8 @@ class Dublin_Core {
/** /**
* Serialize this object to XML and return it. * Serialize this object to XML and return it.
* @param type $with_preamble
* @return type
*/ */
function as_xml($with_preamble = FALSE) { function as_xml($with_preamble = FALSE) {
$dc_xml = new DomDocument(); $dc_xml = new DomDocument();
@ -88,10 +96,17 @@ class Dublin_Core {
return $dc_xml->saveXML(); return $dc_xml->saveXML();
} }
/**
* Create dc from dict ( does nothing )
*/
static function create_dc_from_dict() { static function create_dc_from_dict() {
} }
/**
* Save ??
* @param type $alt_owner
*/
function save($alt_owner = NULL) { function save($alt_owner = NULL) {
$item_to_update = (!empty($alt_owner) ? $alt_owner : $this->owner); $item_to_update = (!empty($alt_owner) ? $alt_owner : $this->owner);
// My Java roots showing, trying to do polymorphism in PHP. // My Java roots showing, trying to do polymorphism in PHP.

28
api/fedora_collection.inc

@ -1,10 +1,9 @@
<?php <?php
// $Id$
/* /**
* @file
* Operations that affect a Fedora repository at a collection level. * Operations that affect a Fedora repository at a collection level.
*/ */
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');
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');
@ -13,7 +12,10 @@ module_load_include('module', 'fedora_repository');
/** /**
* Exports a fedora collection object and all of its children in a format * Exports a fedora collection object and all of its children in a format
* that will let you import them into another repository. * that will let you import them into another repository.
* @param <type> $format * @param type $collection_pid
* @param type $relationship
* @param type $format
* @return type
*/ */
function export_collection($collection_pid, $relationship = 'isMemberOfCollection', $format = 'info:fedora/fedora-system:FOXML-1.1') { function export_collection($collection_pid, $relationship = 'isMemberOfCollection', $format = 'info:fedora/fedora-system:FOXML-1.1') {
$collection_item = new Fedora_Item($collection_pid); $collection_item = new Fedora_Item($collection_pid);
@ -39,7 +41,7 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio
fwrite($file, $item_foxml); fwrite($file, $item_foxml);
fclose($file); fclose($file);
} }
if (system("cd $container;zip -r $collection_pid.zip $collection_pid/* >/dev/NULL") == 0) { if (system("cd $container;zip -r $collection_pid.zip $collection_pid/* >/dev/null") == 0) {
header("Content-type: application/zip"); header("Content-type: application/zip");
header('Content-Disposition: attachment; filename="' . $collection_pid . '.zip' . '"'); header('Content-Disposition: attachment; filename="' . $collection_pid . '.zip' . '"');
$fh = fopen($container . '/' . $collection_pid . '.zip', 'r'); $fh = fopen($container . '/' . $collection_pid . '.zip', 'r');
@ -52,7 +54,7 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio
} }
} }
else { else {
drupal_set_message("Error creating temp directory for batch export.", 'error'); drupal_set_message(t("Error creating temp directory for batch export."), 'error');
return FALSE; return FALSE;
} }
return TRUE; return TRUE;
@ -67,7 +69,6 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio
*/ */
function get_related_items_as_xml($collection_pid, $relationship = array('isMemberOfCollection'), $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') { function get_related_items_as_xml($collection_pid, $relationship = array('isMemberOfCollection'), $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$collection_item = new Fedora_Item($collection_pid);
global $user; global $user;
if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
@ -76,7 +77,7 @@ function get_related_items_as_xml($collection_pid, $relationship = array('isMemb
} }
$query_string = 'select $object $title $content from <#ri> $query_string = 'select $object $title $content from <#ri>
where ($object <dc:title> $title where ($object <fedora-model:label> $title
and $object <fedora-model:hasModel> $content and $object <fedora-model:hasModel> $content
and ('; and (';
@ -117,6 +118,17 @@ function get_related_items_as_xml($collection_pid, $relationship = array('isMemb
return $content; return $content;
} }
/**
* Get Related Items as Arrays
* @param type $collection_pid
* @param type $relationship
* @param type $limit
* @param type $offset
* @param type $active_objects_only
* @param type $cmodel
* @param type $orderby
* @return type
*/
function get_related_items_as_array($collection_pid, $relationship = 'isMemberOfCollection', $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') { function get_related_items_as_array($collection_pid, $relationship = 'isMemberOfCollection', $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') {
$content = get_related_items_as_xml($collection_pid, $relationship, $limit, $offset, $active_objects_only, $cmodel, $orderby); $content = get_related_items_as_xml($collection_pid, $relationship, $limit, $offset, $active_objects_only, $cmodel, $orderby);
if (empty($content)) { if (empty($content)) {

94
api/fedora_export.inc

@ -1,7 +1,11 @@
<?php <?php
// $Id$
/**
* @file
* Fedora Export
*/
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');
define('METS_10', 'info:fedora/fedora-system:METSFedoraExt-1.0'); define('METS_10', 'info:fedora/fedora-system:METSFedoraExt-1.0');
@ -11,6 +15,11 @@ define('ATOMZip_11', 'info:fedora/fedora-system:ATOMZip-1.1');
/** /**
* Function to to export all objects assocoiated with a given pid to the export area * Function to to export all objects assocoiated with a given pid to the export area
* @param type $pid
* @param type $foxml_dir
* @param type $ob_dir
* @param type $log
* @return type
*/ */
function export_to_export_area($pid, $foxml_dir, $ob_dir, &$log = array()) { function export_to_export_area($pid, $foxml_dir, $ob_dir, &$log = array()) {
if (!$paths = export_objects_for_pid($pid, $ob_dir, $log)) { if (!$paths = export_objects_for_pid($pid, $ob_dir, $log)) {
@ -24,6 +33,13 @@ function export_to_export_area($pid, $foxml_dir, $ob_dir, &$log = array()) {
return TRUE; return TRUE;
} }
/**
* Export objects for pids ??
* @param type $pid
* @param type $dir
* @param type $log
* @return string
*/
function export_objects_for_pid($pid, $dir, &$log) { function export_objects_for_pid($pid, $dir, &$log) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$item = new Fedora_Item($pid); $item = new Fedora_Item($pid);
@ -58,6 +74,16 @@ function export_objects_for_pid($pid, $dir, &$log) {
return $paths; return $paths;
} }
/**
* Export foxml for pid
* @param type $pid
* @param type $dir
* @param type $paths
* @param type $log
* @param type $format
* @param type $remove_islandora
* @return type
*/
function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $remove_islandora = FALSE) { function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $remove_islandora = FALSE) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$ob_helper = new ObjectHelper(); $ob_helper = new ObjectHelper();
@ -74,14 +100,14 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Remove rdf elements added during ingest (if present) // Remove rdf elements added during ingest (if present)
if ($remove_islandora) { if ($remove_islandora) {
$xpath->registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#'); $xpath->registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
$descNode = $xpath->query("//rdf:RDF/rdf:Description")->item(0); $desc_node = $xpath->query("//rdf:RDF/rdf:Description")->item(0);
if ($model = $descNode->getElementsByTagName('hasModel')->item(0)) { if ($model = $desc_node->getElementsByTagName('hasModel')->item(0)) {
$descNode->removeChild($model); $desc_node->removeChild($model);
} }
if ($member = $descNode->getElementsByTagName('rel:isMemberOfCollection')->item(0)) { if ($member = $desc_node->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
$descNode->removeChild($member); $desc_node->removeChild($member);
} }
} }
@ -95,24 +121,24 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Update datastream uris // Update datastream uris
$xpath->registerNamespace('foxml', 'info:fedora/fedora-system:def/foxml#'); $xpath->registerNamespace('foxml', 'info:fedora/fedora-system:def/foxml#');
foreach ($xpath->query("//foxml:datastream[@ID]") as $dsNode) { foreach ($xpath->query("//foxml:datastream[@ID]") as $ds_node) {
// Don't update datastreams having external uris // Don't update datastreams having external uris
if (in_array($dsNode->getAttribute('CONTROL_GROUP'), $disallowed_groups)) { if (in_array($ds_node->getAttribute('CONTROL_GROUP'), $disallowed_groups)) {
continue; continue;
} }
$dsId = $dsNode->getAttribute('ID'); $ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream // Remove QUERY datastream
if ($dsId == "QUERY") { if ($ds_id == "QUERY") {
$parentNode = $xpath->query('/foxml:digitalObject')->item(0); $parent_node = $xpath->query('/foxml:digitalObject')->item(0);
$parentNode->removeChild($dsNode); $parent_node->removeChild($ds_node);
} }
foreach ($dsNode->getElementsByTagName('*') as $contentNode) { foreach ($ds_node->getElementsByTagName('*') as $content_node) {
if ($str = $contentNode->getAttribute('REF')) { if ($str = $content_node->getAttribute('REF')) {
$contentNode->setAttribute('REF', url($paths[$dsId], array('absolute' => TRUE))); $content_node->setAttribute('REF', url($paths[$ds_id], array('absolute' => TRUE)));
} }
} }
} }
@ -122,29 +148,29 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
case METS_11: case METS_11:
// Update datastream uris // Update datastream uris
$xpath->registerNamespace('METS', 'http://www.loc.gov/METS/'); $xpath->registerNamespace('METS', 'http://www.loc.gov/METS/');
foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $dsNode) { foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $ds_node) {
$dsId = $dsNode->getAttribute('ID'); $ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream // Remove QUERY datastream
if ($dsId == "QUERY") { if ($ds_id == "QUERY") {
$parentNode = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0); $parent_node = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
$parentNode->removeChild($dsNode); $parent_node->removeChild($ds_node);
} }
$xpath->registerNamespace('xlink', 'http://www.loc.gov/METS/'); $xpath->registerNamespace('xlink', 'http://www.loc.gov/METS/');
foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $dsNode) as $Floc) { foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $ds_node) as $floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => TRUE))); $floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => TRUE)));
} }
/* /*
foreach ($dsNode->getElementsByTagName('METS:file') as $contentNode) { foreach ($ds_node->getElementsByTagName('METS:file') as $content_node) {
// Don't update datastreams having external uris // Don't update datastreams having external uris
if (in_array($dsNode->getAttribute('OWNERID'), $disallowed_groups)) { if (in_array($ds_node->getAttribute('OWNERID'), $disallowed_groups)) {
continue; continue;
} }
foreach ($xpath->('METS:FLocat[@xlink:href]', $contentNode) as $Floc) { foreach ($xpath->('METS:FLocat[@xlink:href]', $content_node) as $floc) {
$Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => true))); $floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => TRUE)));
} }
`} `}
*/ */
@ -170,10 +196,22 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
return TRUE; return TRUE;
} }
function get_file_extension($mimeType) { /**
return substr(strstr($mimeType, '/'), 1); * Get file extension
* @param type $mimeType
* @return type
*/
function get_file_extension($mime_type) {
return substr(strstr($mime_type, '/'), 1);
} }
/**
* Log line
* @param type $msg
* @param type $severity
* @param type $sep
* @return type
*/
function log_line($msg, $severity = 'info', $sep = "\t") { function log_line($msg, $severity = 'info', $sep = "\t") {
return date("Y-m-d H:i:s") . $sep . ucfirst($severity) . $sep . $msg; return date("Y-m-d H:i:s") . $sep . ucfirst($severity) . $sep . $msg;
} }

623
api/fedora_item.inc

@ -1,10 +1,16 @@
<?php <?php
// $Id$ /**
* @file
* Fedora Item
*/
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#');
define("ISLANDORA_PAGE_URI", 'info:islandora/islandora-system:def/pageinfo#');
/**
* Fedora Item Class
*/
class Fedora_Item { class Fedora_Item {
public $pid = NULL; // The $pid of the fedora object represented by an instance of this class. public $pid = NULL; // The $pid of the fedora object represented by an instance of this class.
@ -13,6 +19,22 @@ class Fedora_Item {
public $datastreams = NULL; public $datastreams = NULL;
private static $connection_helper = NULL; private static $connection_helper = NULL;
private static $instantiated_pids = array(); private static $instantiated_pids = array();
private static $SoapManagedFunctions = array(
'ingest',
'addDataStream',
'addRelationship',
'export',
'getDatastream',
'getDatastreamHistory',
'getNextPID',
'getRelationships',
'modifyDatastreamByValue',
'modifyDatastreamByReference',
'purgeDatastream',
'purgeObject',
'modifyObject',
'setDatastreamState'
);
/** /**
* Create an object to represent an item in the Fedora repository. * Create an object to represent an item in the Fedora repository.
@ -37,7 +59,7 @@ class Fedora_Item {
self::$connection_helper = new ConnectionHelper(); self::$connection_helper = new ConnectionHelper();
} }
$raw_objprofile = $this->soap_call('getObjectProfile', array('pid' => $this->pid, 'asOfDateTime' => "")); $raw_objprofile = $this->soap_call('getObjectProfile', array('pid' => $this->pid, 'asOfDateTime' => ""), TRUE);
if (!empty($raw_objprofile)) { if (!empty($raw_objprofile)) {
$this->objectProfile = $raw_objprofile->objectProfile; $this->objectProfile = $raw_objprofile->objectProfile;
@ -51,12 +73,44 @@ class Fedora_Item {
} }
} }
/**
* Forget this Object, do manually when memory constraints apply.
*
* Removes this object from the static list of $instantiated_pids
*/
function forget() {
unset(Fedora_Item::$instantiated_pids[$this->pid]);
}
/**
* Exists
* @return type
*/
function exists() { function exists() {
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) { /**
* Add datastream from file
* @param type $datastream_file
* @param type $datastream_id
* @param type $datastream_label
* @param type $datastream_mimetype
* @param type $controlGroup
* @param type $logMessage
* @return type
*/
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 (!is_file($datastream_file)) {
drupal_set_message(t('The datastream file %datastream_file could not found! (or is not a regular file...)', array('%datastream_file' => $datastream_file)), 'warning');
return;
}
elseif (!is_readable($datastream_file)) {
drupal_set_message(t('The datastream file %datastream_file could not be read! (likely due to permissions...)', array('%datastream_file' => $datastream_file)), 'warning');
return;
}
if (empty($datastream_mimetype)) { if (empty($datastream_mimetype)) {
// Get mime type from the file extension. // Get mime type from the file extension.
$mimetype_helper = new MimeClass(); $mimetype_helper = new MimeClass();
@ -76,11 +130,29 @@ 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) { /**
* Add datastream from url
* @param type $datastream_url
* @param type $datastream_id
* @param type $datastream_label
* @param type $datastream_mimetype
* @param type $controlGroup
* @param type $logMessage
* @return type
*/
function add_datastream_from_url($datastream_url, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
global $base_url;
if (empty($datastream_label)) { if (empty($datastream_label)) {
$datastream_label = $datastream_id; $datastream_label = $datastream_id;
} }
// Fedora has some problems getting files from HTTPS connections sometimes, so if we are getting a file
// from the local drupal, we try to pass a HTTP url instead of a HTTPS one.
if(stripos($datastream_url, 'https://') !== FALSE && stripos($datastream_url, $base_url) !== FALSE) {
$datastream_url = str_ireplace('https://', 'http://', $datastream_url);
}
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'dsID' => $datastream_id, 'dsID' => $datastream_id,
@ -94,16 +166,25 @@ 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) { /**
$dir = sys_get_temp_dir(); * Add datastream from string
* @param type $str
* @param type $datastream_id
* @param type $datastream_label
* @param type $datastream_mimetype
* @param type $controlGroup
* @param type $logMessage
* @return type
*/
function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = NULL) {
$dir = file_directory_temp();
$tmpfilename = tempnam($dir, 'fedoratmp'); $tmpfilename = tempnam($dir, 'fedoratmp');
$tmpfile = fopen($tmpfilename, 'w'); $tmpfile = fopen($tmpfilename, 'w');
fwrite($tmpfile, $str, strlen($str)); fwrite($tmpfile, $str, strlen($str));
@ -113,44 +194,89 @@ class Fedora_Item {
return $returnvalue; return $returnvalue;
} }
/**
* Wrapper to add new or modify existing datastream
* @global url $base_url
* @param url $external_url
* @param string $dsid
* @param string $label
* @param string $mime_type
* @param string $controlGroup
* @param boolean $force
* @param string $logMessage
* @param boolean $quiet
*/
function add_or_modify_by_reference($external_url, $dsid, $label, $mime_type, $controlGroup = 'M', $force = FALSE, $logMessage = 'Modified by Islandora API', $quiet=FALSE) {
global $base_url;
if (array_key_exists($dsid, $this->datastreams)) {
$this->modify_datastream_by_reference($external_url, $dsid, $label, $mime_type, $force, $logMessage, $quiet);
}
else {
$file_location = str_replace("$base_url/", '', $external_url);
$this->add_datastream_from_file($file_location, $dsid, $label, $mime_type, $controlGroup = 'M', $logMessage = NULL);
}
}
/** /**
* Add a relationship string to this object's RELS-EXT. * Add a relationship string to this object's RELS-EXT.
*
* does not support rels-int yet. * does not support rels-int yet.
*
* @param string $relationship * @param string $relationship
* @param <type> $object * The predicate/relationship tag to add
* @param string $object
* The object to be related to.
* @param string $namespaceURI
* The predicate namespace.
* @param boolean $literal_value
* Whether or not the object should be added as a URI (FALSE) or a literal (TRUE).
*/ */
function add_relationship($relationship, $object, $namespaceURI = RELS_EXT_URI) { function add_relationship($relationship, $object, $namespaceURI = RELS_EXT_URI, $literal_value = FALSE) {
//dd($this, 'The Fedora_Item');
$ds_list = $this->get_datastreams_list_as_array(); $ds_list = $this->get_datastreams_list_as_array();
$f_prefix = 'info:fedora/';
if (empty($ds_list['RELS-EXT'])) { if (!array_key_exists('RELS-EXT', $ds_list)) {
$this->add_datastream_from_string(' <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#"> $rdf_string = <<<RDF
<rdf:Description rdf:about="info:fedora/' . $this->pid . '"> <rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="$f_prefix{$this->pid}">
</rdf:Description> </rdf:Description>
</rdf:RDF>', 'RELS-EXT', 'Fedora object-to-object relationship metadata', 'text/xml', 'X'); </rdf:RDF>
RDF;
$this->add_datastream_from_string($rdf_string, 'RELS-EXT', 'Fedora object-to-object relationship metadata', 'application/rdf+xml', 'X');
} }
$relsext = $this->get_datastream_dissemination('RELS-EXT'); $relsext = $this->get_datastream_dissemination('RELS-EXT');
if (substr($object, 0, 12) != 'info:fedora/') { if (!$literal_value && strpos($object, $f_prefix) !== 0) {
$object = "info:fedora/$object"; $object = $f_prefix . $object;
} }
$relsextxml = new DomDocument(); $relsextxml = new DOMDocument();
$relsextxml->loadXML($relsext); $relsextxml->loadXML($relsext);
$description = $relsextxml->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'Description'); $description = $relsextxml->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'Description');
if ($description->length == 0) { if ($description->length == 0) {
//XXX: This really shouldn't be done; lower case d doesn't fit the schema. Warn users to fix the data and generators, pending deprecation.
$description = $relsextxml->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'description'); $description = $relsextxml->getElementsByTagNameNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'description');
if ($description->length > 0) {
drupal_set_message(t('RDF with lower case "d" in "description" encountered. Should be uppercase! PID: %pid', array('%pid' => $this->pid)), 'warning');
}
} }
$description = $description->item(0); $description = $description->item(0);
// Create the new relationship node. // Create the new relationship node.
$newrel = $relsextxml->createElementNS($namespaceURI, $relationship); $newrel = $relsextxml->createElementNS($namespaceURI, $relationship);
if ($literal_value) {
$newrel->appendChild($relsextxml->createTextNode($object));
}
else {
$newrel->setAttribute('rdf:resource', $object); $newrel->setAttribute('rdf:resource', $object);
}
$description->appendChild($newrel); $description->appendChild($newrel);
$this->modify_datastream_by_value($relsextxml->saveXML(), 'RELS-EXT', "Fedora Object-to-Object Relationship Metadata", 'text/xml');
return $this->modify_datastream($relsextxml->saveXML(), 'RELS-EXT', "Fedora Object-to-Object Relationship Metadata", 'application/rdf+xml');
//print ($description->dump_node()); //print ($description->dump_node());
/* /*
$params = array( 'pid' => $this->pid, $params = array( 'pid' => $this->pid,
@ -164,8 +290,55 @@ class Fedora_Item {
*/ */
} }
/**
* Purge/delete relationships string from this object's RELS-EXT.
*
* does not support rels-int yet.
*
* @param string $relationship
* The predicate/relationship tag to delete
* @param string $object
* The object to be related to. (NULL/value for which empty() evaluates to true will remove all relations of the given type, ignoring $literal_value)
* @param string $namespaceURI
* The predicate namespace.
* @param boolean $literal_value
* Whether or not the object should be looked for as a URI (FALSE) or a literal (TRUE).
* @return boolean
* Whether or not this operation has produced any changes in the RELS-EXT
*/
function purge_relationships($relationship, $object, $namespaceURI = RELS_EXT_URI, $literal_value = FALSE) {
$relsext = $this->get_datastream_dissemination('RELS-EXT');
$relsextxml = new DomDocument();
$relsextxml->loadXML($relsext);
$modified = FALSE;
$rels = $relsextxml->getElementsByTagNameNS($namespaceURI, $relationship);
if (!empty($rels)) {
foreach ($rels as $rel) {
if ( //If either no object is specified, or the object matches (in either the literal or URI case), remove this node from it's parent, and mark as changed.
empty($object) ||
(!$literal_value && $rel->getAttributeNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'resource') == $object) ||
($literal_value && $rel->textContent == $object)) {
$rel->parentNode->removeChild($rel);
$modified = TRUE;
}
}
}
//Save changes.
if ($modified) {
$this->modify_datastream($relsextxml->saveXML(), 'RELS-EXT', "Fedora Object-to-Object Relationship Metadata", 'text/xml');
}
//Return whether or not we've introduced any changes.
return $modified;
}
/** /**
* Removes the given relationship from the item's RELS-EXT and re-saves it. * Removes the given relationship from the item's RELS-EXT and re-saves it.
*
* @deprecated
* Dropped in favour of purge_relationships, which follows the same paradigm as add_relationship. This function tries to figure out the predicate URI based on the prefix/predicate given, which requires specific naming...
* @param string $relationship * @param string $relationship
* @param string $object * @param string $object
*/ */
@ -189,9 +362,18 @@ class Fedora_Item {
$relationship = "isPartOf"; $relationship = "isPartOf";
$namespaceURI = 'info:fedora/fedora-system:def/relations-external#'; $namespaceURI = 'info:fedora/fedora-system:def/relations-external#';
break; break;
case "rel:hasModel":
case "hasModel":
$relationship = "hasModel";
$namespaceURI = FEDORA_MODEL_URI;
break;
case "isPageNumber":
$relationship = "isPageNumber";
$namespaceURI = ISLANDORA_PAGE_URI;
break;
} }
if (substr($object, 0, 12) != 'info:fedora/') { if (!empty($object) && substr($object, 0, 12) != 'info:fedora/') {
$object = "info:fedora/$object"; $object = "info:fedora/$object";
} }
@ -201,19 +383,22 @@ class Fedora_Item {
$rels = $relsextxml->getElementsByTagNameNS($namespaceURI, $relationship); $rels = $relsextxml->getElementsByTagNameNS($namespaceURI, $relationship);
if (!empty($rels)) { if (!empty($rels)) {
foreach ($rels as $rel) { foreach ($rels as $rel) {
if ($rel->getAttributeNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'resource') == $object) { if (empty($object) || $rel->getAttributeNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'resource') == $object) {
$rel->parentNode->removeChild($rel); $rel->parentNode->removeChild($rel);
$modified = TRUE; $modified = TRUE;
} }
} }
} }
if ($modified) { if ($modified) {
$this->modify_datastream_by_value($relsextxml->saveXML(), 'RELS-EXT', "Fedora Object-to-Object Relationship Metadata", 'text/xml'); $this->modify_datastream($relsextxml->saveXML(), 'RELS-EXT', "Fedora Object-to-Object Relationship Metadata", 'text/xml');
} }
return $modified; return $modified;
//print ($description->dump_node());
} }
/**
* Export as foxml
* @return type
*/
function export_as_foxml() { function export_as_foxml() {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
@ -245,10 +430,10 @@ class Fedora_Item {
$i++; $i++;
$url = variable_get('fedora_base_url', 'http://localhost:8080/fedora'); $url = variable_get('fedora_base_url', 'http://localhost:8080/fedora');
if ($cursor == 0) { if ($cursor == 0) {
$url .= "/objects?query=$field~$pattern&pid=true&title=true&resultFormat=xml&maxResults=$max_results"; $url .= "/objects?query=$field~$pattern&pid=true&title=TRUE&resultFormat=xml&maxResults=$max_results";
} }
else { else {
$url .= "/objects?pid=true&title=truesessionToken=$session_token&resultFormat=xml&maxResults=$max_results"; $url .= "/objects?pid=true&title=true&sessionToken=$session_token&resultFormat=xml&maxResults=$max_results";
} }
if (count($resultFields) > 0) { if (count($resultFields) > 0) {
@ -256,7 +441,6 @@ class Fedora_Item {
} }
$resultxml = do_curl($url); $resultxml = do_curl($url);
libxml_use_internal_errors(TRUE); libxml_use_internal_errors(TRUE);
$resultelements = simplexml_load_string($resultxml); $resultelements = simplexml_load_string($resultxml);
if ($resultelements === FALSE) { if ($resultelements === FALSE) {
@ -290,13 +474,22 @@ class Fedora_Item {
return $results; return $results;
} }
function get_datastream_dissemination($dsid, $as_of_date_time = "") { /**
* Get datastream dissemination
* @param type $dsid
* @param type $as_of_date_time
* @param type $quiet
* @return null
*/
function get_datastream_dissemination($dsid, $as_of_date_time = "", $quiet=TRUE) {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'dsID' => $dsid, 'dsID' => $dsid,
'asOfDateTime' => $as_of_date_time, 'asOfDateTime' => $as_of_date_time,
); );
$object = self::soap_call('getDataStreamDissemination', $params);
// Make soap call with quite
$object = self::soap_call('getDataStreamDissemination', $params, $quiet);
if (!empty($object)) { if (!empty($object)) {
$content = $object->dissemination->stream; $content = $object->dissemination->stream;
$content = trim($content); $content = trim($content);
@ -307,7 +500,13 @@ class Fedora_Item {
return $content; return $content;
} }
function get_datastream($dsid, $as_of_date_time = "") { /**
* Get datastream
* @param type $dsid
* @param type $as_of_date_time
* @return type
*/
function get_datastream($dsid, $as_of_date_time = '') {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'dsID' => $dsid, 'dsID' => $dsid,
@ -318,6 +517,11 @@ class Fedora_Item {
return $object->datastream; return $object->datastream;
} }
/**
* Get datastream history
* @param type $dsid
* @return type
*/
function get_datastream_history($dsid) { function get_datastream_history($dsid) {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
@ -332,7 +536,15 @@ class Fedora_Item {
return $ret; return $ret;
} }
function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = null) { /**
* Get dissemination
* @param type $service_definition_pid
* @param type $method_name
* @param type $parameters
* @param type $as_of_date_time
* @return string
*/
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,
@ -390,7 +602,7 @@ class Fedora_Item {
* @return datastream object * @return datastream object
* get the mimetype size etc. in one shot. instead of iterating throught the datastream list for what we need * get the mimetype size etc. in one shot. instead of iterating throught the datastream list for what we need
*/ */
function get_datastream_info($dsid, $as_of_date_time = "") { function get_datastream_info($dsid, $as_of_date_time = '') {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'dsID' => $dsid, 'dsID' => $dsid,
@ -423,7 +635,7 @@ class Fedora_Item {
// datastream, instead of returning it as an array, only // datastream, instead of returning it as an array, only
// the single item will be returned directly. We have to // the single item will be returned directly. We have to
// check for this. // check for this.
if (count($this->datastreams_list->datastreamDef) >= 2) { if (count($this->datastreams_list->datastreamDef) > 1) {
foreach ($this->datastreams_list->datastreamDef as $ds) { foreach ($this->datastreams_list->datastreamDef as $ds) {
if (!is_object($ds)) { if (!is_object($ds)) {
print_r($ds); print_r($ds);
@ -476,7 +688,7 @@ class Fedora_Item {
try { try {
$relsext = $this->get_datastream_dissemination('RELS-EXT'); $relsext = $this->get_datastream_dissemination('RELS-EXT');
} catch (exception $e) { } catch (exception $e) {
drupal_set_message("Error retrieving RELS-EXT of object $pid", 'error'); drupal_set_message(t("Error retrieving RELS-EXT of object $pid"), 'error');
return $relationships; return $relationships;
} }
@ -485,7 +697,6 @@ class Fedora_Item {
$relsextxml->loadXML($relsext); $relsextxml->loadXML($relsext);
$relsextxml->normalizeDocument(); $relsextxml->normalizeDocument();
$rels = $relsextxml->getElementsByTagNameNS('info:fedora/fedora-system:def/relations-external#', '*'); $rels = $relsextxml->getElementsByTagNameNS('info:fedora/fedora-system:def/relations-external#', '*');
foreach ($rels as $child) { foreach ($rels as $child) {
if (empty($relationship) || preg_match("/$relationship/", $child->tagName)) { if (empty($relationship) || preg_match("/$relationship/", $child->tagName)) {
$relationships[] = array( $relationships[] = array(
@ -495,12 +706,42 @@ class Fedora_Item {
); );
} }
} }
return $relationships;
}
function get_rdf_relationships() {
$relationships = array();
try {
$relsext = $this->get_datastream_dissemination('RELS-EXT');
} catch (exception $e) {
drupal_set_message(t('Error retrieving RELS-EXT of object %pid.', array('%pid' => $pid)), 'error');
return $relationships; return $relationships;
//$children = $relsextxml->RDF->description; }
//$children = $relsextxml->RDF->description;
//$params = array( 'pid' => $this->pid, // Parse the RELS-EXT into an associative array.
// 'relationship' => 'NULL' ); $relsextxml = new DOMDocument();
//return $this->soap_call( 'getRelationships', $params ); $relsextxml->loadXML($relsext);
$relsextxml->normalizeDocument();
$allTags = array();
$allTags[] = $relsextxml->getElementsByTagNameNS(RELS_EXT_URI, '*');
$allTags[] = $relsextxml->getElementsByTagNameNS(FEDORA_MODEL_URI, '*');
$allTags[] = $relsextxml->getElementsByTagNameNS(ISLANDORA_PAGE_URI, '*');
foreach ($allTags as $tags) {
foreach ($tags as $child) {
$value = preg_replace('/info:fedora\//','',$child->getAttributeNS('http://www.w3.org/1999/02/22-rdf-syntax-ns#', 'resource'));
$relationships[$child->tagName][] = $value;
}
}
return $relationships;
}
function get_models() {
//This is/was formerly just a copy/paste jobbie, without the parameter being passable...
return $this->get_relationships();
} }
/** /**
@ -517,7 +758,7 @@ class Fedora_Item {
foreach ($relationships as $rel) { foreach ($relationships as $rel) {
if (empty($rel['subject']) || empty($rel['predicate']) || empty($rel['object']) || $rel['subject'] != 'info:fedora/' . $this->pid) { if (empty($rel['subject']) || empty($rel['predicate']) || empty($rel['object']) || $rel['subject'] != 'info:fedora/' . $this->pid) {
// drupal_set_message should use parameterized variables, not interpolated. // drupal_set_message should use parameterized variables, not interpolated.
drupal_set_message("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object'], "error"); drupal_set_message(t("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object']), "error");
return FALSE; return FALSE;
} }
} }
@ -528,19 +769,59 @@ class Fedora_Item {
return FALSE; return FALSE;
} }
/**
* Set the object to a deleted state
*/
function move_to_trash($log_message = 'Flagged deleted using Islandora API.') {
// Loop through the datastreams and mark them deleted
foreach ($this->get_datastreams_list_as_array() as $dsid) {
$this->set_datastream_state($dsid, 'D');
}
// Create a message to mark the object deleted
$params = array(
'pid' => $this->pid,
'state' => 'D',
'logMessage' => $logMessage,
'label' => $this->objectProfile->objLabel,
'ownerId' => null,
);
// Send message to mark the object deleted
return self::soap_call('modifyObject', $params, $quiet);
}
/** /**
* Removes this object form the repository. * Removes this object form the repository.
* @param type $log_message
* @param type $force
* @return type
*/ */
function purge($log_message = 'Purged using Islandora API.', $force = FALSE) { function purge($log_message = 'Purged using Islandora API.', $force = FALSE) {
// Flag the object to be deleted first
$this->move_to_trash($log_message);
// Create the delete message
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
'logMessage' => $log_message, 'logMessage' => $log_message,
'force' => $force 'force' => $force
); );
// Delete the object
return $this->soap_call('purgeObject', $params); return $this->soap_call('purgeObject', $params);
} }
/**
* Purge datastream
* @param type $dsID
* @param type $start_date
* @param type $end_date
* @param type $log_message
* @param type $force
* @return type
*/
function purge_datastream($dsID, $start_date = NULL, $end_date = NULL, $log_message = 'Purged datastream using Islandora API', $force = FALSE) { function purge_datastream($dsID, $start_date = NULL, $end_date = NULL, $log_message = 'Purged datastream using Islandora API', $force = FALSE) {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
@ -553,16 +834,27 @@ class Fedora_Item {
return $this->soap_call('purgeDatastream', $params); return $this->soap_call('purgeDatastream', $params);
} }
/**
* URL
* @global type $base_url
* @return type
*/
function url() { function url() {
global $base_url; return url('fedora/repository/' . $this->pid . (!empty($this->objectProfile) ? '/-/' . drupal_urlencode($this->objectProfile->objLabel) : ''), array(
return $base_url . '/fedora/repository/' . $this->pid . (!empty($this->objectProfile) ? '/-/' . drupal_urlencode($this->objectProfile->objLabel) : ''); 'absolute' => TRUE
));
} }
/**
* Get Next PID in Namespace
* @param type $pid_namespace
* @return type
*/
static function get_next_PID_in_namespace($pid_namespace = '') { static function get_next_PID_in_namespace($pid_namespace = '') {
if (empty($pid_namespace)) { if (empty($pid_namespace)) {
// Just get the first one in the config settings. // Just get the first one in the config settings.
$allowed_namespaces = explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: ')); $allowed_namespaces = explode(" ", variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: '));
$pid_namespace = $allowed_namespaces[0]; $pid_namespace = $allowed_namespaces[0];
if (!empty($pid_namespace)) { if (!empty($pid_namespace)) {
$pid_namespace = substr($pid_namespace, 0, strpos($pid_namespace, ":")); $pid_namespace = substr($pid_namespace, 0, strpos($pid_namespace, ":"));
@ -581,18 +873,37 @@ class Fedora_Item {
return $result->pid; return $result->pid;
} }
static function ingest_from_FOXML($foxml) { /**
$params = array('objectXML' => $foxml->saveXML(), 'format' => "info:fedora/fedora-system:FOXML-1.1", 'logMessage' => "Fedora Object Ingested"); * ingest from FOXML
* @param type $foxml
* @return Fedora_Item
*/
static function ingest_from_FOXML(DOMDocument $foxml) {
$params = array(
'objectXML' => $foxml->saveXML(),
'format' => 'info:fedora/fedora-system:FOXML-1.1',
'logMessage' => 'Fedora Object Ingested'
);
$object = self::soap_call('ingest', $params); $object = self::soap_call('ingest', $params);
//dd($object, 'Soap return');
return new Fedora_Item($object->objectPID); return new Fedora_Item($object->objectPID);
} }
/**
* ingest from FOXML file
* @param type $foxml_file
* @return type
*/
static function ingest_from_FOXML_file($foxml_file) { static function ingest_from_FOXML_file($foxml_file) {
$foxml = new DOMDocument(); $foxml = new DOMDocument();
$foxml->load($foxml_file); $foxml->load($foxml_file);
return self::ingest_from_FOXML($foxml); return self::ingest_from_FOXML($foxml);
} }
/**
* ingest from FOXML files in directory
* @param type $path
*/
static function ingest_from_FOXML_files_in_directory($path) { static function ingest_from_FOXML_files_in_directory($path) {
// Open the directory // Open the directory
$dir_handle = @opendir($path); $dir_handle = @opendir($path);
@ -612,7 +923,16 @@ class Fedora_Item {
closedir($dir_handle); closedir($dir_handle);
} }
function modify_object($label = '', $state = null, $ownerId = null, $logMessage = 'Modified by Islandora API', $quiet=TRUE) { /**
* Modify Object
* @param type $label
* @param type $state
* @param type $ownerId
* @param type $logMessage
* @param type $quiet
* @return type
*/
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,
@ -625,6 +945,84 @@ class Fedora_Item {
return self::soap_call('modifyObject', $params, $quiet); return self::soap_call('modifyObject', $params, $quiet);
} }
/**
* Wrap modify by value and reference
*
* Wrap modify by value and reference, so that the proper one gets called in the correct instance. (value if inline XML, reference otherwise)
*
* First tries to treat the passed in value as a filename, tries using as contents second.
* Coerces the data into what is required, and passes it on to the relevant function.
*
* @param string $filename_or_content
* Either a filename to add, or an string of content.
* @param string $dsid
* The DSID to update
* @param string $label
* A label to withwhich to update the datastream
* @param string $mime_type
* Mimetype for the data being pushed into the datastream
* @param boolean $force
* Dunno, refer to underlying functions/SOAP interface. We just pass it like a chump.
* @param string $logMessage
* A message for the audit log.
* @param boolean $quiet
* Error suppression? Refer to soap_call for usage (just passed along here).
*/
function modify_datastream($filename_or_content, $dsid, $label, $mime_type, $force = FALSE, $logMessage='Modified by Islandora API', $quiet=FALSE) {
$toReturn = NULL;
//Determine if it's inline xml; if it is, modify by value
if ($this->get_datastream($dsid)->controlGroup === 'X') {
$content = '<null/>';
if (is_file($filename_or_content) && is_readable($filename_or_content)) {
$content = file_get_contents($filename_or_content);
}
else {
$content = $filename_or_content;
}
$toReturn = $this->modify_datastream_by_value($content, $dsid, $label, $mime_type, $force, $logMessage);
}
//Otherwise, write to web-accessible temp file and modify by reference.
else {
$file = '';
$created_temp = FALSE;
if (is_file($filename_or_content) && is_readable($filename_or_content)) {
$file = $filename_or_content;
$original_path = $file;
// Temporarily move file to a web-accessible location.
file_copy($file, file_directory_path());
$created_temp = ($original_path != $file);
}
else {
//Push contents to a web-accessible file
$file = file_save_data($filename_or_content, file_directory_path());
$created_temp = TRUE;
}
$file_url = file_create_url($file);
$toReturn = $this->modify_datastream_by_reference($file_url, $dsid, $label, $mime_type, $force, $logMessage);
if ($created_temp && is_file($file) && is_writable($file)) {
file_delete($file);
}
}
return $toReturn;
}
/**
* Modify datastream by reference
* @param type $external_url
* @param type $dsid
* @param type $label
* @param type $mime_type
* @param type $force
* @param type $logMessage
* @param type $quiet
* @return type
*/
function modify_datastream_by_reference($external_url, $dsid, $label, $mime_type, $force = FALSE, $logMessage = 'Modified by Islandora API', $quiet=FALSE) { function modify_datastream_by_reference($external_url, $dsid, $label, $mime_type, $force = FALSE, $logMessage = 'Modified by Islandora API', $quiet=FALSE) {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
@ -642,6 +1040,17 @@ class Fedora_Item {
return self::soap_call('modifyDatastreamByReference', $params, $quiet); return self::soap_call('modifyDatastreamByReference', $params, $quiet);
} }
/**
* Modify datastream by value
* @param type $content
* @param type $dsid
* @param type $label
* @param type $mime_type
* @param type $force
* @param type $logMessage
* @param type $quiet
* @return type
*/
function modify_datastream_by_value($content, $dsid, $label, $mime_type, $force = FALSE, $logMessage = 'Modified by Islandora API', $quiet=FALSE) { function modify_datastream_by_value($content, $dsid, $label, $mime_type, $force = FALSE, $logMessage = 'Modified by Islandora API', $quiet=FALSE) {
$params = array( $params = array(
'pid' => $this->pid, 'pid' => $this->pid,
@ -659,68 +1068,63 @@ class Fedora_Item {
return self::soap_call('modifyDatastreamByValue', $params, $quiet); return self::soap_call('modifyDatastreamByValue', $params, $quiet);
} }
static function soap_call($function_name, $params_array, $quiet = FALSE) { function set_datastream_state($dsid, $state, $log_message = 'Modified by Islandora API', $quiet = FALSE) {
$valid_states = array('A', 'D', 'I');
if (array_search($state, $valid_states) !== FALSE) {
$params = array(
'pid' => $this->pid,
'dsID' => $dsid,
'dsState' => $state,
'logMessage' => $log_message,
);
return self::soap_call('setDatastreamState', $params, $quiet);
}
}
/**
* Make a soap call to the fedora API.
*
* @param string $function
* The name of the soap function to call.
* @param array $parameters
* Paramters to pass onto the soap call
* @param boolean $quiet
* If TRUE suppress drupal messages.
*
* @return mixed
* The return value from the soap function if successful, NULL otherwise.
*/
static function soap_call($function, $parameters, $quiet = FALSE) {
if (!self::$connection_helper) { if (!self::$connection_helper) {
module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
self::$connection_helper = new ConnectionHelper(); self::$connection_helper = new ConnectionHelper();
} }
switch ($function_name) { $url = (
case 'ingest': in_array($function, self::$SoapManagedFunctions)?
case 'addDataStream': variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M') :
case 'addRelationship': variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl')
case 'export': );
case 'getDatastream':
case 'getDatastreamHistory':
case 'getNextPID':
case 'getRelationships':
case 'modifyDatastreamByValue':
case 'modifyDatastreamByReference':
case 'purgeDatastream':
case 'purgeObject':
case 'modifyObject':
$soap_client = self::$connection_helper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'));
try { try {
if (!empty($soap_client)) { $soap_client = self::$connection_helper->getSoapClient($url);
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array)); if (isset($soap_client)) {
$result = $soap_client->__soapCall($function, array('parameters' => $parameters));
} }
else { else {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
return NULL;
}
} catch (exception $e) {
if (!$quiet) { if (!$quiet) {
drupal_set_message(t('Error trying to get SOAP client connection'));
if (preg_match('/org\.fcrepo\.server\.security\.xacml\.pep\.AuthzDeniedException/', $e->getMessage())) {
drupal_set_message(t('Error: Insufficient permissions to call SOAP function !fn.', array('!fn' => $function_name)), 'error');
}
else {
drupal_set_message(t("Error trying to call SOAP function $function_name. Check watchdog logs for more information."), 'error');
}
watchdog(t("FEDORA_REPOSITORY"), t("Error Trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR);
}
return NULL;
} }
break; watchdog('fedora_repository', 'Error trying to get SOAP client connection.');
default:
try {
$soap_client = self::$connection_helper->getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'));
if (!empty($soap_client)) {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
}
else {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
return NULL; return NULL;
} }
} catch (exception $e) { } catch (Exception $e) {
if (!$quiet) { if (!$quiet) {
watchdog(t("FEDORA_REPOSITORY"), t("Error trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR); preg_match('/org\.fcrepo\.server\.security\.xacml\.pep\.AuthzDeniedException/', $e->getMessage()) ?
drupal_set_message(t('Insufficient permissions to call SOAP function "%func".', array('%func' => $function)), 'error') :
drupal_set_message(t('Error trying to call SOAP function "%func". Check watchdog logs for more information.', array('%func' => $function)), 'error');
} }
watchdog('fedora_repository', 'Error Trying to call SOAP function "%func". Exception: @e in @f(@l)\n@t', array('%func' => $function, '@e' => $e->getMessage(), '@f' => $e->getFile(), '@l' => $e->getLine(), '@t' => $e->getTraceAsString()), NULL, WATCHDOG_ERROR);
return NULL; return NULL;
} }
}
return $result; return $result;
} }
@ -730,6 +1134,9 @@ class Fedora_Item {
* *
* @param string $pid if none given, getnextpid will be called. * @param string $pid if none given, getnextpid will be called.
* @param string $state The initial state, A - Active, I - Inactive, D - Deleted * @param string $state The initial state, A - Active, I - Inactive, D - Deleted
* @param type $label
* @param type $owner
* @return DOMDocument
*/ */
static function create_object_FOXML($pid = '', $state = 'A', $label = 'Untitled', $owner = '') { static function create_object_FOXML($pid = '', $state = 'A', $label = 'Untitled', $owner = '') {
$foxml = new DOMDocument("1.0", "UTF-8"); $foxml = new DOMDocument("1.0", "UTF-8");
@ -747,25 +1154,23 @@ class Fedora_Item {
} }
} }
$root_element = $foxml->createElement("foxml:digitalObject"); $root_element = $foxml->createElementNS("info:fedora/fedora-system:def/foxml#", "foxml:digitalObject");
$root_element->setAttribute("VERSION", "1.1"); $root_element->setAttribute("VERSION", "1.1");
$root_element->setAttribute("PID", $pid); $root_element->setAttribute("PID", $pid);
$root_element->setAttribute("xmlns:foxml", "info:fedora/fedora-system:def/foxml#"); $root_element->setAttributeNS("http://www.w3.org/2001/XMLSchema-instance", "xsi:schemaLocation", "info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd");
$root_element->setAttribute("xmlns:xsl", "http://www.w3.org/2001/XMLSchema-instance");
$root_element->setAttribute("xsl:schemaLocation", "info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd");
$foxml->appendChild($root_element); $foxml->appendChild($root_element);
// FOXML object properties section // FOXML object properties section
$object_properties = $foxml->createElement("foxml:objectProperties"); $object_properties = $foxml->createElementNS("info:fedora/fedora-system:def/foxml#", "foxml:objectProperties");
$state_property = $foxml->createElement("foxml:property"); $state_property = $foxml->createElementNS("info:fedora/fedora-system:def/foxml#", "foxml:property");
$state_property->setAttribute("NAME", "info:fedora/fedora-system:def/model#state"); $state_property->setAttribute("NAME", "info:fedora/fedora-system:def/model#state");
$state_property->setAttribute("VALUE", $state); $state_property->setAttribute("VALUE", $state);
$label_property = $foxml->createElement("foxml:property"); $label_property = $foxml->createElementNS("info:fedora/fedora-system:def/foxml#", "foxml:property");
$label_property->setAttribute("NAME", "info:fedora/fedora-system:def/model#label"); $label_property->setAttribute("NAME", "info:fedora/fedora-system:def/model#label");
$label_property->setAttribute("VALUE", $label); $label_property->setAttribute("VALUE", $label);
$owner_property = $foxml->createElement("foxml:property"); $owner_property = $foxml->createElementNS("info:fedora/fedora-system:def/foxml#", "foxml:property");
$owner_property->setAttribute("NAME", "info:fedora/fedora-system:def/model#ownerId"); $owner_property->setAttribute("NAME", "info:fedora/fedora-system:def/model#ownerId");
$owner_property->setAttribute("VALUE", $owner); $owner_property->setAttribute("VALUE", $owner);
@ -774,14 +1179,26 @@ class Fedora_Item {
$object_properties->appendChild($owner_property); $object_properties->appendChild($owner_property);
$root_element->appendChild($object_properties); $root_element->appendChild($object_properties);
$foxml->appendChild($root_element); $foxml->appendChild($root_element);
return $foxml; return $foxml;
} }
/**
* ingest new item
* @param type $pid
* @param type $state
* @param type $label
* @param type $owner
* @return type
*/
static function ingest_new_item($pid = '', $state = 'A', $label = '', $owner = '') { static function ingest_new_item($pid = '', $state = 'A', $label = '', $owner = '') {
return self::ingest_from_FOXML(self::create_object_FOXML($pid, $state, $label, $owner)); return self::ingest_from_FOXML(self::create_object_FOXML($pid, $state, $label, $owner));
} }
/**
* fedora item exists
* @param type $pid
* @return type
*/
static function fedora_item_exists($pid) { static function fedora_item_exists($pid) {
$item = new Fedora_Item($pid); $item = new Fedora_Item($pid);
return $item->exists(); return $item->exists();

231
api/fedora_utils.inc

@ -1,14 +1,23 @@
<?php <?php
// $Id$
// @file fedora_utils.inc
// Base utilities used by the Islansora fedora module.
/*
* Functions that emulate php5.3 functionality for backwards compatiablity /**
* @file
* Base utilities used by the Islandora fedora module.
*/ */
if (!function_exists('str_getcsv')) { if (!function_exists('str_getcsv')) {
function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=null, $eol=null) {
/**
* Functions that emulate php5.3 functionality for backwards compatiablity
* @param type $input
* @param type $delimiter
* @param type $enclosure
* @param type $escape
* @param type $eol
* @return type
*/
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,19 +25,79 @@ if (!function_exists('str_getcsv')) {
fclose($temp); fclose($temp);
return $r; return $r;
} }
} }
/*
* Functions that emulate php5.3 functionality for backwards compatiablity
*/
/* /**
* Static functions used by the Fedora PHP API. *
* Utility method to get data from a url location using curl_exec and return
*
* This method takes identical parameters to do_curl_ext and passes them
* directly to do_curl_ext. The output from do_curl_ext is processed into
* either a TRUE, FALSE, or NULL value.
*
* This method exists for historical reasons as existing code makes use of
* do_curl directly and expects a simple return value and not an array.
*
* @param $url
* URL to be accessed by the function
* @param $return_to_variable
* Indicates whether the resource accessed by the curl call (HTML page,
* XML page, etc.) is returned directly from the function to the calling
* program or if it is sent directly to output.
* @param $number_of_post_vars
* Number of variable sot be posted
* @param $post
* Whether the curl_exec is done as a "get" or a "post"
*
* @return
* TRUE, FALSE, NULL, or the data returned from accessing the URL
*/ */
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) {
$return_array = do_curl_ext($url, $return_to_variable, $number_of_post_vars, $post);
return ($return_array != NULL) ? $return_array[0] : NULL;
}
/**
*
* Utility method to get data from a url location using curl_exec
*
* This method takes a URL and three associated parameters and initializes the
* structure required to make a call to curl_exec. As a part of the
* initialization the permissions associated with the (global) user are added
* to the call. This ensures access to any potentially user restricted URLs.
*
* Various defaults are used for the parameters required by curl_exec including
* the user agent and timeout. These are hard-coded.
*
* @param $url
* URL to be accessed by the function
* @param $return_to_variable
* Indicates whether the resource accessed by the curl call (HTML page,
* XML page, etc.) is returned directly from the function to the calling
* program or if it is sent directly to output.
* @param $number_of_post_vars
* Number of variable sot be posted
* @param $post
* Whether the curl_exec is done as a "get" or a "post"
*
* @return
* an array that consists of three value or NULL if curl is not suported:
* - element 0:
* The value returned from the curl_exec function call.
* This is either a boolean value or the actual data returned from
* accessing the URL.
* - element 1:
* The error code reslting from attempting to access the URL with curl_exec
* - element 2:
* A string representing a textual representation of the error code that
* resulted from attempting to access the URL with curl_exec
*/
function do_curl_ext($url, $return_to_variable = TRUE, $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.
// If the user is not valid for a Fedora call curl will throw an exception.
if ((!isset($user)) || $user->uid == 0) { if ((!isset($user)) || $user->uid == 0) {
$fedora_user = 'anonymous'; $fedora_user = 'anonymous';
$fedora_pass = 'anonymous'; $fedora_pass = 'anonymous';
@ -44,7 +113,7 @@ function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, FALSE);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE); curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, FALSE);
curl_setopt($ch, CURLOPT_FAILONERROR, TRUE); // Fail on errors curl_setopt($ch, CURLOPT_FAILONERROR, TRUE); // Fail on errors
curl_setopt($ch, CURLOPT_FOLLOWLOCATION, 1); // allow redirects curl_setopt($ch, CURLOPT_FOLLOWLOCATION, TRUE); // allow redirects
curl_setopt($ch, CURLOPT_TIMEOUT, 90); // times out after 90s curl_setopt($ch, CURLOPT_TIMEOUT, 90); // times out after 90s
curl_setopt($ch, CURLOPT_USERAGENT, $user_agent); curl_setopt($ch, CURLOPT_USERAGENT, $user_agent);
curl_setopt($ch, CURLOPT_RETURNTRANSFER, $return_to_variable); // return into a variable curl_setopt($ch, CURLOPT_RETURNTRANSFER, $return_to_variable); // return into a variable
@ -55,7 +124,12 @@ function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post
curl_setopt($ch, CURLOPT_POST, $number_of_post_vars); curl_setopt($ch, CURLOPT_POST, $number_of_post_vars);
curl_setopt($ch, CURLOPT_POSTFIELDS, "$post"); curl_setopt($ch, CURLOPT_POSTFIELDS, "$post");
} }
return curl_exec($ch);
$ret_val = curl_exec($ch);
$error_code = curl_errno($ch);
$error_string = curl_error($ch);
return array($ret_val, $error_code, $error_string);
} }
else { else {
if (function_exists(drupal_set_message)) { if (function_exists(drupal_set_message)) {
@ -65,13 +139,25 @@ function do_curl($url, $return_to_variable = 1, $number_of_post_vars = 0, $post
} }
} }
/**
* Fedora available
* @return type
*/
function fedora_available() { function fedora_available() {
$response = do_curl(variable_get('fedora_base_url', 'http://localhost:8080/fedora').'/describe'); $response = do_curl_ext(variable_get('fedora_base_url', 'http://localhost:8080/fedora') . '/describe');
return strstr($response, 'Repository Information HTML Presentation') !== FALSE; return ($response != NULL) ? ($response[1] == 0) : FALSE;
} }
/**
* Resource index search available
* @return type
*/
function risearch_available() {
$response = do_curl_ext(variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'));
return ($response != NULL) ? ($response[1] == 0) : 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.
@ -88,7 +174,12 @@ function fix_encoding($in_str) {
} }
} }
function validPid($pid) { /**
* valid pid ??
* @param type $pid
* @return boolean
*/
function valid_pid($pid) {
$valid = FALSE; $valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) { if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE; $valid = TRUE;
@ -97,7 +188,12 @@ function validPid($pid) {
return $valid; return $valid;
} }
function validDsid($dsid) { /**
* Valid Dsid ??
* @param type $dsid
* @return boolean
*/
function valid_dsid($dsid) {
$valid = FALSE; $valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) { if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE; $valid = TRUE;
@ -106,7 +202,12 @@ function validDsid($dsid) {
return $valid; return $valid;
} }
function fixDsid($dsid) { /**
* fixDsid ??
* @param type $dsid
* @return string
*/
function fix_dsid($dsid) {
$new_dsid = trim($dsid); $new_dsid = trim($dsid);
$find = '/[^a-zA-Z0-9\.\_\-]/'; $find = '/[^a-zA-Z0-9\.\_\-]/';
@ -123,6 +224,94 @@ function fixDsid($dsid) {
$new_dsid = 'item' . rand(1, 100); $new_dsid = 'item' . rand(1, 100);
return $new_dsid; return $new_dsid;
}
/**
* Function: get_collections_as_option_array
*
* Description: Returns an associative array of all collection objects in Fedora instance
*
* @return array
*/
function get_collections_as_option_array() {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
$restricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
$allowed_string = variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora:');
$namespaces = explode(':', $allowed_string);
$query = 'select $object $title from <#ri>
where ($object <fedora-model:label> $title
and $object <info:fedora/fedora-system:def/model#hasModel> <info:fedora/islandora:collectionCModel>
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title';
$url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch');
$url .= "?type=tuples&flush=TRUE&format=csv&limit=1000&lang=itql&stream=on&query=";
$content = do_curl($url . htmlentities(urlencode($query)));
$list = explode("\n", $content);
array_shift($list);
$list = preg_replace('/info:fedora\//', '', $list);
foreach ($namespaces as $namespace) {
$trimmed_names[] = trim($namespace);
}
$options = array();
foreach ($list as $item) { //removes blanks
if ($item) {
$parts = explode(',', $item);
$namespace = explode(':', $parts[0]);
$namespace = trim($namespace[0]);
$bool = in_array($namespace, $trimmed_names);
if (!$restricted || in_array($namespace, $trimmed_names)) {
$options[$parts[0]] = $parts[1];
}
}
}
unset($options['islandora:ContentModelCollection']);
return $options;
} }
/**
* Function: get_content_models_as_option_array
*
* Description: Returns an associative array of all available content models in Fedora instance
*
* @return array
*/
function get_content_models_as_option_array() {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
$restricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
$allowed_string = variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora:');
$namespaces = explode(':', $allowed_string);
foreach ($namespaces as $namespace) {
if ($namespace) {
$allowed[] = trim($namespace);
}
}
$query = 'select $object $title from <#ri>
where ($object <fedora-model:label> $title
and ($object <fedora-model:hasModel> <info:fedora/fedora-system:ContentModel-3.0>
or $object <fedora-rels-ext:isMemberOfCollection> <info:fedora/islandora:ContentModelsCollection>)
and $object <fedora-model:state> <info:fedora/fedora-system:def/model#Active>)
order by $title';
$url = variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch');
$url .= "?type=tuples&flush=TRUE&format=csv&limit=1000&lang=itql&stream=on&query=";
$content = do_curl($url . htmlentities(urlencode($query)));
$list = explode("\n", $content);
array_shift($list);
$list = preg_replace('/info:fedora\//', '', $list);
foreach ($list as $item) { //removes blanks
if ($item) {
$parts = explode(',', $item);
$nameparts = explode(':', $parts[0]);
if (!$restricted || in_array($nameparts[0], $allowed)) {
if (!preg_match('/fedora-system/', $nameparts[0])) {
$options[$parts[0]] = $parts[1] . ' ~ ' . $parts[0];
}
}
}
}
return $options;
}

21
api/rels-ext.inc

@ -1,21 +1,20 @@
<?php <?php
// $Id$
/*
* To change this template, choose Tools | Templates
* and open the template in the editor. /**
* @file
* RelsExt class
*/ */
/** /**
* Description of relsext * RelsExt class
*
* @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
/** /**
* Constructor that builds itself by retrieving the RELS-EXT stream from * Constructor that builds itself by retrieving the RELS-EXT stream from
@ -24,9 +23,12 @@ class RelsExt {
*/ */
function RelsExt($item) { function RelsExt($item) {
$relsextxml = $item->get_datastream_dissemination('RELS-EXT'); $relsextxml = $item->get_datastream_dissemination('RELS-EXT');
} }
/**
* modified
* @return type
*/
function modified() { function modified() {
return!(empty(array_diff($this->relsExtArray, $this->originalRelsExtArray)) && return!(empty(array_diff($this->relsExtArray, $this->originalRelsExtArray)) &&
empty(array_diff($this->originalRelsExtArray, $this->relsExtArray))); empty(array_diff($this->originalRelsExtArray, $this->relsExtArray)));
@ -39,5 +41,6 @@ class RelsExt {
function save() { function save() {
} }
} }

27
api/tagging.inc

@ -1,20 +1,25 @@
<?php <?php
// $Id$
/*
* @file tagging.inc
/**
* @file
* TagSet Class
*/ */
/** /**
* Description of tagging * TagSet Class
*
* @author aoneill
*/ */
class TagSet { class TagSet {
public $tags = array(); public $tags = array();
public $item = NULL; public $item = NULL;
public $tagsDSID = 'TAGS'; public $tagsDSID = 'TAGS';
/**
* Constructor
* @param type $item
*/
function TagSet($item = NULL) { function TagSet($item = NULL) {
if (!empty($item) && get_class($item) == 'Fedora_Item') { if (!empty($item) && get_class($item) == 'Fedora_Item') {
$this->item = $item; $this->item = $item;
@ -22,6 +27,10 @@ class TagSet {
} }
} }
/**
* Load ??
* @return type
*/
function load() { function load() {
$tagsxml = isset($this->item->datastreams[$this->tagsDSID]) ? $this->item->get_datastream_dissemination($this->tagsDSID) : NULL; $tagsxml = isset($this->item->datastreams[$this->tagsDSID]) ? $this->item->get_datastream_dissemination($this->tagsDSID) : NULL;
if (empty($tagsxml)) { if (empty($tagsxml)) {
@ -59,11 +68,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(t('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'
});

218
content_models/BASIC_AUDIO.xml

@ -1,218 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<content_model name="standard_qt">
<mimetypes>
<type>video/quicktime</type>
</mimetypes>
<display_in_fieldset>
<datastream id="OBJ">
<method>
<file>plugins/qt_viewer.inc</file>
<class_name>ShowQtStreamsInFieldSets</class_name>
<method_name>showQt</method_name>
</method>
</datastream>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
</display_in_fieldset>
<!-- ingest rules element is required and must have a rule that applies to the mimetypes above or ingest will fail even if the rule has no methods-->
<ingest_rules>
<rule>
<applies_to>
video/quicktime
</applies_to>
<methods/>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/QtFormBuilder.php</file>
<class_name>QtFormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Title/Caption/Video Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the Video</description>
<required>true</required>
</element>
<element>
<label>Creator/</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
<authoritative_list>
<item>
<field>home recording</field>
<value>home recording</value>
</item>
<item>
<field>meeting</field>
<value>meeting</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
</authoritative_list>
</element>
<element>
<label>Description of Video</label>
<name>dc:description</name>
<type>textarea</type>
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
<required>true</required>
</element>
<element>
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element>
<element>
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element>
<element>
<label>Resource Type</label>
<name>dc:type</name>
<type>select</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
<authoritative_list>
<item>
<field>none</field>
<value>none</value>
</item>
<item>
<field>video</field>
<value>video</value>
</item>
<item>
<field>event</field>
<value>event</value>
</item>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>interactive resource</field>
<value>interactive resource</value>
</item>
<item>
<field>model</field>
<value>model</value>
</item>
<item>
<field>party</field>
<value>party</value>
</item>
<item>
<field>physical object</field>
<value>physical object</value>
</item>
<item>
<field>place</field>
<value>place</value>
</item>
<item>
<field>service</field>
<value>service</value>
</item>
<item>
<field>software</field>
<value>software</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
<item>
<field>text</field>
<value>text</value>
</item>
</authoritative_list>
</element>
<element>
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element>
<element>
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element>
<element>
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list>
<item>
<field>eng</field>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list>
</element>
<element>
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description>
<required>false</required>
</element>
<element>
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

218
content_models/BASIC_VIDEO.xml

@ -1,218 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<content_model name="standard_qt">
<mimetypes>
<type>video/quicktime</type>
</mimetypes>
<display_in_fieldset>
<datastream id="OBJ">
<method>
<file>plugins/qt_viewer.inc</file>
<class_name>ShowQtStreamsInFieldSets</class_name>
<method_name>showQt</method_name>
</method>
</datastream>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
</display_in_fieldset>
<!-- ingest rules element is required and must have a rule that applies to the mimetypes above or ingest will fail even if the rule has no methods-->
<ingest_rules>
<rule>
<applies_to>
video/quicktime
</applies_to>
<methods/>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/QtFormBuilder.php</file>
<class_name>QtFormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Title/Caption/Video Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the Video</description>
<required>true</required>
</element>
<element>
<label>Creator/</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
<authoritative_list>
<item>
<field>home recording</field>
<value>home recording</value>
</item>
<item>
<field>meeting</field>
<value>meeting</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
</authoritative_list>
</element>
<element>
<label>Description of Video</label>
<name>dc:description</name>
<type>textarea</type>
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
<required>true</required>
</element>
<element>
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element>
<element>
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element>
<element>
<label>Resource Type</label>
<name>dc:type</name>
<type>select</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
<authoritative_list>
<item>
<field>none</field>
<value>none</value>
</item>
<item>
<field>video</field>
<value>video</value>
</item>
<item>
<field>event</field>
<value>event</value>
</item>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>interactive resource</field>
<value>interactive resource</value>
</item>
<item>
<field>model</field>
<value>model</value>
</item>
<item>
<field>party</field>
<value>party</value>
</item>
<item>
<field>physical object</field>
<value>physical object</value>
</item>
<item>
<field>place</field>
<value>place</value>
</item>
<item>
<field>service</field>
<value>service</value>
</item>
<item>
<field>software</field>
<value>software</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
<item>
<field>text</field>
<value>text</value>
</item>
</authoritative_list>
</element>
<element>
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element>
<element>
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element>
<element>
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list>
<item>
<field>eng</field>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list>
</element>
<element>
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description>
<required>false</required>
</element>
<element>
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

1
content_models/COLLECTIONCM.xml

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

105
content_models/CRITTERS.xml

@ -1,105 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<!--This model is incomplete only the showStreams in Fieldset is currently used-->
<content_model name="CRITTERS">
<display_in_fieldset>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
<datastream id="CRITTERS">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showCritter</method_name>
</method>
</datastream>
</display_in_fieldset>
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>
text/xml
</applies_to>
<applies_to>
text/plain
</applies_to>
<applies_to>
application/xml
</applies_to>
<methods>
</methods>
<disseminators>
<disseminator>
<name>dis1</name>
<parameters>
<parameter name="param1">
200
</parameter>
</parameters>
</disseminator>
</disseminators>
</rule>
<rule>
<!--Method will be called for all text/xml datastreams added so we would have to check that namespace=critters in the xml or something to only do critters schema-->
<applies_to>text/xml</applies_to>
<methods>
<method>
<name>addCritterToDCStream</name>
<datastream_id>critter</datastream_id>
</method>
<method>
<name>another XMLFile</name>
<datastream_id>someotherstream</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/Refworks.inc</file>
<class_name>Refworks</class_name>
<method_name>buildForm</method_name>
<form_handler>handleForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Ingest</label>
<name>hiddenvalue</name>
<value>hidden</value>
<type>hidden</type>
<prefix>We now have all the information we need to ingest.</prefix>
<description>The name given to the resource</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
<!-- show the external links on the objects page -->
<external_links>
<link url="http://www.romeo.com">
<url_parameters>
<parameter name="file">
dc.title
</parameter>
<parameter/>
</url_parameters>
</link>
</external_links>
</content_model>

166
content_models/FAS_slideCModel.xml

@ -1,166 +0,0 @@
<content_model name="standard_slide">
<mimetypes>
<type>image/tiff</type>
<type>image/tif</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JPG">
<method>
<file>plugins/slide_viewer.inc</file>
<class_name>ShowSlideStreamsInFieldSets</class_name>
<method_name>showJPG</method_name>
</method>
</datastream>
<datastream id="JP2"/>
<datastream id="FULL_SIZE"/>
<datastream id="FULL_JPG"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>
image/tiff
</applies_to>
<applies_to>
image/tif
</applies_to>
<methods>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>createJP2</method_name>
<modified_files_ext>jp2</modified_files_ext>
<datastream_id>JP2</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/DemoFormBuilder.inc</file>
<class_name>DemoFormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
</form_builder_method>
<form_elements>
<element>
<label>Title/Caption/Image Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the resource</description>
<required>true</required>
</element>
<element>
<label>Creator/Photographer</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>Subject</description>
<required>false</required>
<authoritative_list>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>photograph</field>
<value>photograph</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>art</field>
<value>art</value>
</item>
</authoritative_list>
</element>
<element>
<label>Description</label>
<name>dc:description</name>
<type>textarea</type>
<description>Description of the Image</description>
<required>true</required>
</element>
<element>
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element>
<element>
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element>
<element>
<label>Resource Type</label>
<name>dc:type</name>
<type>textfield</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
</element>
<element>
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element>
<element>
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element>
<element>
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list>
<item>
<field>eng</field>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list>
</element>
<element>
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description>
<required>false</required>
</element>
<element>
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

76
content_models/REFWORKSCM.xml

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<content_model name="REFWORKS">
<display_in_fieldset>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
<datastream id="refworks">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showRefworks</method_name>
</method>
</datastream>
<datastream id="romeo">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showRomeo</method_name>
</method>
</datastream>
<datastream id="OBJ">
</datastream>
<datastream id="DOC">
</datastream>
</display_in_fieldset>
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>
text/xml
</applies_to>
<applies_to>
text/plain
</applies_to>
<applies_to>
application/xml
</applies_to>
<methods>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/Refworks.inc</file>
<class_name>Refworks</class_name>
<method_name>buildForm</method_name>
<form_handler>handleForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Ingest</label>
<name>hiddenvalue</name>
<value>hidden</value>
<type>hidden</type>
<prefix>We now have all the information we need to ingest.</prefix>
<description>The name given to the resource</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

76
content_models/REFWORKSCM_1.xml

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<content_model name="REFWORKS">
<display_in_fieldset>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
<datastream id="refworks">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showRefworks</method_name>
</method>
</datastream>
<datastream id="romeo">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showRomeo</method_name>
</method>
</datastream>
<datastream id="OBJ">
</datastream>
<datastream id="DOC">
</datastream>
</display_in_fieldset>
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>
text/xml
</applies_to>
<applies_to>
text/plain
</applies_to>
<applies_to>
application/xml
</applies_to>
<methods>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/Refworks.inc</file>
<class_name>Refworks</class_name>
<method_name>buildForm</method_name>
<form_handler>handleForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Ingest</label>
<name>hiddenvalue</name>
<value>hidden</value>
<type>hidden</type>
<prefix>We now have all the information we need to ingest.</prefix>
<description>The name given to the resource</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

95
content_models/STANDARD JPG.xml

@ -1,95 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_jpeg" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>image/jpeg</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>image/jpeg</applies_to>
<ingest_methods>
<ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<parameters>
<parameter name="width">160</parameter>
<parameter name="height">120</parameter>
</parameters>
</ingest_method>
<ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="TN" modified_files_ext="jpg">
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">120</parameter>
</parameters>
</ingest_method>
</ingest_methods>
</rule>
</ingest_rules>
<datastreams>
<datastream dsid="MEDIUM_SIZE">
<display_method module="" file="plugins/ShowDemoStreamsInFieldSets.inc" class="ShowDemoStreamsInFieldSets" method="showMediumSize"/>
</datastream>
<datastream dsid="QDC">
<display_method module="" file="plugins/ShowStreamsInFieldSets.inc" class="ShowStreamsInFieldSets" method="showQdc"/>
</datastream>
<datastream dsid="FULL_SIZE">
<add_datastream_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">160</parameter>
</parameters>
</add_datastream_method>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method module="" file="plugins/DemoFormBuilder.inc" class="DemoFormBuilder" method="buildQDCForm" handler="handleQDCForm"/>
<form_elements>
<element label="Title/Caption/Image Name" name="dc:title" type="textfield" required="true">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>Subject</description>
<authoritative_list>
<item>image</item>
<item>photograph</item>
<item>presentation</item>
<item>art</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" type="textarea" required="true">
<description>Description of the Image</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="textfield">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>

236
content_models/STANDARD PDF.xml

@ -1,236 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<content_model name="standard_pdf">
<mimetypes>
<type>application/pdf</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>
application/pdf
</applies_to>
<methods>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>createThumbnailFromPDF</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>TN</datastream_id>
<parameters>
<parameter name="width">100</parameter>
<parameter name="height">120</parameter>
</parameters>
</method>
</methods>
<disseminators>
<disseminator>
<name>dis1</name>
<parameters>
<parameter name="param1">
200
</parameter>
</parameters>
</disseminator>
</disseminators>
</rule>
</ingest_rules>a868aef684fa34923d4fe697db1e785b
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/FormBuilder.inc</file>
<class_name>FormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Title/Caption/Object Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the resource</description>
<required>true</required>
</element>
<element>
<label>Creator/Photographer/Author</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
<authoritative_list>
<item>
<field>experiment session</field>
<value>experiment session</value>
</item>
<item>
<field>home recording</field>
<value>home recording</value>
</item>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>meeting</field>
<value>meeting</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
<item>
<field>text</field>
<value>text</value>
</item>
</authoritative_list>
</element>
<element>
<label>Description</label>
<name>dc:description</name>
<type>textarea</type>
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
<required>true</required>
</element>
<element>
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element>
<element>
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element>
<element>
<label>Resource Type</label>
<name>dc:type</name>
<type>select</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
<authoritative_list>
<item>
<field>none</field>
<value>none</value>
</item>
<item>
<field>collection</field>
<value>collection</value>
</item>
<item>
<field>dataset</field>
<value>dataset</value>
</item>
<item>
<field>event</field>
<value>event</value>
</item>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>interactive resource</field>
<value>interactive resource</value>
</item>
<item>
<field>model</field>
<value>model</value>
</item>
<item>
<field>party</field>
<value>party</value>
</item>
<item>
<field>physical object</field>
<value>physical object</value>
</item>
<item>
<field>place</field>
<value>place</value>
</item>
<item>
<field>service</field>
<value>service</value>
</item>
<item>
<field>software</field>
<value>software</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
<item>
<field>text</field>
<value>text</value>
</item>
</authoritative_list>
</element>
<element>
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element>
<element>
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element>
<element>
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list>
<item>
<field>eng</field>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list>
</element>
<element>
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description>
<required>false</required>
</element>
<element>
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

218
content_models/STANDARD_FLVCM.xml

@ -1,218 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<content_model name="standard_flv">
<mimetypes>
<type>video/x-flv</type>
</mimetypes>
<display_in_fieldset>
<datastream id="FLV">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showFLV</method_name>
</method>
</datastream>
<datastream id="QDC">
<method>
<file>plugins/ShowStreamsInFieldSets.inc</file>
<class_name>ShowStreamsInFieldSets</class_name>
<method_name>showQdc</method_name>
</method>
</datastream>
</display_in_fieldset>
<!-- ingest rules element is required and must have a rule that applies to the mimetypes above or ingest will fail even if the rule has no methods-->
<ingest_rules>
<rule>
<applies_to>
video/x-flv
</applies_to>
<methods/>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/FlvFormBuilder.inc</file>
<class_name>FlvFormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Title/Caption/Video Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the Video</description>
<required>true</required>
</element>
<element>
<label>Creator/</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
<authoritative_list>
<item>
<field>home recording</field>
<value>home recording</value>
</item>
<item>
<field>meeting</field>
<value>meeting</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
</authoritative_list>
</element>
<element>
<label>Description of Video</label>
<name>dc:description</name>
<type>textarea</type>
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
<required>true</required>
</element>
<element>
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element>
<element>
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element>
<element>
<label>Resource Type</label>
<name>dc:type</name>
<type>select</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
<authoritative_list>
<item>
<field>none</field>
<value>none</value>
</item>
<item>
<field>video</field>
<value>video</value>
</item>
<item>
<field>event</field>
<value>event</value>
</item>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>interactive resource</field>
<value>interactive resource</value>
</item>
<item>
<field>model</field>
<value>model</value>
</item>
<item>
<field>party</field>
<value>party</value>
</item>
<item>
<field>physical object</field>
<value>physical object</value>
</item>
<item>
<field>place</field>
<value>place</value>
</item>
<item>
<field>service</field>
<value>service</value>
</item>
<item>
<field>software</field>
<value>software</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
<item>
<field>text</field>
<value>text</value>
</item>
</authoritative_list>
</element>
<element>
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element>
<element>
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element>
<element>
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list>
<item>
<field>eng</field>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list>
</element>
<element>
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description>
<required>false</required>
</element>
<element>
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

271
content_models/STANDARD_IMAGECM.xml

@ -1,271 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<content_model name="standard_image">
<mimetypes>
<type>image/jpeg</type>
<type>image/gif</type>
<type>image/png</type>
<type>image/tiff</type>
<type>image/tif</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>
image/jpeg
</applies_to>
<applies_to>
image/gif
</applies_to>
<applies_to>
image/png
</applies_to>
<applies_to>
image/tiff
</applies_to>
<applies_to>
image/tif
</applies_to>
<!--ingest methods to call-->
<methods>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>createThumbnail</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>TN</datastream_id>
<parameters>
<parameter name="width">100</parameter>
<parameter name="height">120</parameter>
</parameters>
</method>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>createPNG</method_name>
<modified_files_ext>png</modified_files_ext>
<datastream_id>PNG</datastream_id>
</method>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>createPreview</method_name>
<modified_files_ext>jpg</modified_files_ext>
<datastream_id>PRE</datastream_id>
<parameters>
<parameter name="width">240</parameter>
<parameter name="height">300</parameter>
</parameters>
</method>
</methods>
<disseminators>
<disseminator>
<name>dis1</name>
<parameters>
<parameter name="param1">
200
</parameter>
</parameters>
</disseminator>
</disseminators>
</rule>
</ingest_rules>a868aef684fa34923d4fe697db1e785b
<ingest_form dsid='QDC' page="2">
<form_builder_method>
<file>plugins/FormBuilder.inc</file>
<class_name>FormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
<!--need validation method as well-->
</form_builder_method>
<form_elements>
<element>
<label>Title/Caption/Object Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the resource</description>
<required>true</required>
</element>
<element>
<label>Creator/Photographer/Author</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
<authoritative_list >
<item>
<field>experiment session</field>
<value>experiment session</value>
</item>
<item>
<field>home recording</field>
<value>home recording</value>
</item>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>meeting</field>
<value>meeting</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
<item>
<field>text</field>
<value>text</value>
</item>
</authoritative_list>
</element>
<element>
<label>Description</label>
<name>dc:description</name>
<type>textarea</type>
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
<required>true</required>
</element>
<element>
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element>
<element>
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element>
<element>
<label>Resource Type</label>
<name>dc:type</name>
<type>select</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
<authoritative_list >
<item>
<field>none</field>
<value>none</value>
</item>
<item>
<field>collection</field>
<value>collection</value>
</item>
<item>
<field>dataset</field>
<value>dataset</value>
</item>
<item>
<field>event</field>
<value>event</value>
</item>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>interactive resource</field>
<value>interactive resource</value>
</item>
<item>
<field>model</field>
<value>model</value>
</item>
<item>
<field>party</field>
<value>party</value>
</item>
<item>
<field>physical object</field>
<value>physical object</value>
</item>
<item>
<field>place</field>
<value>place</value>
</item>
<item>
<field>service</field>
<value>service</value>
</item>
<item>
<field>software</field>
<value>software</value>
</item>
<item>
<field>sound</field>
<value>sound</value>
</item>
<item>
<field>text</field>
<value>text</value>
</item>
</authoritative_list>
</element>
<element>
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element>
<element>
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element>
<element>
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list >
<item>
<field>eng</field>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list>
</element>
<element>
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description>
<required>false</required>
</element>
<element>
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>

95
content_models/STANDARD_JPG.xml

@ -1,95 +0,0 @@
<?xml version="1.0" encoding="utf-8"?>
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_jpeg" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>image/jpeg</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>image/jpeg</applies_to>
<ingest_methods>
<ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<parameters>
<parameter name="width">160</parameter>
<parameter name="height">120</parameter>
</parameters>
</ingest_method>
<ingest_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="TN" modified_files_ext="jpg">
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">120</parameter>
</parameters>
</ingest_method>
</ingest_methods>
</rule>
</ingest_rules>
<datastreams>
<datastream dsid="MEDIUM_SIZE">
<display_method module="" file="plugins/ShowDemoStreamsInFieldSets.inc" class="ShowDemoStreamsInFieldSets" method="showMediumSize"/>
</datastream>
<datastream dsid="QDC">
<display_method module="" file="plugins/ShowStreamsInFieldSets.inc" class="ShowStreamsInFieldSets" method="showQdc"/>
</datastream>
<datastream dsid="FULL_SIZE">
<add_datastream_method module="" file="plugins/ImageManipulation.inc" class="ImageManipulation" method="manipulateImage" dsid="MEDIUM_SIZE" modified_files_ext="jpg">
<parameters>
<parameter name="width">120</parameter>
<parameter name="height">160</parameter>
</parameters>
</add_datastream_method>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method module="" file="plugins/DemoFormBuilder.inc" class="DemoFormBuilder" method="buildQDCForm" handler="handleQDCForm"/>
<form_elements>
<element label="Title/Caption/Image Name" name="dc:title" type="textfield" required="true">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>Subject</description>
<authoritative_list>
<item>image</item>
<item>photograph</item>
<item>presentation</item>
<item>art</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" type="textarea" required="true">
<description>Description of the Image</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="textfield">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>

137
content_models/STANDARD_QT.xml

@ -1,137 +0,0 @@
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_qt" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>video/quicktime</type>
<type>video/mp4</type>
<type>audio/mp3</type>
<type>audio/x-aiff</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>video/quicktime</applies_to>
<applies_to>video/mp4</applies_to>
<applies_to>audio/mp3</applies_to>
<applies_to>audio/x-aiff</applies_to>
<ingest_methods>
<ingest_method file="plugins/Exiftool.inc" class="Exiftool" method="extractMetadata" dsid="OBJ_EXIFTOOL" modified_files_ext="">
<parameters></parameters>
</ingest_method>
<ingest_method class="Ffmpeg" dsid="FULL_SIZE" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg">
<parameters>
</parameters>
</ingest_method>
<ingest_method class="Ffmpeg" dsid="TN" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg">
<parameters>
<parameter name="s">92x92</parameter>
</parameters>
</ingest_method>
</ingest_methods>
</rule>
</ingest_rules>
<datastreams>
<datastream dsid="OBJ">
<display_method class="ShowQtStreamsInFieldSets" file="plugins/qt_viewer.inc" method="showQt" module=""></display_method>
</datastream>
<datastream dsid="PROXY"></datastream>
<datastream dsid="OBJ_EXIFTOOL"></datastream>
<datastream dsid="TN"></datastream>
<datastream dsid="FULL_SIZE"></datastream>
<datastream dsid="QDC">
<display_method class="ShowStreamsInFieldSets" file="plugins/ShowStreamsInFieldSets.inc" method="showQdc" module=""></display_method>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="QtFormBuilder" file="plugins/QtFormBuilder.php" handler="handleQDCForm" method="buildQDCForm" module=""></form_builder_method>
<form_elements>
<element label="Title/Caption/Media Name" name="dc:title" required="true" type="textfield">
<description>The name given to the file</description>
</element>
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
</authoritative_list>
</element>
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>video</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>

107
content_models/STRICT_PDFCM.xml

@ -1,107 +0,0 @@
<content_model name="strict_pdf" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>application/pdf</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>application/pdf</applies_to>
<ingest_methods>
<ingest_method class="ImageManipulation" dsid="TN" file="plugins/ImageManipulation.inc"
method="createThumbnailFromPDF" modified_files_ext="jpg" module="">
<parameters>
<parameter name="width">100</parameter>
<parameter name="height">120</parameter>
</parameters>
</ingest_method>
</ingest_methods>
</rule>
</ingest_rules>
<datastreams>
<datastream dsid="TN">
<display_method class="ShowStreamsInFieldSets" file="plugins/ShowStreamsInFieldSets.inc" method="showPDFPreview" module=""/>
</datastream>
<datastream dsid="OBJ">
<add_datastream_method class="ImageManipulation" dsid="TN" file="plugins/ImageManipulation.inc"
method="createThumbnailFromPDF" modified_files_ext="jpg" module="">
<parameters>
<parameter name="width">100</parameter>
<parameter name="height">120</parameter>
</parameters>
</add_datastream_method>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="FormBuilder" file="plugins/FormBuilder.inc" handler="handleQDCForm"
method="buildQDCForm" module=""/>
<form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer/Author" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<authoritative_list>
<item>experiment session</item>
<item>home recording</item>
<item>image</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>collection</item>
<item>dataset</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>

65
content_models/demo_Collection.xml

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="demo:Collection" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Service Definition Object (Collection) for Image Collection Demo"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2008-07-02T05:09:42.015Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-03-29T14:15:20.712Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.015Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-03-29T14:15:20.712Z</audit:date>
<audit:justification>Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_Collection.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.125Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="432">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Service Definition Object (Collection) for Image Collection Demo</dc:title>
<dc:identifier>demo:Collection</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.125Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="404">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/demo:Collection">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.125Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0" ID="METHODMAP1.0" LABEL="Abstract Method Map"
MIMETYPE="text/xml" SIZE="401">
<foxml:xmlContent>
<fmm:MethodMap name="MethodMap - Collection of Objects" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationLabel="An xml list of members in the collection" operationName="list"/>
<fmm:Method operationLabel="An html representation of the collection" operationName="view"/>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

196
content_models/demo_CollectionImpl.xml

@ -1,196 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="demo:CollectionImpl" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Service Deployment Object (Collection) for Image Collection Demo"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2008-07-02T05:09:42.015Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-03-29T14:15:20.819Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.015Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-03-29T14:15:20.819Z</audit:date>
<audit:justification>Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_CollectionImpl.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.171Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="494">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Service Deployment Object (Collection) for Image Collection Demo</dc:title>
<dc:identifier>demo:ImageCollectionImpl</dc:identifier>
<dc:identifier>demo:CollectionImpl</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.171Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.1" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="674">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/demo:CollectionImpl">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"/>
<fedora-model:isDeploymentOf rdf:resource="info:fedora/demo:Collection"/>
<fedora-model:isContractorOf rdf:resource="info:fedora/demo:DualResImageCollection"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.171Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP1.0" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="1948">
<foxml:xmlContent>
<fmm:MethodMap name="MethodMap - Image Collection" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationLabel="An html representation of the collection" operationName="view"
wsdlMsgName="viewRequest" wsdlMsgOutput="dissemResponse">
<fmm:DatastreamInputParm label="Stylesheet to transform LIST into html" parmName="XSLT" passBy="URL_REF" required="true"/>
<fmm:DatastreamInputParm label="The result of the list dissemination as a datastream" parmName="LIST"
passBy="URL_REF" required="true"/>
<fmm:DefaultInputParm defaultValue="yes" label="Whether to reload the stylesheet each time"
parmName="CLEAR_CACHE" passBy="VALUE" required="true"/>
<fmm:MethodReturnType wsdlMsgName="dissemResponse" wsdlMsgTOMIME="text/html"/>
</fmm:Method>
<fmm:Method operationLabel="An xml list of members in the collection" operationName="list"
wsdlMsgName="listRequest" wsdlMsgOutput="dissemResponse">
<fmm:DatastreamInputParm defaultValue="" label="" parmName="QUERY" passBy="URL_REF" required="true"/>
<fmm:DefaultInputParm defaultValue="tuples" label="" parmName="TYPE" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="itql" label="" parmName="LANG" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="Sparql" label="" parmName="FORMAT" passBy="VALUE" required="true"/>
<fmm:MethodReturnType wsdlMsgName="dissemResponse" wsdlMsgTOMIME="text/xml"/>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2004-12-17T15:32:11.000Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC1.0"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="1194">
<foxml:xmlContent>
<fbs:DSInputSpec label="Datastream Input Specification for Image Collection" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="XSLT">
<fbs:DSInputLabel>XSLT Binding</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="LIST">
<fbs:DSInputLabel>LIST Binding</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="QUERY">
<fbs:DSInputLabel>QUERY Binding</fbs:DSInputLabel>
<fbs:DSMIME>text/plain</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="WSDL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.171Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL1.0" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="5242">
<foxml:xmlContent>
<wsdl:definitions name="ImageCollection" targetNamespace="bmech"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="bmech"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema targetNamespace="bmech">
<xsd:simpleType name="TYPEType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="QUERYType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="XSLTType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="LANGType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="LISTType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="CLEAR_CACHEType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="FORMATType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="viewRequest">
<wsdl:part name="XSLT" type="this:XSLTType"/>
<wsdl:part name="LIST" type="this:LISTType"/>
<wsdl:part name="CLEAR_CACHE" type="this:CLEAR_CACHEType"/>
</wsdl:message>
<wsdl:message name="listRequest">
<wsdl:part name="TYPE" type="this:TYPEType"/>
<wsdl:part name="QUERY" type="this:QUERYType"/>
<wsdl:part name="LANG" type="this:LANGType"/>
<wsdl:part name="FORMAT" type="this:FORMATType"/>
</wsdl:message>
<wsdl:message name="dissemResponse">
<wsdl:part name="dissem" type="xsd:base64Binary"/>
</wsdl:message>
<wsdl:portType name="ImageCollectionPortType">
<wsdl:operation name="view">
<wsdl:input message="this:viewRequest"/>
<wsdl:output message="this:dissemResponse"/>
</wsdl:operation>
<wsdl:operation name="list">
<wsdl:input message="this:listRequest"/>
<wsdl:output message="this:dissemResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="ImageCollection">
<wsdl:port binding="this:ImageCollection_http" name="ImageCollection_port">
<http:address location="LOCAL"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="ImageCollection_http" type="this:ImageCollectionPortType">
<http:binding verb="GET"/>
<wsdl:operation name="view">
<http:operation location="http://local.fedora.server/saxon/SaxonServlet?source=(LIST)&amp;style=(XSLT)&amp;clear-stylesheet-cache=(CLEAR_CACHE)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/html"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="list">
<http:operation location="http://local.fedora.server/fedora/risearch?type=(TYPE)&amp;lang=(LANG)&amp;format=(FORMAT)&amp;query=(QUERY)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xml"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

76
content_models/demo_DualResImage.xml

@ -1,76 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="demo:DualResImage" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Content Model Object (Image) for Image Collection Demo"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2007-08-15T14:36:32.085Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-03-29T14:15:19.456Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2007-08-15T14:36:32.085Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-03-29T14:15:19.456Z</audit:date>
<audit:justification>Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImage.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.890Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="424">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Content Model Object (Image) for Image Collection Demo</dc:title>
<dc:identifier>demo:DualResImage</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.890Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="472">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/demo:DualResImage">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/>
<fedora-model:hasService rdf:resource="info:fedora/demo:DualResolution"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DS-COMPOSITE-MODEL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2007-08-15T14:36:30.369Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0" ID="DS-COMPOSITE-MODEL1.0"
LABEL="Datastream Composite Model" MIMETYPE="text/xml" SIZE="651">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#">
<dsTypeModel ID="DC">
<form FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="RELS-EXT">
<form FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" MIME="application/rdf+xml"/>
</dsTypeModel>
<dsTypeModel ID="MEDIUM_SIZE">
<form MIME="image/jpeg"/>
</dsTypeModel>
<dsTypeModel ID="FULL_SIZE">
<form MIME="image/jpeg"/>
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

73
content_models/demo_DualResImageCollection.xml

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="demo:DualResImageCollection" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Content Model Object (Image Collection) for Image Collection Demo"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2007-08-15T14:36:34.682Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-03-29T14:15:19.509Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2007-08-15T14:36:34.682Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-03-29T14:15:19.509Z</audit:date>
<audit:justification>Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImageCollection.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.906Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="445">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Content Model Object (Image Collection) for Image Collection Demo</dc:title>
<dc:identifier>demo:DualResImageCollection</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.906Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="478">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/demo:DualResImageCollection">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/>
<fedora-model:hasService rdf:resource="info:fedora/demo:Collection"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DS-COMPOSITE-MODEL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2007-08-15T14:36:30.369Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0" ID="DS-COMPOSITE-MODEL1.0"
LABEL="Datastream Composite Model" MIMETYPE="text/xml" SIZE="410">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#">
<dsTypeModel ID="QUERY">
<form MIME="text/plain"/>
</dsTypeModel>
<dsTypeModel ID="XSLT">
<form MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="LIST">
<form MIME="text/xml"/>
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

162
content_models/demo_DualResImageImpl.xml

@ -1,162 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="demo:DualResImageImpl" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Service Deployment Object (Image) for Image Collection Demo"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2008-07-02T05:09:42.015Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-03-29T14:15:20.881Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.015Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-03-29T14:15:20.881Z</audit:date>
<audit:justification>Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_DualResImageImpl.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.203Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="433">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Service Deployment Object (Image) for Image Collection Demo</dc:title>
<dc:identifier>demo:DualResImageImpl</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.203Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.1" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="670">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/demo:DualResImageImpl">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"/>
<fedora-model:isDeploymentOf rdf:resource="info:fedora/demo:DualResolution"/>
<fedora-model:isContractorOf rdf:resource="info:fedora/demo:DualResImage"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.203Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP1.0" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="1152">
<foxml:xmlContent>
<fmm:MethodMap name="MethodMap - Dual Resolution Image Implementation" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationLabel="A full-size image" operationName="fullSize" wsdlMsgName="fullSizeRequest" wsdlMsgOutput="dissemResponse">
<fmm:DatastreamInputParm defaultValue="" label="The full-size image" parmName="FULL_SIZE" passBy="URL_REF" required="true"/>
<fmm:MethodReturnType wsdlMsgName="dissemResponse" wsdlMsgTOMIME="image/jpeg"/>
</fmm:Method>
<fmm:Method operationLabel="A medium-size image" operationName="mediumSize" wsdlMsgName="mediumSizeRequest" wsdlMsgOutput="dissemResponse">
<fmm:DatastreamInputParm defaultValue="" label="The medium-size image" parmName="MEDIUM_SIZE"
passBy="URL_REF" required="true"/>
<fmm:MethodReturnType wsdlMsgName="dissemResponse" wsdlMsgTOMIME="image/jpeg"/>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.203Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC1.0"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="899">
<foxml:xmlContent>
<fbs:DSInputSpec label="Datastream Input Specification for Dual Resolution Image Implementation" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="FULL_SIZE">
<fbs:DSInputLabel>FULL_SIZE Binding</fbs:DSInputLabel>
<fbs:DSMIME>image/jpeg</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="MEDIUM_SIZE">
<fbs:DSInputLabel>MEDIUM_SIZE Binding</fbs:DSInputLabel>
<fbs:DSMIME>image/jpeg</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="WSDL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.203Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL1.0" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="3744">
<foxml:xmlContent>
<wsdl:definitions name="DualResolutionImageImplementation" targetNamespace="bmech"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="bmech"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:types>
<xsd:schema targetNamespace="bmech">
<xsd:simpleType name="FULL_SIZEType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
<xsd:simpleType name="MEDIUM_SIZEType">
<xsd:restriction base="xsd:string"/>
</xsd:simpleType>
</xsd:schema>
</wsdl:types>
<wsdl:message name="fullSizeRequest">
<wsdl:part name="FULL_SIZE" type="this:FULL_SIZEType"/>
</wsdl:message>
<wsdl:message name="mediumSizeRequest">
<wsdl:part name="MEDIUM_SIZE" type="this:MEDIUM_SIZEType"/>
</wsdl:message>
<wsdl:message name="dissemResponse">
<wsdl:part name="dissem" type="xsd:base64Binary"/>
</wsdl:message>
<wsdl:portType name="DualResImageImplPortType">
<wsdl:operation name="fullSize">
<wsdl:input message="this:fullSizeRequest"/>
<wsdl:output message="this:dissemResponse"/>
</wsdl:operation>
<wsdl:operation name="mediumSize">
<wsdl:input message="this:mediumSizeRequest"/>
<wsdl:output message="this:dissemResponse"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="DualResImageImpl">
<wsdl:port binding="this:DualResImageImpl_http" name="DualResImageImpl_port">
<http:address location="LOCAL"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="DualResImageImpl_http" type="this:DualResImageImplPortType">
<http:binding verb="GET"/>
<wsdl:operation name="fullSize">
<http:operation location="(FULL_SIZE)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="image/jpeg"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="mediumSize">
<http:operation location="(MEDIUM_SIZE)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="image/jpeg"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

65
content_models/demo_DualResolution.xml

@ -1,65 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="demo:DualResolution" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Service Definition Object (Image) for Image Collection Demo"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2008-07-02T05:09:42.015Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-03-29T14:15:20.765Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:42.015Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-03-29T14:15:20.765Z</audit:date>
<audit:justification>Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_DualResolution.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.156Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="431">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Service Definition Object (Image) for Image Collection Demo</dc:title>
<dc:identifier>demo:DualResolution</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.156Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="408">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/demo:DualResolution">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2008-07-02T05:09:43.156Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0" ID="METHODMAP1.0" LABEL="Abstract Method Map"
MIMETYPE="text/xml" SIZE="367">
<foxml:xmlContent>
<fmm:MethodMap name="MethodMap - Dual Resolution Image" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationLabel="A full-size image" operationName="fullSize"/>
<fmm:Method operationLabel="A medium-size image" operationName="mediumSize"/>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

675
content_models/ilives_bookCModel.xml

@ -1,675 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="ilives:bookCModel" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="BookCModel"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2008-12-14T00:12:52.636Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-11-26T15:24:13.742Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2008-12-14T00:12:52.636Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-12T14:56:58.331Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_bookCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-05-31T19:56:44.131Z</audit:date>
<audit:justification>Ingested from source repository with pid ilives:bookCModel</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-10T17:43:56.335Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_bookCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-10T19:01:39.144Z</audit:date>
<audit:justification>DatastreamsPane generated this logMessage.</audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-10T19:29:20.220Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-10T19:46:24.930Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-15T07:01:30.019Z</audit:date>
<audit:justification>Ingested from local file /Users/al/fedora_repository/content_models/ilives_bookCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-16T08:56:09.156Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC9">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-16T08:59:35.673Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC10">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-16T08:59:52.831Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC11">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>MODS</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-16T09:13:08.428Z</audit:date>
<audit:justification>DatastreamsPane generated this logMessage.</audit:justification>
</audit:record>
<audit:record ID="AUDREC12">
<audit:process type="Fedora API-M"/>
<audit:action>purgeDatastream</audit:action>
<audit:componentID>MODS</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-16T09:13:32.732Z</audit:date>
<audit:justification>DatastreamPane generated this logMessage. . . . Purged datastream (ID=MODS), versions ranging from 2010-06-16T06:13:08.428Z to 2010-06-16T06:13:08.428Z. This resulted in the permanent removal of 1 datastream version(s) (2010-06-16T06:13:08.428Z) and all associated audit records.</audit:justification>
</audit:record>
<audit:record ID="AUDREC13">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-16T09:21:14.357Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC14">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-08-30T13:14:03.487Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/fedora_repository/ilives/xml/ilives_bookCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC15">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-11-26T15:24:13.742Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T19:58:26.781Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.5" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="450">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:bookCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<hasService rdf:resource="info:fedora/ilives:viewerSdef" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DS-COMPOSITE-MODEL" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-03-11T19:16:18.656Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0" ID="DS-COMPOSITE-MODEL.7"
LABEL="Datastream Composite Model" MIMETYPE="text/xml" SIZE="2378">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#">
<comment xmlns="info:fedora/fedora-system:def/comment#">
This DS-COMPOSITE-MODEL datastream is included as a starting point to
assist in the creation of a content model. The DS-COMPOSITE-MODEL
should define the datastreams that are required for any objects
conforming to this content model.
For more information about content models, see:
http://fedora-commons.org/confluence/x/dgBI.
For examples of completed content model objects, see the demonstration
objects included with your Fedora distribution, such as:
demo:CMImage, demo:UVA_STD_IMAGE, demo:DualResImageCollection,
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
</comment>
<dsTypeModel ID="ABBYY_XML" ORDERED="false">
<form MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="ABBYY_OCR" ORDERED="false">
<form MIME="text/plain"/>
</dsTypeModel>
<dsTypeModel ID="TEI" ORDERED="false">
<form MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="MARCXML" ORDERED="false">
<form MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="MODS" ORDERED="false">
<form MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="METSRights" ORDERED="false">
<form MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="StructMap" ORDERED="false">
<form MIME="text/xml"/>
</dsTypeModel>
<dsTypeModel ID="PDF" ORDERED="false">
<form MIME="application/pdf"/>
</dsTypeModel>
<dsTypeModel ID="Correspondence" ORDERED="false">
<form MIME="application/pdf"/>
</dsTypeModel>
<dsTypeModel ID="Permission_Letter" ORDERED="false">
<form MIME="application/pdf"/>
</dsTypeModel>
<dsTypeModel ID="CoverTN" ORDERED="false">
<form MIME="image/JPG"/>
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-02-13T17:57:45.873Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC.2" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="388">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Book Content Model</dc:title>
<dc:identifier>ilives:bookCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="ISLANDORACM" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-06-10T19:01:39.144Z" ID="ISLANDORACM.0"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="2102">
<foxml:xmlContent>
<content_model name="standard_herb">
<mimetypes>
<type>image/tiff</type>
<type>image/tif</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JP2">
<method>
<module>ilives</module>
<file>plugins/herbarium.inc</file>
<class_name>Herbarium</class_name>
<method_name>showFieldSets</method_name>
</method>
</datastream>
<datastream id="TN"/>
<datastream id="DC"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<methods>
<method>
<module>ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>ingestBook</method_name>
<datastream_id>MODS</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="MODS" page="2">
<form_builder_method>
<module>ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildDrupalForm</method_name>
<form_handler>handleIngestForm</form_handler>
</form_builder_method>
</ingest_form>
<edit_metadata>
<build_form_method dsid="MODS">
<module>ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildEditMetadataForm</method_name>
</build_form_method>
<submit_form_method dsid="MODS">
<module>ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>handleEditMetadataForm</method_name>
</submit_form_method>
</edit_metadata>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-06-10T19:29:20.220Z" ID="ISLANDORACM.1"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="2137">
<foxml:xmlContent>
<content_model name="standard_herb">
<mimetypes>
<type>image/tiff</type>
<type>image/tif</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JP2">
<method>
<module>fedora_ilives</module>
<file>plugins/herbarium.inc</file>
<class_name>Herbarium</class_name>
<method_name>showFieldSets</method_name>
</method>
</datastream>
<datastream id="TN"/>
<datastream id="DC"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<methods>
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>ingestBook</method_name>
<datastream_id>MODS</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="MODS" page="2">
<form_builder_method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildDrupalForm</method_name>
<form_handler>handleIngestForm</form_handler>
</form_builder_method>
</ingest_form>
<edit_metadata>
<build_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildEditMetadataForm</method_name>
</build_form_method>
<submit_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>handleEditMetadataForm</method_name>
</submit_form_method>
</edit_metadata>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-06-10T19:46:24.930Z" ID="ISLANDORACM.2"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="2093">
<foxml:xmlContent>
<content_model name="Book">
<mimetypes>
<type>image/tiff</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JP2">
<method>
<module>fedora_ilives</module>
<file>plugins/herbarium.inc</file>
<class_name>Herbarium</class_name>
<method_name>showFieldSets</method_name>
</method>
</datastream>
<datastream id="TN"/>
<datastream id="DC"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<methods>
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>ingestBook</method_name>
<datastream_id>MODS</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="MODS" page="2">
<form_builder_method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildDrupalForm</method_name>
<form_handler>handleIngestForm</form_handler>
</form_builder_method>
</ingest_form>
<edit_metadata>
<build_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildEditMetadataForm</method_name>
</build_form_method>
<submit_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>handleEditMetadataForm</method_name>
</submit_form_method>
</edit_metadata>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-06-16T08:56:09.156Z" ID="ISLANDORACM.3"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="2084">
<foxml:xmlContent>
<content_model name="Book">
<mimetypes>
<type>image/tiff</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JP2">
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>showFieldSets</method_name>
</method>
</datastream>
<datastream id="TN"/>
<datastream id="DC"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<methods>
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>ingestBook</method_name>
<datastream_id>MODS</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="MODS" page="2">
<form_builder_method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildDrupalForm</method_name>
<form_handler>handleIngestForm</form_handler>
</form_builder_method>
</ingest_form>
<edit_metadata>
<build_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildEditMetadataForm</method_name>
</build_form_method>
<submit_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>handleEditMetadataForm</method_name>
</submit_form_method>
</edit_metadata>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-06-16T08:59:35.673Z" ID="ISLANDORACM.4"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="2083">
<foxml:xmlContent>
<content_model name="Book">
<mimetypes>
<type>image/tiff</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JP2">
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>showFieldSet</method_name>
</method>
</datastream>
<datastream id="TN"/>
<datastream id="DC"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<methods>
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>ingestBook</method_name>
<datastream_id>MODS</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="MODS" page="2">
<form_builder_method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildDrupalForm</method_name>
<form_handler>handleIngestForm</form_handler>
</form_builder_method>
</ingest_form>
<edit_metadata>
<build_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildEditMetadataForm</method_name>
</build_form_method>
<submit_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>handleEditMetadataForm</method_name>
</submit_form_method>
</edit_metadata>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-06-16T08:59:52.831Z" ID="ISLANDORACM.5"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="2084">
<foxml:xmlContent>
<content_model name="Book">
<mimetypes>
<type>image/tiff</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JP2">
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>showFieldSets</method_name>
</method>
</datastream>
<datastream id="TN"/>
<datastream id="DC"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<methods>
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>ingestBook</method_name>
<datastream_id>MODS</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="MODS" page="2">
<form_builder_method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildDrupalForm</method_name>
<form_handler>handleIngestForm</form_handler>
</form_builder_method>
</ingest_form>
<edit_metadata>
<build_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildEditMetadataForm</method_name>
</build_form_method>
<submit_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>handleEditMetadataForm</method_name>
</submit_form_method>
</edit_metadata>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-06-16T09:21:14.357Z" ID="ISLANDORACM.6"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="2132">
<foxml:xmlContent>
<content_model name="Book">
<mimetypes>
<type>image/tiff</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JP2">
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>showFieldSets</method_name>
</method>
</datastream>
<datastream id="TN"/>
<datastream id="MODS"/>
<datastream id="DC"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<methods>
<method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>ingestBook</method_name>
<datastream_id>MODS</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="MODS" page="2">
<form_builder_method>
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildDrupalForm</method_name>
<form_handler>handleIngestForm</form_handler>
</form_builder_method>
</ingest_form>
<edit_metadata>
<build_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>buildEditMetadataForm</method_name>
</build_form_method>
<submit_form_method dsid="MODS">
<module>fedora_ilives</module>
<file>book.inc</file>
<class_name>IslandoraBook</class_name>
<method_name>handleEditMetadataForm</method_name>
</submit_form_method>
</edit_metadata>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-11-26T15:24:13.742Z" ID="ISLANDORACM.7"
LABEL="Islandora content model information" MIMETYPE="text/xml" SIZE="1328">
<foxml:xmlContent>
<content_model name="Book" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>image/tiff</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>text/xml</applies_to>
<ingest_methods>
<ingest_method class="IslandoraBook" dsid="MODS" file="book.inc" method="ingestBook"
modified_files_ext="" module="fedora_ilives"/>
</ingest_methods>
</rule>
</ingest_rules>
<datastreams>
<datastream dsid="JP2">
<display_method class="IslandoraBook" file="book.inc" method="showFieldSets" module="fedora_ilives"/>
</datastream>
<datastream dsid="TN"/>
<datastream dsid="MODS"/>
<datastream dsid="DC"/>
</datastreams>
<ingest_form dsid="MODS" page="2">
<form_builder_method class="IslandoraBook" file="book.inc" handler="handleIngestForm"
method="buildDrupalForm" module="fedora_ilives"/>
<form_elements/>
</ingest_form>
<edit_metadata_method class="IslandoraBook" dsid="MODS" file="book.inc" handler="handleEditMetadataForm"
method="buildEditMetadataForm" module="fedora_ilives"/>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

73
content_models/ilives_jp2Sdef.xml

@ -1,73 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="ilives:jp2Sdef" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="ilives:jp2Sdef"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-18T15:07:42.398Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-05-25T13:17:14.106Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.398Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-12T14:56:59.840Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdef.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-05-25T13:17:14.106Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.487Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="363">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:jp2Sdef">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.398Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="381">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>ilives:jp2Sdef</dc:title>
<dc:identifier>ilives:jp2Sdef</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T20:08:16.294Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0" ID="METHODMAP.3" LABEL="Abstract Method Map"
MIMETYPE="text/xml" SIZE="245">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="getMetadata"/>
<fmm:Method operationName="getRegion"/>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

179
content_models/ilives_jp2Sdep-pageCModel.xml

@ -1,179 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="ilives:jp2Sdep-pageCModel" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="ilives:jp2Sdep-pageCModel"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-21T03:24:05.906Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-06-01T00:48:39.302Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-21T03:24:05.906Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-12T14:57:00.246Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdep-pageCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-01T00:46:19.239Z</audit:date>
<audit:justification>Ingested from local file /Users/al/Desktop/ilives_jp2Sdep-pageCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-01T00:48:39.302Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-05-21T03:24:05.906Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="403">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>ilives:jp2Sdep-pageCModel</dc:title>
<dc:identifier>ilives:jp2Sdep-pageCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-21T03:26:21.830Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP.1" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="2498">
<foxml:xmlContent>
<fmm:MethodMap bDefPID="djatoka:bDef" name="MethodMap - djatoka Service Methods" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="getMetadata" wsdlMsgName="getMetadataRequest" wsdlMsgOutput="response">
<fmm:DefaultInputParm defaultValue="$PID" label="fedora object pid" parmName="PID" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="JP2" label="content model" parmName="DSID" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="info:lanl-repo/svc/getMetadata" parmName="svc_id" passBy="VALUE" required="true"/>
<fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/>
<fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="application/json"/>
</fmm:Method>
<fmm:Method operationName="getRegion" wsdlMsgName="getRegionRequest" wsdlMsgOutput="response">
<fmm:DefaultInputParm defaultValue="$PID" label="fedora object pid" parmName="PID" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="JP2" label="content model" parmName="DSID" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="info:lanl-repo/svc/getRegion" parmName="svc_id" passBy="VALUE" required="true"/>
<fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/>
<fmm:UserInputParm defaultValue="" parmName="region" passBy="VALUE" required="false"/>
<fmm:UserInputParm defaultValue="0" parmName="rotate" passBy="VALUE" required="false"/>
<fmm:UserInputParm defaultValue="-1" parmName="level" passBy="VALUE" required="false"/>
<fmm:UserInputParm defaultValue="" parmName="scale" passBy="VALUE" required="false"/>
<fmm:UserInputParm defaultValue="" parmName="clayers" passBy="VALUE" required="false"/>
<fmm:UserInputParm defaultValue="image/jpeg" parmName="format" passBy="VALUE" required="false"/>
<fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="image/jpeg"/>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-21T03:26:44.151Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC.1"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="401">
<foxml:xmlContent>
<fbs:DSInputSpec label="jp2SdepInputSpec" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC">
<fbs:DSInputLabel>DC</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="WSDL" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-21T03:27:46.103Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL.1" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="3258">
<foxml:xmlContent>
<wsdl:definitions name="Fedora Local Djatoka Service" targetNamespace="jp2SDep"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="djatoka"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="getMetadataRequest">
<wsdl:part name="PID" type="xsd:string"/>
<wsdl:part name="DSID" type="xsd:string"/>
<wsdl:part name="svc_id" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getRegionRequest">
<wsdl:part name="PID" type="xsd:string"/>
<wsdl:part name="DSID" type="xsd:string"/>
<wsdl:part name="svc_id" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="response">
<wsdl:part name="exhibit" type="xsd:base64Binary"/>
</wsdl:message>
<wsdl:portType name="FedoraDjatokaPortType">
<wsdl:operation name="getMetadata">
<wsdl:input message="this:getMetadataRequest"/>
<wsdl:output message="this:response"/>
</wsdl:operation>
<wsdl:operation name="getRegion">
<wsdl:input message="this:getRegionRequest"/>
<wsdl:output message="this:response"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="FedoraDjatoka">
<wsdl:port binding="this:FedoraDjatoka_http" name="FedoraDjatoka_port">
<http:address location="http://local.fedora.server/"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="FedoraDjatoka_http" type="this:FedoraDjatokaPortType">
<http:binding verb="GET"/>
<wsdl:operation name="getMetadata">
<http:operation location="adore-djatoka/resolver?url_ver=Z39.88-2004&amp;rft_id=http://local.fedora.server/fedora/get/(PID)/(DSID)&amp;svc_id=(svc_id)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="application/json"/>
</wsdl:output>
</wsdl:operation>
<wsdl:operation name="getRegion">
<http:operation location="adore-djatoka/resolver?url_ver=Z39.88-2004&amp;rft_id=http://local.fedora.server/fedora/get/(PID)/(DSID)&amp;svc_id=(svc_id)&amp;svc_val_fmt=info:ofi/fmt:kev:mtx:jpeg2000&amp;svc.format=(format)&amp;svc.level=(level)&amp;svc.rotate=(rotate)&amp;svc.region=(region)&amp;svc.scale=(scale)&amp;svc.clayers=(clayers)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="image/jpeg"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-06-01T00:48:39.302Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.2" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="688">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:jp2Sdep-pageCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/ilives:jp2Sdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/ilives:pageCModel" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/newspapers:pageCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

72
content_models/ilives_tei2htmlSdef.xml

@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="ilives:tei2htmlSdef" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="ilives:tei2htmlSdef"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-18T15:07:42.398Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-06-01T00:46:19.652Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.398Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-12T14:57:01.057Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdef.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-01T00:46:19.652Z</audit:date>
<audit:justification>Ingested from local file /Users/al/Desktop/ilives_tei2htmlSdef.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.487Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="368">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:tei2htmlSdef">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.398Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="391">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>ilives:tei2htmlSdef</dc:title>
<dc:identifier>ilives:tei2htmlSdef</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T20:08:16.294Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0" ID="METHODMAP.3" LABEL="Abstract Method Map"
MIMETYPE="text/xml" SIZE="180">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="tei2html"/>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

234
content_models/ilives_tei2htmlSdep-pageCModel.xml

@ -1,234 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="ilives:tei2htmlSdep-pageCModel" VERSION="1.1"
xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="ilives:tei2htmlSdep-pageCModel"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-21T03:24:05.906Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-06-01T00:46:19.847Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-21T03:24:05.906Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-12T14:57:01.366Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdep-pageCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>XSL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-12-11T19:09:52.417Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>XSL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-12-11T19:22:11.096Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-01T00:46:19.847Z</audit:date>
<audit:justification>Ingested from local file /Users/al/Desktop/ilives_tei2htmlSdep-pageCModel.xml</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-21T03:25:04.961Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.1" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="614">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:tei2htmlSdep-pageCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/ilives:tei2htmlSdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/ilives:pageCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-05-21T03:24:05.906Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="413">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>ilives:tei2htmlSdep-pageCModel</dc:title>
<dc:identifier>ilives:tei2htmlSdep-pageCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-09-17T02:47:11.226Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC.3"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="718">
<foxml:xmlContent>
<fbs:DSInputSpec label="tei2htmlSdepInputSpec" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="TEI">
<fbs:DSInputLabel>TEI</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" pid="ilives:tei2htmlSdep-pageCModel" wsdlMsgPartName="XSL">
<fbs:DSInputLabel>XSL</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="WSDL" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-09-17T02:47:56.422Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL.3" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="1938">
<foxml:xmlContent>
<wsdl:definitions name="tei2htmlSdep" targetNamespace="tei2htmlSdep"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="tei2htmlSdep"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="tei2htmlRequestMsg">
<wsdl:part name="TEI" type="xsd:string"/>
<wsdl:part name="XSL" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="response">
<wsdl:part name="exhibit" type="xsd:base64Binary"/>
</wsdl:message>
<wsdl:portType name="tei2html_portType">
<wsdl:operation name="tei2html">
<wsdl:input message="this:tei2htmlRequestMsg"/>
<wsdl:output message="this:response"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="tei2html_service">
<wsdl:port binding="this:tei2html_binding" name="tei2html_port">
<http:address location="http://local.fedora.server/saxon/"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="tei2html_binding" type="this:tei2html_portType">
<http:binding verb="GET"/>
<wsdl:operation name="tei2html">
<http:operation location="SaxonServlet?source=(TEI)&amp;style=(XSL)&amp;clear-stylesheet-cache=yes"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/html"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-09-17T02:51:06.102Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP.6" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="695">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="tei2html" wsdlMsgName="tei2htmlRequestMsg" wsdlMsgOutput="response">
<fmm:DatastreamInputParm parmName="TEI" passBy="URL_REF" required="true"/>
<fmm:DatastreamInputParm parmName="XSL" passBy="URL_REF" required="true"/>
<fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/>
<fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="text/html"/>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="XSL" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-12-11T19:22:11.096Z" ID="XSL.2"
LABEL="XSL stylesheet for tei2html conversion" MIMETYPE="text/xml" SIZE="3406">
<foxml:xmlContent>
<xsl:stylesheet exclude-result-prefixes="tei" version="2.0" xmlns:tei="http://www.tei-c.org/ns/1.0" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output doctype-public="-//W3C//DTD HTML 4.01 Strict//EN"
doctype-system="http://www.w3.org/TR/html4/strict.dtd" indent="yes" method="html" omit-xml-declaration="yes"/>
<xsl:template match="tei:TEI">
<html>
<head>
<title>
<xsl:value-of select="normalize-space(tei:teiHeader/tei:fileDesc/tei:titleStmt/tei:title)"/>
</title>
</head>
<body>
<xsl:apply-templates/>
</body>
</html>
</xsl:template>
<xsl:template match="tei:body">
<div class="tei">
<xsl:apply-templates/>
</div>
</xsl:template>
<xsl:template match="tei:p">
<p>
<xsl:apply-templates/>
</p>
</xsl:template>
<xsl:template match="tei:date">
<span class="date">
<xsl:value-of select="normalize-space(.)"/>
</span>
</xsl:template>
<xsl:template match="tei:persName">
<xsl:choose>
<xsl:when test="(.//tei:surname) and (.//tei:forename)">
<span class="persName">
<a>
<xsl:attribute name="class">search persName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22<xsl:value-of
select=".//tei:surname"/>+<xsl:value-of select=".//tei:forename"/>%22+AND+dc.type:collection</xsl:attribute>
<xsl:apply-templates select="*|node()"/>
</a>
</span>
</xsl:when>
<xsl:otherwise>
<xsl:apply-templates select="*|node()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="tei:placeName">
<a>
<xsl:attribute name="class">search placeName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
<xsl:template match="tei:orgName">
<a>
<xsl:attribute name="class">search orgName</xsl:attribute>
<xsl:attribute name="target">_blank</xsl:attribute>
<xsl:attribute
name="href">http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22<xsl:value-of select="normalize-space(.)"/>%22+AND+dc.type:collection</xsl:attribute>
<xsl:value-of select="normalize-space(.)"/>
</a>
</xsl:template>
<xsl:template match="tei:teiHeader"/>
</xsl:stylesheet>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

72
content_models/ilives_viewerSdef.xml

@ -1,72 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="ilives:viewerSdef" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="ilives:viewerSdef"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-18T15:07:42.398Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-05-25T13:17:14.247Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.398Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-12T17:09:29.912Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdef.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-05-25T13:17:14.247Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.487Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="366">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:viewerSdef">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T15:07:42.398Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="387">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>ilives:viewerSdef</dc:title>
<dc:identifier>ilives:viewerSdef</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T20:08:16.294Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0" ID="METHODMAP.3" LABEL="Abstract Method Map"
MIMETYPE="text/xml" SIZE="181">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="getViewer"/>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

157
content_models/ilives_viewerSdep-bookCModel.xml

@ -1,157 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="ilives:viewerSdep-bookCModel" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="ilives:viewerSdep-bookCModel"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-05-18T19:50:00.488Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-05-31T20:57:49.117Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T19:50:00.488Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-12T17:09:41.797Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-bookCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-05-31T20:03:42.709Z</audit:date>
<audit:justification>Ingested from source repository with pid ilives:viewerSdep-bookCModel</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-05-31T20:04:57.893Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-05-31T20:57:49.117Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-05-18T19:50:00.488Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="409">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>ilives:viewerSdep-bookCModel</dc:title>
<dc:identifier>ilives:viewerSdep-bookCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-18T19:52:55.042Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC.1"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="404">
<foxml:xmlContent>
<fbs:DSInputSpec label="viewerSdepInputSpec" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC">
<fbs:DSInputLabel>DC</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-19T13:34:53.687Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP.2" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="955">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="getViewer" wsdlMsgName="getViewerRequestMsg" wsdlMsgOutput="getViewerResponseMsg">
<fmm:DefaultInputParm defaultValue="$PID" label="fedora object pid" parmName="PID" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="ilives:bookCModel" label="content model" parmName="CMODEL"
passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="JP2" label="content model" parmName="DSID" passBy="VALUE" required="true"/>
<fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/>
<fmm:MethodReturnType wsdlMsgName="getViewerResponseMsg" wsdlMsgTOMIME="text/html"/>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="WSDL" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-05-19T13:34:20.768Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL.4" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="2073">
<foxml:xmlContent>
<wsdl:definitions name="viewerSdep" targetNamespace="viewerSdep"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="viewerSdep"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="getViewerRequestMsg">
<wsdl:part name="PID" type="xsd:string"/>
<wsdl:part name="CMODEL" type="xsd:string"/>
<wsdl:part name="DSID" type="xsd:string"/>
<wsdl:part name="uid" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getViewerResponseMsg">
<wsdl:part name="RESPONSE" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="viewer_portType">
<wsdl:operation name="getViewer">
<wsdl:input message="this:getViewerRequestMsg"/>
<wsdl:output message="this:getViewerResponseMsg"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="viewer_service">
<wsdl:port binding="this:viewer_binding" name="viewer_port">
<http:address location="http://local.fedora.server/iiv/viewer.jsp"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="viewer_binding" type="this:viewer_portType">
<http:binding verb="GET"/>
<wsdl:operation name="getViewer">
<http:operation location="?pid=(PID)&amp;cmodel=(CMODEL)&amp;dsid=(DSID)&amp;uid=(uid)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/html"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-05-31T20:57:49.117Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.3" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="562">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/ilives:viewerSdep-bookCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/ilives:viewerSdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/ilives:bookCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

584
content_models/islandora_collectionCModel.xml

@ -1,584 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="islandora:collectionCModel" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Islandora Collection Content Model"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-12-20T16:14:50.165Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-01-21T19:41:19.709Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-12-20T16:14:50.165Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:14:50.165Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:14:50.352Z</audit:date>
<audit:justification>Ingested object RELS-EXT</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:14:50.407Z</audit:date>
<audit:justification>Modified by Islandora API</audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:14:50.475Z</audit:date>
<audit:justification>Ingested object ISLANDORACM</audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-01-17T15:04:59.169Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-01-17T15:06:08.023Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-01-21T19:40:39.790Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2011-01-21T19:41:19.709Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:14:50.165Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="413">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Islandora Collection Content Model</dc:title>
<dc:identifier>islandora:collectionCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:14:50.352Z" ID="RELS-EXT.0"
LABEL="Fedora object-to-object relationship metadata" MIMETYPE="text/xml" SIZE="167">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:collectionCModel"/>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-12-20T16:14:50.407Z" ID="RELS-EXT.1"
LABEL="Fedora Object-to-Object Relationship Metadata" MIMETYPE="text/xml" SIZE="299">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:collectionCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="ISLANDORACM" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:14:50.475Z" ID="ISLANDORACM.0" LABEL="Islandora Content Model.xml"
MIMETYPE="application/xml" SIZE="4349">
<foxml:xmlContent>
<content_model name="Collection" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules/>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="CollectionFormBuilder" file="plugins/CollectionFormBuilder.inc"
handler="handleQDCForm" method="buildQDCForm" module=""/>
<form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer/Author" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<authoritative_list>
<item>none</item>
<item>Multi Media</item>
<item>image</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>collection</item>
<item>dataset</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2011-01-17T15:04:59.169Z" ID="ISLANDORACM.1" LABEL="Islandora Content Model.xml"
MIMETYPE="application/xml" SIZE="4554">
<foxml:xmlContent>
<content_model name="Collection" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules/>
<datastreams>
<datastream dsid="DC">
<display_method class="FedoraCollection" file="plugins/herbarium.inc" method="showFieldSets" module=""/>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="CollectionFormBuilder" file="plugins/CollectionFormBuilder.inc"
handler="handleQDCForm" method="buildQDCForm" module=""/>
<form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer/Author" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<authoritative_list>
<item>none</item>
<item>Multi Media</item>
<item>image</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>collection</item>
<item>dataset</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2011-01-17T15:06:08.023Z" ID="ISLANDORACM.2" LABEL="Islandora Content Model.xml"
MIMETYPE="application/xml" SIZE="4551">
<foxml:xmlContent>
<content_model name="Collection" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules/>
<datastreams>
<datastream dsid="DC">
<display_method class="CollectionClass" file="CollectionClass.inc" method="showFieldSets" module=""/>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="CollectionFormBuilder" file="plugins/CollectionFormBuilder.inc"
handler="handleQDCForm" method="buildQDCForm" module=""/>
<form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer/Author" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<authoritative_list>
<item>none</item>
<item>Multi Media</item>
<item>image</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>collection</item>
<item>dataset</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2011-01-21T19:40:39.790Z" ID="ISLANDORACM.3" LABEL="Islandora Content Model.xml"
MIMETYPE="application/xml" SIZE="4692">
<foxml:xmlContent>
<content_model name="Collection" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules/>
<datastreams>
<datastream dsid="DC">
<display_method class="CollectionClass" file="CollectionClass.inc" method="showFieldSets" module=""/>
</datastream>
<datastream dsid="TN"/>
<datastream dsid="COLLECTION_POLICY"/>
<datastream dsid="Crumpets"/>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="CollectionFormBuilder" file="plugins/CollectionFormBuilder.inc"
handler="handleQDCForm" method="buildQDCForm" module=""/>
<form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer/Author" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<authoritative_list>
<item>none</item>
<item>Multi Media</item>
<item>image</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>collection</item>
<item>dataset</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2011-01-21T19:41:19.709Z" ID="ISLANDORACM.4" LABEL="Islandora Content Model.xml"
MIMETYPE="application/xml" SIZE="4646">
<foxml:xmlContent>
<content_model name="Collection" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>text/xml</type>
<type>text/plain</type>
<type>application/xml</type>
</mimetypes>
<ingest_rules/>
<datastreams>
<datastream dsid="DC">
<display_method class="CollectionClass" file="CollectionClass.inc" method="showFieldSets" module=""/>
</datastream>
<datastream dsid="TN"/>
<datastream dsid="COLLECTION_POLICY"/>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="CollectionFormBuilder" file="plugins/CollectionFormBuilder.inc"
handler="handleQDCForm" method="buildQDCForm" module=""/>
<form_elements>
<element label="Title/Caption/Object Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer/Author" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<authoritative_list>
<item>none</item>
<item>Multi Media</item>
<item>image</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of contents, or free-text account of the content of the resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>collection</item>
<item>dataset</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

1851
content_models/islandora_herbCModel.xml

File diff suppressed because it is too large Load Diff

277
content_models/islandora_jp2Sdep-slideCModel.xml

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

247
content_models/islandora_largeimages.xml

@ -1,247 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="islandora:largeimages" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Large Images Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-12-20T16:02:16.800Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-12-20T16:09:32.544Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-12-20T16:02:16.800Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:16.800Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.020Z</audit:date>
<audit:justification>Ingested object RELS-EXT</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.091Z</audit:date>
<audit:justification>Modified by Islandora API</audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.142Z</audit:date>
<audit:justification>Modified by Islandora API</audit:justification>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:02:17.213Z</audit:date>
<audit:justification>Ingested object COLLECTION_POLICY</audit:justification>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:08:27.075Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
<audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>TN</audit:componentID>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-12-20T16:08:27.131Z</audit:date>
<audit:justification>Ingested object TN</audit:justification>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>purgeDatastream</audit:action>
<audit:componentID>TN</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-12-20T16:09:24.726Z</audit:date>
<audit:justification>DatastreamPane generated this logMessage. . . . Purged datastream (ID=TN), versions ranging from 2010-12-20T12:08:27.131Z to 2010-12-20T12:08:27.131Z. This resulted in the permanent removal of 1 datastream version(s) (2010-12-20T12:08:27.131Z) and all associated audit records.</audit:justification>
</audit:record>
<audit:record ID="AUDREC9">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>COLLECTION_POLICY</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-12-20T16:09:32.544Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:02:16.800Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="397">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Large Images Collection</dc:title>
<dc:identifier>islandora:largeimages</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.020Z" ID="RELS-EXT.0"
LABEL="Fedora object-to-object relationship metadata" MIMETYPE="text/xml" SIZE="178">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:largeimages"/>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.091Z" ID="RELS-EXT.1"
LABEL="Fedora Object-to-Object Relationship Metadata" MIMETYPE="text/xml" SIZE="361">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:largeimages">
<fedora-model:hasModel rdf:resource="info:fedora/islandora:collectionCModel" xmlns:fedora-model="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.142Z" ID="RELS-EXT.2"
LABEL="Fedora Object-to-Object Relationship Metadata" MIMETYPE="text/xml" SIZE="520">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:largeimages">
<fedora-model:hasModel rdf:resource="info:fedora/islandora:collectionCModel" xmlns:fedora-model="info:fedora/fedora-system:def/model#"/>
<isMemberOfCollection rdf:resource="info:fedora/islandora:demos" xmlns="info:fedora/fedora-system:def/relations-external#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="COLLECTION_POLICY" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-12-20T16:02:17.213Z" ID="COLLECTION_POLICY.0" LABEL="Large Images Collection"
MIMETYPE="text/xml" SIZE="2533">
<foxml:xmlContent>
<collection_policy name="Large Images Collection">
<contentmodels>
<contentmodel name="SLIDE_CMODEL">
<pid_namespace>islandora:slide</pid_namespace>
<pid>islandora:slideCModel</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
<contentmodel name="MAP_CMODEL">
<pid_namespace>islandora:map</pid_namespace>
<pid>islandora:mapCModel</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
<contentmodel name="HERB_CMODEL">
<pid_namespace>islandora:herb</pid_namespace>
<pid>islandora:herbCModel</pid>
<dsid>ISLANDORACM</dsid>
</contentmodel>
</contentmodels>
<relationship>isMemberOfCollection</relationship>
<search_terms>
<default>dc.description</default>
<term>
<field>dc.title</field>
<value>dc.title</value>
</term>
<term>
<field>dc.creator</field>
<value>dc.creator</value>
</term>
<term>
<field>dc.description</field>
<value>dc.description</value>
</term>
<term>
<field>dc.date</field>
<value>dc.date</value>
</term>
<term>
<field>dc.identifier</field>
<value>dc.identifier</value>
</term>
<term>
<field>dc.language</field>
<value>dc.language</value>
</term>
<term>
<field>dc.publisher</field>
<value>dc.publisher</value>
</term>
<term>
<field>dc.rights</field>
<value>dc.rights</value>
</term>
<term>
<field>dc.subject</field>
<value>dc.subject</value>
</term>
<term>
<field>dc.relation</field>
<value>dc.relation</value>
</term>
<term>
<field>dcterms.temporal</field>
<value>dcterms.temporal</value>
</term>
<term>
<field>dcterms.spatial</field>
<value>dcterms.spatial</value>
</term>
<term>
<field>fgs.DS.first.text</field>
<value>Full Text</value>
</term>
</search_terms>
</collection_policy>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-12-20T16:09:32.544Z" ID="COLLECTION_POLICY.1" LABEL="Large Images Collection"
MIMETYPE="text/xml" SIZE="1428">
<foxml:xmlContent>
<collection_policy name="Large Images Collection" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="SLIDE_CMODEL" namespace="islandora:slide" pid="islandora:slideCModel"/>
<content_model dsid="ISLANDORACM" name="MAP_CMODEL" namespace="islandora:map" pid="islandora:mapCModel"/>
<content_model dsid="ISLANDORACM" name="HERB_CMODEL" namespace="islandora:herb" pid="islandora:herbCModel"/>
</content_models>
<search_terms>
<term field="dc.title">dc.title</term>
<term field="dc.creator">dc.creator</term>
<term default="true" field="dc.description">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>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

366
content_models/islandora_mapCModel.xml

@ -1,366 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="islandora:mapCModel" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Islandora Map Content Model"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-05-25T12:52:58.656Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-09-16T16:13:49.927Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-05-25T12:52:58.656Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-05-25T12:52:58.656Z</audit:date>
<audit:justification>Created with Admin GUI "New Object" command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-05-25T12:53:38.788Z</audit:date>
<audit:justification>DatastreamsPane generated this logMessage.</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-09-16T16:13:13.388Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/fedora_repository/content_models/islandora_mapCModel.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>ISLANDORACM</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-09-16T16:13:49.927Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-05-25T12:52:58.744Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="363">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:mapCModel">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ContentModel-3.0"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DS-COMPOSITE-MODEL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-05-25T12:52:58.745Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0" ID="DS-COMPOSITE-MODEL1.0"
LABEL="Datastream Composite Model" MIMETYPE="text/xml" SIZE="1120">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#">
<comment xmlns="info:fedora/fedora-system:def/comment#">
This DS-COMPOSITE-MODEL datastream is included as a starting point to
assist in the creation of a content model. The DS-COMPOSITE-MODEL
should define the datastreams that are required for any objects
conforming to this content model.
For more information about content models, see:
http://fedora-commons.org/confluence/x/dgBI.
For examples of completed content model objects, see the demonstration
objects included with your Fedora distribution, such as:
demo:CMImage, demo:UVA_STD_IMAGE, demo:DualResImageCollection,
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
</comment>
<dsTypeModel ID="DSID">
<form MIME="text/xml"/>
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-05-25T12:52:58.656Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="399">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Islandora Map Content Model</dc:title>
<dc:identifier>islandora:mapCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="ISLANDORACM" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-05-25T12:53:38.788Z" ID="ISLANDORACM.0"
LABEL="Islandora Content Model Object" MIMETYPE="text/xml" SIZE="7098">
<foxml:xmlContent>
<content_model name="Standard_Map">
<mimetypes>
<type>image/tiff</type>
<type>image/tif</type>
</mimetypes>
<display_in_fieldset>
<datastream id="JPG">
<method>
<file>plugins/map_viewer.inc</file>
<class_name>ShowMapStreamsInFieldSets</class_name>
<method_name>showJPG</method_name>
</method>
</datastream>
<datastream id="JP2"/>
<datastream id="FULL_SIZE"/>
<datastream id="FULL_JPG"/>
<datastream id="DC"/>
<datastream id="MODS"/>
</display_in_fieldset>
<ingest_rules>
<rule>
<applies_to>
image/tiff
</applies_to>
<applies_to>
image/tif
</applies_to>
<methods>
<method>
<file>plugins/ImageManipulation.inc</file>
<class_name>ImageManipulation</class_name>
<method_name>createJP2</method_name>
<modified_files_ext>jp2</modified_files_ext>
<datastream_id>JP2</datastream_id>
</method>
</methods>
</rule>
</ingest_rules>
<ingest_form dsid="QDC" page="2">
<form_builder_method>
<file>plugins/DemoFormBuilder.inc</file>
<class_name>DemoFormBuilder</class_name>
<method_name>buildQDCForm</method_name>
<form_handler>handleQDCForm</form_handler>
</form_builder_method>
<form_elements>
<element>
<label>Title/Caption/Image Name</label>
<name>dc:title</name>
<type>textfield</type>
<description>The name given to the resource</description>
<required>true</required>
</element>
<element>
<label>Creator/Photographer</label>
<name>dc:creator</name>
<type>textfield</type>
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Subject</label>
<name>dc:subject</name>
<type>select</type>
<description>Subject</description>
<required>false</required>
<authoritative_list>
<item>
<field>image</field>
<value>image</value>
</item>
<item>
<field>photograph</field>
<value>photograph</value>
</item>
<item>
<field>presentation</field>
<value>presentation</value>
</item>
<item>
<field>art</field>
<value>art</value>
</item>
</authoritative_list>
</element>
<element>
<label>Description</label>
<name>dc:description</name>
<type>textarea</type>
<description>Description of the Image</description>
<required>true</required>
</element>
<element>
<label>Publisher</label>
<name>dc:publisher</name>
<type>textfield</type>
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
<required>false</required>
</element>
<element>
<label>Contributor</label>
<name>dc:contributor</name>
<type>textfield</type>
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
<required>false</required>
</element>
<element>
<label>Date</label>
<name>dc:date</name>
<type>textfield</type>
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
<required>false</required>
</element>
<element>
<label>Resource Type</label>
<name>dc:type</name>
<type>textfield</type>
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
<required>false</required>
</element>
<element>
<label>Source</label>
<name>dc:source</name>
<type>textfield</type>
<description>A reference to a resource from which the present resource is derived.</description>
<required>false</required>
</element>
<element>
<label>Identifier</label>
<name>dc:identifier</name>
<type>textfield</type>
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
<required>false</required>
</element>
<element>
<label>Language</label>
<name>dc:language</name>
<type>select</type>
<description>The language of the intellectual content of the resource.</description>
<required>false</required>
<authoritative_list>
<item>
<field>eng</field>
<value>English</value>
</item>
<item>
<field>fre</field>
<value>French</value>
</item>
</authoritative_list>
</element>
<element>
<label>Relation</label>
<name>dc:relation</name>
<type>textfield</type>
<description>Reference to a related resource.</description>
<required>false</required>
</element>
<element>
<label>Rights Management</label>
<name>dc:rights</name>
<type>textarea</type>
<description>Information about intellectual property rights, copyright, and various property rights.</description>
<required>false</required>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-09-16T16:13:49.927Z" ID="ISLANDORACM.1"
LABEL="Islandora Content Model Object" MIMETYPE="text/xml" SIZE="4279">
<foxml:xmlContent>
<content_model name="Standard_Map" xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>image/tiff</type>
<type>image/tif</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>image/tiff</applies_to>
<applies_to>image/tif</applies_to>
<ingest_methods>
<ingest_method class="ImageManipulation" dsid="JP2" file="plugins/ImageManipulation.inc"
method="createJP2" modified_files_ext="jp2" module=""/>
</ingest_methods>
</rule>
</ingest_rules>
<datastreams>
<datastream dsid="JPG">
<display_method class="ShowMapStreamsInFieldSets" file="plugins/map_viewer.inc" method="showJPG" module=""/>
</datastream>
<datastream dsid="JP2"/>
<datastream dsid="FULL_SIZE"/>
<datastream dsid="FULL_JPG"/>
<datastream dsid="DC"/>
<datastream dsid="MODS"/>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="DemoFormBuilder" file="plugins/DemoFormBuilder.inc" handler="handleQDCForm"
method="buildQDCForm" module=""/>
<form_elements>
<element label="Title/Caption/Image Name" name="dc:title" required="true" type="textfield">
<description>The name given to the resource</description>
</element>
<element label="Creator/Photographer" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the content of the resource such as a person, organization or service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>Subject</description>
<authoritative_list>
<item>image</item>
<item>photograph</item>
<item>presentation</item>
<item>art</item>
</authoritative_list>
</element>
<element label="Description" name="dc:description" required="true" type="textarea">
<description>Description of the Image</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations, or services), responsible for making the resource available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the content of the resource such as a person, organization or service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="textfield">
<description>Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.</description>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this instance, the accession number or collection number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property rights, copyright, and various property rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

110
content_models/islandora_mods2htmlSdef.xml

@ -1,110 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="islandora:mods2htmlSdef" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="MODS to HTML Disseminator"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-03-12T14:57:03.509Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-05-25T13:17:13.492Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-03-12T14:57:03.509Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T14:57:03.509Z</audit:date>
<audit:justification>Created with Admin GUI "New Object" command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>METHODMAP</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T15:12:03.341Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T17:28:34.323Z</audit:date>
<audit:justification>Ingested from local file /Users/aoneill/fedora_repository/content_models/islandora-mods2htmlSdef.xml</audit:justification>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-05-25T13:17:13.492Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T14:57:03.602Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="372">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:mods2htmlSdef">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDefinition-3.0"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T14:57:03.602Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0" ID="METHODMAP1.0" LABEL="Abstract Method Map"
MIMETYPE="text/xml" SIZE="1005">
<foxml:xmlContent>
<fmm:MethodMap name="Fedora MethodMap for SDef" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<comment xmlns="info:fedora/fedora-system:def/comment#">
This METHODMAP datastream is included as a starting point to
assist in the creation of a service definition. The METHODMAP
should define the methods and method parameters for this
service definition.
For more information about service definitions, see:
http://fedora-commons.org/confluence/x/dgBI.
For examples of completed service definition objects, see the demonstration
objects included with your Fedora distribution, such as:
demo:1, demo:12, demo: 19, and demo:27.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
</comment>
<fmm:Method operationName="changeme"/>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-12T15:12:03.341Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDefMethodMap-1.0" ID="METHODMAP.1" LABEL="Abstract Method Map"
MIMETYPE="text/xml" SIZE="181">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="mods2html"/>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T14:57:03.509Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="401">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>MODS to HTML Disseminator</dc:title>
<dc:identifier>islandora:mods2htmlSdef</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

464
content_models/islandora_mods2htmlSdep.xml

@ -1,464 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="islandora:mods2htmlSdep" VERSION="1.1" xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="MODS to HTML Disseminator Service Deployment"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-03-12T15:14:29.138Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-06-01T01:05:17.111Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2010-03-12T15:14:29.138Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T15:14:29.138Z</audit:date>
<audit:justification>Created with Admin GUI "New Object" command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>addDatastream</audit:action>
<audit:componentID>XSL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T15:17:20.270Z</audit:date>
<audit:justification>DatastreamsPane generated this logMessage.</audit:justification>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T15:18:27.234Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>METHODMAP</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T15:21:44.430Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DSINPUTSPEC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T15:23:21.361Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>WSDL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-12T15:27:58.299Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>admin</audit:responsibility>
<audit:date>2010-05-25T13:17:13.612Z</audit:date>
<audit:justification>Fedora Object Ingested</audit:justification>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-06-01T01:05:17.111Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T15:14:29.172Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="612">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:mods2htmlSdep">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"/>
<fedora-model:isDeploymentOf rdf:resource="info:fedora/changeme-to-sDefPid"/>
<fedora-model:isContractorOf rdf:resource="info:fedora/changeme-to-cModelPid"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-12T15:18:27.234Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.1" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="613">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:mods2htmlSdep">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/islandora:mods2htmlSdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:mapCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-06-01T01:05:17.111Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.2" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="698">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:mods2htmlSdep">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/islandora:mods2htmlSdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:mapCModel" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/newspapers:issueCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T15:14:29.172Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP1.0" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="298">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This METHODMAP datastream is included as a starting point to
assist in the creation of a service deployment. The METHODMAP
should define the the mapping of the WSDL to Fedora object methods.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-12T15:21:44.430Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP.1" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="698">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="mods2html" wsdlMsgName="mods2htmlRequestMsg" wsdlMsgOutput="response">
<fmm:DatastreamInputParm parmName="MODS" passBy="URL_REF" required="true"/>
<fmm:DatastreamInputParm parmName="XSL" passBy="URL_REF" required="true"/>
<fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/>
<fmm:MethodReturnType wsdlMsgName="response" wsdlMsgTOMIME="text/html"/>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T15:14:29.172Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC1.0"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="300">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This DSINPUTSPEC datastream is included as a starting point to
assist in the creation of a service deployment. The DSINPUTSPEC
should define the datastreams to be used by WSDL-defined methods.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-12T15:23:21.361Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC.1"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="714">
<foxml:xmlContent>
<fbs:DSInputSpec label="mods2htmlSdepInputSpec" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="MODS">
<fbs:DSInputLabel>MODS</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" pid="islandora:mods2htmlSdep" wsdlMsgPartName="XSL">
<fbs:DSInputLabel>XSL</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="WSDL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T15:14:29.178Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL1.0" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="752">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This WSDL datastream is included as a starting point to
assist in the creation of a service deployment. The WSDL
should define the services provided by this
service deployment.
For more information about service deployments, see:
http://fedora-commons.org/confluence/x/dgBI.
For examples of completed service deployment objects, see the demonstration
objects included with your Fedora distribution, such as:
demo:2, demo:13, demo:20, and demo:28.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-12T15:27:58.299Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL.1" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="1953">
<foxml:xmlContent>
<wsdl:definitions name="mods2htmlSdep" targetNamespace="mods2htmlSdep"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="mods2htmlSdep"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="mods2htmlRequestMsg">
<wsdl:part name="MODS" type="xsd:string"/>
<wsdl:part name="XSL" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="response">
<wsdl:part name="exhibit" type="xsd:base64Binary"/>
</wsdl:message>
<wsdl:portType name="mods2html_portType">
<wsdl:operation name="mods2html">
<wsdl:input message="this:mods2htmlRequestMsg"/>
<wsdl:output message="this:response"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="mods2html_service">
<wsdl:port binding="this:mods2html_binding" name="mods2html_port">
<http:address location="http://local.fedora.server/saxon/"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="mods2html_binding" type="this:mods2html_portType">
<http:binding verb="GET"/>
<wsdl:operation name="mods2html">
<http:operation location="SaxonServlet?source=(MODS)&amp;style=(XSL)&amp;clear-stylesheet-cache=yes"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/html"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T15:14:29.138Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="420">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>MODS to HTML Disseminator Service Deployment</dc:title>
<dc:identifier>islandora:mods2htmlSdep</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="XSL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2010-03-12T15:17:20.270Z" ID="XSL.0"
LABEL="MODS to HTML XSLT Transformation Stylesheet" MIMETYPE="text/xml" SIZE="8864">
<foxml:xmlContent>
<xsl:stylesheet exclude-result-prefixes="mods" version="1.0" xmlns:mods="http://www.loc.gov/mods/v3"
xmlns:xlink="http://www.w3.org/1999/xlink" xmlns:xsl="http://www.w3.org/1999/XSL/Transform">
<xsl:output indent="yes" method="html"/>
<xsl:variable name="dictionary" select="document('http://www.loc.gov/standards/mods/modsDictionary.xml')/dictionary"/>
<xsl:template match="/">
<html>
<head>
<style type="text/css">TD {vertical-align:top}</style>
</head>
<body>
<xsl:choose>
<xsl:when test="mods:modsCollection">
<xsl:apply-templates select="mods:modsCollection"/>
</xsl:when>
<xsl:when test="mods:mods">
<xsl:apply-templates select="mods:mods"/>
</xsl:when>
</xsl:choose>
</body>
</html>
</xsl:template>
<xsl:template match="mods:modsCollection">
<xsl:apply-templates select="mods:mods"/>
</xsl:template>
<xsl:template match="mods:mods">
<table>
<xsl:apply-templates/>
</table>
<hr/>
</xsl:template>
<xsl:template match="*">
<xsl:choose>
<xsl:when test="child::*">
<tr>
<td colspan="2">
<b>
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="local-name()"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="attr"/>
</b>
</td>
</tr>
<xsl:apply-templates mode="level2"/>
</xsl:when>
<xsl:otherwise>
<tr>
<td width="300pt">
<b>
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="local-name()"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="attr"/>
</b>
</td>
<td>
<xsl:call-template name="formatValue"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="formatValue">
<xsl:choose>
<xsl:when test="@type='uri'">
<a href="{text()}">
<xsl:value-of select="text()"/>
</a>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="text()"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*" mode="level2">
<xsl:choose>
<xsl:when test="child::*">
<tr>
<td colspan="2">
<p style="margin-left: 1em">
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="local-name()"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="attr"/>
</p>
</td>
</tr>
<xsl:apply-templates mode="level3"/>
</xsl:when>
<xsl:otherwise>
<tr>
<td>
<p style="margin-left: 1em">
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="local-name()"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="attr"/>
</p>
</td>
<td>
<xsl:call-template name="formatValue"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*" mode="level3">
<xsl:choose>
<xsl:when test="child::*">
<tr>
<td colspan="2">
<p style="margin-left: 2em">
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="local-name()"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="attr"/>
</p>
</td>
</tr>
<xsl:apply-templates mode="level4"/>
</xsl:when>
<xsl:otherwise>
<tr>
<td>
<p style="margin-left: 2em">
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="local-name()"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="attr"/>
</p>
</td>
<td>
<xsl:call-template name="formatValue"/>
</td>
</tr>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template match="*" mode="level4">
<tr>
<td>
<p style="margin-left: 3em">
<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="local-name()"/>
</xsl:with-param>
</xsl:call-template>
<xsl:call-template name="attr"/>
</p>
</td>
<td>
<xsl:value-of select="text()"/>
</td>
</tr>
</xsl:template>
<xsl:template name="longName">
<xsl:param name="name"/>
<xsl:choose>
<xsl:when test="$dictionary/entry[@key=$name]">
<xsl:value-of select="$dictionary/entry[@key=$name]"/>
</xsl:when>
<xsl:otherwise>
<xsl:value-of select="$name"/>
</xsl:otherwise>
</xsl:choose>
</xsl:template>
<xsl:template name="attr">
<xsl:for-each select="@type|@point">:<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@authority or @edition">
<xsl:for-each select="@authority">(<xsl:call-template name="longName">
<xsl:with-param name="name">
<xsl:value-of select="."/>
</xsl:with-param>
</xsl:call-template>
</xsl:for-each>
<xsl:if test="@edition">Edition <xsl:value-of select="@edition"/>
</xsl:if>)</xsl:if>
<xsl:variable name="attrStr">
<xsl:for-each select="@*[local-name()!='edition' and local-name()!='type' and local-name()!='authority' and local-name()!='point']">
<xsl:value-of select="local-name()"/>="<xsl:value-of select="."/>",</xsl:for-each>
</xsl:variable>
<xsl:variable name="nattrStr" select="normalize-space($attrStr)"/>
<xsl:if test="string-length($nattrStr)">(<xsl:value-of select="substring($nattrStr,1,string-length($nattrStr)-1)"/>)</xsl:if>
</xsl:template>
</xsl:stylesheet>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

163
content_models/islandora_qtCModel.xml

@ -1,163 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject VERSION="1.1" PID="islandora:qtCModel"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Generic Content Model for Fedora Attach"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2010-01-26T21:29:20.416Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-03-11T21:01:44.921Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2010-01-26T21:29:20.416Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="396">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Quicktime Content Model</dc:title>
<dc:identifier>islandora:qtCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="ISLANDORACM" CONTROL_GROUP="X" STATE="A" >
<foxml:datastreamVersion ID="ISLANDORACM.0" MIMETYPE="application/xml" LABEL="ISLANDORACM.0">
<foxml:xmlContent>
<content_model xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="standard_qt" xsi:schemaLocation="http://www.islandora.ca http://localhost/islandoracm.xsd">
<mimetypes>
<type>video/quicktime</type>
<type>video/mp4</type>
<type>audio/mp3</type>
<type>audio/x-aiff</type>
</mimetypes>
<ingest_rules>
<rule>
<applies_to>video/quicktime</applies_to>
<applies_to>video/mp4</applies_to>
<applies_to>audio/mp3</applies_to>
<applies_to>audio/x-aiff</applies_to>
<ingest_methods>
<ingest_method file="plugins/Exiftool.inc" class="Exiftool" method="extractMetadata" dsid="OBJ_EXIFTOOL" modified_files_ext="">
<parameters></parameters>
</ingest_method>
<ingest_method class="Ffmpeg" dsid="FULL_SIZE" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg">
<parameters>
</parameters>
</ingest_method>
<ingest_method class="Ffmpeg" dsid="TN" file="plugins/Ffmpeg.inc" method="extract_thumbnail" modified_files_ext="jpg">
<parameters>
<parameter name="s">92x92</parameter>
</parameters>
</ingest_method>
</ingest_methods>
</rule>
</ingest_rules>
<datastreams>
<datastream dsid="OBJ">
<display_method class="ShowQtStreamsInFieldSets" file="plugins/qt_viewer.inc" method="showQt" module=""></display_method>
</datastream>
<datastream dsid="PROXY"></datastream>
<datastream dsid="OBJ_EXIFTOOL"></datastream>
<datastream dsid="TN"></datastream>
<datastream dsid="FULL_SIZE"></datastream>
<datastream dsid="QDC">
<display_method class="ShowStreamsInFieldSets" file="plugins/ShowStreamsInFieldSets.inc" method="showQdc" module=""></display_method>
</datastream>
</datastreams>
<ingest_form dsid="QDC" page="2">
<form_builder_method class="QtFormBuilder" file="plugins/QtFormBuilder.php" handler="handleQDCForm" method="buildQDCForm" module=""></form_builder_method>
<form_elements>
<element label="Title/Caption/Media Name" name="dc:title" required="true" type="textfield">
<description>The name given to the file</description>
</element>
<element label="Creator/" name="dc:creator" type="textfield">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
</element>
<element label="Subject" name="dc:subject" type="select">
<description>An entity primarily responsible for making the
content of the resource such as a person, organization or
service.</description>
<authoritative_list>
<item>home recording</item>
<item>meeting</item>
<item>presentation</item>
<item>sound</item>
</authoritative_list>
</element>
<element label="Description of Media" name="dc:description" required="true" type="textarea">
<description>Examples include an abstract, table of
contents, or free-text account of the content of the
resource.</description>
</element>
<element label="Publisher" name="dc:publisher" type="textfield">
<description>An entity, (including persons, organizations,
or services), responsible for making the resource
available.</description>
</element>
<element label="Contributor" name="dc:contributor" type="textfield">
<description>An entity responsible for contributing to the
content of the resource such as a person, organization or
service.</description>
</element>
<element label="Date" name="dc:date" type="textfield">
<description>Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
2007-10-23)</description>
</element>
<element label="Resource Type" name="dc:type" type="select">
<description>Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
report, essay, dictionary.</description>
<authoritative_list>
<item>none</item>
<item>video</item>
<item>event</item>
<item>image</item>
<item>interactive resource</item>
<item>model</item>
<item>party</item>
<item>physical object</item>
<item>place</item>
<item>service</item>
<item>software</item>
<item>sound</item>
<item>text</item>
</authoritative_list>
</element>
<element label="Source" name="dc:source" type="textfield">
<description>A reference to a resource from which the
present resource is derived.</description>
</element>
<element label="Identifier" name="dc:identifier" type="textfield">
<description>A unique reference to the resource; In this
instance, the accession number or collection
number.</description>
</element>
<element label="Language" name="dc:language" type="select">
<description>The language of the intellectual content of
the resource.</description>
<authoritative_list>
<item field="eng">English</item>
<item field="fre">French</item>
</authoritative_list>
</element>
<element label="Relation" name="dc:relation" type="textfield">
<description>Reference to a related resource.</description>
</element>
<element label="Rights Management" name="dc:rights" type="textarea">
<description>Information about intellectual property
rights, copyright, and various property
rights.</description>
</element>
</form_elements>
</ingest_form>
</content_model>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

1466
content_models/islandora_slideCModel.xml

File diff suppressed because it is too large Load Diff

311
content_models/islandora_viewerSdep-slideCModel.xml

@ -1,311 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject PID="islandora:viewerSdep-slideCModel" VERSION="1.1"
xmlns:foxml="info:fedora/fedora-system:def/foxml#" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="viewerSdep-slideCModel"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2009-11-27T17:57:45.462Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2010-05-14T20:05:44.278Z"/>
</foxml:objectProperties>
<foxml:datastream CONTROL_GROUP="X" ID="AUDIT" STATE="A" VERSIONABLE="false">
<foxml:datastreamVersion CREATED="2009-11-27T17:57:45.462Z"
FORMAT_URI="info:fedora/fedora-system:format/xml.fedora.audit" ID="AUDIT.0" LABEL="Audit Trail for this object" MIMETYPE="text/xml">
<foxml:xmlContent>
<audit:auditTrail xmlns:audit="info:fedora/fedora-system:def/audit#">
<audit:record ID="AUDREC1">
<audit:process type="Fedora API-M"/>
<audit:action>ingest</audit:action>
<audit:componentID/>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T17:57:45.462Z</audit:date>
<audit:justification>Created with Admin GUI "New Object" command</audit:justification>
</audit:record>
<audit:record ID="AUDREC2">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:02:20.095Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC3">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>METHODMAP</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:17:31.165Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC4">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>DSINPUTSPEC</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:20:50.036Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC5">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>WSDL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:22:44.560Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC6">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>WSDL</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2009-11-27T18:37:33.153Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC7">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-03-11T21:01:10.851Z</audit:date>
<audit:justification/>
</audit:record>
<audit:record ID="AUDREC8">
<audit:process type="Fedora API-M"/>
<audit:action>modifyDatastreamByValue</audit:action>
<audit:componentID>RELS-EXT</audit:componentID>
<audit:responsibility>fedoraAdmin</audit:responsibility>
<audit:date>2010-05-14T20:05:44.278Z</audit:date>
<audit:justification/>
</audit:record>
</audit:auditTrail>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="RELS-EXT" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-11-27T17:57:46.437Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT1.0" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="603">
<foxml:xmlContent>
<rdf:RDF xmlns:fedora-model="info:fedora/fedora-system:def/model#" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:viewerSdep-slideCModel">
<fedora-model:hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0"/>
<fedora-model:isDeploymentOf rdf:resource="info:fedora/changeme-to-sDefPid"/>
<fedora-model:isContractorOf rdf:resource="info:fedora/changeme-to-cModelPid"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2009-11-27T18:02:20.095Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.1" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="570">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:viewerSdep-slideCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/ilives:viewerSdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:slideCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-03-11T21:01:10.851Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.2" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="700">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:viewerSdep-slideCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/ilives:viewerSdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:slideCModel" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:mapCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2010-05-14T20:05:44.278Z" FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0"
ID="RELS-EXT.3" LABEL="RDF Statements about this object" MIMETYPE="application/rdf+xml" SIZE="831">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:viewerSdep-slideCModel">
<hasModel rdf:resource="info:fedora/fedora-system:ServiceDeployment-3.0" xmlns="info:fedora/fedora-system:def/model#"/>
<isDeploymentOf rdf:resource="info:fedora/ilives:viewerSdef" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:slideCModel" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:mapCModel" xmlns="info:fedora/fedora-system:def/model#"/>
<isContractorOf rdf:resource="info:fedora/islandora:herbCModel" xmlns="info:fedora/fedora-system:def/model#"/>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="METHODMAP" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-11-27T17:57:46.437Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP1.0" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="298">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This METHODMAP datastream is included as a starting point to
assist in the creation of a service deployment. The METHODMAP
should define the the mapping of the WSDL to Fedora object methods.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2009-11-27T18:17:31.165Z"
FORMAT_URI="info:fedora/fedora-system:FedoraSDepMethodMap-1.1" ID="METHODMAP.1" LABEL="Deployment Method Map"
MIMETYPE="text/xml" SIZE="895">
<foxml:xmlContent>
<fmm:MethodMap name="methodmap" xmlns:fmm="http://fedora.comm.nsdlib.org/service/methodmap">
<fmm:Method operationName="getViewer" wsdlMsgName="getViewerRequestMsg" wsdlMsgOutput="getViewerResponseMsg">
<fmm:DefaultInputParm defaultValue="$PID" label="fedora object pid" parmName="PID" passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="islandora:slideCModel" label="content model" parmName="CMODEL"
passBy="VALUE" required="true"/>
<fmm:DefaultInputParm defaultValue="JP2" label="content model" parmName="DSID" passBy="VALUE" required="true"/>
<fmm:UserInputParm defaultValue="" parmName="uid" passBy="VALUE" required="false"/>
<fmm:MethodReturnType wsdlMsgName="getViewerResponseMsg" wsdlMsgTOMIME="text/html"/>
</fmm:Method>
</fmm:MethodMap>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DSINPUTSPEC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-11-27T17:57:46.438Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC1.0"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="300">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This DSINPUTSPEC datastream is included as a starting point to
assist in the creation of a service deployment. The DSINPUTSPEC
should define the datastreams to be used by WSDL-defined methods.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2009-11-27T18:20:50.036Z"
FORMAT_URI="info:fedora/fedora-system:FedoraDSInputSpec-1.1" ID="DSINPUTSPEC.1"
LABEL="Datastream Input Specification" MIMETYPE="text/xml" SIZE="356">
<foxml:xmlContent>
<fbs:DSInputSpec label="viewerSdepInputSpec" xmlns:fbs="http://fedora.comm.nsdlib.org/service/bindspec">
<fbs:DSInput DSMax="1" DSMin="1" DSOrdinality="false" wsdlMsgPartName="DC">
<fbs:DSInputLabel>DC</fbs:DSInputLabel>
<fbs:DSMIME>text/xml</fbs:DSMIME>
<fbs:DSInputInstruction/>
</fbs:DSInput>
</fbs:DSInputSpec>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="WSDL" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-11-27T17:57:46.443Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL1.0" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="752">
<foxml:xmlContent>
<comment xmlns="info:fedora/fedora-system:def/comment#">
This WSDL datastream is included as a starting point to
assist in the creation of a service deployment. The WSDL
should define the services provided by this
service deployment.
For more information about service deployments, see:
http://fedora-commons.org/confluence/x/dgBI.
For examples of completed service deployment objects, see the demonstration
objects included with your Fedora distribution, such as:
demo:2, demo:13, demo:20, and demo:28.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
</comment>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2009-11-27T18:22:44.560Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL.1" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="1815">
<foxml:xmlContent>
<wsdl:definitions name="viewerSdep" targetNamespace="viewerSdep"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="viewerSdep"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="getViewerRequestMsg">
<wsdl:part name="PID" type="xsd:string"/>
<wsdl:part name="CMODEL" type="xsd:string"/>
<wsdl:part name="DSID" type="xsd:string"/>
<wsdl:part name="uid" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getViewerResponseMsg">
<wsdl:part name="RESPONSE" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="viewer_portType">
<wsdl:operation name="getViewer">
<wsdl:input message="this:getViewerRequestMsg"/>
<wsdl:output message="this:getViewerResponseMsg"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="viewer_service">
<wsdl:port binding="this:viewer_binding" name="viewer_port">
<http:address location="http://local.fedora.server/iiv/page_viewer.jsp"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="viewer_binding" type="this:viewer_portType">
<http:binding verb="GET"/>
<wsdl:operation name="getViewer">
<http:operation location="?pid=(PID)&amp;cmodel=(CMODEL)&amp;dsid=(DSID)&amp;uid=(uid)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xhtml"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion CREATED="2009-11-27T18:37:33.153Z" FORMAT_URI="http://schemas.xmlsoap.org/wsdl/"
ID="WSDL.2" LABEL="WSDL Bindings" MIMETYPE="text/xml" SIZE="1816">
<foxml:xmlContent>
<wsdl:definitions name="viewerSdep" targetNamespace="viewerSdep"
xmlns:http="http://schemas.xmlsoap.org/wsdl/http/" xmlns:mime="http://schemas.xmlsoap.org/wsdl/mime/"
xmlns:soap="http://schemas.xmlsoap.org/wsdl/soap"
xmlns:soapenc="http://schemas.xmlsoap.org/wsdl/soap/encoding" xmlns:this="viewerSdep"
xmlns:wsdl="http://schemas.xmlsoap.org/wsdl/" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<wsdl:message name="getViewerRequestMsg">
<wsdl:part name="PID" type="xsd:string"/>
<wsdl:part name="CMODEL" type="xsd:string"/>
<wsdl:part name="DSID" type="xsd:string"/>
<wsdl:part name="uid" type="xsd:string"/>
</wsdl:message>
<wsdl:message name="getViewerResponseMsg">
<wsdl:part name="RESPONSE" type="xsd:string"/>
</wsdl:message>
<wsdl:portType name="viewer_portType">
<wsdl:operation name="getViewer">
<wsdl:input message="this:getViewerRequestMsg"/>
<wsdl:output message="this:getViewerResponseMsg"/>
</wsdl:operation>
</wsdl:portType>
<wsdl:service name="viewer_service">
<wsdl:port binding="this:viewer_binding" name="viewer_port">
<http:address location="http://local.fedora.server/iiv/slide_viewer.jsp"/>
</wsdl:port>
</wsdl:service>
<wsdl:binding name="viewer_binding" type="this:viewer_portType">
<http:binding verb="GET"/>
<wsdl:operation name="getViewer">
<http:operation location="?pid=(PID)&amp;cmodel=(CMODEL)&amp;dsid=(DSID)&amp;uid=(uid)"/>
<wsdl:input>
<http:urlReplacement/>
</wsdl:input>
<wsdl:output>
<mime:content type="text/xhtml"/>
</wsdl:output>
</wsdl:operation>
</wsdl:binding>
</wsdl:definitions>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream CONTROL_GROUP="X" ID="DC" STATE="A" VERSIONABLE="true">
<foxml:datastreamVersion CREATED="2009-11-27T17:57:45.462Z" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/"
ID="DC1.0" LABEL="Dublin Core Record for this object" MIMETYPE="text/xml" SIZE="407">
<foxml:xmlContent>
<oai_dc:dc xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>viewerSdep-slideCModel</dc:title>
<dc:identifier>islandora:viewerSdep-slideCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

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>

8
fedora_repository.info

@ -1,8 +1,8 @@
; $Id$ name = Islandora Repository
name = Digital Repository
dependencies[] = imageapi dependencies[] = imageapi
dependencies[] = tabs dependencies[] = tabs
dependencies[] = islandora_content_model_forms
description = Shows a list of items in a fedora collection. description = Shows a list of items in a fedora collection.
package = Fedora Repository package = Islandora
version = 6.x-$Format:%h$-dev version = 6.x-dev
core = 6.x core = 6.x

78
fedora_repository.install

@ -1,5 +1,4 @@
<?php <?php
// $Id$
/** /**
* @file fedora_repository.install * @file fedora_repository.install
@ -35,60 +34,71 @@ function fedora_collections_enable() {
* @see _update_cron_notify() * @see _update_cron_notify()
*/ */
function fedora_repository_requirements($phase) { function fedora_repository_requirements($phase) {
global $base_url;
$requirements = array(); $requirements = array();
$t = get_t(); //May not have access to the regular t() function; and so Drupal provides...
if ($phase == 'install') { if ($phase == 'install') {
$requirements['fedora-soap']['title'] = t("PHP SOAP extension library");
// Test for SOAP
$requirements['fedora-soap']['title'] = $t("PHP SOAP extension library");
if (!class_exists('SoapClient')) { if (!class_exists('SoapClient')) {
$requirements['fedora-soap']['value'] = t("Not installed"); $requirements['fedora-soap']['value'] = $t("Not installed");
$requirements['fedora-soap']['severity'] = REQUIREMENT_ERROR; $requirements['fedora-soap']['severity'] = REQUIREMENT_ERROR;
$requirements['fedora-soap']['description'] = t('Ensure that the PHP SOAP extension is installed.'); $requirements['fedora-soap']['description'] = $t('Ensure that the PHP SOAP extension is installed.');
} }
else { else {
$requirements['fedora-soap']['value'] = t("Installed"); $requirements['fedora-soap']['value'] = $t("Installed");
$requirements['fedora-soap']['severity'] = REQUIREMENT_OK; $requirements['fedora-soap']['severity'] = REQUIREMENT_OK;
} }
// Test for Curl
$requirements['curl']['title'] = $t('PHP Curl extension library');
if (!function_exists('curl_init')) {
$requirements['curl']['value'] = $t("Not installed");
$requirements['curl']['severity'] = REQUIREMENT_ERROR;
$requirements['curl']['description'] = $t("Ensure that the PHP Curl extension is installed.");
}
else {
$requirements['curl']['value'] = $t("Installed");
$requirements['curl']['severity'] = REQUIREMENT_OK;
} }
elseif ($phase == 'runtime') {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
$requirements['fedora-repository']['title'] = t("Fedora server"); // Test for DOM
if (!fedora_available()) { $requirements['dom']['title'] = $t("PHP DOM XML extension library");
$requirements['fedora-repository']['value'] = t("Not available"); if (!method_exists('DOMDocument', 'loadHTML')) {
$requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR; $requirements['dom']['value'] = $t("Not installed");
$requirements['fedora-repository']['description'] = t('Ensure that Fedora is running and that the <a href="@collection-settings">collection settings</a> are correct.', $requirements['dom']['severity'] = REQUIREMENT_ERROR;
array('@collection-settings' => $base_url.'/admin/settings/fedora_repository')); $requirements['dom']['description'] = $t("Ensure that the PHP DOM XML extension is installed.");
} }
else { else {
$requirements['fedora-repository']['value'] = t("Available"); $requirements['dom']['value'] = $t("Installed");
$requirements['fedora-repository']['severity'] = REQUIREMENT_OK; $requirements['dom']['severity'] = REQUIREMENT_OK;
} }
// Check for ImageMagick // Test for XSLT
$requirements['fedora-imagemagick']['title'] = t("ImageMagick convert in \$PATH"); $requirements['xsl']['title'] = $t("PHP XSL extension library");
$result = exec('convert'); if (!class_exists('XSLTProcessor')) {
if (!$result) { $requirements['xslt']['value'] = $t("Not installed");
$requirements['fedora-imagemagick']['value'] = t('Not in $PATH'); $requirements['xslt']['severity'] = REQUIREMENT_ERROR;
$requirements['fedora-imagemagick']['description'] = t('Islandora will not be able to create thumbnails. Ensure that <a href="www.imagemagick.org/">ImageMagick</a> is installed and the convert command is executable by the web server user.'); $requirements['xslt']['description'] = $t("Ensure that the PHP XSL extension is installed.");
$requirements['fedora-imagemagick']['severity'] = REQUIREMENT_WARNING;
} }
else { else {
$requirements['fedora-imagemagick']['value'] = t("Available"); $requirements['xslt']['value'] = $t("Installed");
$requirements['fedora-imagemagick']['severity'] = REQUIREMENT_OK; $requirements['xslt']['severity'] = REQUIREMENT_OK;
} }
}
elseif ($phase == 'runtime') {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
$requirements['fedora-kakadu']['title'] = 'Kakadu kdu_compress in $PATH'; $requirements['fedora-repository']['title'] = $t("Fedora server");
$kdu_res = exec('kdu_compress -v'); if (!fedora_available()) {
if (!$kdu_res) { $requirements['fedora-repository']['value'] = $t("Not available");
$requirements['fedora-kakadu']['value'] = ('Not in $PATH'); $requirements['fedora-repository']['severity'] = REQUIREMENT_ERROR;
$requirements['fedora-kakadu']['description'] = t('Islandora cannot convert TIFF image files to JPEG2000 format. Ensure <a href="http://www.kakadusoftware.com/">Kakadu</a> is installed and the kdu_compress command is executable by the web server user.'); $requirements['fedora-repository']['description'] = $t('Ensure that Fedora is running and that the <a href="@collection-settings">collection settings</a> are correct.', array('@collection-settings' => url('admin/settings/fedora_repository')));
$requirements['fedora-kakadu']['severity'] = REQUIREMENT_WARNING;
} }
else { else {
$requirements['fedora-kakadu']['value'] = t("Available"); $requirements['fedora-repository']['value'] = $t("Available");
$requirements['fedora-kakadu']['severity'] = REQUIREMENT_OK; $requirements['fedora-repository']['severity'] = REQUIREMENT_OK;
} }
} }

863
fedora_repository.module

File diff suppressed because it is too large Load Diff

58
fedora_repository.solutionpacks.inc

@ -1,7 +1,7 @@
<?php <?php
/** /**
* @file
* Invokes a hook to any dependent modules asking them if their installations require * Invokes a hook to any dependent modules asking them if their installations require
* any fedora objects to be present. Modules implementing this hook should return an array * any fedora objects to be present. Modules implementing this hook should return an array
* of arrays of the form: * of arrays of the form:
@ -46,19 +46,21 @@ function fedora_repository_solution_packs_page() {
* @param array $solution_pack * @param array $solution_pack
*/ */
function fedora_repository_solution_pack_form(&$form_state, $solution_pack_module, $solution_pack_name, $objects = array()) { function fedora_repository_solution_pack_form(&$form_state, $solution_pack_module, $solution_pack_name, $objects = array()) {
// Check each object to see if it is in the repository. // Check each object to see if it is in the repository.
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
global $base_path; global $base_path;
$needs_update = FALSE; $needs_update = FALSE;
$needs_install = FALSE; $needs_install = FALSE;
$form = array(); $form = array();
$form['solution_pack_module'] = array( $form['solution_pack_module'] = array(
'#type' => 'hidden', '#type' => 'hidden',
'#value' => $solution_pack_module, '#value' => $solution_pack_module,
); );
if (!$form_state['submitted']) { if (!$form_state['submitted']) {
$form['soluction_pack_name'] = array( $form['solution_pack_name'] = array(
'#type' => 'markup', '#type' => 'markup',
'#value' => t($solution_pack_name), '#value' => t($solution_pack_name),
'#prefix' => '<h3>', '#prefix' => '<h3>',
@ -75,7 +77,6 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
$table_header = array('PID', 'Status'); $table_header = array('PID', 'Status');
$table_rows = array(); $table_rows = array();
foreach ($objects as $object) { foreach ($objects as $object) {
$datastreams = NULL; $datastreams = NULL;
if (isset($object['pid'])) { if (isset($object['pid'])) {
@ -87,7 +88,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 +98,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)) {
@ -107,10 +110,11 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
$object_status = 'Missing datastream'; $object_status = 'Missing datastream';
break; break;
} }
if (isset($ds['dsversion'])) { elseif (isset($ds['dsversion'])) {
// Check if the datastream is versioned and needs updating. // Check if the datastream is versioned and needs updating.
$installed_version = fedora_repository_get_islandora_datastream_version($item, $ds['dsid']); $installed_version = fedora_repository_get_islandora_datastream_version($item, $ds['dsid']);
$available_version = fedora_repository_get_islandora_datastream_version(NULL, NULL, $ds['datastream_file']); $available_version = fedora_repository_get_islandora_datastream_version(NULL, NULL, $ds['datastream_file']);
if ($available_version > $installed_version) { if ($available_version > $installed_version) {
$needs_update = TRUE; $needs_update = TRUE;
$object_status = 'Out of date'; $object_status = 'Out of date';
@ -137,12 +141,16 @@ 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 { $submit_button_text = t("Force Reinstallation of Fedora Objects");
}
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.');
$submit_button_text = t("Install Fedora Objects");
} }
$form['submit'] = array( $form['submit'] = array(
'#value' => t('Install'), '#value' => $submit_button_text,
'#disabled' => !$needs_install && !$needs_update,
'#type' => 'submit', '#type' => 'submit',
'#name' => $solution_pack_module, '#name' => $solution_pack_module,
); );
@ -156,7 +164,11 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
function fedora_repository_solution_pack_form_submit($form, &$form_state) { function fedora_repository_solution_pack_form_submit($form, &$form_state) {
$what = $form_state; $what = $form_state;
$module_name = $form_state['values']['solution_pack_module']; $module_name = $form_state['values']['solution_pack_module'];
$solution_pack_info = call_user_func($module_name . '_required_fedora_objects');
// This should be replaced with module_invoke
//$solution_pack_info = call_user_func($module_name . '_required_fedora_objects');
$solution_pack_info = module_invoke($module_name, 'required_fedora_objects');
$batch = array( $batch = array(
'title' => t('Installing / updating solution pack objects'), 'title' => t('Installing / updating solution pack objects'),
'file' => drupal_get_path('module', 'fedora_repository') . '/fedora_repository.module', 'file' => drupal_get_path('module', 'fedora_repository') . '/fedora_repository.module',
@ -170,3 +182,29 @@ function fedora_repository_solution_pack_form_submit($form, &$form_state) {
} }
batch_set($batch); batch_set($batch);
} }
function solution_pack_add_form($form_name, $form_xml) {
$result = db_result(db_query('Select name from {xml_forms} where name = "%s"', $form_name));
if (!$result) {
$object = new stdClass();
$object->name = $form_name;
$object->form = $form_xml;
$result = drupal_write_record('xml_forms', $object);
drupal_set_message(t("Added @name", array("@name" => $form_name)));
}
}
function solution_pack_add_form_association($content_model, $form_name) {
$result = db_result(db_query('Select content_model from {islandora_content_model_forms} where content_model = "%s" and form_name = "%s"',
$content_model, $form_name));
if (!$result) {
$object = new stdClass();
$object->content_model = $content_model;
$object->form_name = $form_name;
$object->dsid = 'MODS';
$object->title_field = "['titleInfo']['title']";
$object->transform = 'mods_to_dc.xsl';
$result = drupal_write_record('islandora_content_model_forms', $object);
drupal_set_message(t("Added association between @cm and @name", array("@cm" => $content_model, "@name"=>$form_name)));
}
}

474
formClass.inc

@ -1,28 +1,31 @@
<?php <?php
// $Id$
/*
* Created on Jan 22, 2008 /**
* @file
* formClass class
*/ */
/**
* form Class
*/
class formClass { class formClass {
function formClass() { function formClass() {
module_load_include('inc', 'formClass', '');
drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL); drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
} }
/* /**
* create the paths for urls and map them to php functions * Create the paths for urls and map them to php functions
* @return array
*/ */
function createMenu() { function createMenu() {
$items = array(); $items = array();
$items['admin/settings/fedora_repository'] = array( $items['admin/settings/fedora_repository'] = array(
'title' => t('Fedora collection list'), 'title' => t('Islandora Configuration'),
'description' => t('Enter the Fedora Collection information here'), 'description' => t("Configure Islandora's interaction with Fedora"),
'page callback' => 'drupal_get_form', 'page callback' => 'drupal_get_form',
'page arguments' => array('fedora_repository_admin'), 'page arguments' => array('fedora_repository_admin'),
'access arguments' => array('administer site configuration'), 'access arguments' => array('administer site configuration'),
@ -30,7 +33,7 @@ class formClass {
); );
$items['admin/settings/fedora_repository/collection'] = array( $items['admin/settings/fedora_repository/collection'] = array(
'title' => t('Collection list'), 'title' => t('Collection list'),
'description' => t('Enter the Fedora collection information here.'), 'description' => t('Enter the Islandora collection information here.'),
'access arguments' => array('administer site configuration'), 'access arguments' => array('administer site configuration'),
'type' => MENU_DEFAULT_LOCAL_TASK, 'type' => MENU_DEFAULT_LOCAL_TASK,
'weight' => 0, 'weight' => 0,
@ -44,9 +47,8 @@ class formClass {
'file' => 'fedora_repository.solutionpacks.inc', 'file' => 'fedora_repository.solutionpacks.inc',
'type' => MENU_LOCAL_TASK, 'type' => MENU_LOCAL_TASK,
); );
$items['islandoracm.xsd'] = array( $items['islandoracm.xsd'] = array(
'title' => t('Islandoracm XML Schema Definition'), 'title' => t('Islandora Content Model XML Schema Definition'),
'page callback' => 'fedora_repository_display_schema', 'page callback' => 'fedora_repository_display_schema',
'page arguments' => array('islandoracm.xsd'), 'page arguments' => array('islandoracm.xsd'),
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
@ -54,7 +56,7 @@ class formClass {
); );
$items['collection_policy.xsd'] = array( $items['collection_policy.xsd'] = array(
'title' => t('Islandoracm XML Schema Definition'), 'title' => t('Islandora Content Model XML Schema Definition'),
'page callback' => 'fedora_repository_display_schema', 'page callback' => 'fedora_repository_display_schema',
'page arguments' => array('collection_policy.xsd'), 'page arguments' => array('collection_policy.xsd'),
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
@ -66,19 +68,11 @@ class formClass {
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access arguments' => array('view fedora collection'), 'access arguments' => array('view fedora collection'),
); );
$repository_title = variable_get('fedora_repository_title', 'Digital repository');
if (trim($repository_title) != '') {
$respository_title = t($repository_title);
}
else {
$repository_title = NULL;
}
$items['fedora/repository'] = array( $items['fedora/repository'] = array(
'title' => $repository_title, 'title' => 'Digital Repository',
'page callback' => 'repository_page', 'page callback' => 'repository_page',
'type' => MENU_NORMAL_ITEM, 'type' => MENU_NORMAL_ITEM,
'access arguments' => array('view fedora collection'), 'access arguments' => array('view fedora collection'),
// 'access' => TRUE
); );
$items['fedora/repository/service'] = array( $items['fedora/repository/service'] = array(
@ -93,39 +87,38 @@ class formClass {
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access arguments' => array('view fedora collection') 'access arguments' => array('view fedora collection')
); );
$items['fedora/repository/editmetadata'] = array( $items['fedora/repository/editmetadata'] = array(
'title' => t('Edit metadata'), 'title' => t('Edit metadata'),
'page callback' => 'fedora_repository_edit_qdc_page', 'page callback' => 'fedora_repository_edit_qdc_page',
// 'page arguments' => array(1),
//'type' => MENU_LOCAL_TASK,
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access arguments' => array('edit fedora meta data') 'access arguments' => array('edit fedora meta data')
); );
$items['fedora/repository/purgeStream'] = array( $items['fedora/repository/purgeStream'] = array(
'title' => t('Purge data stream'), 'title' => t('Purge data stream'),
'page callback' => 'fedora_repository_purge_stream', 'page callback' => 'fedora_repository_purge_stream',
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access arguments' => array('purge objects and datastreams') 'access arguments' => array('purge objects and datastreams')
); );
$items['fedora/repository/replaceStream'] = array( $items['fedora/repository/replaceStream'] = array(
'title' => t('Replace Stream'), 'title' => t('Replace Stream'),
'page callback' => 'fedora_repository_replace_stream', 'page callback' => 'fedora_repository_replace_stream',
// 'callback arguments' => array(3, 4),
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
// 'access callback' => 'fedora_repository_user_access',
'access arguments' => array('add fedora datastreams'), 'access arguments' => array('add fedora datastreams'),
); );
$items['fedora/repository/purgeObject'] = array( $items['fedora/repository/purgeObject'] = array(
'title' => t('Purge object'), 'title' => t('Purge object'),
'page callback' => 'fedora_repository_purge_object', 'page callback' => 'fedora_repository_purge_object',
// 'type' => MENU_LOCAL_TASK,
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access arguments' => array('purge objects and datastreams') 'access arguments' => array('purge objects and datastreams')
); );
$items['fedora/repository/addStream'] = array( $items['fedora/repository/addStream'] = array(
'title' => t('Add stream'), 'title' => t('Add stream'),
'page callback' => 'add_stream', 'page callback' => 'add_stream',
// 'type' => MENU_LOCAL_TASK,
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access arguments' => array('add fedora datastreams') 'access arguments' => array('add fedora datastreams')
); );
@ -134,8 +127,9 @@ class formClass {
'title' => t('Collection view'), 'title' => t('Collection view'),
'page callback' => 'fedora_collection_view', 'page callback' => 'fedora_collection_view',
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access argruments' => array('view fedora collection') 'access argruments' => array('view fedora collection'),
); );
//new for mnpl****************************************** //new for mnpl******************************************
$items['fedora/repository/mnpl_advanced_search'] = array( $items['fedora/repository/mnpl_advanced_search'] = array(
'title' => t('Repository advanced search'), 'title' => t('Repository advanced search'),
@ -143,6 +137,7 @@ class formClass {
'type' => MENU_CALLBACK, 'type' => MENU_CALLBACK,
'access arguments' => array('view fedora collection') 'access arguments' => array('view fedora collection')
); );
$items['fedora/ingestObject'] = array( $items['fedora/ingestObject'] = array(
'title' => t('Ingest object'), 'title' => t('Ingest object'),
'page callback' => 'fedora_repository_ingest_object', 'page callback' => 'fedora_repository_ingest_object',
@ -157,13 +152,6 @@ class formClass {
'access arguments' => array('view fedora collection') 'access arguments' => array('view fedora collection')
); );
$items['fedora/tagging/add_tag/js'] = array(
'page callback' => 'fedora_tagging_add_tag_js',
'access arguments' => array('edit tags datastream'),
'type' => MENU_CALLBACK,
);
/* Export functionality */ /* Export functionality */
$items['fedora/basket'] = array( $items['fedora/basket'] = array(
'title' => t('Fedora Basket'), 'title' => t('Fedora Basket'),
@ -194,106 +182,64 @@ class formClass {
return $items; return $items;
} }
/**
* Create admin form
* @return array
*/
function createAdminForm() { function createAdminForm() {
if (!user_access('administer site configuration')) { if (!user_access('administer site configuration')) {
drupal_set_message(t('You must be a site administrator to edit the Fedora collecitons list.'), 'error'); drupal_set_message(t('You must be a site administrator to edit the Fedora collections list.'), 'error');
return; return;
} }
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ObjectHelper');
$form = array(); $form = array();
$form['fedora_repository_name'] = array(
'#type' => 'textfield',
'#title' => t('Default collection name'),
'#default_value' => variable_get('fedora_repository_name', 'Islandora demos collection'),
'#description' => t('The Name of the collection to grab the list of items from'),
'#required' => TRUE,
'#weight' => -2
);
$form['fedora_repository_pid'] = array( $form['fedora_repository_pid'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Default collection PID'), '#title' => t('Root Collection PID'),
'#default_value' => variable_get('fedora_repository_pid', 'islandora:top'), '#default_value' => variable_get('fedora_repository_pid', 'islandora:root'),
'#description' => t('The PID of the collection object to grab the list of items from'), '#description' => t('The PID of the Root Collection Object'),
'#required' => TRUE,
'#weight' => -2
);
$form['fedora_collection_model_pid'] = array(
'#type' => 'textfield',
'#title' => t('Default Collection Model PID'),
'#default_value' => variable_get('fedora_collection_model_pid', 'islandora:collectionCModel'),
'#description' => t('The PID of the default Collection Model Object'),
'#required' => TRUE, '#required' => TRUE,
'#weight' => -2 '#weight' => -18
); );
$form['fedora_content_model_collection_pid'] = array( $form['fedora_base_url'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Default Content Model Collection PID'), '#title' => t('Fedora base URL'),
'#default_value' => variable_get('fedora_content_model_collection_pid', 'islandora:ContentModelCollection'), '#default_value' => variable_get('fedora_base_url', 'http://localhost:8080/fedora'),
'#description' => t('The PID of the Content Model Collection Object'), '#description' => t('The URL to use for REST-type connections'),
'#required' => TRUE, '#required' => TRUE,
'#weight' => -2 '#weight' => -16,
); );
$form['fedora_repository_url'] = array( $form['fedora_repository_url'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Fedora RISearch URL'), '#title' => t('Fedora RISearch URL'),
'#default_value' => variable_get('fedora_repository_url', '#default_value' => variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'),
'http://localhost:8080/fedora/risearch'),
'#description' => t('The url of the Fedora server'), '#required' => TRUE, '#description' => t('The url of the Fedora server'), '#required' => TRUE,
'#weight' => 0 '#weight' => -14
);
$form['fedora_fgsearch_url'] = array(
'#type' => 'textfield',
'#title' => t('Fedora Lucene search URL'),
'#default_value' => variable_get('fedora_fgsearch_url', 'http://localhost:8080/fedoragsearch/rest'),
'#description' => t('The url of the Lucene Fedora server'),
'#required' => TRUE,
'#weight' => 0
);
$form['fedora_index_name'] = array(
'#type' => 'textfield',
'#title' => t('Fedora Lucene index name'),
'#default_value' => variable_get('fedora_index_name', 'BasicIndex'),
'#description' => t('The name of the Lucene index to search'),
'#required' => TRUE,
'#weight' => 0
); );
$form['fedora_soap_url'] = array( $form['fedora_soap_url'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Fedora SOAP Url'), '#title' => t('Fedora SOAP Url'),
'#default_value' => variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'), '#default_value' => variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'),
'#description' => t('The URL to use for SOAP connections'), '#description' => t('The URL to use for SOAP connections'),
'#required' => TRUE, '#required' => TRUE,
'#weight' => 0, '#weight' => -12,
'#suffix' => '<p>' . (fedora_available() ? '<img src="' . url('misc/watchdog-ok.png') . '"/>' . t('Successfully connected to Fedora server at !fedora_soap_url', array('!fedora_soap_url' => variable_get('fedora_soap_url', ''))) : '<img src="' . url('misc/watchdog-error.png') . '"/> ' . t('Unable to connect to Fedora server at !fedora_soap_url</p>', array('!fedora_soap_url' => variable_get('fedora_soap_url', '')))), '#suffix' => '<p>' . (
); fedora_available() ?
$form['fedora_base_url'] = array( theme('image', 'misc/watchdog-ok.png') . t('Successfully connected to Fedora server at @fedora_soap_url', array('@fedora_soap_url' => variable_get('fedora_soap_url', ''))) :
'#type' => 'textfield', theme('image', 'misc/watchdog-error.png') . t('Unable to connect to Fedora server at @fedora_soap_url', array('@fedora_soap_url' => variable_get('fedora_soap_url', '')))) . '</p>',
'#title' => t('Fedora base URL'),
'#default_value' => variable_get('fedora_base_url', 'http://localhost:8080/fedora'),
'#description' => t('The URL to use for REST-type connections'),
'#required' => TRUE,
'#weight' => 0,
); );
$form['fedora_soap_manage_url'] = array( $form['fedora_soap_manage_url'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Fedora SOAP management URL'), '#title' => t('Fedora SOAP management URL'),
'#default_value' => variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'), '#description' => t('The URL to use for SOAP API-M connections'), '#default_value' => variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/wsdl?api=API-M'), '#description' => t('The URL to use for SOAP API-M connections'),
'#required' => TRUE,
'#weight' => 0
);
$form['fedora_solr_search_url'] = array(
'#type' => 'textfield',
'#title' => t('Fedora Solr search URL'),
'#default_value' => variable_get('fedora_solr_search_url', 'http://localhost:8080/solr'), '#description' => t('The URL to use for Solr searching'),
'#required' => TRUE, '#required' => TRUE,
'#weight' => 0 '#weight' => -10
); );
// will allow admin user to remove namepsace restrictions if not explicitly disallowed in settings.php // will allow admin user to remove namepsace restrictions if not explicitly disallowed in settings.php
@ -317,8 +263,8 @@ class formClass {
$form['fedora_namespace']['fedora_pids_allowed'] = array( $form['fedora_namespace']['fedora_pids_allowed'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('PID namespaces allowed in this Drupal install'), '#title' => t('PID namespaces allowed in this Drupal install'),
'#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '), '#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: '),
'#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. <br /> This could be more than a simple namespace ie demo:mydemos.'), '#description' => t('A space separated list of PID namespaces that users are permitted to access from this Drupal installation. <br /> This could be more than a simple namespace ie demo:mydemos.'),
'#weight' => 0 '#weight' => 0
); );
} }
@ -326,19 +272,36 @@ class formClass {
$form['fedora_pids_allowed'] = array( $form['fedora_pids_allowed'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('PID namespaces allowed in this Drupal install'), '#title' => t('PID namespaces allowed in this Drupal install'),
'#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '), '#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: islandora-book: books: newspapers: '),
'#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. <br /> This could be more than a simple namespace ie demo:mydemos.'), '#description' => t('A space separated list of PID namespaces that users are permitted to access from this Drupal installation. <br /> This could be more than a simple namespace ie demo:mydemos.'),
'#weight' => 0 '#weight' => 0
); );
} }
$form['fedora_repository_title'] = array(
'#type' => 'textfield', //have tabs options (like disable)
'#title' => t('Fedora Repository Title'), $form['tabs'] = array(
'#default_value' => variable_get('fedora_repository_title', 'Digital Repository'), '#type' => 'fieldset',
'#description' => t('The title displayed when viewing collections and objects in /fedora/repository. Leave blank to display no title. Note that the menus must be rebuilt after changing this variable.'), '#title' => t('Tabs Configuration'),
'#description' => t('Configure the tabs avaialble when viewing Fedora objects.'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
//when checked show object details tab
$form['tabs']['fedora_repository_show_object_details_tab'] = array(
'#type' => 'checkbox',
'#title' => t('Show Object Details Tab'),
'#default_value' => variable_get('fedora_repository_show_object_details_tab', TRUE),
'#description' => t("When enabled, the 'Object Details' tab will be visible to users with the correct permissions when viewing an object in the repository"),
); );
$form['fedora_object_display_title'] = array( $form['advanced'] = array(
'#type' => 'fieldset',
'#title' => t('Advanced configuration options'),
'#description' => t('Advanced configuration. Under normal circumstances these will not be touched'),
'#collapsible' => TRUE,
'#collapsed' => TRUE,
);
$form['advanced']['fedora_object_display_title'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => t('Display Object Title Behaviour'), '#title' => t('Display Object Title Behaviour'),
'#default_value' => variable_get('fedora_object_display_title', ObjectHelper::$DISPLAY_ALWAYS), '#default_value' => variable_get('fedora_object_display_title', ObjectHelper::$DISPLAY_ALWAYS),
@ -346,7 +309,7 @@ class formClass {
'#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'), '#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'),
); );
$form['fedora_object_display_description'] = array( $form['advanced']['fedora_object_display_description'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => t('Display Object Description Behaviour'), '#title' => t('Display Object Description Behaviour'),
'#default_value' => variable_get('fedora_object_display_description', ObjectHelper::$DISPLAY_ALWAYS), '#default_value' => variable_get('fedora_object_display_description', ObjectHelper::$DISPLAY_ALWAYS),
@ -354,14 +317,14 @@ class formClass {
'#description' => t('Determines when to display the default object (or collection) description fieldset when viewing an object/collection page.'), '#description' => t('Determines when to display the default object (or collection) description fieldset when viewing an object/collection page.'),
); );
$form['fedora_object_restrict_datastreams'] = array( $form['advanced']['fedora_object_restrict_datastreams'] = array(
'#type' => 'checkbox', '#type' => 'checkbox',
'#title' => t('Restrict Access to Fedora Object Datastreams'), '#title' => t('Restrict Access to Fedora Object Datastreams'),
'#default_value' => variable_get('fedora_object_restrict_datastreams', FALSE), '#default_value' => variable_get('fedora_object_restrict_datastreams', FALSE),
'#description' => t('When enabled, restricts access to fedora object datastreams that are not listed in the Islandora Content Model for the object (unless the user is an administrator).'), '#description' => t('When enabled, restricts access to fedora object datastreams that are not listed in the Islandora Content Model for the object (unless the user is an administrator).'),
); );
$form['fedora_collection_display_list'] = array( $form['advanced']['fedora_collection_display_list'] = array(
'#type' => 'select', '#type' => 'select',
'#title' => t('Display Collection List Behaviour'), '#title' => t('Display Collection List Behaviour'),
'#default_value' => variable_get('fedora_collection_display_list', ObjectHelper::$DISPLAY_ALWAYS), '#default_value' => variable_get('fedora_collection_display_list', ObjectHelper::$DISPLAY_ALWAYS),
@ -370,7 +333,7 @@ class formClass {
); );
//Export functionality //Export functionality
$form['module']['export_area'] = array( $form['advanced']['module']['export_area'] = array(
'#type' => 'textfield', '#type' => 'textfield',
'#title' => t('Export area'), '#title' => t('Export area'),
'#default_value' => variable_get('export_area', file_directory_path() . '/fedora_export_area'), '#default_value' => variable_get('export_area', file_directory_path() . '/fedora_export_area'),
@ -384,6 +347,13 @@ class formClass {
return system_settings_form($form); return system_settings_form($form);
} }
/**
* Update Metadata
* @param type $form_id
* @param type $form_values
* @param type $client
* @return type
*/
function updateMetaData($form_id, $form_values, $client) { function updateMetaData($form_id, $form_values, $client) {
// ====================================== // ======================================
// = begin creation of foxml dom object = // = begin creation of foxml dom object =
@ -401,7 +371,13 @@ class formClass {
// DC elements // DC elements
$previousElement = NULL; // Used in case we have to nest elements for qualified dublin core. $previousElement = NULL; // Used in case we have to nest elements for qualified dublin core.
$label = null;
foreach ($form_values as $key => $value) { foreach ($form_values as $key => $value) {
//echo ($key);
if ($key == 'dc:title-0') {
$label = $value;
}
$index = strrpos($key, '-'); $index = strrpos($key, '-');
$key = substr($key, 0, $index); $key = substr($key, 0, $index);
$test = substr($key, 0, 2); $test = substr($key, 0, 2);
@ -422,6 +398,13 @@ class formClass {
} }
} }
// Save the title
if ( $label != null )
{
$object = new Fedora_Item($form_values['pid']);
$object->modify_object($label);
}
$dom->appendChild($oai); $dom->appendChild($oai);
if (!$client) { if (!$client) {
@ -442,13 +425,17 @@ class formClass {
try { try {
$object = $client->__soapCall('ModifyDatastreamByValue', array($params)); $object = $client->__soapCall('ModifyDatastreamByValue', array($params));
} catch (exception $e) { } catch (exception $e) {
drupal_set_message(t("Error updating metadata ") . $e->getMessage(), 'error'); drupal_set_message(t("Error updating metadata") . " " . $e->getMessage(), 'error');
} }
} }
// queries the collection object for a childsecurity datastream and if found parses it /**
// to determine if this user is allowed to ingest in this collection * queries the collection object for a childsecurity datastream and if found parses it
// we assume if they are able to modify objects in the collection they can ingest as well. * to determine if this user is allowed to ingest in this collection
* we assume if they are able to modify objects in the collection they can ingest as well.
* @param type $collection_pid
* @return type
*/
function can_ingest_here($collection_pid) { function can_ingest_here($collection_pid) {
module_load_include('inc', 'fedora_repository', 'SecurityClass'); module_load_include('inc', 'fedora_repository', 'SecurityClass');
$securityClass = new SecurityClass(); $securityClass = new SecurityClass();
@ -456,108 +443,170 @@ class formClass {
} }
/** /**
* Create a multi step form (wizard) for ingesting objects into Fedora * Drupal's permissions at this point no xacml yet. xacml decisions are made by fedora
* @param type $collection_pid
* @return type
*/ */
function createIngestForm($collection_pid, $collection_label, &$form_state) { function canShowIngestForm($collection_pid) {
global $user;
module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
// drupal_add_js("function _imce_ingest_ImceFinish(path, w, h, s, imceWin) {imceWin.close(); document.getElementById('edit-ingest-file-location').value = path;}",'inline','header');
if (!user_access('ingest new fedora objects')) { if (!user_access('ingest new fedora objects')) {
drupal_set_message(t('You do not have permission to ingest.'), 'error'); drupal_set_message(t('You do not have permission to ingest.'), 'error');
return ''; return FALSE;
}
if (empty($form_state['storage']['step'])) {
// we are coming in without a step, so default to step 1
$form_state['storage']['step'] = 1;
} }
//this uses drupal's permissions at this point no xacml yet. xacml decisions are made by fedora module_load_include('inc', 'fedora_repository', 'SecurityClass');
if (!$this->can_ingest_here($collection_pid)) { $security_class = new SecurityClass();
if (!$security_class->canIngestHere($collection_pid)) {
// Queries the collection object for a child security datastream and if found parses it
// to determine if this user is allowed to ingest in this collection
// we assume if they are able to modify objects in the collection they can ingest as well.
drupal_set_message(t('You do not have premission to ingest here.')); drupal_set_message(t('You do not have premission to ingest here.'));
return ''; return FALSE;
} }
if ($collection_pid == NULL) { if ($collection_pid == NULL) {
drupal_set_message(t('You must specify an collection object pid to ingest an object.'), 'error'); drupal_set_message(t('You must specify an collection object pid to ingest an object.'), 'error');
return FALSE; return FALSE;
} }
if (($cp = CollectionPolicy::loadFromCollection($collection_pid)) === FALSE) { return TRUE;
}
/**
* Creates the first page of the ingest form for editing QDC.
*
* @param string $collection_pid
* @param string $collection_label
* @param array $form_state
*
* @return array
*/
function createQDCIngestFormPageOne($collection_pid, $collection_label, array &$form_state) {
if (($collection_policy = CollectionPolicy::loadFromCollection($collection_pid)) === FALSE) {
drupal_set_message(t('Unable to load collection policy \'' . $collection_pid . '\'.')); drupal_set_message(t('Unable to load collection policy \'' . $collection_pid . '\'.'));
return FALSE; return FALSE;
} }
if (!($content_models = $collection_policy->getContentModels())) {
$contentModels = $cp->getContentModels();
if (!$contentModels) {
drupal_set_message(t('No content models associated with this collection: !collection_label. Please contact your administrator.', array('!collection_label' => $collection_label)), 'error'); drupal_set_message(t('No content models associated with this collection: !collection_label. Please contact your administrator.', array('!collection_label' => $collection_label)), 'error');
return FALSE; return FALSE;
} }
$modelsForForm = array(); $potential_models = array();
foreach ($contentModels as $contentModel) { foreach ($content_models as $content_model) {
$identifier = $contentModel->getIdentifier(); $identifier = $content_model->getIdentifier();
$name = $contentModel->name; $name = $content_model->name;
$modelsForForm["$identifier"] = "$name"; $potential_models["$identifier"] = "$name";
} }
$identifier = key($potential_models);
switch ($form_state['storage']['step']) { $selected_model = isset($form_state['values']['models']) ? $form_state['values']['models'] : $identifier;
case 1: return array(
$form['indicator'] = array( 'indicator' => array(
'#type' => 'fieldset', '#type' => 'fieldset',
'#title' => t('Ingest digital object into collection_pid !collection_label Step #1', array('collection_pid' => $collection_pid, '!collection_label' => $collection_label)) '#title' => t('Ingest digital object into collection_pid !collection_label Step #1', array('collection_pid' => $collection_pid, '!collection_label' => $collection_label)),
); 'models' => array(
$form['indicator']['models'] = array(// content models available
'#type' => 'select', '#type' => 'select',
'#title' => t('Content models available'), '#title' => t('Content models available'),
'#options' => $modelsForForm, '#options' => $potential_models,
//'#description' => t('Content models available in this collection. A content model defines what is allowed in a collection and what to do with a file when it is uploaded (An example may creating a thumbnail from an image.).') '#default_value' => $selected_model,
'#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.<br /> Additional information may be found <a href="https://wiki.duraspace.org/display/FEDORACREATE/Content+Models+Overview">here.</a> ') '#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.<br /> Additional information may be found <a href="https://wiki.duraspace.org/display/FEDORACREATE/Content+Models+Overview">here.</a>'),
),
),
'collection_pid' => array(
'#type' => 'hidden',
'#value' => $collection_pid
),
'submit' => array(
'#type' => 'submit',
'#submit' => array('fedora_repository_ingest_form_submit'),
'#value' => t('Next')
),
); );
break; }
case 2:
module_load_include('inc', 'fedora_repository', 'MimeClass'); // Why this include? --Zac, 2010-09-17
$contentModelPid = ContentModel::getPidFromIdentifier($form_state['values']['models']);
$contentModelDsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']);
if (($cm = ContentModel::loadFromModel($contentModelPid, $contentModelDsid)) !== FALSE) { /**
$form = $cm->buildIngestForm($form, $form_state); * Create the second page of the ingest form for editing QDC
*
* @param string $collection_pid
* @param string $collection_label
* @param array $form_state
*
* @return array
*/
function createQDCIngestFormPageTwo($collection_pid, $collection_label, array &$form_state) {
module_load_include('inc', 'fedora_repository', 'ContentModel');
$form = array();
$content_model_pid = ContentModel::getPidFromIdentifier($form_state['values']['models']);
$content_model_dsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']);
if (($content_model = ContentModel::loadFromModel($content_model_pid, $content_model_dsid)) !== FALSE) {
$form = $content_model->buildIngestForm($form, $form_state);
if ($form === FALSE) { if ($form === FALSE) {
drupal_set_message(t("Error Building Ingest Form."), 'error'); drupal_set_message(t("Error Building Ingest Form."), 'error');
foreach (ContentModel::$errors as $err) { foreach (ContentModel::$errors as $error) {
drupal_set_message($err, 'error'); drupal_set_message($error, 'error');
}
} }
} }
break;
}
$form['collection_pid'] = array( $form['collection_pid'] = array(
'#type' => 'hidden', '#type' => 'hidden',
'#value' => $collection_pid '#value' => $collection_pid
); );
$form['submit'] = array(
'#type' => 'submit',
'#submit' => array('fedora_repository_ingest_form_submit'),
'#value' => t('Ingest')
);
}
return $form;
}
if ($form_state['storage']['step'] < 2) { /**
$button_name = t('Next'); * Create the QDC Ingest Form.
*
* @param type $collection_pid
* @param type $collection_label
* @param array $form_state
*
* @return array
*/
function createQDCIngestForm($collection_pid, $collection_label, array &$form_state) {
module_load_include('inc', 'fedora_repository', 'CollectionPolicy');
$form_state['storage']['step'] = empty($form_state['storage']['step']) ? 1 : $form_state['storage']['step'];
if ($form_state['storage']['step'] == 1) {
return $this->createQDCIngestFormPageOne($collection_pid, $collection_label, $form_state);
} }
else { else {
$prefix = t('Please be patient. Once you click next there may be a number of files created. Depending on your content model this could take a few minutes to process.<br />'); return $this->createQDCIngestFormPageTwo($collection_pid, $collection_label, $form_state);
$button_name = t('Ingest'); }
} }
$form['submit'] = array( /**
'#type' => 'submit', * Create a multi step form (wizard) for ingesting objects into Fedora
'#submit' => array('fedora_repository_ingest_form_submit'), *
'#value' => $button_name * @param string $collection_pid
); * @param string $collection_label
* @param array $form_state
*
* @return array
*/
function createIngestForm($collection_pid, $collection_label, array &$form_state) {
if (!$this->canShowIngestForm($collection_pid)) {
return FALSE;
}
return $form; drupal_set_title($collection_label);
if (module_exists('islandora_content_model_forms')) {
module_load_include('inc', 'islandora_content_model_forms', 'IngestObjectMetadataForm');
try {
$form = new IngestObjectMetadataForm();
return $form->create($collection_pid, $collection_label, $form_state);
} catch (Exception $e) {
//dd('An error occured; reverting to QDC form...');
$form_state['storage']['xml'] = FALSE; // An error occured revert back to the QDC Form.
}
}
return $this->createQDCIngestForm($collection_pid, $collection_label, $form_state);
} }
// this function may not be being used /**
* this function may not be being used
* @param type $pid
* @param type $form_state
* @return string
*/
function createAddDataStreamForm($pid, &$form_state) { function createAddDataStreamForm($pid, &$form_state) {
//dump_vars($form_state); //dump_vars($form_state);
// Populate the list of datastream IDs. // Populate the list of datastream IDs.
@ -577,7 +626,6 @@ class formClass {
if (!empty($newElements)) { if (!empty($newElements)) {
$available_dsids = array_merge($available_dsids, $newElements); $available_dsids = array_merge($available_dsids, $newElements);
} }
} }
} }
@ -666,30 +714,30 @@ class formClass {
} }
/** /**
* Creates a drupal form to edit either the QDC or DC datastream * Create QDC Edit form.
*
* @param string $pid
* @param string $dsid
* @param object $client
* @param array $form_state
*
* @return string
*/ */
function createMetaDataForm($pid, $dsId = NULL, $client) { function createQDCEditForm($pid, $dsid, $client, &$form_state) {
if (!isset($dsId)) { $dsid = empty($dsid) ? 'QDC' : $dsid;
$dsId = 'QDC';
}
//$client = getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'));
$params = array('pid' => "$pid", 'dsID' => "$dsId", 'asOfDateTime' => "");
try { try {
$object = $client->__soapCAll('getDatastreamDissemination', array('parameters' => $params)); $params = array('pid' => "$pid", 'dsID' => "$dsid", 'asOfDateTime' => "");
$object = $client->__soapCall('getDatastreamDissemination', array('parameters' => $params));
} catch (Exception $e) { } catch (Exception $e) {
return array(); return array();
} }
$content = $object->dissemination->stream; $content = $object->dissemination->stream;
$content = trim($content); $content = trim($content);
$doc = new DOMDocument(); $doc = new DOMDocument();
if (!$doc->loadXML($content)) { if (!$doc->loadXML($content)) {
echo "error loading xml"; echo "error loading xml";
} }
$oai_dc = $doc->getElementsByTagName('dc'); $oai_dc = $doc->getElementsByTagName('dc');
$dcItems = $oai_dc->item(0)->getElementsByTagName('*'); $dcItems = $oai_dc->item(0)->getElementsByTagName('*');
$form = array(); $form = array();
for ($i = 0; $i < $dcItems->length; $i++) { for ($i = 0; $i < $dcItems->length; $i++) {
@ -740,25 +788,49 @@ class formClass {
} }
} }
} }
$form['pid'] = array( $form['pid'] = array(
'#type' => 'hidden', '#type' => 'hidden',
'#value' => "$pid" '#value' => "$pid"
); );
$form['dsid'] = array( $form['dsid'] = array(
'#type' => 'hidden', '#type' => 'hidden',
'#value' => "$dsId" '#value' => "$dsid"
); );
$form['submit'] = array( $form['submit'] = array(
'#type' => 'submit', '#type' => 'submit',
'#value' => t('Update Metadata'), '#value' => t('Update Metadata'),
); );
return $form; return $form;
} }
/**
* Creates a drupal form to edit either the QDC or DC datastream
* @param type $pid
* @param type $dsid
* @param type $client
* @param boolean $form_state
* @return type
*/
function createMetaDataForm($pid, $dsid, $client, &$form_state) {
if (module_exists('islandora_content_model_forms')) {
module_load_include('inc', 'islandora_content_model_forms', 'EditObjectMetadataForm');
try {
$form = new EditObjectMetadataForm($form_state);
return $form->create($pid, $client, $form_state);
} catch (Exception $e) {
$form_state['storage']['xml'] = FALSE; // An error occured revert back to the QDC Form.
}
}
return $this->createQDCEditForm($pid, $dsid, $client, $form_state);
}
/** /**
* Creates a form for replacing datastream * Creates a form for replacing datastream
* @param type $pid
* @param type $dsId
* @param type $dsLabel
* @param type $form_state
* @return type
*/ */
function createReplaceDataStreamForm($pid, $dsId, $dsLabel, &$form_state) { function createReplaceDataStreamForm($pid, $dsId, $dsLabel, &$form_state) {
$form = array(); $form = array();

7
form_elements/css/copyright.css

@ -1,7 +0,0 @@
.cc_preview
{
width: 250px;
overflow: none;
border: 0px solid black;
float: right;
}

93
form_elements/css/filechooser.css

@ -1,93 +0,0 @@
.carousel .jCarouselLite {
border: 1px solid black;
float: left;
background-color: #dfdfdf;
/*
position: relative;
visibility: hidden;
left: -5000px;*/
width: 680px;
height: 200px;
}
.carousel li
{
cursor:pointer;
}
.carousel li.selected
{
background-color: #999;
}
.carousel li div
{
margin: 0 0 10px 10px;
font-size: 80%;
}
.carousel li img.thumbnail
{
width: 150px;
height: 118px;
margin: 10px 10px 0 10px;
}
.carousel li div.textplaceholder
{
width: 128px;
height: 128px;
margin: 10px 10px 0 10px;
background-image: url('../images/txt.png');
background-repeat:no-repeat;
}
.carousel li div.videoplaceholder
{
width: 128px;
height: 128px;
margin: 10px 10px 0 10px;
background-image: url('../images/sound.png');
background-repeat:no-repeat;
}
.carousel li div.audioplaceholder
{
width: 128px;
height: 128px;
margin: 10px 10px 0 10px;
background-image: url('../images/video.png');
background-repeat:no-repeat;
}
.carousel li div.imageplaceholder
{
width: 128px;
height: 128px;
margin: 10px 10px 0 10px;
background-image: url('../images/image.png');
background-repeat:no-repeat;
}
.carousel li div.applicationplaceholder
{
width: 128px;
height: 128px;
margin: 10px 10px 0 10px;
background-image: url('../images/application.png');
background-repeat:no-repeat;
}
.carousel li.loading
{
font-size: 150%;
margin: auto;
margin-top: 50px;
text-align: center;
width: 250px;
}

25
form_elements/css/list.css

@ -1,25 +0,0 @@
.tagEditor
{
margin: 4px 0;
padding: 0;
}
.tagEditor li
{
display: inline;
background-image: url('../images/minus_small.png');
background-color: #efe;
background-position: right center;
background-repeat: no-repeat;
list-style-type: none;
padding: 0 18px 0 6px;
margin: 0 4px;
cursor: pointer;
-moz-border-radius: 5px;
-webkit-border-radius: 5px;
}
.tagEditor li:hover
{
background-color: #eee;
}

137
form_elements/css/people.css

@ -1,137 +0,0 @@
/* $Id: ife-people-admin.css,v 1.1.2.7 2009/03/20 17:51:03 pasqualle Exp $ */
/* Admin form */
#ife-peoplelist-table
{
margin-top: 15px;
width: 100%;
}
#ife-peoplelist-table .form-item {
margin-bottom: 5px;
}
#ife-peoplelist-table .form-item .description {
margin-top: 3px;
}
#ife-peoplelist-table .ife-person-name {
width: auto;
height: 125px;
}
#ife-peoplelist-table .ife-person-name label{
font-weight: bold;
float: left;
clear: left;
width: 125px;
}
#ife-peoplelist-table .ife-person-role {
width: 150px;
padding-right: 50px;
}
#ife-peoplelist-table .ife-person-remove {
width: 100px;
}
#ife-peoplelist-table .description {
white-space: normal;
}
#ife-peoplelist-table .ife-person-content .form-item .form-text {
width: 150px;
}
#ife-peoplelist-table .ife-person-view-content input.form-submit {
display: none;
}
#ife-peoplelist-table .ife-person-content {
display: none;
}
#ife-peoplelist-table .ife-person-remove label,
#add-more-people-button label,
#add-more-conf-button label,
#add-more-org-button label {
font-weight: bold;
float: left;
clear: left;
width: auto;
}
#add-more-org-button,
#add-more-conf-button,
#add-more-people-button {
width: 150px;
display: block;
margin-top: 20px;
float: right;
}
.add-person, .add-conf, .add-org,
#ife-peoplelist-table .delete-person {
display: block;
overflow: hidden;
width: 32px;
height: 32px;
padding: 0;
margin: 0;
border: 0;
text-indent: -9999px;
cursor: pointer; /* hand-shaped cursor */
cursor: hand; /* for IE 5.x */
}
.add-person {
background: transparent url(../images/add_user.png) no-repeat 0 0;
}
.delete-person {
background: transparent url(../images/editdelete.png) no-repeat 0 0;
}
.add-org {
background: transparent url(../images/add_group.png) no-repeat 0 0;
}
.add-conf {
background: transparent url(../images/groupevent.png) no-repeat 0 0;
}
/* QT style selection form */
div.ife-people-preview {
border: none;
width: 280px;
height: 80px;
}
#ife-people-settings .ife-people-styles .form-item {
width: 280px;
float: left;
margin: 0 10px 10px 0;
border: 1px solid #ccc;
background-color: #fff;
}
#ife-people-settings .ife-people-styles .form-item .option {
display: block;
background-color: #bfe3ff;
font: bold 12px/18px verdana;
color: #0a5793;
}
#ife-people-settings .ife-people-styles .form-item .option:hover {
background-color: #aadaff;
cursor: pointer;
color: #003863;
}
#ife-people-settings .ife-people-styles .form-item .option .form-radio {
margin-right: 5px;
float: left;
height: 15px;
margin-top: 2px;
}
#ife-people-settings .ife-people_wrapper {
margin: 5px;
font: bold 12px/170% Verdana;
}

18
form_elements/css/sticky.css

@ -1,18 +0,0 @@
input.sticky {
height: 18px;
padding-left: 15px;
background: url(../images/pushpin.png) top left no-repeat;
filter:alpha(opacity=50);
-moz-opacity:0.5;
-khtml-opacity:0.5;
opacity:0.5;
}
input.sticky:checked {
background-image: url(../images/pushpin.png);
filter:alpha(opacity=100);
-moz-opacity:1;
-khtml-opacity:1;
opacity:1;
}

BIN
form_elements/css/ui-lightness/images/ui-bg_diagonals-thick_18_b81900_40x40.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 260 B

BIN
form_elements/css/ui-lightness/images/ui-bg_diagonals-thick_20_666666_40x40.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 251 B

BIN
form_elements/css/ui-lightness/images/ui-bg_flat_10_000000_40x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 178 B

BIN
form_elements/css/ui-lightness/images/ui-bg_glass_100_f6f6f6_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 104 B

BIN
form_elements/css/ui-lightness/images/ui-bg_glass_100_fdf5ce_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 125 B

BIN
form_elements/css/ui-lightness/images/ui-bg_glass_65_ffffff_1x400.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 105 B

BIN
form_elements/css/ui-lightness/images/ui-bg_gloss-wave_35_f6a828_500x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 3.7 KiB

BIN
form_elements/css/ui-lightness/images/ui-bg_highlight-soft_100_eeeeee_1x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 90 B

BIN
form_elements/css/ui-lightness/images/ui-bg_highlight-soft_75_ffe45c_1x100.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 129 B

BIN
form_elements/css/ui-lightness/images/ui-icons_222222_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

BIN
form_elements/css/ui-lightness/images/ui-icons_228ef1_256x240.png

Binary file not shown.

Before

Width:  |  Height:  |  Size: 4.3 KiB

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

Loading…
Cancel
Save