diff --git a/CollectionClass.inc b/CollectionClass.inc
index c2929708..b486f2ce 100644
--- a/CollectionClass.inc
+++ b/CollectionClass.inc
@@ -1,608 +1,607 @@
-collectionObject = new ObjectHelper($pid);
- $this->pid = $pid;
- }
- }
-
- /**
- * gets objects related to this object. must include offset and limit
- * calls getRelatedItems but enforces limit and offset
- */
- function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) {
- module_load_include('inc', 'fedora_repository', 'ObjectHelper');
- $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);
- }
-
- /**
- * Gets objects related to this item. It will query the object for a Query stream and use that as a itql query
- * 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
- */
- function getRelatedItems($pid, $itqlquery = NULL, $limit = NULL, $offset = NULL) {
- module_load_include('inc', 'fedora_repository', 'ObjectHelper');
- module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
- if (!isset($limit)) {
- $limit = 1000;
- }
- if (!isset($offset)) {
- $offset = 0;
- }
- 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;
- if (!isset($query_string)) {
- $query_string = $objectHelper->getStream($pid, 'QUERY', 0);
- if ($query_string == NULL) {
- $query_string = 'select $object $title $content from <#ri>
- where ($object $title
- and $object $content
- and ($object
- or $object )
- and $object )
- minus $content
- order by $title';
- }
- }
- else {
- // Replace %parent_collection% with the actual collection PID
- $query_string = preg_replace("/\%parent_collection\%/", "", $query_string);
- }
-
- $query_string = htmlentities(urlencode($query_string));
-
- $content = '';
- $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);
-
- return $content;
- }
-
- /**
- * getCollectionPolicyStream ??
- * @param type $collection_pid
- * @return type
- */
- function getCollectionPolicyStream($collection_pid) {
- if ($this->collectionPolicyStream != NULL) {
- return $this->collectionPolicyStream;
- }
- $this->collectionPolicyStream = $this->getStream($collection_pid, CollectionClass :: $COLLECTION_CLASS_COLLECTION_POLICY_STREAM, 0);
- return $this->collectionPolicyStream;
- }
-
- /**
- * getRelationshipElement
- * @param type $collection_pid
- * @return type
- */
- function getRelationshipElement($collection_pid) {
- $stream = $this->getCollectionPolicyStream($collection_pid);
- try {
- $xml = new SimpleXMLElement($stream);
- } catch (Exception $e) {
- drupal_set_message(t('Error getting relationship element from policy stream !e', array('!e' => $e->getMessage())), 'error');
- return;
- }
- $relationship = $xml->relationship[0];
- return $relationship;
- }
-
- /**
- * getCollectionViewStream ??
- * @param type $collection_pid
- * @return type
- */
- function getCollectionViewStream($collection_pid) {
- $this->collectionViewStream = $this->getStream($collection_pid, CollectionClass :: $COLLECTION_CLASS_COLLECTION_VIEW_STREAM, 0);
- return $this->collectionViewStream;
- }
-
- /**
- * getStream ??
- * @param type $pid
- * @param type $dsid
- * @param type $showError
- * @return type
- */
- function getStream($pid, $dsid, $showError = 1) {
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
- $item = new fedora_item($pid);
- return isset($item->datastreams[$dsid]) ? $item->get_datastream_dissemination($dsid) : NULL;
- }
-
- /**
- * getPidNameSpace ??
- * @param type $pid
- * @param type $dsid
- * @return type
- */
- function getPidNameSpace($pid, $dsid) {
- $stream = $this->getCollectionPolicyStream($pid);
- try {
- $xml = new SimpleXMLElement($stream);
- } catch (Exception $e) {
- drupal_set_message(t('Error getting PID namespace !e', array('!e' => $e->getMessage())), 'error');
- return;
- }
- foreach ($xml->contentmodels->contentmodel as $contentModel) {
- // $contentModelName=strip_tags($contentModel['name']);
- $contentdsid = strip_tags($contentModel->dsid);
- if (strtolower($contentdsid) == strtolower($dsid)) {
- return strip_tags($contentModel->pid_namespace->asXML());
- }
- }
- drupal_set_message(t('Error getting PID namespace! using collection pid of !pid and content model of !dsid', array('!pid' => $pid, '!dsid' => $dsid)), 'error');
- return NULL;
- }
-
- /**
- * gets a list of content models from a collection policy
- */
- function getContentModels($collection_pid, $showError = TRUE) {
- module_load_include('inc', 'Fedora_Repository', 'ContentModel');
- $collection_stream = $this->getCollectionPolicyStream($collection_pid);
- try {
- $xml = new SimpleXMLElement($collection_stream);
- } catch (Exception $e) {
- if ($showError) {
- drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
- }
- return NULL;
- }
- foreach ($xml->contentmodels->contentmodel as $content_model) {
- $contentModel = new ContentModel();
- $contentModel->contentModelDsid = $content_model->dsid;
- $contentModel->contentModelPid = $content_model->pid;
- $contentModel->pidNamespace = $content_model->pidNamespace;
- $contentModel->contentModelName = $content_model['name'];
- $models[] = $contentModel;
- }
- return $models;
- }
-
- /**
- * using the collection policies pid namespace get a new pid by calling fedora' get next pid and appending it to the namespace
- * $pid is the $pid of the content model
- * $dsid is the datastream id of the content model.
- */
- function getNextPid($pid, $dsid) {
- module_load_include('inc', 'Fedora_Repository', 'ConnectionHelper');
- $pidNameSpace = $this->getPidNameSpace($pid, $dsid);
- $pname = substr($pidNameSpace, 0, strpos($pidNameSpace, ":"));
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
- return Fedora_Item::get_next_pid_in_namespace($pname);
- }
-
- /**
- * gets the form handler file, class and method and returns them in an array
- *
- * @param string $pid The content model PID
- * @param string $dsid The content model DSID
- * @return array The file, class and method name to handle the ingest form.
- */
- function getFormHandler($pid, $dsid) {
- $stream = $this->getContentModelStream($pid, $dsid);
- try {
- $xml = new SimpleXMLElement($stream);
- } catch (Exception $e) {
- drupal_set_message(t('Error Getting FormHandler: !e', array('!e' => $e->getMessage())), 'error');
- return NULL;
- }
- $formHandler = $xml->ingest_form;
- if ($formHandler != NULL) {
- $handlerDsid = strip_tags($formHandler['dsid']);
- $handlerMethod = strip_tags($formHandler->form_builder_method->form_handler->asXML());
- $handlerFile = strip_tags($formHandler->form_builder_method->file->asXML());
- $handlerClass = strip_tags($formHandler->form_builder_method->class_name->asXML());
- $handlerModule = strip_tags($formHandler->form_builder_method->module->asXML());
- $returnArray = array();
- $returnArray['module'] = $handlerModule;
- $returnArray['method'] = $handlerMethod;
- $returnArray['class'] = $handlerClass;
- $returnArray['file'] = $handlerFile;
- return $returnArray;
- }
-
- drupal_set_message(t("Error getting form handler. No handler found for !pid - !dsid", array('!pid' => $pid, '!dsid' => $dsid)), 'error');
- return NULL;
- }
-
- /**
- * getAllowedMimeType ??
- * @param type $contentModelPid
- * @param type $contentModel_dsid
- * @return type
- */
- function getAllowedMimeTypes($contentModelPid, $contentModel_dsid) {
- $stream = $this->getContentModelStream($contentModelPid, $contentModel_dsid);
- try {
- $xml = new SimpleXMLElement($stream);
- } catch (Exception $e) {
- drupal_set_message(t('Error getting content model stream for mime types !e', array('!e' => $e->getMessage())), 'error');
- return;
- }
- foreach ($xml->mimetypes->type as $type) {
- $types[] = $type;
- }
- return $types;
- }
-
- /**
- * Grabs the rules from the content model stream
- * file the file that has been uploaded
- */
- function getAndDoRules($file, $mimetype, $pid, $dsid) {
- if (!user_access('ingest new fedora objects')) {
- drupal_set_message(t('You do not have permission to ingest objects.'));
- return FALSE;
- }
-
- $stream = $this->getContentModelStream($pid, $dsid);
-
- try {
- $xml = new SimpleXMLElement($stream);
- } catch (Exception $e) {
- drupal_set_message(t('Error getting content model stream !e', array('!e' => $e->getMessage())), 'error');
- return FALSE;
- }
- foreach ($xml->ingest_rules->rule as $rule) {
- foreach ($rule->applies_to as $type) {
- if (!strcmp(trim($type), trim($mimetype))) {
- $methods = $rule->methods->method;
- return $this->callMethods($file, $methods);
- }
- }
- }
- }
-
- /**
- * calls the methods defined in the content model rules .xml file stored in a Fedora object
- */
- function callMethods($file, $methods) {
- foreach ($methods as $method) {
- $phpFile = strip_tags($method->file->asXML());
- $phpClass = strip_tags($method->class_name->asXML());
- $phpMethod = strip_tags($method->method_name->asXML());
- $file_ext = strip_tags($method->modified_files_ext->asXML());
- $parameters = $method->parameters->parameter;
- $dsid = strip_tags($method->datastream_id);
- $parametersArray = array();
- if (isset($parameters)) {
- foreach ($parameters as $parameter) {
- $name = strip_tags($parameter['name']);
- $value = strip_tags($parameter->asXML());
- $parametersArray["$name"] = $value;
- }
- }
- // module_load_include( $phpFile, 'Fedora_Repository', ' ');
- require_once(drupal_get_path('module', 'fedora_repository') . '/' . $phpFile);
- $thisClass = new $phpClass ();
- $returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
- if (!$returnValue) {
- drupal_set_message('Error! Failed running content model method !m !rv', array('!m' => $phpMethod, '!rv' => $returnValue));
- return FALSE;
- }
- }
- return TRUE;
- }
-
- /**
- * grabs a xml form definition from a content model and builds
- * the form using drupals forms api
- */
- function build_ingest_form(&$form, &$form_state, $contentModelPid, $contentModelDsid) {
- $stream = $this->getContentModelStream($contentModelPid, $contentModelDsid);
- try {
- $xml = new SimpleXMLElement($stream);
- } catch (Exception $e) {
- drupal_set_message(t('Error getting ingest form stream !e', array('!e' => $e->getMessage())), 'error');
- return FALSE;
- }
- $docRoot = $_SERVER['DOCUMENT_ROOT'];
-
- $file = (isset($form_state['values']['ingest-file-location']) ? $form_state['values']['ingest-file-location'] : '');
- // $fullPath = $docRoot . '' . $file;
- $fullpath = $file;
- // $form = array();
- $form['step'] = array(
- '#type' => 'hidden',
- '#value' => (isset($form_state['values']['step']) ? $form_state['values']['step'] : 0) + 1,
- );
- $form['ingest-file-location'] = array(
- '#type' => 'hidden',
- '#value' => $file,
- );
-
- $form['content_model_name'] = array(
- '#type' => 'hidden',
- '#value' => $contentModelDsid
- );
- $form['models'] = array(//content models available
- '#type' => 'hidden',
- '#value' => $form_state['values']['models'],
- );
- $form['fullpath'] = array(
- '#type' => 'hidden',
- '#value' => $fullpath,
- );
-
- $form['#attributes']['enctype'] = 'multipart/form-data';
- $form['indicator']['ingest-file-location'] = array(
- '#type' => 'file',
- '#title' => t('Upload Document'),
- '#size' => 48,
- '#description' => t('Full text'),
- );
- if ($xml->ingest_form->hide_file_chooser == 'TRUE') {
- $form['indicator']['ingest-file-location']['#type'] = 'hidden';
- }
- $ingest_form = $xml->ingest_form; //should only be one
- $drupal_module = strip_tags($ingest_form->form_builder_method->module->asXML());
- if (empty($drupal_module)) {
- $drupal_module = 'fedora_repository';
- }
- $phpFile = strip_tags($ingest_form->form_builder_method->file->asXML());
- $phpClass = strip_tags($ingest_form->form_builder_method->class_name->asXML());
- $phpMethod = strip_tags($ingest_form->form_builder_method->method_name->asXML());
- $dsid = strip_tags($ingest_form['dsid']);
- // module_load_include('php', 'Fedora_Repository', $phpFile);
- require_once(drupal_get_path('module', $drupal_module) . '/' . $phpFile);
- $thisClass = new $phpClass ();
-
- 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.
- *
- * @param type $user
- * @return type
- */
- function createUserCollection(& $user) {
- if (isset($user->fedora_personal_pid)) {
- return;
- }
- $username = array(
- 'name' => variable_get('fedora_admin_user', 'fedoraAdmin')
- );
- $admin_user = user_load($username);
- module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
- $connectionHelper = new ConnectionHelper();
- try {
- $soapClient = $connectionHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'));
- $pidNameSpace = variable_get('fedora_repository_pid', 'vre:');
- $pidNameSpace = substr($pidNameSpace, 0, strpos($pidNameSpace, ":"));
- $params = array(
- 'numPIDs' => '',
- 'pidNamespace' => $pidNameSpace
- );
- $object = $soapClient->__soapCall('getNextPID', array(
- $params
- ));
- } catch (exception $e) {
- drupal_set_message(t('Error getting Next PID: !e', array('!e' => $e->getMessage())), 'error');
- return FALSE;
- }
- $pid = implode(get_object_vars($object));
- $pidNumber = strstr($pid, ":");
- $pid = $pidNameSpace . ':' . 'USER-' . $user->name . '-' . substr($pidNumber, 1);
- $personal_collection_pid = array(
- 'fedora_personal_pid' => $pid
- );
- module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass');
- $personalCollectionClass = new PersonalCollectionClass();
- if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) {
- drupal_set_message("Did not create a personal collection object for !u", array('!u' => $user->name));
- return FALSE; //creation failed don't save the collection pid in drupal db
- }
- user_save($user, $personal_collection_pid);
- return TRUE;
- }
-
- /**
- * Queries a collection object for an xslt to format how the
- * collection of objects is displayed.
- */
- function getXslContent($pid, $path, $canUseDefault = TRUE) {
- module_load_include('inc', 'fedora_repository', 'CollectionClass');
- $collectionClass = new CollectionClass();
- $xslContent = $collectionClass->getCollectionViewStream($pid);
- if (!$xslContent && $canUseDefault) { //no xslt so we will use the default sent with the module
- $xslContent = file_get_contents($path . '/xsl/sparql_to_html.xsl');
- }
- return $xslContent;
- }
-
- /**
- * showFieldSets ??
- * @global type $base_url
- * @global type $user
- * @param type $page_number
- * @return string
- */
- function showFieldSets($page_number) {
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
- global $base_url;
-
- $tabset = array();
-
- global $user;
- $objectHelper = new ObjectHelper();
- $item = new Fedora_Item($this->pid);
- $query = NULL;
- if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) {
- $query = $item->get_datastream_dissemination('QUERY');
- }
- $results = $this->getRelatedItems($this->pid, $query);
-
- $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number);
- $collection_item = new Fedora_Item($this->pid);
- // 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_to_collection = $this->getIngestInterface();
-
- $tabset['view_tab'] = array(
- '#type' => 'tabpage',
- '#title' => 'View',
- '#content' => $collection_items
- );
- $tabset['add_tab'] = array(
- // #type and #title are the minimum requirements.
- '#type' => 'tabpage',
- '#title' => t('Add'),
- '#selected' => $show_ingest_tab,
- // This will be the content of the tab.
- '#content' => $add_to_collection,
- );
- return $tabset;
- }
-
- /**
- * getIngestInterface ??
- * @global type $base_url
- * @return string
- */
- function getIngestInterface() {
- global $base_url;
- $objectHelper = new ObjectHelper();
- module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy');
- $collectionPolicyExists = $objectHelper->getMimeType($this->pid, CollectionPolicy::getDefaultDSID());
- if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) {
- if (!empty($collectionPolicyExists)) {
- $allow = TRUE;
- if (module_exists('fedora_fesl')) {
- $allow = fedora_fesl_check_roles($this->pid, 'write');
- }
- if ($allow) {
- $ingestObject = drupal_get_form('fedora_repository_ingest_form', $this->pid);
- }
- }
- }
- else {
- $ingestObject = '';
- }
-
- return $ingestObject;
- }
-
- /**
- * renderCOllection ??
- * @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, $collection, $pageNumber = NULL) {
- $path = drupal_get_path('module', 'fedora_repository');
- global $base_url;
- $collection_pid = $pid; //we will be changing the pid later maybe
- $objectHelper = new ObjectHelper();
- $parsedContent = NULL;
- $contentModels = $objectHelper->get_content_models_list($pid);
- $isCollection = FALSE;
- //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.
-
- $fedoraItem = NULL;
-
-
-
- $collectionName = $collection;
- if (!$pageNumber) {
- $pageNumber = 1;
- }
-
- if (!isset($collectionName)) {
- $collectionName = variable_get('fedora_repository_name', 'Collection');
- }
- $xslContent = $this->getXslContent($pid, $path);
-
- //get collection list and display using xslt-------------------------------------------
- $objectList = '';
- if (isset($content) && $content != FALSE) {
- $input = new DomDocument();
- $input->loadXML(trim($content));
- $results = $input->getElementsByTagName('result');
- if ($results->length > 0) {
- try {
- $proc = new XsltProcessor();
- $proc->setParameter('', 'collectionPid', $collection_pid);
- $proc->setParameter('', 'collectionTitle', $collectionName);
- $proc->setParameter('', 'baseUrl', $base_url);
- $proc->setParameter('', 'path', $base_url . '/' . $path);
- $proc->setParameter('', 'hitPage', $pageNumber);
- $proc->registerPHPFunctions();
- $xsl = new DomDocument();
- $xsl->loadXML($xslContent);
- // php xsl does not seem to work with namespaces so removing it below
- // I may have just been being stupid here
- // $content = str_ireplace('xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result"', '', $content);
-
- $xsl = $proc->importStylesheet($xsl);
- $newdom = $proc->transformToDoc($input);
-
- $objectList = $newdom->saveXML(); //is the xml transformed to html as defined in the xslt associated with the collection object
-
- if (!$objectList) {
- throw new Exception("Invalid XML.");
- }
- } catch (Exception $e) {
- drupal_set_message(t('!e', array('!e' => $e->getMessage())), 'error');
- return '';
- }
- }
- }
- else {
- drupal_set_message(t("No Objects in this collection or bad query."));
- }
- return $objectList;
- }
-
-}
-
+collectionObject = new ObjectHelper($pid);
+ $this->pid = $pid;
+ }
+ }
+
+ /**
+ * gets objects related to this object. must include offset and limit
+ * calls getRelatedItems but enforces limit and offset
+ */
+ function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) {
+ module_load_include('inc', 'fedora_repository', 'ObjectHelper');
+ $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);
+ }
+
+ /**
+ * Gets objects related to this item. It will query the object for a Query stream and use that as a itql query
+ * 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
+ */
+ function getRelatedItems($pid, $itqlquery = NULL, $limit = NULL, $offset = NULL) {
+ module_load_include('inc', 'fedora_repository', 'ObjectHelper');
+ module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
+ if (!isset($limit)) {
+ $limit = 1000;
+ }
+ if (!isset($offset)) {
+ $offset = 0;
+ }
+ 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;
+ if (!isset($query_string)) {
+ $query_string = $objectHelper->getStream($pid, 'QUERY', 0);
+ if ($query_string == NULL) {
+ $query_string = 'select $object $title $content from <#ri>
+ where ($object $title
+ and $object $content
+ and ($object
+ or $object )
+ and $object )
+ minus $content
+ order by $title';
+ }
+ }
+ else {
+ // Replace %parent_collection% with the actual collection PID
+ $query_string = preg_replace("/\%parent_collection\%/", "", $query_string);
+ }
+
+ $query_string = htmlentities(urlencode($query_string));
+
+ $content = '';
+ $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);
+
+ return $content;
+ }
+
+ /**
+ * getCollectionPolicyStream ??
+ * @param type $collection_pid
+ * @return type
+ */
+ function getCollectionPolicyStream($collection_pid) {
+ if ($this->collectionPolicyStream != NULL) {
+ return $this->collectionPolicyStream;
+ }
+ $this->collectionPolicyStream = $this->getStream($collection_pid, CollectionClass :: $COLLECTION_CLASS_COLLECTION_POLICY_STREAM, 0);
+ return $this->collectionPolicyStream;
+ }
+
+ /**
+ * getRelationshipElement
+ * @param type $collection_pid
+ * @return type
+ */
+ function getRelationshipElement($collection_pid) {
+ $stream = $this->getCollectionPolicyStream($collection_pid);
+ try {
+ $xml = new SimpleXMLElement($stream);
+ } catch (Exception $e) {
+ drupal_set_message(t('Error getting relationship element from policy stream !e', array('!e' => $e->getMessage())), 'error');
+ return;
+ }
+ $relationship = $xml->relationship[0];
+ return $relationship;
+ }
+
+ /**
+ * getCollectionViewStream ??
+ * @param type $collection_pid
+ * @return type
+ */
+ function getCollectionViewStream($collection_pid) {
+ $this->collectionViewStream = $this->getStream($collection_pid, CollectionClass :: $COLLECTION_CLASS_COLLECTION_VIEW_STREAM, 0);
+ return $this->collectionViewStream;
+ }
+
+ /**
+ * getStream ??
+ * @param type $pid
+ * @param type $dsid
+ * @param type $showError
+ * @return type
+ */
+ function getStream($pid, $dsid, $showError = 1) {
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+ $item = new fedora_item($pid);
+ return isset($item->datastreams[$dsid]) ? $item->get_datastream_dissemination($dsid) : NULL;
+ }
+
+ /**
+ * getPidNameSpace ??
+ * @param type $pid
+ * @param type $dsid
+ * @return type
+ */
+ function getPidNameSpace($pid, $dsid) {
+ $stream = $this->getCollectionPolicyStream($pid);
+ try {
+ $xml = new SimpleXMLElement($stream);
+ } catch (Exception $e) {
+ drupal_set_message(t('Error getting PID namespace !e', array('!e' => $e->getMessage())), 'error');
+ return;
+ }
+ foreach ($xml->contentmodels->contentmodel as $contentModel) {
+ // $contentModelName=strip_tags($contentModel['name']);
+ $contentdsid = strip_tags($contentModel->dsid);
+ if (strtolower($contentdsid) == strtolower($dsid)) {
+ return strip_tags($contentModel->pid_namespace->asXML());
+ }
+ }
+ drupal_set_message(t('Error getting PID namespace! using collection pid of !pid and content model of !dsid', array('!pid' => $pid, '!dsid' => $dsid)), 'error');
+ return NULL;
+ }
+
+ /**
+ * gets a list of content models from a collection policy
+ */
+ function getContentModels($collection_pid, $showError = TRUE) {
+ module_load_include('inc', 'Fedora_Repository', 'ContentModel');
+ $collection_stream = $this->getCollectionPolicyStream($collection_pid);
+ try {
+ $xml = new SimpleXMLElement($collection_stream);
+ } catch (Exception $e) {
+ if ($showError) {
+ drupal_set_message(t("!e", array('!e' => $e->getMessage())), 'error');
+ }
+ return NULL;
+ }
+ foreach ($xml->contentmodels->contentmodel as $content_model) {
+ $contentModel = new ContentModel();
+ $contentModel->contentModelDsid = $content_model->dsid;
+ $contentModel->contentModelPid = $content_model->pid;
+ $contentModel->pidNamespace = $content_model->pidNamespace;
+ $contentModel->contentModelName = $content_model['name'];
+ $models[] = $contentModel;
+ }
+ return $models;
+ }
+
+ /**
+ * using the collection policies pid namespace get a new pid by calling fedora' get next pid and appending it to the namespace
+ * $pid is the $pid of the content model
+ * $dsid is the datastream id of the content model.
+ */
+ function getNextPid($pid, $dsid) {
+ module_load_include('inc', 'Fedora_Repository', 'ConnectionHelper');
+ $pidNameSpace = $this->getPidNameSpace($pid, $dsid);
+ $pname = substr($pidNameSpace, 0, strpos($pidNameSpace, ":"));
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+ return Fedora_Item::get_next_pid_in_namespace($pname);
+ }
+
+ /**
+ * gets the form handler file, class and method and returns them in an array
+ *
+ * @param string $pid The content model PID
+ * @param string $dsid The content model DSID
+ * @return array The file, class and method name to handle the ingest form.
+ */
+ function getFormHandler($pid, $dsid) {
+ $stream = $this->getContentModelStream($pid, $dsid);
+ try {
+ $xml = new SimpleXMLElement($stream);
+ } catch (Exception $e) {
+ drupal_set_message(t('Error Getting FormHandler: !e', array('!e' => $e->getMessage())), 'error');
+ return NULL;
+ }
+ $formHandler = $xml->ingest_form;
+ if ($formHandler != NULL) {
+ $handlerDsid = strip_tags($formHandler['dsid']);
+ $handlerMethod = strip_tags($formHandler->form_builder_method->form_handler->asXML());
+ $handlerFile = strip_tags($formHandler->form_builder_method->file->asXML());
+ $handlerClass = strip_tags($formHandler->form_builder_method->class_name->asXML());
+ $handlerModule = strip_tags($formHandler->form_builder_method->module->asXML());
+ $returnArray = array();
+ $returnArray['module'] = $handlerModule;
+ $returnArray['method'] = $handlerMethod;
+ $returnArray['class'] = $handlerClass;
+ $returnArray['file'] = $handlerFile;
+ return $returnArray;
+ }
+
+ drupal_set_message(t("Error getting form handler. No handler found for !pid - !dsid", array('!pid' => $pid, '!dsid' => $dsid)), 'error');
+ return NULL;
+ }
+
+ /**
+ * getAllowedMimeType ??
+ * @param type $contentModelPid
+ * @param type $contentModel_dsid
+ * @return type
+ */
+ function getAllowedMimeTypes($contentModelPid, $contentModel_dsid) {
+ $stream = $this->getContentModelStream($contentModelPid, $contentModel_dsid);
+ try {
+ $xml = new SimpleXMLElement($stream);
+ } catch (Exception $e) {
+ drupal_set_message(t('Error getting content model stream for mime types !e', array('!e' => $e->getMessage())), 'error');
+ return;
+ }
+ foreach ($xml->mimetypes->type as $type) {
+ $types[] = $type;
+ }
+ return $types;
+ }
+
+ /**
+ * Grabs the rules from the content model stream
+ * file the file that has been uploaded
+ */
+ function getAndDoRules($file, $mimetype, $pid, $dsid) {
+ if (!user_access('ingest new fedora objects')) {
+ drupal_set_message(t('You do not have permission to ingest objects.'));
+ return FALSE;
+ }
+
+ $stream = $this->getContentModelStream($pid, $dsid);
+
+ try {
+ $xml = new SimpleXMLElement($stream);
+ } catch (Exception $e) {
+ drupal_set_message(t('Error getting content model stream !e', array('!e' => $e->getMessage())), 'error');
+ return FALSE;
+ }
+ foreach ($xml->ingest_rules->rule as $rule) {
+ foreach ($rule->applies_to as $type) {
+ if (!strcmp(trim($type), trim($mimetype))) {
+ $methods = $rule->methods->method;
+ return $this->callMethods($file, $methods);
+ }
+ }
+ }
+ }
+
+ /**
+ * calls the methods defined in the content model rules .xml file stored in a Fedora object
+ */
+ function callMethods($file, $methods) {
+ foreach ($methods as $method) {
+ $phpFile = strip_tags($method->file->asXML());
+ $phpClass = strip_tags($method->class_name->asXML());
+ $phpMethod = strip_tags($method->method_name->asXML());
+ $file_ext = strip_tags($method->modified_files_ext->asXML());
+ $parameters = $method->parameters->parameter;
+ $dsid = strip_tags($method->datastream_id);
+ $parametersArray = array();
+ if (isset($parameters)) {
+ foreach ($parameters as $parameter) {
+ $name = strip_tags($parameter['name']);
+ $value = strip_tags($parameter->asXML());
+ $parametersArray["$name"] = $value;
+ }
+ }
+ // module_load_include( $phpFile, 'Fedora_Repository', ' ');
+ require_once(drupal_get_path('module', 'fedora_repository') . '/' . $phpFile);
+ $thisClass = new $phpClass ();
+ $returnValue = $thisClass->$phpMethod($parametersArray, $dsid, $file, $file_ext);
+ if (!$returnValue) {
+ drupal_set_message(t('Error! Failed running content model method !m !rv'), array('!m' => $phpMethod, '!rv' => $returnValue));
+ return FALSE;
+ }
+ }
+ return TRUE;
+ }
+
+ /**
+ * grabs a xml form definition from a content model and builds
+ * the form using drupals forms api
+ */
+ function build_ingest_form(&$form, &$form_state, $contentModelPid, $contentModelDsid) {
+ $stream = $this->getContentModelStream($contentModelPid, $contentModelDsid);
+ try {
+ $xml = new SimpleXMLElement($stream);
+ } catch (Exception $e) {
+ drupal_set_message(t('Error getting ingest form stream !e', array('!e' => $e->getMessage())), 'error');
+ return FALSE;
+ }
+ $docRoot = $_SERVER['DOCUMENT_ROOT'];
+
+ $file = (isset($form_state['values']['ingest-file-location']) ? $form_state['values']['ingest-file-location'] : '');
+ // $fullPath = $docRoot . '' . $file;
+ $fullpath = $file;
+ // $form = array();
+ $form['step'] = array(
+ '#type' => 'hidden',
+ '#value' => (isset($form_state['values']['step']) ? $form_state['values']['step'] : 0) + 1,
+ );
+ $form['ingest-file-location'] = array(
+ '#type' => 'hidden',
+ '#value' => $file,
+ );
+
+ $form['content_model_name'] = array(
+ '#type' => 'hidden',
+ '#value' => $contentModelDsid
+ );
+ $form['models'] = array(//content models available
+ '#type' => 'hidden',
+ '#value' => $form_state['values']['models'],
+ );
+ $form['fullpath'] = array(
+ '#type' => 'hidden',
+ '#value' => $fullpath,
+ );
+
+ $form['#attributes']['enctype'] = 'multipart/form-data';
+ $form['indicator']['ingest-file-location'] = array(
+ '#type' => 'file',
+ '#title' => t('Upload Document'),
+ '#size' => 48,
+ '#description' => t('Full text'),
+ );
+ if ($xml->ingest_form->hide_file_chooser == 'TRUE') {
+ $form['indicator']['ingest-file-location']['#type'] = 'hidden';
+ }
+ $ingest_form = $xml->ingest_form; //should only be one
+ $drupal_module = strip_tags($ingest_form->form_builder_method->module->asXML());
+ if (empty($drupal_module)) {
+ $drupal_module = 'fedora_repository';
+ }
+ $phpFile = strip_tags($ingest_form->form_builder_method->file->asXML());
+ $phpClass = strip_tags($ingest_form->form_builder_method->class_name->asXML());
+ $phpMethod = strip_tags($ingest_form->form_builder_method->method_name->asXML());
+ $dsid = strip_tags($ingest_form['dsid']);
+ // module_load_include('php', 'Fedora_Repository', $phpFile);
+ require_once(drupal_get_path('module', $drupal_module) . '/' . $phpFile);
+ $thisClass = new $phpClass ();
+
+ 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.
+ *
+ * @param type $user
+ * @return type
+ */
+ function createUserCollection(& $user) {
+ if (isset($user->fedora_personal_pid)) {
+ return;
+ }
+ $username = array(
+ 'name' => variable_get('fedora_admin_user', 'fedoraAdmin')
+ );
+ $admin_user = user_load($username);
+ module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
+ $connectionHelper = new ConnectionHelper();
+ try {
+ $soapClient = $connectionHelper->getSoapClient(variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'));
+ $pidNameSpace = variable_get('fedora_repository_pid', 'vre:');
+ $pidNameSpace = substr($pidNameSpace, 0, strpos($pidNameSpace, ":"));
+ $params = array(
+ 'numPIDs' => '',
+ 'pidNamespace' => $pidNameSpace
+ );
+ $object = $soapClient->__soapCall('getNextPID', array(
+ $params
+ ));
+ } catch (exception $e) {
+ drupal_set_message(t('Error getting Next PID: !e', array('!e' => $e->getMessage())), 'error');
+ return FALSE;
+ }
+ $pid = implode(get_object_vars($object));
+ $pidNumber = strstr($pid, ":");
+ $pid = $pidNameSpace . ':' . 'USER-' . $user->name . '-' . substr($pidNumber, 1);
+ $personal_collection_pid = array(
+ 'fedora_personal_pid' => $pid
+ );
+ module_load_include('inc', 'fedora_repository', 'plugins/PersonalCollectionClass');
+ $personalCollectionClass = new PersonalCollectionClass();
+ if (!$personalCollectionClass->createCollection($user, $pid, $soapClient)) {
+ drupal_set_message(t("Did not create a personal collection object for !u"), array('!u' => $user->name));
+ return FALSE; //creation failed don't save the collection pid in drupal db
+ }
+ user_save($user, $personal_collection_pid);
+ return TRUE;
+ }
+
+ /**
+ * Queries a collection object for an xslt to format how the
+ * collection of objects is displayed.
+ */
+ function getXslContent($pid, $path, $canUseDefault = TRUE) {
+ module_load_include('inc', 'fedora_repository', 'CollectionClass');
+ $collectionClass = new CollectionClass();
+ $xslContent = $collectionClass->getCollectionViewStream($pid);
+ if (!$xslContent && $canUseDefault) { //no xslt so we will use the default sent with the module
+ $xslContent = file_get_contents($path . '/xsl/sparql_to_html.xsl');
+ }
+ return $xslContent;
+ }
+
+ /**
+ * showFieldSets ??
+ * @global type $base_url
+ * @global type $user
+ * @param type $page_number
+ * @return string
+ */
+ function showFieldSets($page_number) {
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+ global $base_url;
+
+ $tabset = array();
+
+ global $user;
+ $objectHelper = new ObjectHelper();
+ $item = new Fedora_Item($this->pid);
+ $query = NULL;
+ if ($item->exists() && array_key_exists('QUERY', $item->datastreams)) {
+ $query = $item->get_datastream_dissemination('QUERY');
+ }
+ $results = $this->getRelatedItems($this->pid, $query);
+
+ $collection_items = $this->renderCollection($results, $this->pid, NULL, NULL, $page_number);
+ $collection_item = new Fedora_Item($this->pid);
+ // 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_to_collection = $this->getIngestInterface();
+
+ $tabset['view_tab'] = array(
+ '#type' => 'tabpage',
+ '#title' => 'View',
+ '#content' => $collection_items
+ );
+ $tabset['add_tab'] = array(
+ // #type and #title are the minimum requirements.
+ '#type' => 'tabpage',
+ '#title' => t('Add'),
+ '#selected' => $show_ingest_tab,
+ // This will be the content of the tab.
+ '#content' => $add_to_collection,
+ );
+ return $tabset;
+ }
+
+ /**
+ * getIngestInterface ??
+ * @global type $base_url
+ * @return string
+ */
+ function getIngestInterface() {
+ global $base_url;
+ $objectHelper = new ObjectHelper();
+ module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy');
+ $collectionPolicyExists = $objectHelper->getMimeType($this->pid, CollectionPolicy::getDefaultDSID());
+ if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) {
+ if (!empty($collectionPolicyExists)) {
+ $allow = TRUE;
+ if (module_exists('fedora_fesl')) {
+ $allow = fedora_fesl_check_roles($this->pid, 'write');
+ }
+ if ($allow) {
+ $ingestObject = drupal_get_form('fedora_repository_ingest_form', $this->pid);
+ }
+ }
+ }
+ else {
+ $ingestObject = '';
+ }
+
+ return $ingestObject;
+ }
+
+ /**
+ * renderCOllection ??
+ * @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, $collection, $pageNumber = NULL) {
+ $path = drupal_get_path('module', 'fedora_repository');
+ global $base_url;
+ $collection_pid = $pid; //we will be changing the pid later maybe
+ $objectHelper = new ObjectHelper();
+ $parsedContent = NULL;
+ $contentModels = $objectHelper->get_content_models_list($pid);
+ $isCollection = FALSE;
+ //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.
+
+ $fedoraItem = NULL;
+
+
+
+ $collectionName = $collection;
+ if (!$pageNumber) {
+ $pageNumber = 1;
+ }
+
+ if (!isset($collectionName)) {
+ $collectionName = variable_get('fedora_repository_name', 'Collection');
+ }
+ $xslContent = $this->getXslContent($pid, $path);
+
+ //get collection list and display using xslt-------------------------------------------
+ $objectList = '';
+ if (isset($content) && $content != FALSE) {
+ $input = new DomDocument();
+ $input->loadXML(trim($content));
+ $results = $input->getElementsByTagName('result');
+ if ($results->length > 0) {
+ try {
+ $proc = new XsltProcessor();
+ $proc->setParameter('', 'collectionPid', $collection_pid);
+ $proc->setParameter('', 'collectionTitle', $collectionName);
+ $proc->setParameter('', 'baseUrl', $base_url);
+ $proc->setParameter('', 'path', $base_url . '/' . $path);
+ $proc->setParameter('', 'hitPage', $pageNumber);
+ $proc->registerPHPFunctions();
+ $xsl = new DomDocument();
+ $xsl->loadXML($xslContent);
+ // php xsl does not seem to work with namespaces so removing it below
+ // I may have just been being stupid here
+ // $content = str_ireplace('xmlns="http://www.w3.org/2001/sw/DataAccess/rf1/result"', '', $content);
+
+ $xsl = $proc->importStylesheet($xsl);
+ $newdom = $proc->transformToDoc($input);
+
+ $objectList = $newdom->saveXML(); //is the xml transformed to html as defined in the xslt associated with the collection object
+
+ if (!$objectList) {
+ throw new Exception("Invalid XML.");
+ }
+ } catch (Exception $e) {
+ drupal_set_message(t('!e', array('!e' => $e->getMessage())), 'error');
+ return '';
+ }
+ }
+ }
+ else {
+ drupal_set_message(t("No Objects in this collection or bad query."));
+ }
+ return $objectList;
+ }
+
+}
+
diff --git a/CollectionPolicy.inc b/CollectionPolicy.inc
index af28633e..b4993563 100644
--- a/CollectionPolicy.inc
+++ b/CollectionPolicy.inc
@@ -1,7 +1,5 @@
get_datastream_dissemination($dsid);
}
else {
- $ds = null;
+ $ds = NULL;
}
}
@@ -355,8 +353,8 @@ class CollectionPolicy extends XMLDatastream {
}
/**
- * Gets the next available PID for the
- * content model specified by the DSID
+ * Gets the next available PID for the
+ * content model specified by the DSID
* parameter.
*
* @param string $dsid
@@ -364,7 +362,7 @@ class CollectionPolicy extends XMLDatastream {
*/
public function getNextPid($dsid) {
$ret = FALSE;
- if (self::validDsid($dsid) && $this->validate()) {
+ if (self::valid_dsid($dsid) && $this->validate()) {
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
$namespace = FALSE;
for ($i = 0; $namespace === FALSE && $i < $content_models->length; $i++) {
@@ -384,7 +382,7 @@ class CollectionPolicy extends XMLDatastream {
/**
* Gets a list of ContentModel objects supported by this collection.
*
- * @return ContentModel[] $models
+ * @return ContentModel[] $models
*/
function getContentModels() {
$ret = FALSE;
@@ -393,7 +391,10 @@ class CollectionPolicy extends XMLDatastream {
$ret = array();
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
for ($i = 0; $i < $content_models->length; $i++) {
- $cm = ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'), $content_models->item($i)->getAttribute('dsid'), $content_models->item($i)->getAttribute('namespace'), $content_models->item($i)->getAttribute('name'));
+ $cm = ContentModel::loadFromModel($content_models->item($i)->getAttribute('pid'),
+ $content_models->item($i)->getAttribute('dsid'),
+ $content_models->item($i)->getAttribute('namespace'),
+ $content_models->item($i)->getAttribute('name'));
if ($cm !== FALSE) {
$ret[] = $cm;
}
@@ -583,7 +584,7 @@ class CollectionPolicy extends XMLDatastream {
*/
function addModel($cm, $namespace) {
$ret = FALSE;
- if (self::validPid($namespace) && $this->validate() && $cm->validate()) {
+ if (self::valid_pid($namespace) && $this->validate() && $cm->validate()) {
$contentmodelsEl = $this->xml->getElementsByTagName('content_models');
$models = $contentmodelsEl->item(0)->getElementsByTagName('content_model');
$found = FALSE;
diff --git a/ConnectionHelper.inc b/ConnectionHelper.inc
index 344fb6a9..8225f0fc 100644
--- a/ConnectionHelper.inc
+++ b/ConnectionHelper.inc
@@ -1,94 +1,94 @@
- $url)));
- return NULL;
- }
-
- return $new_url;
- }
-
- /**
- * getSoapClient
- * @global type $user
- * @param type $url
- * @param type $exceptions
- * @return SoapClient
- */
- function getSoapClient($url = NULL, $exceptions = TRUE) {
- if (empty($url)) {
- $url = variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl');
- }
-
- global $user;
- if ($user->uid == 0) {
- //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
- try {
- $client = new SoapClient($this->_fixURL($url, 'anonymous', 'anonymous'), array(
- 'login' => 'anonymous',
- 'password' => 'anonymous',
- 'exceptions' => $exceptions,
- ));
- } catch (SoapFault $e) {
- drupal_set_message(t("!e", array('!e' => $e->getMessage())));
- return NULL;
- }
- }
- else {
- try {
- $client = new SoapClient($this->_fixURL($url, $user->name, $user->pass), array(
- 'login' => $user->name,
- 'password' => $user->pass,
- 'exceptions' => TRUE,
- ));
- } catch (SoapFault $e) {
- drupal_set_message(t("!e", array('!e' => $e->getMessage())));
- return NULL;
- }
- }
- return $client;
- }
-
-}
-
+ $url)));
+ return NULL;
+ }
+
+ return $new_url;
+ }
+
+ /**
+ * getSoapClient
+ * @global type $user
+ * @param type $url
+ * @param type $exceptions
+ * @return SoapClient
+ */
+ function getSoapClient($url = NULL, $exceptions = TRUE) {
+ if (empty($url)) {
+ $url = variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl');
+ }
+
+ global $user;
+ if ($user->uid == 0) {
+ //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
+ try {
+ $client = new SoapClient($this->_fixURL($url, 'anonymous', 'anonymous'), array(
+ 'login' => 'anonymous',
+ 'password' => 'anonymous',
+ 'exceptions' => $exceptions,
+ ));
+ } catch (SoapFault $e) {
+ drupal_set_message(t("!e", array('!e' => $e->getMessage())));
+ return NULL;
+ }
+ }
+ else {
+ try {
+ $client = new SoapClient($this->_fixURL($url, $user->name, $user->pass), array(
+ 'login' => $user->name,
+ 'password' => $user->pass,
+ 'exceptions' => TRUE,
+ ));
+ } catch (SoapFault $e) {
+ drupal_set_message(t("!e", array('!e' => $e->getMessage())));
+ return NULL;
+ }
+ }
+ return $client;
+ }
+
+}
+
diff --git a/ContentModel.inc b/ContentModel.inc
index d0c07bbb..64b71980 100644
--- a/ContentModel.inc
+++ b/ContentModel.inc
@@ -1,2390 +1,2393 @@
-get_content_models_list($pid);
- foreach ($content_models as $content_model) {
- if ($content_model != 'fedora-system:FedoraObject-3.0') {
- $ret = $content_model;
- break;
- }
- }
- }
- return $ret;
- }
-
- /**
- * Ingests a Content Model from a file to the specified pid/dsid .
- * Returns false on failure.
- *
- * @param string $pid
- * @param string $name
- * @param string $modelDsid
- * @param string $file
- * @return ContentModel $cm
- */
- public static function ingestFromFile($pid, $name, $modelDsid, $file) {
- $ret = FALSE;
-
- if (($cm = self::loadFromModel($pid, $modelDsid)) === FALSE && file_exists($file)) {
- $cm = new ContentModel(file_get_contents($file), $pid, $modelDsid);
- $rootEl = $cm->xml->getElementsByTagName('content_model')->item(0);
- $rootEl->setAttribute('name', $name);
-
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
- $fedoraItem = new Fedora_Item($pid);
- $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X');
- $ret = $cm;
- }
-
- return $ret;
- }
-
- /**
- * Ingests a Content Model from an existing model to the specified pid/dsid .
- * Returns false on failure.
- *
- * @param string $pid
- * @param string $name
- * @param string $modelDsid
- * @param string $copy_model_pid
- * @return ContentModel $cm
- */
- public static function ingestFromModel($pid, $name, $modelDsid, $copy_model_pid) {
- $ret = FALSE;
-
- if (($cm = self::loadFromModel($pid, $modelDsid)) === FALSE && ($copy_cm = self::loadFromModel($copy_model_pid)) !== FALSE && $copy_cm->validate()) {
- $newDom = $copy_cm->xml;
- $rootEl = $newDom->getElementsByTagName('content_model')->item(0);
- $rootEl->setAttribute('name', $name);
-
- $cm = new ContentModel($newDom, $pid, $modelDsid);
-
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
- $fedoraItem = new Fedora_Item($pid);
- $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X');
- $ret = $cm;
- }
-
- return $ret;
- }
-
- /**
- * Ingests a minimum Content Model to the specified pid/dsid.
- * Returns false on failure.
- *
- * @param string $pid
- * @param string $name
- * @param string $modelDsid
- * @param string $defaultMimetype
- * @param string $ingestFromDsid
- * @param integer $ingestFormPage
- * @param boolean $ingestFormHideFileChooser
- * @param string $ingestFormModule
- * @param string $ingestFormModule
- * @param string $ingestFormFile
- * @param string $ingestFormClass
- * @param string $ingestFormMethod
- * @param string $ingestFormHandler
- *
- * @return ContentModel $cm
- */
- public static function ingestBlankModel($pid, $name, $modelDsid, $defaultMimetype, $ingestFormDsid, $ingestFormPage, $ingestFormHideChooser, $ingestFormModule, $ingestFormModule, $ingestFormFile, $ingestFormClass, $ingestFormMethod, $ingestFormHandler) {
- $ret = FALSE;
- if (($cm = self::loadFromModel($pid, $modelDsid)) === FALSE) {
- $newDom = new DOMDocument('1.0', 'utf-8');
- $newDom->formatOutput = TRUE;
- $rootEl = $newDom->createElement('content_model');
- $rootEl->setAttribute('name', $name);
- $rootEl->setAttribute('xmlns', self::$XMLNS);
- $rootEl->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
- $rootEl->setAttribute('xsi:schemaLocation', self::$XMLNS . ' ' . self::$SCHEMA_URI);
-
- $mimeEl = $newDom->createElement('mimetypes');
- $typeEl = $newDom->createElement('type', $defaultMimetype);
- $mimeEl->appendChild($typeEl);
- $rootEl->appendChild($mimeEl);
-
- $ingestRulesEl = $newDom->createElement('ingest_rules');
- $rootEl->appendChild($ingestRulesEl);
-
- $ingestFormEl = $newDom->createElement('ingest_form');
- $ingestFormEl->setAttribute('dsid', $ingestFormDsid);
- $ingestFormEl->setAttribute('page', $ingestFormPage);
- if ($ingestFormHideChooser == 'true') {
- $ingestFormEl->setAttribute('hide_file_chooser', 'true');
- }
-
- $builderEl = $newDom->createElement('form_builder_method');
- $builderEl->setAttribute('module', $ingestFormModule);
- $builderEl->setAttribute('file', $ingestFormFile);
- $builderEl->setAttribute('class', $ingestFormClass);
- $builderEl->setAttribute('method', $ingestFormMethod);
- $builderEl->setAttribute('handler', $ingestFormHandler);
- $ingestFormEl->appendChild($builderEl);
-
- $elementsEl = $newDom->createElement('form_elements');
- $ingestFormEl->appendChild($elementsEl);
- $rootEl->appendChild($ingestFormEl);
- $newDom->appendChild($rootEl);
-
- $cm = new ContentModel($newDom, $pid, $modelDsid);
-
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
- $fedoraItem = new Fedora_Item($pid);
- $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X');
- $ret = $cm;
- }
-
- return $ret;
- }
-
- /**
- * 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
- * use the default (usually ISLANDORACM). PID_NAMESPACE and name can also be initialized
- * from the collection policy.
- * Returns false on failure.
- *
- * NOTE: $name will be overwritten with the content model name found in the datastream
- * when the model is first validated.\
- *
- * @param string $pid
- * @param string $dsid
- * @param string $pid_namespace
- * @param string $name
- * @return ContentModel $cm
- */
- public static function loadFromModel($pid, $dsid = NULL, $pid_namespace = NULL, $name = NULL) {
- $ret = FALSE;
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
- try {
- if (self::validPid($pid)) {
- $fedoraItem = new Fedora_Item($pid);
- $dsid = ($dsid != NULL && self::validDsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
- $ds = $fedoraItem->get_datastream_dissemination($dsid);
- if (!empty($ds)) {
- $ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name);
- }
- }
- } catch (SOAPException $e) {
- $ret = FALSE;
- }
- return $ret;
- }
-
- /**
- * Constructor
- * NOTE: Use the static constructor methods whenever possible.
- *
- * @param string $xmlStr
- * @param string $pid
- * @param string $dsid
- * @param string $pid_namespace
- * @param string $name
- * @return XMLDatastream $cm
- */
- public function __construct($xmlStr, $pid = NULL, $dsid = NULL, $pid_namespace = NULL, $name = NULL) {
- parent::__construct($xmlStr, $pid, $dsid);
- $this->pid_namespace = $pid_namespace;
- $this->name = ($name == NULL) ? 'Islandora Content Model' : $name;
- $this->xpath = new DOMXPath($this->xml);
- $this->xpath->registerNamespace('cm', 'http://www.islandora.ca');
- }
-
- /**
- * Attempts to convert from the old XML schema to the new by
- * traversing the XML DOM and building a new DOM. When done
- * $this->xml is replaced by the newly created DOM..
- *
- * @return void
- */
- protected function convertFromOldSchema() {
- $sXml = simplexml_load_string($this->xml->saveXML());
- $newDom = new DOMDocument('1.0', 'utf-8');
- $newDom->formatOutput = TRUE;
- $rootEl = $newDom->createElement('content_model');
- $rootEl->setAttribute('name', $sXml['name']);
- $rootEl->setAttribute('xmlns', self::$XMLNS);
- $rootEl->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
- $rootEl->setAttribute('xsi:schemaLocation', self::$XMLNS . ' ' . self::$SCHEMA_URI);
-
- $mimeEl = $newDom->createElement('mimetypes');
- foreach ($sXml->mimetypes->type as $mime) {
- $typeEl = $newDom->createElement('type', $mime);
- $mimeEl->appendChild($typeEl);
- }
- $rootEl->appendChild($mimeEl);
-
- $ingestRulesEl = $newDom->createElement('ingest_rules');
- foreach ($sXml->ingest_rules->rule as $rule) {
- $ruleEl = $newDom->createElement('rule');
- foreach ($rule->applies_to as $appTo) {
- $applToEl = $newDom->createElement('applies_to', trim($appTo));
- $ruleEl->appendChild($applToEl);
- }
- if (isset($rule->methods->method) && count($rule->methods->method) > 0) {
- $methodsEl = $newDom->createElement('ingest_methods');
- foreach ($rule->methods->method as $method) {
- $methodEl = $newDom->createElement('ingest_method');
- $methodEl->setAttribute('module', $method->module);
- $methodEl->setAttribute('file', $method->file);
- $methodEl->setAttribute('class', $method->class_name);
- $methodEl->setAttribute('method', $method->method_name);
- $methodEl->setAttribute('dsid', $method->datastream_id);
- $methodEl->setAttribute('modified_files_ext', $method->modified_files_ext);
-
- if (isset($method->parameters)) {
- $paramsEl = $newDom->createElement('parameters');
- foreach ($method->parameters->parameter as $param) {
- $paramEl = $newDom->createElement('parameter', $param);
- $paramEl->setAttribute('name', $param['name']);
- $paramsEl->appendChild($paramEl);
- }
- $methodEl->appendChild($paramsEl);
- }
-
-
- $methodsEl->appendChild($methodEl);
- }
- $ruleEl->appendChild($methodsEl);
- $ingestRulesEl->appendChild($ruleEl);
- }
- }
- $rootEl->appendChild($ingestRulesEl);
-
- if (isset($sXml->display_in_fieldset) && count($sXml->display_in_fieldset->datastream) > 0) {
- $datastreamsEl = $newDom->createElement('datastreams');
-
- foreach ($sXml->display_in_fieldset->datastream as $ds) {
- $dsEl = $newDom->createElement('datastream');
- $dsEl->setAttribute('dsid', $ds['id']);
-
- if (isset($ds->add_datastream_method)) {
- $add_ds_methodEl = $newDom->createElement('add_datastream_method');
- $add_ds_methodEl->setAttribute('module', $ds->add_datastream_method->module);
- $add_ds_methodEl->setAttribute('file', $ds->add_datastream_method->file);
- $add_ds_methodEl->setAttribute('class', $ds->add_datastream_method->class_name);
- $add_ds_methodEl->setAttribute('method', $ds->add_datastream_method->method_name);
- $add_ds_methodEl->setAttribute('dsid', $ds->add_datastream_method->datastream_id);
- $add_ds_methodEl->setAttribute('modified_files_ext', $ds->add_datastream_method->modified_files_ext);
-
- if (isset($ds->add_datastream_method->parameters)) {
- $paramsEl = $newDom->createElement('parameters');
- foreach ($ds->add_datastream_method->parameters->parameter as $param) {
- $paramEl = $newDom->createElement('parameter', $param);
- $paramEl->setAttribute('name', $param['name']);
- $paramsEl->appendChild($paramEl);
- }
- $add_ds_methodEl->appendChild($paramsEl);
- }
-
- $dsEl->appendChild($add_ds_methodEl);
- }
-
- foreach ($ds->method as $disp_meth) {
- $disp_methEl = $newDom->createElement('display_method');
- $disp_methEl->setAttribute('module', $disp_meth->module);
- $disp_methEl->setAttribute('file', $disp_meth->file);
- $disp_methEl->setAttribute('class', $disp_meth->class_name);
- $disp_methEl->setAttribute('method', $disp_meth->method_name);
- $dsEl->appendChild($disp_methEl);
- }
- $datastreamsEl->appendChild($dsEl);
- }
- $rootEl->appendChild($datastreamsEl);
- }
-
- $ingest_formEl = $newDom->createElement('ingest_form');
- $ingest_formEl->setAttribute('dsid', $sXml->ingest_form['dsid']);
- $ingest_formEl->setAttribute('page', $sXml->ingest_form['page']);
- if (isset($sXml->ingest_form['hide_file_chooser'])) {
- $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->setAttribute('module', $sXml->ingest_form->form_builder_method->module);
- $form_builderEl->setAttribute('file', $sXml->ingest_form->form_builder_method->file);
- $form_builderEl->setAttribute('class', $sXml->ingest_form->form_builder_method->class_name);
- $form_builderEl->setAttribute('method', $sXml->ingest_form->form_builder_method->method_name);
- $form_builderEl->setAttribute('handler', $sXml->ingest_form->form_builder_method->form_handler);
- $ingest_formEl->appendChild($form_builderEl);
-
- $form_elementsEl = $newDom->createElement('form_elements');
- foreach ($sXml->ingest_form->form_elements->element as $element) {
-
- //I found an XML where the label was HTML.. this code will attempt to
- //walk the object setting the label to be the first string it finds.
- if (count(get_object_vars($element->label)) > 0) {
- $obj = $element->label;
- while ($obj != NULL && !is_string($obj)) {
- $keys = get_object_vars($obj);
- $obj = array_shift($keys);
- }
- $element->label = ($obj == NULL) ? '' : $obj;
- }
-
- $elEl = $newDom->createElement('element');
- $elEl->setAttribute('label', $element->label);
- $elEl->setAttribute('name', $element->name);
- $elEl->setAttribute('type', $element->type);
- if (strtolower($element->required) == 'true') {
- $elEl->setAttribute('required', 'true');
- }
- if (isset($element->description) && trim($element->description) != '') {
- $descEl = $newDom->createElement('description', trim($element->description));
- $elEl->appendChild($descEl);
- }
- if (isset($element->authoritative_list)) {
- $authListEl = $newDom->createElement('authoritative_list');
- foreach ($element->authoritative_list->item as $item) {
- $itemEl = $newDom->createElement('item', trim($item->value));
- if (trim($item->value) != trim($item->field)) {
- $itemEl->setAttribute('field', trim($item->field));
- }
- $authListEl->appendChild($itemEl);
- }
- $elEl->appendChild($authListEl);
- }
- $form_elementsEl->appendChild($elEl);
- }
- $ingest_formEl->appendChild($form_builderEl);
- $ingest_formEl->appendChild($form_elementsEl);
- $rootEl->appendChild($ingest_formEl);
-
- if (isset($sXml->edit_metadata) &&
- trim($sXml->edit_metadata->build_form_method->module) != '' &&
- trim($sXml->edit_metadata->build_form_method->file) != '' &&
- trim($sXml->edit_metadata->build_form_method->class_name) != '' &&
- trim($sXml->edit_metadata->build_form_method->method_name) != '' &&
- trim($sXml->edit_metadata->submit_form_method->method_name) != '' &&
- trim($sXml->edit_metadata->build_form_method['dsid']) != ''
- ) {
- $edit_metadata_methodEl = $newDom->createElement('edit_metadata_method');
- $edit_metadata_methodEl->setAttribute('module', $sXml->edit_metadata->build_form_method->module);
- $edit_metadata_methodEl->setAttribute('file', $sXml->edit_metadata->build_form_method->file);
- $edit_metadata_methodEl->setAttribute('class', $sXml->edit_metadata->build_form_method->class_name);
- $edit_metadata_methodEl->setAttribute('method', $sXml->edit_metadata->build_form_method->method_name);
- $edit_metadata_methodEl->setAttribute('handler', $sXml->edit_metadata->submit_form_method->method_name);
- $edit_metadata_methodEl->setAttribute('dsid', $sXml->edit_metadata->build_form_method['dsid']);
- $rootEl->appendChild($edit_metadata_methodEl);
- }
-
- $newDom->appendChild($rootEl);
-
- $this->xml = DOMDocument::loadXML($newDom->saveXml());
- }
-
- /**
- * Gets a list of service deployments that this model has.
- *
- * NOTE: Not currently being used.
- *
- * @return String[] $serviceDepPids
- */
- public function getServices() {
- $query = 'select $object $title from <#ri>
- where ($object $title
- and $object $deploymentOf
- and $object
- and $object pid . '>
- and $object )
- order by $title';
-
- module_load_include('inc', 'fedora_repository', 'CollectionClass');
-
- $collectionHelper = new CollectionClass();
- $xml = simplexml_load_string($collectionHelper->getRelatedItems($this->pid, $query));
-
- $results = array();
- foreach ($xml->results->result as $result) {
- $pid = strval(($result->object['uri']));
- $pid = substr($pid, strpos($pid, "/") + 1, strlen($pid));
- $results[] = $pid;
- }
-
- return $results;
- }
-
- /**
- * Gets the name of the ContentModel
- * Returns false on failure.
- *
- * @return String $name
- */
- public function getName() {
- $ret = FALSE;
- if ($this->name != NULL) {
- $ret = $this->name;
- }
- elseif ($this->validate()) {
- $rootEl = $this->xml->getElementsByTagName('content_model')->item(0);
- $this->name = $rootEl->getAttribute('name');
- $ret = $this->name;
- }
- return $ret;
- }
-
- /**
- * Gets the element corresponding to the datastream specified
- * in the element of the schema.
- * Returns FALSE on failure.
- *
- * @param $dsid
- * @return DOMElement $datastream
- */
- private function getDSModel($dsid) {
- $ret = FALSE;
- if (self::validDsid($dsid) && $this->validate()) {
- $result = $this->xml->getElementsByTagName('datastreams');
- if ($result->length > 0) {
- $result = $result->item(0)->getElementsByTagName('datastream');
- for ($i = 0; $ret == FALSE && $i < $result->length; $i++) {
- if ($result->item($i)->getAttribute('dsid') == $dsid)
- $ret = $result->item($i);
- }
- }
- }
- return $ret;
- }
-
- /**
- * 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
- * in the form builder if more complex forms or behaviour is required.
- * Each element has the following keys: 'label', 'type', 'required', 'description', and if defined, 'authoritative_list' and/or 'parameters'
- *
- * @return string[] $elements
- */
- public function getIngestFormElements() {
- $ret = FALSE;
- if ($this->validate()) {
- $elements_array = array();
- $form_elements_wrapper = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements');
-
- if ($form_elements_wrapper->length == 0) {
- return $ret;
- }
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
- for ($i = 0; $i < $elements->length; $i++) {
- $desc = $elements->item($i)->getElementsByTagName('description');
- $desc = ($desc->length > 0) ? $desc->item(0)->nodeValue : '';
-
- $label = $elements->item($i)->getAttribute('label');
- if ($label == NULL) {
- $label = $elements->item($i)->getAttribute('name');
- }
-
- $element = array('name' => $elements->item($i)->getAttribute('name'),
- 'label' => $label,
- 'type' => $elements->item($i)->getAttribute('type'),
- 'required' => ($elements->item($i)->getAttribute('required') == 'true') ? TRUE : FALSE,
- 'description' => $desc
- );
-
- $auth_list = $elements->item($i)->getElementsByTagName('authoritative_list');
- if ($auth_list->length > 0) {
- $list = array();
- $items = $auth_list->item(0)->getElementsByTagName('item');
- for ($j = 0; $j < $items->length; $j++) {
- $field = $items->item($j)->attributes->getNamedItem('field');
- $list[$items->item($j)->nodeValue] = ($field !== NULL) ? $field->nodeValue : $items->item($j)->nodeValue;
- }
- $element['authoritative_list'] = $list;
- }
-
-
- $params = $elements->item($i)->getElementsByTagName('parameters');
- $list = array();
- if ($params->length > 0) {
- $items = $params->item(0)->getElementsByTagName('parameter');
- for ($j = 0; $j < $items->length; $j++) {
- $value = $items->item($j)->nodeValue;
- $list[$items->item($j)->getAttribute('name')] = (strtolower($value) == 'true' ? TRUE : (strtolower($value) == 'false' ? FALSE : $value));
- }
- }
- $element['parameters'] = $list;
-
- $elements_array[] = $element;
- }
- $ret = $elements_array;
- }
-
- return $ret;
- }
-
- /**
- * Decrements an ingest form element in the list of elements.
- * Updates the "order". This method is simply an overload to the incIngestFormElement
- * which has a direction parameter.
- *
- * TODO: Might be useful to move multiple places at once, or define
- * a method to move to an absolute position.
- *
- * @param String $name
- * @return boolean $success
- */
- public function decIngestFormElement($name) {
- return $this->incIngestFormElement($name, 'dec');
- }
-
- /**
- * Increments (or decrements) ingest form element in the list of elements.
- * Updates the "order". The $reorder parameter accepts 'inc' or 'dec' to
- * specify the direction to move (defaults to increment.)
- *
- * TODO: Might be useful to move multiple places at once, or define
- * a method to move to an absolute position.
- *
- * @param String $name
- * @param String $reorder
- * @return boolean $success
- */
- public function incIngestFormElement($name, $reorder = 'inc') {
- $ret = FALSE;
- if ($this->validate()) {
- $elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
- $elements = $elementsEl->getElementsByTagName('element');
- $found = FALSE;
- $refEl = FALSE;
- for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == trim($name)) {
- if ($reorder == 'inc') {
- $found = $elements->item($i);
- $refEl = ($i > 0) ? $elements->item($i - 1) : false;
- }
- else {
- $found = ($i + 1 < $elements->length) ? $elements->item($i + 1) : FALSE;
- $refEl = $elements->item($i);
- }
- }
- }
-
- if ($found !== FALSE) {
- $elementsEl->removeChild($found);
- $elementsEl->insertBefore($found, $refEl);
- $ret = TRUE;
- }
- }
- return $ret;
- }
-
- /**
- * Removes an ingest form element from the list of ingest form elements.
- * @param String $name
- * @return boolean $success
- */
- public function removeIngestFormElement($name) {
- $ret = FALSE;
- if ($this->validate()) {
- $elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
- $elements = $elementsEl->getElementsByTagName('element');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == trim($name)) {
- $found = $elements->item($i);
- }
- }
-
- if ($found !== FALSE) {
- $elementsEl->removeChild($found);
- $ret = TRUE;
- }
- }
- return $ret;
- }
-
- /**
- * 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").
- *
- * @param String $elementName
- * @param String $paramName
- * @param String $paramValue
- * @return boolean success
- */
- public function setIngestFormElementParam($name, $paramName, $paramValue) {
- $ret = FALSE;
-
- if ($this->validate()) {
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
- $element = FALSE;
- for ($i = 0; $element === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == $name) {
- $element = $elements->item($i);
- }
- }
-
- if ($element !== FALSE) {
- $paramsEl = $element->getElementsByTagName('parameters');
- if ($paramsEl->length == 0) {
- if ($paramValue !== FALSE) {
- $paramsEl = $this->xml->createElement('parameters');
- $element->appendChild($paramsEl);
- }
- else {
- $ret = TRUE;
- }
- }
- else {
- $paramsEl = $paramsEl->item(0);
- }
-
- if (!$ret) {
- $params = $paramsEl->getElementsByTagName('parameter');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $params->length; $i++) {
- if ($params->item($i)->getAttribute('name') == $paramName) {
- $found = $params->item($i);
- }
- }
-
- if ($paramValue === FALSE) {
- if ($found !== FALSE) {
- $paramsEl->removeChild($found);
- if ($params->length == 0) {
- $element->removeChild($paramsEl);
- }
- }
- $ret = TRUE;
- }
- else {
- if ($found !== FALSE) {
- $found->nodeValue = $paramValue;
- }
- else {
- $paramEl = $this->xml->createElement('parameter', $paramValue);
- $paramEl->setAttribute('name', $paramName);
- $paramsEl->appendChild($paramEl);
- }
- $ret = TRUE;
- }
- }
- }
- }
-
- return $ret;
- }
-
- /**
- * Gets a list of all parameters that belong to the specified ingest form element.
- *
- * @param String $elementName
- * @return boolean success
- */
- public function getIngestFormElementParams($name) {
- $ret = FALSE;
-
- if ($this->validate()) {
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
- $element = FALSE;
- for ($i = 0; $element === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == $name) {
- $element = $elements->item($i);
- }
- }
-
- if ($element !== FALSE) {
- $ret = array();
- $paramsEl = $element->getElementsByTagName('parameters');
-
- if ($paramsEl->length > 0) {
- $params = $paramsEl->item(0)->getElementsByTagName('parameter');
- for ($i = 0; $i < $params->length; $i++) {
- $ret[$params->item($i)->getAttribute('name')] = $params->item($i)->nodeValue;
- }
- }
- }
- }
-
- return $ret;
- }
-
- /**
- * Edits the ingest form element specified.
- * NOTE: The element name can not be changed. To update an elements name
- * it must be deleted and added with the new name.
- *
- * @param String $name
- * @param String $label
- * @param String $type
- * @param boolean $required
- * @param String description
- * @return boolean success
- */
- public function editIngestFormElement($name, $label, $type, $required, $description) {
- $ret = FALSE;
- if ($this->validate()) {
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == $name) {
- $found = $elements->item($i);
- }
- }
-
- $found->setAttribute('name', $name);
- $found->setAttribute('type', $type);
- $found->setAttribute('required', $required ? 'true' : 'false');
- if (trim($label) != '' && trim($label) != trim($name)) {
- $found->setAttribute('label', $label);
- }
- elseif ($found->getAttribute('label') != '') {
- $found->removeAttribute('label');
- }
-
- $descEl = $found->getElementsByTagName('description');
- if (trim($description) != '') {
- if ($descEl->length > 0) {
- $descEl = $descEl->item(0);
- $descEl->nodeValue = $description;
- }
- else {
- $descEl = $this->xml->createElement('description', $description);
- $found->appendChild($descEl);
- }
- }
- elseif ($descEl->length > 0) {
- $found->removeChild($descEl->item(0));
- }
-
- if ($found->getAttribute('type') != 'select' && $found->getAttribute('type') != 'radio') {
- $authList = $found->getElementsByTagName('authoritative_list');
- if ($authList->length > 0) {
- $found->removeChild($authList->item(0));
- }
- }
-
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * Add an ingest form element to the model.
- *
- * @param String $name
- * @param String $label
- * @param String $type
- * @param boolean $required
- * @param String $description
- * @return boolean $success
- */
- public function addIngestFormElement($name, $label, $type, $required, $description = '') {
- $ret = FALSE;
- if ($this->validate()) {
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
- $elementEl = $this->xml->createElement('element');
- $elementEl->setAttribute('name', $name);
- $elementEl->setAttribute('type', $type);
- $elementEl->setAttribute('required', $requiredi ? 'true' : 'false');
- if (trim($label) != '' && trim($label) != trim($name)) {
- $elementEl->setAttribute('label', $label);
- }
- if (trim($description) != '') {
- $descEl = $this->xml->createElement('description', $description);
- $elementEl->appendChild($descEl);
- }
- $elements->appendChild($elementEl);
-
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * Decrements an authority list item from a form element in the list of elements.
- * Updates the "order". This method is simply an overload to the incAuthListItem
- * which has a direction parameter.
-
- *
- * @param String $elementName
- * @param String $value
- * @return boolean $success
- */
- public function decAuthListItem($elementName, $value) {
- return $this->incAuthListItem($elementName, $value, 'dec');
- }
-
- /**
- * Increments (or decrements) an authority list item from a form element in the list of elements.
- * Updates the "order".
- *
- * @param String $elementName
- * @param String $value
- * @param String $direction
- * @return boolean $success
- */
- public function incAuthListItem($elementName, $value, $reorder = 'inc') {
- $ret = FALSE;
- if ($this->validate()) {
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == $elementName) {
- $found = $elements->item($i);
- }
- }
-
- if ($found !== FALSE) {
-
- $authListEl = $found->getElementsByTagName('authoritative_list');
- if ($authListEl->length > 0) {
- $authListEl = $authListEl->item(0);
-
- $items = $authListEl->getElementsByTagName('item');
- $found = FALSE;
- $refEl = FALSE;
- for ($i = 0; $found === FALSE && $i < $items->length; $i++) {
- if ($items->item($i)->nodeValue == $value) {
- if ($reorder == 'inc') {
- $refEl = ($i > 0) ? $items->item($i - 1) : FALSE;
- $found = $items->item($i);
- }
- else {
- $refEl = $items->item($i);
- $found = ($i + 1 < $items->length) ? $items->item($i + 1) : FALSE;
- }
- }
- }
-
- if ($found !== FALSE && $refEl !== FALSE) {
- $authListEl->removeChild($found);
- $authListEl->insertBefore($found, $refEl);
- $ret = TRUE;
- }
- }
- }
- }
- return $ret;
- }
-
- /**
- * Removes an authority list item from a form element.
- * @param String $elementName
- * @param String $value
- * @return boolean $success
- */
- public function removeAuthListItem($elementName, $value) {
- $ret = FALSE;
- if ($this->validate()) {
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == $elementName) {
- $found = $elements->item($i);
- }
- }
-
- if ($found !== FALSE) {
- $authListEl = $found->getElementsByTagName('authoritative_list');
- if ($authListEl->length > 0) {
- $authListEl = $authListEl->item(0);
- $items = $authListEl->getElementsByTagName('item');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $items->length; $i++) {
- if ($items->item($i)->nodeValue == $value) {
- $found = $items->item($i);
- }
- }
-
- if ($found !== FALSE) {
- if ($items->length == 1) {
- $found->removeChild($authListEl);
- }
- else {
- $authListEl->removeChild($found);
- }
-
- $ret = TRUE;
- }
- }
- }
- }
- return $ret;
- }
-
- /**
- * Adds an authority list item to a form element.
- * @param String $elementName
- * @param String $value
- * @param String $label (optional)
- * @return boolean $success
- */
- public function addAuthListItem($elementName, $value, $label = '') {
- $ret = FALSE;
- if ($this->validate()) {
- $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
- if ($elements->item($i)->getAttribute('name') == $elementName) {
- $found = $elements->item($i);
- }
- }
-
- if ($found !== FALSE) {
- $authListEl = $found->getElementsByTagName('authoritative_list');
- if ($authListEl->length == 0) {
- $authListEl = $this->xml->createElement('authoritative_list');
- $found->appendChild($authListEl);
- }
- else {
- $authListEl = $authListEl->item(0);
- }
-
- $items = $authListEl->getElementsByTagName('item');
- $found = FALSE;
- for ($i = 0; $found == FALSE && $i < $items->length; $i++) {
- if ($items->item($i)->nodeValue == $value) {
- $found = TRUE;
- }
- }
-
- if (!$found) {
- $itemEl = $this->xml->createElement('item', trim($value));
- if (trim($label) != '' && trim($label) != trim($value)) {
- $itemEl->setAttribute('field', trim($label));
- }
- $authListEl->appendChild($itemEl);
- $ret = TRUE;
- }
- }
- }
- return $ret;
- }
-
- /**
- * Builds an ingest form using the method specified in element of
- * Returns FALSE on failure.
- *
- * @param &$form
- * @param &$form_state
- * @return string identifier
- */
- public function buildIngestForm(&$form, &$form_state) {
- $ret = FALSE;
- if ($this->validate()) {
- $docRoot = $_SERVER['DOCUMENT_ROOT'];
- $file = (isset($form_state['values']['ingest-file-location']) ? $form_state['values']['ingest-file-location'] : '');
-
- $fullpath = $file;
-
- $form['step'] = array(
- '#type' => 'hidden',
- '#value' => (isset($form_state['values']['step']) ? $form_state['values']['step'] : 0) + 1,
- );
- $form['ingest-file-location'] = array(
- '#type' => 'hidden',
- '#value' => $file,
- );
- $form['content_model_name'] = array(
- '#type' => 'hidden',
- '#value' => 'ISLANDORACM',
- );
- $form['models'] = array(//content models available
- '#type' => 'hidden',
- '#value' => $form_state['values']['models'],
- );
- $form['fullpath'] = array(
- '#type' => 'hidden',
- '#value' => $fullpath,
- );
-
- $form['#attributes']['enctype'] = 'multipart/form-data';
- $form['indicator']['ingest-file-location'] = array(
- '#type' => 'file',
- '#title' => t('Upload Document'),
- '#size' => 48,
- '#description' => t('Full text'),
- );
-
- $ingest_form = $this->xml->getElementsByTagName('ingest_form')->item(0);
-
- if (!empty($ingest_form)) {
- if (strtolower($ingest_form->getAttribute('hide_file_chooser')) == 'true') {
- $form['indicator']['ingest-file-location']['#type'] = 'hidden';
- }
- }
- $dsid = $ingest_form->getAttribute('dsid');
-
- $method = $ingest_form->getElementsByTagName('form_builder_method')->item(0);
- $module = $method->getAttribute('module');
- $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
- if (!file_exists($path)) {
- self::$errors[] = 'Build Ingest Form: file \'' . $path . '\' does not exist.';
- }
- else {
- @require_once($path);
- $className = $method->getAttribute('class');
- $methodName = ($method->getAttribute('method'));
- if (!class_exists($className)) {
- self::$errors[] = 'Build Ingest Form: class \'' . $className . ' does not exist.';
- }
- else {
- $class = new $className;
- $elements_array = $this->getIngestFormElements();
- if (method_exists($class, $methodName)) {
- $ret = $class->$methodName($form, $elements_array, $form_state);
- }
- else {
- self::$errors[] = 'Build Ingest Form: method \'' . $className . '->' . $methodName . '\' does not exist.';
- }
- }
- }
- }
- return $ret;
- }
-
- /**
- * Builds an edit metadata form using the method specified in the element
- * The DSID specified must match the DSID attribute of . Returns FALSE on failure.
- *
- * @param string $dsid
- * @return $form
- */
- public function buildEditMetadataForm($pid, $dsid) {
- $ret = FALSE;
- if (self::validDsid($dsid) && $this->validate()) {
- $method = $this->xml->getElementsByTagName('edit_metadata_method');
- if ($method->length > 0 && $method->item(0)->getAttribute('dsid') == $dsid) {
- $method = $method->item(0);
- $module = $method->getAttribute('module');
- $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
- if (!file_exists($path)) {
- self::$errors[] = 'Build Edit Metadata Form: file \'' . $path . '\' does not exist.';
- }
- else {
- @require_once($path );
- $className = $method->getAttribute('class');
- $methodName = ($method->getAttribute('method'));
- if (!class_exists($className)) {
- self::$errors[] = 'Build Edit Metadata Form: class \'' . $className . '\' does not exist.';
- }
- else {
- $class = new $className($pid);
- if (!method_exists($class, $methodName)) {
- self::$errors[] = 'Build Edit Metadata Form: method \'' . $className . '->' . $methodName . '\' does not exist.';
- }
- else {
- $ret = $class->$methodName();
- }
- }
- }
- }
- }
- return $ret;
- }
-
- /**
- * Handles the edit metadata form using the handler specified in the element
- * Returns FALSE on failure.
- *
- * @param &$form_id
- * @param &$form_values
- * @param &$soap_client
- * @return $result
- */
- public function handleEditMetadataForm(&$form_id, &$form_state, &$soap_client) {
- global $base_url;
- $ret = FALSE;
- if ($this->validate()) {
- $method = $this->xml->getElementsByTagName('edit_metadata_method');
- if ($method->length > 0) {
- $method = $method->item(0);
- $module = $method->getAttribute('module');
- $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
- if (!file_exists($path)) {
- self::$errors[] = 'Handle Edit Metadata Form: file \'' . $path . '\' does not exist.';
- }
- else {
- @require_once($path);
- $className = $method->getAttribute('class');
- $methodName = ($method->getAttribute('handler'));
- if (!class_exists($className)) {
- self::$errors[] = 'Handle Edit Metadata Form: class \'' . $className . '\' does not exist.';
- }
- else {
- $class = new $className($form_state['values']['pid']);
- if (!method_exists($class, $methodName)) {
- self::$errors[] = 'Handle Edit Metadata Form: metho \'' . $className . '->' . $methodName . '\' does not exist.';
- }
- else {
- $ret = $class->$methodName($form_id, $form_state['values'], $soap_client);
- }
- }
- }
- }
- else {
- // Assume DC form if none is specified.
- module_load_include('inc', 'fedora_repository', 'formClass');
- $metaDataForm = new formClass();
- $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'];
- }
- }
- return $ret;
- }
-
- /**
- * Gets an associative array describing the edit metadata method.
- * Array has the following keys: 'file', 'class', 'method', 'handler', 'dsid'
- * @return String[] $method
- */
- public function getEditMetadataMethod() {
- $ret = FALSE;
- if ($this->validate()) {
- $method = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method');
- if ($method->length > 0) {
- $method = $method->item(0);
- $ret = array('module' => $method->getAttribute('module') == '' ? 'fedora_repository' : $method->getAttribute('module'),
- 'file' => $method->getAttribute('file'),
- 'class' => $method->getAttribute('class'),
- 'method' => $method->getAttribute('method'),
- 'handler' => $method->getAttribute('handler'),
- 'dsid' => $method->getAttribute('dsid')
- );
- }
- }
- return $ret;
- }
-
- /**
- * Removes the edit data method from the Content Model.
- * @return boolean $success
- */
- public function removeEditMetadataMethod() {
- $ret = FALSE;
- if ($this->validate()) {
- $rootEl = $this->xml->getElementsByTagName('content_model')->item(0);
- $method = $rootEl->getElementsByTagName('edit_metadata_method');
- if ($method->length > 0) {
- $rootEl->removeChild($method->item(0));
- $ret = TRUE;
- }
- }
- return $ret;
- }
-
- /**
- * Update the Edit Metadata Method defined in the Content Model
- * @param String $module
- * @param String $file
- * @param String $class
- * @param String $method
- * @param String $handler
- * @param String $dsid
- * @return boolean $success
- */
- public function updateEditMetadataMethod($module, $file, $class, $method, $handler, $dsid) {
- $ret = FALSE;
- if (self::validDsid($dsid) && $this->validate()) {
- $methodEl = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method');
- if ($methodEl->length > 0) {
- $methodEl = $methodEl->item(0);
- }
- else {
- $methodEl = $this->xml->createElement('edit_metadata_method');
- $this->xml->getElementsByTagName('content_model')->item(0)->appendChild($methodEl);
- }
- $methodEl->setAttribute('module', $module);
- $methodEl->setAttribute('file', $file);
- $methodEl->setAttribute('class', $class);
- $methodEl->setAttribute('method', $method);
- $methodEl->setAttribute('handler', $handler);
- $methodEl->setAttribute('dsid', $dsid);
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * Executes the add datastream method for the specified datastream on the specified file.
- * Returns FALSE on failure.
- *
- * @param string $dsid
- * @param string $filen
- * @return $result
- */
- public function execAddDatastreamMethods($dsid, $file) {
- $ret = FALSE;
- if (self::validDsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) {
- $addMethod = $ds->getElementsByTagName('add_datastream_method');
- if ($addMethod->length > 0) {
- $addMethod = $addMethod->item(0);
- $paramArray = array();
- $params = $addMethod->getElementsByTagName('parameters');
- if ($params->length > 0) {
- $params = $params->item(0)->getElementsByTagName('parameter');
- for ($i = 0; $i < $params->length; $i++) {
- $paramsArray[$params->item($i)->getAttribute('name')] = $params->item($i)->nodeValue;
- }
- }
- $module = $addMethod->getAttribute('module');
- $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $addMethod->getAttribute('file');
- if (!file_exists($path)) {
- self::$errors[] = 'Execute Add Datastream Methods: file \'' . $path . '\' does not exist.';
- }
- else {
- @require_once($path);
- $className = $addMethod->getAttribute('class');
- $methodName = $addMethod->getAttribute('method');
- if (!class_exists($className)) {
- self::$errors[] = 'Execute Add Datastream Methods: class \'' . $className . '\' does not exist.';
- }
- else {
- $class = new $className;
- if (!method_exists($class, $methodName)) {
- self::$errors[] = 'Execute Add Datastream Methods: method \'' . $className . '->' . $methodName . '\' does not exist.';
- }
- else {
- $ret = $class->$methodName($paramsArray, $addMethod->getAttribute('dsid'), $file, $addMethod->getAttribute('modified_files_ext'));
- }
- }
- }
- }
- }
- return $ret;
- }
-
- /**
- * Executes the ingest rules that apply to the specified file/mimetype.
- * Returns FALSE on failure.
- *
- * If $preview is TRUE, then only execute rules with
- * a parameter 'preview'. Used to generate previews for the file chooser.
- *
- * @param string $file
- * @param string $mimetype
- * @param boolean $preview
- * @return $result
- */
- public function execIngestRules($file, $mimetype, $preview = FALSE) {
- $ret = FALSE;
- if ($this->validate()) {
- $ret = TRUE;
- $rules = $this->xml->getElementsByTagName('ingest_rules')->item(0)->getElementsByTagName('rule');
- for ($i = 0; $i < $rules->length; $i++) {
- $rule = $rules->item($i);
- $types = $rule->getElementsbyTagName('applies_to');
- $valid_types = array();
- for ($j = 0; $j < $types->length; $j++) {
- $valid_types[] = trim($types->item($j)->nodeValue);
- }
-
- if (in_array($mimetype, $valid_types)) {
- $methods = $rule->getElementsByTagName('ingest_methods');
- if ($methods->length > 0) {
- $methods = $methods->item(0)->getElementsbyTagName('ingest_method');
- for ($j = 0; $j < $methods->length; $j++) {
- $method = $methods->item($j);
- $param_array = array();
- $params = $method->getElementsByTagName('parameters');
- $param_array['model_pid'] = $this->pid;
- if ($params->length > 0) {
- $params = $params->item(0)->getElementsByTagName('parameter');
- for ($k = 0; $k < $params->length; $k++)
- $param_array[$params->item($k)->getAttribute('name')] = $params->item($k)->nodeValue;
- }
-
-
- if (!$preview || isset($param_array['preview'])) {
- $module = $method->getAttribute('module');
- $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
-
- if (!file_exists($path) || substr_compare($path, 'fedora_repository/', -strlen('fedora_repository/'), strlen('fedora_repository/')) === 0) {
- self::$errors[] = 'Execute Ingest Rules: file \'' . $path . '\' does not exist.';
- $ret = FALSE;
- }
- else {
- require_once($path);
- $className = $method->getAttribute('class');
- $methodName = ($method->getAttribute('method'));
- if (!class_exists($className)) {
- self::$errors[] = 'Execute Ingest Rules: class \'' . $className . '\' does not exist.';
- $ret = FALSE;
- }
- else
- $class = new $className;
- if (!method_exists($class, $methodName)) {
- self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' does not exist.';
- $ret = FALSE;
- }
- else {
- $status = $class->$methodName($param_array, $method->getAttribute('dsid'), $file, $method->getAttribute('modified_files_ext'));
- if ($status !== TRUE) {
- $ret = FALSE;
- }
- }
- }
- }
- }
- }
- }
- }
- }
- return $ret;
- }
-
- /**
- * Executes the form handler from the element of .
- *
- * @param &$formData
- * @param &$form_state
- * @return boolean $success
- */
- public function execFormHandler(&$data, &$form_state) {
- $ret = FALSE;
- if ($this->validate()) {
- $method = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0);
- $module = $method->getAttribute('module');
- $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
- if (!file_exists($path)) {
- self::$errors[] = 'Execute Form Handler: file \'' . $path . '\' does not exist.';
- }
- else {
- require_once($path);
- $className = $method->getAttribute('class');
- $methodName = ($method->getAttribute('handler'));
- if (!class_exists($className)) {
- self::$errors[] = 'Execute Form Handler: class \'' . $className . '\' does not exist.';
- }
- else {
- $class = new $className;
- if (!method_exists($class, $methodName)) {
- self::$errors[] = 'Execute Form Handler: method \'' . $className . '->' . $methodName . '\' does not exist.';
- }
- else {
- $class->$methodName($data, $form_state);
- $ret = TRUE;
- }
- }
- }
- }
-
- return $ret;
- }
-
- /**
- * Gets a list of valid mimetypes that can apply to this model.
- * Returns FALSE on failure.
- *
- * @return string[] $mimetypes
- */
- public function getMimetypes() {
- //only proceed if the xml is valid.
- if ($this->validate()) {
- if ($this->mimes === NULL) {
- $result = $this->xml->getElementsByTagName('mimetypes');
- $result = $result->item(0)->getElementsByTagName('type');
- $mimes = array();
- for ($i = 0; $i < $result->length; $i++) {
- $mimes[] = trim($result->item($i)->nodeValue);
- }
- $this->mimes = $mimes;
- }
- return $this->mimes;
- }
- }
-
- /**
- * Calls all defined display methods for the ContentModel.
- * The PID specified is passed to the constructor of the display
- * class(es) specified in the Content Model.
- *
- * @param string $pid
- * @return string $output
- */
- public function displayExtraFieldset($pid, $page_number) {
- $output = '';
- if ($this->validate()) {
- $datastreams = $this->xml->getElementsByTagName('datastreams');
- if ($datastreams->length > 0) {
- $datastreams = $datastreams->item(0)->getElementsByTagName('datastream');
- for ($i = 0; $i < $datastreams->length; $i++) {
- $ds = $datastreams->item($i);
- if ($ds->attributes->getNamedItem('display_in_fieldset') == NULL || strtolower($ds->getAttribute('display_in_fieldset')) != 'false') {
- $dispMethods = $ds->getElementsByTagName('display_method');
- for ($j = 0; $j < $dispMethods->length; $j++) {
- $method = $dispMethods->item($j);
- $module = $method->getAttribute('module');
- $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
- if (!file_exists($path)) {
- self::$errors[] = 'Execute Form Handler: file \'' . $path . '\' does not exist.';
- }
- else {
- require_once($path);
- $className = $method->getAttribute('class');
- $methodName = ($method->getAttribute('method'));
- if (!class_exists($className)) {
- self::$errors[] = 'Execute Form Handler: class \'' . $className . '\' does not exist.';
- }
- else {
- $class = new $className($pid);
- if (!method_exists($class, $methodName)) {
- self::$errors[] = 'Execute Form Handler: method \'' . $className . '->' . $methodName . '\' does not exist.';
- }
- else {
- $output = $class->$methodName($page_number);
- }
- }
- }
- }
- }
- }
- }
- }
-
- return $output;
- }
-
- /**
- * Gets a list of datastreams from the ContentModel
- * (not including the QDC ds if it is listed).
- * Returns FALSE on failure.
- *
- * @return string[] $datastreams
- */
- public function listDatastreams() {
- $ds_array = array();
- if ($this->validate()) {
- $datastreams = $this->xml->getElementsByTagName('datastreams');
- if ($datastreams->length > 0) {
- $datastreams = $datastreams->item(0)->getElementsByTagName('datastream');
- for ($i = 0; $i < $datastreams->length; $i++) {
- $dsName = $datastreams->item($i)->getAttribute('dsid');
- // if ($dsName != 'QDC')
- // {
- $ds_array[] = $dsName;
- // }
- }
- }
- }
-
- return $ds_array;
- }
-
- /**
- * Adds an allowed mimetype to the model.
- *
- * @param String $type
- * @return boolean $success
- */
- public function addMimetype($type) {
- $ret = FALSE;
- if ($this->validate()) {
- $mimetypesEl = $this->xml->getElementsByTagName('mimetypes')->item(0);
- $types = $mimetypesEl->getElementsByTagName('type');
-
- $found = FALSE;
- for ($i = 0; !$found && $i < $types->length; $i++) {
- if ($types->item($i)->nodeValue == $type)
- $found = TRUE;
- }
-
- if (!$found) {
- $newTypeEl = $this->xml->createElement('type', $type);
- $mimetypesEl->appendChild($newTypeEl);
- $ret = TRUE;
- }
- }
- return $ret;
- }
-
- /**
- * Removes an allowed mimetype from the model.
- *
- * @param String $type
- * @return boolean $success
- */
- public function removeMimetype($type) {
- $ret = FALSE;
- if ($this->validate()) {
- $mimetypesEl = $this->xml->getElementsByTagName('mimetypes')->item(0);
- $types = $mimetypesEl->getElementsByTagName('type');
- $found = FALSE;
- for ($i = 0; !$found && $i < $types->length; $i++) {
- if ($types->item($i)->nodeValue == $type)
- $found = $types->item($i);
- }
-
- if ($found !== FALSE && $types->length > 1) {
- $mimetypesEl->removeChild($found);
- $ret = TRUE;
- }
- }
- return $ret;
- }
-
- /**
- * getDisplayMethods ??
- * @param type $ds
- * @return type
- */
- public function getDisplayMethods($ds) {
- $ret = FALSE;
- if (($ds = $this->getDSModel($ds)) !== FALSE) {
- $ret = array();
- $dispMethods = $ds->getElementsByTagName('display_method');
- for ($i = 0; $i < $dispMethods->length; $i++) {
- $ret[] = array('module' => $dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module'),
- 'file' => $dispMethods->item($i)->getAttribute('file'),
- 'class' => $dispMethods->item($i)->getAttribute('class'),
- 'method' => $dispMethods->item($i)->getAttribute('method'),
- 'default' => ($dispMethods->item($i)->attributes->getNamedItem('default') !== NULL ? strtolower($dispMethods->item($i)->getAttribute('default')) == 'true' : FALSE));
- }
- }
- return $ret;
- }
-
- /**
- * addDs ??
- * @param type $dsid
- * @param type $display_in_fieldset
- * @return boolean
- */
- public function addDs($dsid, $display_in_fieldset = FALSE) {
- $ret = FALSE;
-
- if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) {
- $datastreamsEl = $this->xml->getElementsByTagName('datastreams');
- if ($datastreamsEl->length > 0) {
- $datastreamsEl = $datastreamsEl->item(0);
- }
- else {
- $datastreamsEl = $this->xml->createElement('datastreams');
- $this->xml->getElementsByTagName('content_model')->item(0)->appendChild($datastreamsEl);
- }
-
- $dsEl = $this->xml->createElement('datastream');
- $dsEl->setAttribute('dsid', $dsid);
- if ($display_in_fieldset == TRUE) {
- $dsEl->setAttribute('display_in_fieldset', 'true');
- }
- $datastreamsEl->appendChild($dsEl);
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * removeDs ??
- * @param type $dsid
- * @return boolean
- */
- public function removeDs($dsid) {
- $ret = FALSE;
-
- if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
- $datastreamsEl = $this->xml->getElementsByTagName('datastreams')->item(0);
- $datastreamsEl->removeChild($ds);
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * displayInFieldset ??
- * @param type $dsid
- * @return type
- */
- public function displayInFieldset($dsid) {
- $ret = FALSE;
- if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
- $ret = strtolower($ds->getAttribute('display_in_fieldset')) == 'true';
- }
- return $ret;
- }
-
- /**
- * setDisplayInFieldset ??
- * @param type $dsid
- * @param type $value
- * @return boolean
- */
- public function setDisplayInFieldset($dsid, $value = TRUE) {
- $ret = FALSE;
- if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
- if ($value == FALSE && $ds->attributes->getNamedItem('display_in_fieldset') !== NULL) {
- $ds->removeAttribute('display_in_fieldset');
- $ret = TRUE;
- }
- elseif ($value == TRUE) {
- $ds->setAttribute('display_in_fieldset', 'true');
- $ret = TRUE;
- }
- }
- 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) {
- $ret = FALSE;
-
- if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
- $found = FALSE;
- $dispMethods = $ds->getElementsByTagName('display_method');
- for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
- if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module')) &&
- $file == $dispMethods->item($i)->getAttribute('file') &&
- $class == $dispMethods->item($i)->getAttribute('class') &&
- $method == $dispMethods->item($i)->getAttribute('method')) {
- $found = $dispMethods->item($i);
- }
- }
-
- if ($found !== FALSE) {
-
- for ($i = 0; $i < $dispMethods->length; $i++) {
- if ($dispMethods->item($i)->attributes->getNamedItem('default') !== NULL) {
- $dispMethods->item($i)->removeAttribute('default');
- }
- }
-
- $found->setAttribute('default', 'true');
- $ret = TRUE;
- }
- }
- 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) {
- $ret = FALSE;
- if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
- $found = FALSE;
- $dispMethods = $ds->getElementsByTagName('display_method');
- for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
- if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module') == '') &&
- $file == $dispMethods->item($i)->getAttribute('file') &&
- $class == $dispMethods->item($i)->getAttribute('class') &&
- $method == $dispMethods->item($i)->getAttribute('method')) {
- $found = $dispMethods->item($i);
- }
- }
-
- if ($found !== FALSE) {
- $ds->removeChild($found);
- $ret = TRUE;
- }
- }
- 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) {
- $ret = FALSE;
- if (self::validDsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
- $dispMethEl = $this->xml->createElement('display_method');
- $dispMethEl->setAttribute('module', $module);
- $dispMethEl->setAttribute('file', $file);
- $dispMethEl->setAttribute('class', $class);
- $dispMethEl->setAttribute('method', $method);
- if ($default == TRUE) {
- $dispMethEl->setAttribute('default', TRUE);
- }
- $ds->appendChild($dispMethEl);
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * getAddDsMethod ??
- * @param type $ds
- * @return type
- */
- public function getAddDsMethod($ds) {
- $ret = FALSE;
- if (($ds = $this->getDSModel($ds)) !== FALSE) {
- $addDsMethod = $ds->getElementsByTagName('add_datastream_method');
- if ($addDsMethod !== FALSE && $addDsMethod->length > 0) {
- $ret = array('module' => $addDsMethod->item(0)->getAttribute('module') == '' ? 'fedora_repository' : $addDsMethod->item(0)->getAttribute('module'),
- 'file' => $addDsMethod->item(0)->getAttribute('file'),
- 'class' => $addDsMethod->item(0)->getAttribute('class'),
- 'method' => $addDsMethod->item(0)->getAttribute('method'),
- 'modified_files_ext' => $addDsMethod->item(0)->getAttribute('modified_files_ext'),
- 'dsid' => $addDsMethod->item(0)->getAttribute('dsid')
- );
- }
- }
- return $ret;
- }
-
- /**
- * getIngestRule ??
- * @param type $rule_id
- * @return type
- */
- public function getIngestRule($rule_id) {
- $ret = FALSE;
- if ($this->validate()) {
- $rules = $this->xml->getElementsByTagName('ingest_rules')->item(0)->getElementsByTagName('rule');
- if ($rule_id < $rules->length)
- $ret = $rules->item($rule_id);
- }
- return $ret;
- }
-
- /**
- * removeAppliesTo ??
- * @param type $rule_id
- * @param type $type
- * @return boolean
- */
- public function removeAppliesTo($rule_id, $type) {
- $ret = FALSE;
- if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
- $applies = $rule->getElementsByTagName('applies_to');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $applies->length; $i++) {
- if ($type == $applies->item($i)->nodeValue) {
- $found = $applies->item($i);
- }
- }
-
- if ($found) {
- $rule->removeChild($found);
- $ret = TRUE;
- }
- }
- return $ret;
- }
-
- /**
- * addAppliesTo ??
- * @param type $rule_id
- * @param type $type
- * @return boolean
- */
- public function addAppliesTo($rule_id, $type) {
- $ret = FALSE;
- if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
- $applies = $rule->getElementsByTagName('applies_to');
- $found = FALSE;
- for ($i = 0; !$found && $i < $applies->length; $i++) {
- $found = ($type == $applies->item($i)->nodeValue);
- }
-
- if (!$found) {
- $newAppliesTo = $this->xml->createElement('applies_to', $type);
- $rule->insertBefore($newAppliesTo, $rule->getElementsByTagName('ingest_methods')->item(0));
- $ret = TRUE;
- }
- }
- 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) {
- $ret = FALSE;
- if (self::validDsid($dsid) && ($rule = $this->getIngestRule($rule_id)) !== FALSE) {
- $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
- $meth = $this->xml->createElement('ingest_method');
- $meth->setAttribute('module', $module);
- $meth->setAttribute('file', $file);
- $meth->setAttribute('class', $class);
- $meth->setAttribute('method', $method);
- $meth->setAttribute('dsid', $dsid);
- $meth->setAttribute('modified_files_ext', $modified_files_ext);
-
- $methodsEl->appendChild($meth);
- $ret = TRUE;
- }
- 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) {
- $ret = FALSE;
- if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
- $found = FALSE;
- $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
- $methods = $methodsEl->getElementsByTagName('ingest_method');
- for ($i = 0; !$found && $i < $methods->length; $i++) {
- if ($methods->item($i)->getAttribute('module') == $module && $methods->item($i)->getAttribute('file') == $file && $methods->item($i)->getAttribute('class') == $class && $methods->item($i)->getAttribute('method') == $method) {
- $found = $methods->item($i);
- }
- }
-
- if ($found !== FALSE && $methods->length > 1) {
- $methodsEl->removeChild($found);
- $ret = TRUE;
- }
- }
- 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) {
- $ret = FALSE;
- if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
- $methods = $rule->getElementsByTagName('ingest_methods')->item(0)->getElementsByTagName('ingest_method');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $methods->length; $i++) {
- if (($methods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $methods->item($i)->getAttribute('module')) == $module &&
- $methods->item($i)->getAttribute('file') == $file &&
- $methods->item($i)->getAttribute('class') == $class &&
- $methods->item($i)->getAttribute('method') == $method) {
- $found = $methods->item($i);
- }
- }
-
- if ($found !== FALSE) {
- $paramsEl = $found->getElementsByTagName('parameters');
- if ($paramsEl->length == 0) {
- $paramsEl = $found->appendChild($this->xml->createElement('parameters'));
- }
- else {
- $paramsEl = $paramsEl->item(0);
- }
-
- $params = $paramsEl->getElementsByTagName('parameter');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $params->length; $i++) {
- if ($params->item($i)->getAttribute('name') == $name) {
- $found = $params->item($i);
- }
- }
-
- if ($found === FALSE) {
- $param = $this->xml->createElement('parameter', $value);
- $param->setAttribute('name', $name);
- $paramsEl->appendChild($param);
- $ret = TRUE;
- }
- }
- }
- 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) {
- $ret = FALSE;
- if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
- $found = FALSE;
- $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
- $methods = $methodsEl->getElementsByTagName('ingest_method');
- for ($i = 0; !$found && $i < $methods->length; $i++) {
- if (( trim($methods->item($i)->getAttribute('module')) == $module || (trim($methods->item($i)->getAttribute('module')) == '' && $module == 'fedora_repository')) && trim($methods->item($i)->getAttribute('file')) == $file && trim($methods->item($i)->getAttribute('class')) == $class && trim($methods->item($i)->getAttribute('method')) == $method) {
- $found = $methods->item($i);
- }
- }
- if ($found !== FALSE) {
- $methodEl = $found;
- $paramsEl = $found->getElementsByTagName('parameters');
- if ($paramsEl->length > 0) {
- $paramsEl = $paramsEl->item(0);
- $params = $paramsEl->getElementsByTagName('parameter');
- $found = FALSE;
- for ($i = 0; $found === FALSE && $i < $params->length; $i++) {
- if ($params->item($i)->getAttribute('name') == $name) {
- $found = $params->item($i);
- }
- }
-
- if ($found !== FALSE) {
- $paramsEl->removeChild($found);
- if ($params->length == 0) {
- $methodEl->removeChild($paramsEl);
- }
-
- $ret = TRUE;
- }
- }
- }
- }
- return $ret;
- }
-
- /**
- * removeIngestRule ??
- * @param type $rule_id
- * @return type
- */
- public function removeIngestRule($rule_id) {
- $ret = FALSE;
- if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
- $ret = $this->xml->getElementsByTagName('ingest_rules')->item(0)->removeChild($rule);
- }
- 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) {
- $ret = FALSE;
- if (self::validDsid($dsid) && $this->validate()) {
- $ingestRulesEl = $this->xml->getElementsByTagName('ingest_rules')->item(0);
- $rule = $this->xml->createElement('rule');
- $ingestMethodsEl = $this->xml->createElement('ingest_methods');
- $rule->appendChild($ingestMethodsEl);
- $ingestRulesEl->appendChild($rule);
- $newRuleId = $ingestRulesEl->getElementsByTagName('rule')->length - 1;
- $ret = ($this->addAppliesTo($newRuleId, $applies_to) && $this->addIngestMethod($newRuleId, $module, $file, $class, $method, $dsid, $modified_files_ext));
- }
- return $ret;
- }
-
- /**
- * getIngestRules ??
- * @return type
- */
- public function getIngestRules() {
- $ret = FALSE;
- if ($this->validate()) {
- $ret = array();
- $rules = $this->xml->getElementsByTagName('ingest_rules')->item(0)->getElementsByTagName('rule');
- for ($i = 0; $i < $rules->length; $i++) {
- $rule = array('applies_to' => array(),
- 'ingest_methods' => array());
- $applies_to = $rules->item($i)->getElementsByTagName('applies_to');
- for ($j = 0; $j < $applies_to->length; $j++) {
- $rule['applies_to'][] = trim($applies_to->item($j)->nodeValue);
- }
-
- $methods = $rules->item($i)->getElementsByTagName('ingest_methods')->item(0)->getElementsByTagName('ingest_method');
- for ($j = 0; $j < $methods->length; $j++) {
- $method = array('module' => $methods->item($j)->getAttribute('module') == '' ? 'fedora_repository' : $methods->item($j)->getAttribute('module'),
- 'file' => $methods->item($j)->getAttribute('file'),
- 'class' => $methods->item($j)->getAttribute('class'),
- 'method' => $methods->item($j)->getAttribute('method'),
- 'dsid' => $methods->item($j)->getAttribute('dsid'),
- 'modified_files_ext' => $methods->item($j)->getAttribute('modified_files_ext'),
- 'parameters' => array());
-
- $params = $methods->item($j)->getElementsByTagName('parameters');
- if ($params->length > 0) {
- $params = $params->item(0)->getElementsByTagName('parameter');
- for ($k = 0; $k < $params->length; $k++) {
- $method['parameters'][$params->item($k)->getAttribute('name')] = $params->item($k)->nodeValue;
- }
- }
-
- $rule['ingest_methods'][] = $method;
- }
-
- $ret[] = $rule;
- }
- }
- return $ret;
- }
-
- /**
- * getIngestFormAttributes ??
- * @return type
- */
- public function getIngestFormAttributes() {
- $ret = FALSE;
- if ($this->validate()) {
- $ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
- $ret = array('dsid' => $ingest_formEl->getAttribute('dsid'),
- 'page' => $ingest_formEl->getAttribute('page'),
- 'hide_file_chooser' => strtolower($ingest_formEl->getAttribute('hide_file_chooser')) == 'true',
- 'redirect' => strtolower($ingest_formEl->getAttribute('redirect')) == 'false' ? FALSE : TRUE);
- }
- 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) {
- $ret = FALSE;
- if (self::validDsid($dsid) && $this->validate()) {
- $ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
- $ingest_formEl->setAttribute('dsid', $dsid);
- $ingest_formEl->setAttribute('page', $page);
- if (!$redirect) {
- $ingest_formEl->setAttribute('redirect', 'false');
- }
- else {
- $ingest_formEl->removeAttribute('redirect');
- }
- if ($hide_file_chooser) {
- $ingest_formEl->setAttribute('hide_file_chooser', 'true');
- }
- else {
- $ingest_formEl->removeAttribute('hide_file_chooser');
- }
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * getIngestFormBuilderMethod
- * @return type
- */
- public function getIngestFormBuilderMethod() {
- $ret = FALSE;
- if ($this->validate()) {
- $method = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0);
- $ret = array('module' => ($method->getAttribute('module') == '' ? 'fedora_repository' : $method->getAttribute('module')),
- 'file' => $method->getAttribute('file'),
- 'class' => $method->getAttribute('class'),
- 'method' => $method->getAttribute('method'),
- 'handler' => $method->getAttribute('handler'));
- }
- 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) {
- $ret = FALSE;
- if ($this->validate()) {
- $methodEl = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0);
- $methodEl->setAttribute('module', $module);
- $methodEl->setAttribute('file', $file);
- $methodEl->setAttribute('class', $class);
- $methodEl->setAttribute('method', $method);
- $methodEl->setAttribute('handler', $handler);
- $ret = TRUE;
- }
- return $ret;
- }
-
- /**
- * Find the form element with name $name.
- *
- * @param string $name
- * The name of the form element to find.
- * @return DOMElement
- * The form element $name, if found FALSE otherwise.
- */
- public function getForm($name) {
- $result = $this->xpath->query("//cm:form[@name='$name']");
- return $result->length == 1 ? $result->item(0) : FALSE;
- }
-
- /**
- *
- * @return array
- * An array of form names that exist in this content model.
- */
- public function getFormNames() {
- if (!$this->validate()) {
- return FALSE;
- }
- $names = FALSE;
- $result = $this->xpath->query('//cm:forms/cm:form/@name'); // Select the name attribute of all forms.
- for ($i = 0; $i < $result->length; $i++) {
- $attribute = $result->item($i);
- $name = $attribute->value;
- $names[$name] = $name;
- }
- return $names;
- }
-
- /**
- *
- * @return array
- * An array of form names that exist in this content model.
- */
- public function getIngestFormNames() {
- if (!$this->validate()) {
- return FALSE;
- }
- $result = $this->xpath->query('//cm:forms/cm:form[@ingest_class and @ingest_file and @ingest_module]/@name'); // Select the name attribute of all forms.
- for ($i = 0; $i < $result->length; $i++) {
- $attribute = $result->item($i);
- $name = $attribute->value;
- $names[$name] = $name;
- }
- return $names;
- }
-
- /**
- *
- * @return array
- * An array of form names that exist in this content model.
- */
- public function getEditFormNames() {
- if (!$this->validate()) {
- return FALSE;
- }
- $result = $this->xpath->query('//cm:forms/cm:form[@edit_class and @edit_file and @edit_module]/@name'); // Select the name attribute of all forms.
- for ($i = 0; $i < $result->length; $i++) {
- $attribute = $result->item($i);
- $name = $attribute->value;
- $names[$name] = $name;
- }
- return $names;
- }
-
- /**
- * Removes the named form.
- *
- * @param string $name
- * Name of the form to remove.
- *
- * @return boolean
- * TRUE on success, FALSE otherwise.
- */
- public function removeForm($name) {
- $result = $this->xpath->query("//cm:form[@name='$name']");
- if ($result->length == 1) {
- $form = $result->item(0);
- $form->parentNode->removeChild($form);
- return TRUE;
- }
- return FALSE;
- }
-
- /**
- * Adds the named form.
- *
- * @param string $element
- * Name of the form to add.
- *
- * @return boolean
- * TRUE on success, FALSE otherwise.
- */
- public function addForm($element) {
- $result = $this->xpath->query("//cm:forms");
- if ($result->length == 0) { // Forms doesn't exist
- $forms = $this->xml->createElement('forms');
- $element = $this->xml->importNode($element);
- $forms->appendChild($element);
- $result = $this->xpath->query("//cm:content_model");
- $result->item(0)->appendChild($forms);
- return TRUE;
- }
- else if ($result->length == 1) {
- $element = $this->xml->importNode($element);
- $result->item(0)->appendChild($element);
- return TRUE;
- }
- return FALSE;
- }
-
- /**
- * Edits a form element with attribute name='$name' from the 'forms' element.
- *
- * @param String $name
- */
- public function editForm($name, $element) {
- if (!$this->validate()) {
- return FALSE;
- }
- $result = $this->xpath->query("//cm:form[@name='$name']");
- if ($result->length == 1) {
- $form = $result->item(0);
- $result = $this->xpath->query("child::node()", $form);
- $element = $this->xml->importNode($element);
- for ($i = 0; $i < $result->length; $i++) {
- $child = $result->item($i);
- $element->appendChild($child);
- }
- $form->parentNode->replaceChild($element, $form);
- return TRUE;
- }
- return FALSE;
- }
-
- /**
- *
- * @param $element_definition
- * @param $parent_element
- * @return
- */
- public function addElementToForm($element, $parent_element) {
- $element = $this->xml->importNode($element, TRUE);
- $parent_element->appendChild($element);
- return TRUE;
- }
-
- /**
- *
- * @param $element_definition
- * @param $parent_element
- */
- public function editFormElement($new_element, $edit_element) {
- $new_element = $this->xml->importNode($new_element, TRUE);
- $name = $new_element->tagName;
- $result = $new_element->getElementsByTagName('content');
- if ($result->length == 1) {
- $new_content = $result->item(0);
- $result = $this->xpath->query("child::cm:content/child::node()", $edit_element);
- for ($i = 0; $i < $result->length; $i++) {
- $child = $result->item($i);
- $new_content->appendChild($child);
- }
- }
- $edit_element->parentNode->replaceChild($new_element, $edit_element);
- return TRUE;
- }
-
- /**
- *
- * @param $new_element
- * @param $element
- */
- private function insertElementInPlace($new_element, $element) {
- $next = $element->nextSibling;
- if ($next) {
- $element->parentNode->insertBefore($new_element, $next);
- }
- else {
- $element->parentNode->appendChild($new_element);
- }
- }
-
- /**
- *
- * @param $form_element
- * @return
- */
- public function incFormElement($form_element) {
- $prev = $form_element;
- $name = $prev->getAttribute('name');
- while ($prev = $prev->previousSibling) {
- if (get_class($prev) == 'DOMElement') {
- $form_element->parentNode->insertBefore($form_element, $prev);
- break;
- }
- }
- return TRUE;
- }
-
- /**
- *
- * @param $form_element
- * @return
- */
- public function decFormElement($form_element) {
- $next = $form_element;
- while ($next = $next->nextSibling) {
- if (get_class($next) == 'DOMElement') {
- $this->insertElementInPlace($form_element, $next);
- break;
- }
- }
- return TRUE;
- }
-
-}
+get_content_models_list($pid);
+ foreach ($content_models as $content_model) {
+ if ($content_model != 'fedora-system:FedoraObject-3.0') {
+ $ret = $content_model;
+ break;
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Ingests a Content Model from a file to the specified pid/dsid .
+ * Returns false on failure.
+ *
+ * @param string $pid
+ * @param string $name
+ * @param string $modelDsid
+ * @param string $file
+ * @return ContentModel $cm
+ */
+ public static function ingestFromFile($pid, $name, $modelDsid, $file) {
+ $ret = FALSE;
+
+ if (($cm = self::loadFromModel($pid, $modelDsid)) === FALSE && file_exists($file)) {
+ $cm = new ContentModel(file_get_contents($file), $pid, $modelDsid);
+ $rootEl = $cm->xml->getElementsByTagName('content_model')->item(0);
+ $rootEl->setAttribute('name', $name);
+
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+ $fedoraItem = new Fedora_Item($pid);
+ $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X');
+ $ret = $cm;
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Ingests a Content Model from an existing model to the specified pid/dsid .
+ * Returns false on failure.
+ *
+ * @param string $pid
+ * @param string $name
+ * @param string $modelDsid
+ * @param string $copy_model_pid
+ * @return ContentModel $cm
+ */
+ public static function ingestFromModel($pid, $name, $modelDsid, $copy_model_pid) {
+ $ret = FALSE;
+
+ if (($cm = self::loadFromModel($pid, $modelDsid)) === FALSE && ($copy_cm = self::loadFromModel($copy_model_pid)) !== FALSE && $copy_cm->validate()) {
+ $newDom = $copy_cm->xml;
+ $rootEl = $newDom->getElementsByTagName('content_model')->item(0);
+ $rootEl->setAttribute('name', $name);
+
+ $cm = new ContentModel($newDom, $pid, $modelDsid);
+
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+ $fedoraItem = new Fedora_Item($pid);
+ $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X');
+ $ret = $cm;
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Ingests a minimum Content Model to the specified pid/dsid.
+ * Returns false on failure.
+ *
+ * @param string $pid
+ * @param string $name
+ * @param string $modelDsid
+ * @param string $defaultMimetype
+ * @param string $ingestFromDsid
+ * @param integer $ingestFormPage
+ * @param boolean $ingestFormHideFileChooser
+ * @param string $ingestFormModule
+ * @param string $ingestFormModule
+ * @param string $ingestFormFile
+ * @param string $ingestFormClass
+ * @param string $ingestFormMethod
+ * @param string $ingestFormHandler
+ *
+ * @return ContentModel $cm
+ */
+ public static function ingestBlankModel($pid, $name, $modelDsid, $defaultMimetype, $ingestFormDsid, $ingestFormPage, $ingestFormHideChooser, $ingestFormModule, $ingestFormModule, $ingestFormFile, $ingestFormClass, $ingestFormMethod, $ingestFormHandler) {
+ $ret = FALSE;
+ if (($cm = self::loadFromModel($pid, $modelDsid)) === FALSE) {
+ $newDom = new DOMDocument('1.0', 'utf-8');
+ $newDom->formatOutput = TRUE;
+ $rootEl = $newDom->createElement('content_model');
+ $rootEl->setAttribute('name', $name);
+ $rootEl->setAttribute('xmlns', self::$XMLNS);
+ $rootEl->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
+ $rootEl->setAttribute('xsi:schemaLocation', self::$XMLNS . ' ' . self::$SCHEMA_URI);
+
+ $mimeEl = $newDom->createElement('mimetypes');
+ $typeEl = $newDom->createElement('type', $defaultMimetype);
+ $mimeEl->appendChild($typeEl);
+ $rootEl->appendChild($mimeEl);
+
+ $ingestRulesEl = $newDom->createElement('ingest_rules');
+ $rootEl->appendChild($ingestRulesEl);
+
+ $ingestFormEl = $newDom->createElement('ingest_form');
+ $ingestFormEl->setAttribute('dsid', $ingestFormDsid);
+ $ingestFormEl->setAttribute('page', $ingestFormPage);
+ if ($ingestFormHideChooser == 'true') {
+ $ingestFormEl->setAttribute('hide_file_chooser', 'true');
+ }
+
+ $builderEl = $newDom->createElement('form_builder_method');
+ $builderEl->setAttribute('module', $ingestFormModule);
+ $builderEl->setAttribute('file', $ingestFormFile);
+ $builderEl->setAttribute('class', $ingestFormClass);
+ $builderEl->setAttribute('method', $ingestFormMethod);
+ $builderEl->setAttribute('handler', $ingestFormHandler);
+ $ingestFormEl->appendChild($builderEl);
+
+ $elementsEl = $newDom->createElement('form_elements');
+ $ingestFormEl->appendChild($elementsEl);
+ $rootEl->appendChild($ingestFormEl);
+ $newDom->appendChild($rootEl);
+
+ $cm = new ContentModel($newDom, $pid, $modelDsid);
+
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+ $fedoraItem = new Fedora_Item($pid);
+ $fedoraItem->add_datastream_from_string($cm->dumpXml(), $modelDsid, $name, 'text/xml', 'X');
+ $ret = $cm;
+ }
+
+ return $ret;
+ }
+
+ /**
+ * 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
+ * use the default (usually ISLANDORACM). PID_NAMESPACE and name can also be initialized
+ * from the collection policy.
+ * Returns false on failure.
+ *
+ * NOTE: $name will be overwritten with the content model name found in the datastream
+ * when the model is first validated.\
+ *
+ * @param string $pid
+ * @param string $dsid
+ * @param string $pid_namespace
+ * @param string $name
+ * @return ContentModel $cm
+ */
+ public static function loadFromModel($pid, $dsid = NULL, $pid_namespace = NULL, $name = NULL) {
+ $ret = FALSE;
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+ try {
+ if (self::valid_pid($pid)) {
+ $fedoraItem = new Fedora_Item($pid);
+ $dsid = ($dsid != NULL && self::valid_dsid($dsid)) ? $dsid : ContentModel::getDefaultDSID();
+ $ds = $fedoraItem->get_datastream_dissemination($dsid);
+ if (!empty($ds)) {
+ $ret = new ContentModel($ds, $pid, $dsid, $pid_namespace, $name);
+ }
+ }
+ } catch (SOAPException $e) {
+ $ret = FALSE;
+ }
+ return $ret;
+ }
+
+ /**
+ * Constructor
+ * NOTE: Use the static constructor methods whenever possible.
+ *
+ * @param string $xmlStr
+ * @param string $pid
+ * @param string $dsid
+ * @param string $pid_namespace
+ * @param string $name
+ * @return XMLDatastream $cm
+ */
+ public function __construct($xmlStr, $pid = NULL, $dsid = NULL, $pid_namespace = NULL, $name = NULL) {
+ parent::__construct($xmlStr, $pid, $dsid);
+ $this->pid_namespace = $pid_namespace;
+ $this->name = ($name == NULL) ? 'Islandora Content Model' : $name;
+ $this->xpath = new DOMXPath($this->xml);
+ $this->xpath->registerNamespace('cm', 'http://www.islandora.ca');
+ }
+
+ /**
+ * Attempts to convert from the old XML schema to the new by
+ * traversing the XML DOM and building a new DOM. When done
+ * $this->xml is replaced by the newly created DOM..
+ *
+ * @return void
+ */
+ protected function convertFromOldSchema() {
+ $sXml = simplexml_load_string($this->xml->saveXML());
+ $newDom = new DOMDocument('1.0', 'utf-8');
+ $newDom->formatOutput = TRUE;
+ $rootEl = $newDom->createElement('content_model');
+ $rootEl->setAttribute('name', $sXml['name']);
+ $rootEl->setAttribute('xmlns', self::$XMLNS);
+ $rootEl->setAttribute('xmlns:xsi', 'http://www.w3.org/2001/XMLSchema-instance');
+ $rootEl->setAttribute('xsi:schemaLocation', self::$XMLNS . ' ' . self::$SCHEMA_URI);
+
+ $mimeEl = $newDom->createElement('mimetypes');
+ foreach ($sXml->mimetypes->type as $mime) {
+ $typeEl = $newDom->createElement('type', $mime);
+ $mimeEl->appendChild($typeEl);
+ }
+ $rootEl->appendChild($mimeEl);
+
+ $ingestRulesEl = $newDom->createElement('ingest_rules');
+ foreach ($sXml->ingest_rules->rule as $rule) {
+ $ruleEl = $newDom->createElement('rule');
+ foreach ($rule->applies_to as $appTo) {
+ $applToEl = $newDom->createElement('applies_to', trim($appTo));
+ $ruleEl->appendChild($applToEl);
+ }
+ if (isset($rule->methods->method) && count($rule->methods->method) > 0) {
+ $methodsEl = $newDom->createElement('ingest_methods');
+ foreach ($rule->methods->method as $method) {
+ $methodEl = $newDom->createElement('ingest_method');
+ $methodEl->setAttribute('module', $method->module);
+ $methodEl->setAttribute('file', $method->file);
+ $methodEl->setAttribute('class', $method->class_name);
+ $methodEl->setAttribute('method', $method->method_name);
+ $methodEl->setAttribute('dsid', $method->datastream_id);
+ $methodEl->setAttribute('modified_files_ext', $method->modified_files_ext);
+
+ if (isset($method->parameters)) {
+ $paramsEl = $newDom->createElement('parameters');
+ foreach ($method->parameters->parameter as $param) {
+ $paramEl = $newDom->createElement('parameter', $param);
+ $paramEl->setAttribute('name', $param['name']);
+ $paramsEl->appendChild($paramEl);
+ }
+ $methodEl->appendChild($paramsEl);
+ }
+
+
+ $methodsEl->appendChild($methodEl);
+ }
+ $ruleEl->appendChild($methodsEl);
+ $ingestRulesEl->appendChild($ruleEl);
+ }
+ }
+ $rootEl->appendChild($ingestRulesEl);
+
+ if (isset($sXml->display_in_fieldset) && count($sXml->display_in_fieldset->datastream) > 0) {
+ $datastreamsEl = $newDom->createElement('datastreams');
+
+ foreach ($sXml->display_in_fieldset->datastream as $ds) {
+ $dsEl = $newDom->createElement('datastream');
+ $dsEl->setAttribute('dsid', $ds['id']);
+
+ if (isset($ds->add_datastream_method)) {
+ $add_ds_methodEl = $newDom->createElement('add_datastream_method');
+ $add_ds_methodEl->setAttribute('module', $ds->add_datastream_method->module);
+ $add_ds_methodEl->setAttribute('file', $ds->add_datastream_method->file);
+ $add_ds_methodEl->setAttribute('class', $ds->add_datastream_method->class_name);
+ $add_ds_methodEl->setAttribute('method', $ds->add_datastream_method->method_name);
+ $add_ds_methodEl->setAttribute('dsid', $ds->add_datastream_method->datastream_id);
+ $add_ds_methodEl->setAttribute('modified_files_ext', $ds->add_datastream_method->modified_files_ext);
+
+ if (isset($ds->add_datastream_method->parameters)) {
+ $paramsEl = $newDom->createElement('parameters');
+ foreach ($ds->add_datastream_method->parameters->parameter as $param) {
+ $paramEl = $newDom->createElement('parameter', $param);
+ $paramEl->setAttribute('name', $param['name']);
+ $paramsEl->appendChild($paramEl);
+ }
+ $add_ds_methodEl->appendChild($paramsEl);
+ }
+
+ $dsEl->appendChild($add_ds_methodEl);
+ }
+
+ foreach ($ds->method as $disp_meth) {
+ $disp_methEl = $newDom->createElement('display_method');
+ $disp_methEl->setAttribute('module', $disp_meth->module);
+ $disp_methEl->setAttribute('file', $disp_meth->file);
+ $disp_methEl->setAttribute('class', $disp_meth->class_name);
+ $disp_methEl->setAttribute('method', $disp_meth->method_name);
+ $dsEl->appendChild($disp_methEl);
+ }
+ $datastreamsEl->appendChild($dsEl);
+ }
+ $rootEl->appendChild($datastreamsEl);
+ }
+
+ $ingest_formEl = $newDom->createElement('ingest_form');
+ $ingest_formEl->setAttribute('dsid', $sXml->ingest_form['dsid']);
+ $ingest_formEl->setAttribute('page', $sXml->ingest_form['page']);
+ if (isset($sXml->ingest_form['hide_file_chooser'])) {
+ $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->setAttribute('module', $sXml->ingest_form->form_builder_method->module);
+ $form_builderEl->setAttribute('file', $sXml->ingest_form->form_builder_method->file);
+ $form_builderEl->setAttribute('class', $sXml->ingest_form->form_builder_method->class_name);
+ $form_builderEl->setAttribute('method', $sXml->ingest_form->form_builder_method->method_name);
+ $form_builderEl->setAttribute('handler', $sXml->ingest_form->form_builder_method->form_handler);
+ $ingest_formEl->appendChild($form_builderEl);
+
+ $form_elementsEl = $newDom->createElement('form_elements');
+ foreach ($sXml->ingest_form->form_elements->element as $element) {
+
+ //I found an XML where the label was HTML.. this code will attempt to
+ //walk the object setting the label to be the first string it finds.
+ if (count(get_object_vars($element->label)) > 0) {
+ $obj = $element->label;
+ while ($obj != NULL && !is_string($obj)) {
+ $keys = get_object_vars($obj);
+ $obj = array_shift($keys);
+ }
+ $element->label = ($obj == NULL) ? '' : $obj;
+ }
+
+ $elEl = $newDom->createElement('element');
+ $elEl->setAttribute('label', $element->label);
+ $elEl->setAttribute('name', $element->name);
+ $elEl->setAttribute('type', $element->type);
+ if (strtolower($element->required) == 'true') {
+ $elEl->setAttribute('required', 'true');
+ }
+ if (isset($element->description) && trim($element->description) != '') {
+ $descEl = $newDom->createElement('description', trim($element->description));
+ $elEl->appendChild($descEl);
+ }
+ if (isset($element->authoritative_list)) {
+ $authListEl = $newDom->createElement('authoritative_list');
+ foreach ($element->authoritative_list->item as $item) {
+ $itemEl = $newDom->createElement('item', trim($item->value));
+ if (trim($item->value) != trim($item->field)) {
+ $itemEl->setAttribute('field', trim($item->field));
+ }
+ $authListEl->appendChild($itemEl);
+ }
+ $elEl->appendChild($authListEl);
+ }
+ $form_elementsEl->appendChild($elEl);
+ }
+ $ingest_formEl->appendChild($form_builderEl);
+ $ingest_formEl->appendChild($form_elementsEl);
+ $rootEl->appendChild($ingest_formEl);
+
+ if (isset($sXml->edit_metadata) &&
+ trim($sXml->edit_metadata->build_form_method->module) != '' &&
+ trim($sXml->edit_metadata->build_form_method->file) != '' &&
+ trim($sXml->edit_metadata->build_form_method->class_name) != '' &&
+ trim($sXml->edit_metadata->build_form_method->method_name) != '' &&
+ trim($sXml->edit_metadata->submit_form_method->method_name) != '' &&
+ trim($sXml->edit_metadata->build_form_method['dsid']) != ''
+ ) {
+ $edit_metadata_methodEl = $newDom->createElement('edit_metadata_method');
+ $edit_metadata_methodEl->setAttribute('module', $sXml->edit_metadata->build_form_method->module);
+ $edit_metadata_methodEl->setAttribute('file', $sXml->edit_metadata->build_form_method->file);
+ $edit_metadata_methodEl->setAttribute('class', $sXml->edit_metadata->build_form_method->class_name);
+ $edit_metadata_methodEl->setAttribute('method', $sXml->edit_metadata->build_form_method->method_name);
+ $edit_metadata_methodEl->setAttribute('handler', $sXml->edit_metadata->submit_form_method->method_name);
+ $edit_metadata_methodEl->setAttribute('dsid', $sXml->edit_metadata->build_form_method['dsid']);
+ $rootEl->appendChild($edit_metadata_methodEl);
+ }
+
+ $newDom->appendChild($rootEl);
+
+ $this->xml = DOMDocument::loadXML($newDom->saveXml());
+ }
+
+ /**
+ * Gets a list of service deployments that this model has.
+ *
+ * NOTE: Not currently being used.
+ *
+ * @return String[] $serviceDepPids
+ */
+ public function getServices() {
+ $query = 'select $object $title from <#ri>
+ where ($object $title
+ and $object $deploymentOf
+ and $object
+ and $object pid . '>
+ and $object )
+ order by $title';
+
+ module_load_include('inc', 'fedora_repository', 'CollectionClass');
+
+ $collectionHelper = new CollectionClass();
+ $xml = simplexml_load_string($collectionHelper->getRelatedItems($this->pid, $query));
+
+ $results = array();
+ foreach ($xml->results->result as $result) {
+ $pid = strval(($result->object['uri']));
+ $pid = substr($pid, strpos($pid, "/") + 1, strlen($pid));
+ $results[] = $pid;
+ }
+
+ return $results;
+ }
+
+ /**
+ * Gets the name of the ContentModel
+ * Returns false on failure.
+ *
+ * @return String $name
+ */
+ public function getName() {
+ $ret = FALSE;
+ if ($this->name != NULL) {
+ $ret = $this->name;
+ }
+ elseif ($this->validate()) {
+ $rootEl = $this->xml->getElementsByTagName('content_model')->item(0);
+ $this->name = $rootEl->getAttribute('name');
+ $ret = $this->name;
+ }
+ return $ret;
+ }
+
+ /**
+ * Gets the element corresponding to the datastream specified
+ * in the element of the schema.
+ * Returns FALSE on failure.
+ *
+ * @param $dsid
+ * @return DOMElement $datastream
+ */
+ private function getDSModel($dsid) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && $this->validate()) {
+ $result = $this->xml->getElementsByTagName('datastreams');
+ if ($result->length > 0) {
+ $result = $result->item(0)->getElementsByTagName('datastream');
+ for ($i = 0; $ret == FALSE && $i < $result->length; $i++) {
+ if ($result->item($i)->getAttribute('dsid') == $dsid)
+ $ret = $result->item($i);
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * 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
+ * in the form builder if more complex forms or behaviour is required.
+ * Each element has the following keys: 'label', 'type', 'required', 'description', and if defined, 'authoritative_list' and/or 'parameters'
+ *
+ * @return string[] $elements
+ */
+ public function getIngestFormElements() {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elements_array = array();
+ $form_elements_wrapper = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements');
+
+ if ($form_elements_wrapper->length == 0) {
+ return $ret;
+ }
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
+ for ($i = 0; $i < $elements->length; $i++) {
+ $desc = $elements->item($i)->getElementsByTagName('description');
+ $desc = ($desc->length > 0) ? $desc->item(0)->nodeValue : '';
+
+ $label = $elements->item($i)->getAttribute('label');
+ if ($label == NULL) {
+ $label = $elements->item($i)->getAttribute('name');
+ }
+
+ $element = array('name' => $elements->item($i)->getAttribute('name'),
+ 'label' => $label,
+ 'type' => $elements->item($i)->getAttribute('type'),
+ 'required' => ($elements->item($i)->getAttribute('required') == 'true') ? TRUE : FALSE,
+ 'description' => $desc
+ );
+
+ $auth_list = $elements->item($i)->getElementsByTagName('authoritative_list');
+ if ($auth_list->length > 0) {
+ $list = array();
+ $items = $auth_list->item(0)->getElementsByTagName('item');
+ for ($j = 0; $j < $items->length; $j++) {
+ $field = $items->item($j)->attributes->getNamedItem('field');
+ $list[$items->item($j)->nodeValue] = ($field !== NULL) ? $field->nodeValue : $items->item($j)->nodeValue;
+ }
+ $element['authoritative_list'] = $list;
+ }
+
+
+ $params = $elements->item($i)->getElementsByTagName('parameters');
+ $list = array();
+ if ($params->length > 0) {
+ $items = $params->item(0)->getElementsByTagName('parameter');
+ for ($j = 0; $j < $items->length; $j++) {
+ $value = $items->item($j)->nodeValue;
+ $list[$items->item($j)->getAttribute('name')] = (strtolower($value) == 'true' ? TRUE : (strtolower($value) == 'false' ? FALSE : $value));
+ }
+ }
+ $element['parameters'] = $list;
+
+ $elements_array[] = $element;
+ }
+ $ret = $elements_array;
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Decrements an ingest form element in the list of elements.
+ * Updates the "order". This method is simply an overload to the incIngestFormElement
+ * which has a direction parameter.
+ *
+ * TODO: Might be useful to move multiple places at once, or define
+ * a method to move to an absolute position.
+ *
+ * @param String $name
+ * @return boolean $success
+ */
+ public function decIngestFormElement($name) {
+ return $this->incIngestFormElement($name, 'dec');
+ }
+
+ /**
+ * Increments (or decrements) ingest form element in the list of elements.
+ * Updates the "order". The $reorder parameter accepts 'inc' or 'dec' to
+ * specify the direction to move (defaults to increment.)
+ *
+ * TODO: Might be useful to move multiple places at once, or define
+ * a method to move to an absolute position.
+ *
+ * @param String $name
+ * @param String $reorder
+ * @return boolean $success
+ */
+ public function incIngestFormElement($name, $reorder = 'inc') {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
+ $elements = $elementsEl->getElementsByTagName('element');
+ $found = FALSE;
+ $ref_el = FALSE;
+ for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == trim($name)) {
+ if ($reorder == 'inc') {
+ $found = $elements->item($i);
+ $ref_el = ($i > 0) ? $elements->item($i - 1) : FALSE;
+ }
+ else {
+ $found = ($i + 1 < $elements->length) ? $elements->item($i + 1) : FALSE;
+ $ref_el = $elements->item($i);
+ }
+ }
+ }
+
+ if ($found !== FALSE) {
+ $elementsEl->removeChild($found);
+ $elementsEl->insertBefore($found, $ref_el);
+ $ret = TRUE;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Removes an ingest form element from the list of ingest form elements.
+ * @param String $name
+ * @return boolean $success
+ */
+ public function removeIngestFormElement($name) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elementsEl = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
+ $elements = $elementsEl->getElementsByTagName('element');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == trim($name)) {
+ $found = $elements->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+ $elementsEl->removeChild($found);
+ $ret = TRUE;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * 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").
+ *
+ * @param String $elementName
+ * @param String $paramName
+ * @param String $paramValue
+ * @return boolean success
+ */
+ public function setIngestFormElementParam($name, $paramName, $paramValue) {
+ $ret = FALSE;
+
+ if ($this->validate()) {
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
+ $element = FALSE;
+ for ($i = 0; $element === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == $name) {
+ $element = $elements->item($i);
+ }
+ }
+
+ if ($element !== FALSE) {
+ $paramsEl = $element->getElementsByTagName('parameters');
+ if ($paramsEl->length == 0) {
+ if ($paramValue !== FALSE) {
+ $paramsEl = $this->xml->createElement('parameters');
+ $element->appendChild($paramsEl);
+ }
+ else {
+ $ret = TRUE;
+ }
+ }
+ else {
+ $paramsEl = $paramsEl->item(0);
+ }
+
+ if (!$ret) {
+ $params = $paramsEl->getElementsByTagName('parameter');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $params->length; $i++) {
+ if ($params->item($i)->getAttribute('name') == $paramName) {
+ $found = $params->item($i);
+ }
+ }
+
+ if ($paramValue === FALSE) {
+ if ($found !== FALSE) {
+ $paramsEl->removeChild($found);
+ if ($params->length == 0) {
+ $element->removeChild($paramsEl);
+ }
+ }
+ $ret = TRUE;
+ }
+ else {
+ if ($found !== FALSE) {
+ $found->nodeValue = $paramValue;
+ }
+ else {
+ $paramEl = $this->xml->createElement('parameter', $paramValue);
+ $paramEl->setAttribute('name', $paramName);
+ $paramsEl->appendChild($paramEl);
+ }
+ $ret = TRUE;
+ }
+ }
+ }
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Gets a list of all parameters that belong to the specified ingest form element.
+ *
+ * @param String $elementName
+ * @return boolean success
+ */
+ public function getIngestFormElementParams($name) {
+ $ret = FALSE;
+
+ if ($this->validate()) {
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
+ $element = FALSE;
+ for ($i = 0; $element === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == $name) {
+ $element = $elements->item($i);
+ }
+ }
+
+ if ($element !== FALSE) {
+ $ret = array();
+ $paramsEl = $element->getElementsByTagName('parameters');
+
+ if ($paramsEl->length > 0) {
+ $params = $paramsEl->item(0)->getElementsByTagName('parameter');
+ for ($i = 0; $i < $params->length; $i++) {
+ $ret[$params->item($i)->getAttribute('name')] = $params->item($i)->nodeValue;
+ }
+ }
+ }
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Edits the ingest form element specified.
+ * NOTE: The element name can not be changed. To update an elements name
+ * it must be deleted and added with the new name.
+ *
+ * @param String $name
+ * @param String $label
+ * @param String $type
+ * @param boolean $required
+ * @param String description
+ * @return boolean success
+ */
+ public function editIngestFormElement($name, $label, $type, $required, $description) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == $name) {
+ $found = $elements->item($i);
+ }
+ }
+
+ $found->setAttribute('name', $name);
+ $found->setAttribute('type', $type);
+ $found->setAttribute('required', $required ? 'true' : 'false');
+ if (trim($label) != '' && trim($label) != trim($name)) {
+ $found->setAttribute('label', $label);
+ }
+ elseif ($found->getAttribute('label') != '') {
+ $found->removeAttribute('label');
+ }
+
+ $descEl = $found->getElementsByTagName('description');
+ if (trim($description) != '') {
+ if ($descEl->length > 0) {
+ $descEl = $descEl->item(0);
+ $descEl->nodeValue = $description;
+ }
+ else {
+ $descEl = $this->xml->createElement('description', $description);
+ $found->appendChild($descEl);
+ }
+ }
+ elseif ($descEl->length > 0) {
+ $found->removeChild($descEl->item(0));
+ }
+
+ if ($found->getAttribute('type') != 'select' && $found->getAttribute('type') != 'radio') {
+ $authList = $found->getElementsByTagName('authoritative_list');
+ if ($authList->length > 0) {
+ $found->removeChild($authList->item(0));
+ }
+ }
+
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * Add an ingest form element to the model.
+ *
+ * @param String $name
+ * @param String $label
+ * @param String $type
+ * @param boolean $required
+ * @param String $description
+ * @return boolean $success
+ */
+ public function addIngestFormElement($name, $label, $type, $required, $description = '') {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0);
+ $elementEl = $this->xml->createElement('element');
+ $elementEl->setAttribute('name', $name);
+ $elementEl->setAttribute('type', $type);
+ $elementEl->setAttribute('required', $requiredi ? 'true' : 'false');
+ if (trim($label) != '' && trim($label) != trim($name)) {
+ $elementEl->setAttribute('label', $label);
+ }
+ if (trim($description) != '') {
+ $descEl = $this->xml->createElement('description', $description);
+ $elementEl->appendChild($descEl);
+ }
+ $elements->appendChild($elementEl);
+
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * Decrements an authority list item from a form element in the list of elements.
+ * Updates the "order". This method is simply an overload to the incAuthListItem
+ * which has a direction parameter.
+
+ *
+ * @param String $elementName
+ * @param String $value
+ * @return boolean $success
+ */
+ public function decAuthListItem($elementName, $value) {
+ return $this->incAuthListItem($elementName, $value, 'dec');
+ }
+
+ /**
+ * Increments (or decrements) an authority list item from a form element in the list of elements.
+ * Updates the "order".
+ *
+ * @param String $elementName
+ * @param String $value
+ * @param String $direction
+ * @return boolean $success
+ */
+ public function incAuthListItem($elementName, $value, $reorder = 'inc') {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == $elementName) {
+ $found = $elements->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+
+ $authListEl = $found->getElementsByTagName('authoritative_list');
+ if ($authListEl->length > 0) {
+ $authListEl = $authListEl->item(0);
+
+ $items = $authListEl->getElementsByTagName('item');
+ $found = FALSE;
+ $ref_el = FALSE;
+ for ($i = 0; $found === FALSE && $i < $items->length; $i++) {
+ if ($items->item($i)->nodeValue == $value) {
+ if ($reorder == 'inc') {
+ $ref_el = ($i > 0) ? $items->item($i - 1) : FALSE;
+ $found = $items->item($i);
+ }
+ else {
+ $ref_el = $items->item($i);
+ $found = ($i + 1 < $items->length) ? $items->item($i + 1) : FALSE;
+ }
+ }
+ }
+
+ if ($found !== FALSE && $ref_el !== FALSE) {
+ $authListEl->removeChild($found);
+ $authListEl->insertBefore($found, $ref_el);
+ $ret = TRUE;
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Removes an authority list item from a form element.
+ * @param String $elementName
+ * @param String $value
+ * @return boolean $success
+ */
+ public function removeAuthListItem($elementName, $value) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == $elementName) {
+ $found = $elements->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+ $authListEl = $found->getElementsByTagName('authoritative_list');
+ if ($authListEl->length > 0) {
+ $authListEl = $authListEl->item(0);
+ $items = $authListEl->getElementsByTagName('item');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $items->length; $i++) {
+ if ($items->item($i)->nodeValue == $value) {
+ $found = $items->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+ if ($items->length == 1) {
+ $found->removeChild($authListEl);
+ }
+ else {
+ $authListEl->removeChild($found);
+ }
+
+ $ret = TRUE;
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Adds an authority list item to a form element.
+ * @param String $elementName
+ * @param String $value
+ * @param String $label (optional)
+ * @return boolean $success
+ */
+ public function addAuthListItem($elementName, $value, $label = '') {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $elements = $this->xml->getElementsbyTagName('ingest_form')->item(0)->getElementsByTagName('form_elements')->item(0)->getElementsByTagName('element');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $elements->length; $i++) {
+ if ($elements->item($i)->getAttribute('name') == $elementName) {
+ $found = $elements->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+ $authListEl = $found->getElementsByTagName('authoritative_list');
+ if ($authListEl->length == 0) {
+ $authListEl = $this->xml->createElement('authoritative_list');
+ $found->appendChild($authListEl);
+ }
+ else {
+ $authListEl = $authListEl->item(0);
+ }
+
+ $items = $authListEl->getElementsByTagName('item');
+ $found = FALSE;
+ for ($i = 0; $found == FALSE && $i < $items->length; $i++) {
+ if ($items->item($i)->nodeValue == $value) {
+ $found = TRUE;
+ }
+ }
+
+ if (!$found) {
+ $itemEl = $this->xml->createElement('item', trim($value));
+ if (trim($label) != '' && trim($label) != trim($value)) {
+ $itemEl->setAttribute('field', trim($label));
+ }
+ $authListEl->appendChild($itemEl);
+ $ret = TRUE;
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Builds an ingest form using the method specified in element of
+ * Returns FALSE on failure.
+ *
+ * @param &$form
+ * @param &$form_state
+ * @return string identifier
+ */
+ public function buildIngestForm(&$form, &$form_state) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $docRoot = $_SERVER['DOCUMENT_ROOT'];
+ $file = (isset($form_state['values']['ingest-file-location']) ? $form_state['values']['ingest-file-location'] : '');
+
+ $fullpath = $file;
+
+ $form['step'] = array(
+ '#type' => 'hidden',
+ '#value' => (isset($form_state['values']['step']) ? $form_state['values']['step'] : 0) + 1,
+ );
+ $form['ingest-file-location'] = array(
+ '#type' => 'hidden',
+ '#value' => $file,
+ );
+ $form['content_model_name'] = array(
+ '#type' => 'hidden',
+ '#value' => 'ISLANDORACM',
+ );
+ $form['models'] = array(//content models available
+ '#type' => 'hidden',
+ '#value' => $form_state['values']['models'],
+ );
+ $form['fullpath'] = array(
+ '#type' => 'hidden',
+ '#value' => $fullpath,
+ );
+
+ $form['#attributes']['enctype'] = 'multipart/form-data';
+ $form['indicator']['ingest-file-location'] = array(
+ '#type' => 'file',
+ '#title' => t('Upload Document'),
+ '#size' => 48,
+ '#description' => t('Full text'),
+ );
+
+ $ingest_form = $this->xml->getElementsByTagName('ingest_form')->item(0);
+
+ if (!empty($ingest_form)) {
+ if (strtolower($ingest_form->getAttribute('hide_file_chooser')) == 'true') {
+ $form['indicator']['ingest-file-location']['#type'] = 'hidden';
+ }
+ }
+ $dsid = $ingest_form->getAttribute('dsid');
+
+ $method = $ingest_form->getElementsByTagName('form_builder_method')->item(0);
+ $module = $method->getAttribute('module');
+ $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
+ if (!file_exists($path)) {
+ self::$errors[] = 'Build Ingest Form: file \'' . $path . '\' does not exist.';
+ }
+ else {
+ @require_once($path);
+ $className = $method->getAttribute('class');
+ $methodName = ($method->getAttribute('method'));
+ if (!class_exists($className)) {
+ self::$errors[] = 'Build Ingest Form: class \'' . $className . ' does not exist.';
+ }
+ else {
+ $class = new $className;
+ $elements_array = $this->getIngestFormElements();
+ if (method_exists($class, $methodName)) {
+ $ret = $class->$methodName($form, $elements_array, $form_state);
+ }
+ else {
+ self::$errors[] = 'Build Ingest Form: method \'' . $className . '->' . $methodName . '\' does not exist.';
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Builds an edit metadata form using the method specified in the element
+ * The DSID specified must match the DSID attribute of . Returns FALSE on failure.
+ *
+ * @param string $dsid
+ * @return $form
+ */
+ public function buildEditMetadataForm($pid, $dsid) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && $this->validate()) {
+ $method = $this->xml->getElementsByTagName('edit_metadata_method');
+ if ($method->length > 0 && $method->item(0)->getAttribute('dsid') == $dsid) {
+ $method = $method->item(0);
+ $module = $method->getAttribute('module');
+ $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
+ if (!file_exists($path)) {
+ self::$errors[] = 'Build Edit Metadata Form: file \'' . $path . '\' does not exist.';
+ }
+ else {
+ @require_once($path );
+ $className = $method->getAttribute('class');
+ $methodName = ($method->getAttribute('method'));
+ if (!class_exists($className)) {
+ self::$errors[] = 'Build Edit Metadata Form: class \'' . $className . '\' does not exist.';
+ }
+ else {
+ $class = new $className($pid);
+ if (!method_exists($class, $methodName)) {
+ self::$errors[] = 'Build Edit Metadata Form: method \'' . $className . '->' . $methodName . '\' does not exist.';
+ }
+ else {
+ $ret = $class->$methodName();
+ }
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Handles the edit metadata form using the handler specified in the element
+ * Returns FALSE on failure.
+ *
+ * @param &$form_id
+ * @param &$form_values
+ * @param &$soap_client
+ * @return $result
+ */
+ public function handleEditMetadataForm(&$form_id, &$form_state, &$soap_client) {
+ global $base_url;
+ $ret = FALSE;
+ if ($this->validate()) {
+ $method = $this->xml->getElementsByTagName('edit_metadata_method');
+ if ($method->length > 0) {
+ $method = $method->item(0);
+ $module = $method->getAttribute('module');
+ $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
+ if (!file_exists($path)) {
+ self::$errors[] = 'Handle Edit Metadata Form: file \'' . $path . '\' does not exist.';
+ }
+ else {
+ @require_once($path);
+ $className = $method->getAttribute('class');
+ $methodName = ($method->getAttribute('handler'));
+ if (!class_exists($className)) {
+ self::$errors[] = 'Handle Edit Metadata Form: class \'' . $className . '\' does not exist.';
+ }
+ else {
+ $class = new $className($form_state['values']['pid']);
+ if (!method_exists($class, $methodName)) {
+ self::$errors[] = 'Handle Edit Metadata Form: metho \'' . $className . '->' . $methodName . '\' does not exist.';
+ }
+ else {
+ $ret = $class->$methodName($form_id, $form_state['values'], $soap_client);
+ }
+ }
+ }
+ }
+ else {
+ // Assume DC form if none is specified.
+ module_load_include('inc', 'fedora_repository', 'formClass');
+ $metaDataForm = new formClass();
+ $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'];
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Gets an associative array describing the edit metadata method.
+ * Array has the following keys: 'file', 'class', 'method', 'handler', 'dsid'
+ * @return String[] $method
+ */
+ public function getEditMetadataMethod() {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $method = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method');
+ if ($method->length > 0) {
+ $method = $method->item(0);
+ $ret = array('module' => $method->getAttribute('module') == '' ? 'fedora_repository' : $method->getAttribute('module'),
+ 'file' => $method->getAttribute('file'),
+ 'class' => $method->getAttribute('class'),
+ 'method' => $method->getAttribute('method'),
+ 'handler' => $method->getAttribute('handler'),
+ 'dsid' => $method->getAttribute('dsid')
+ );
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Removes the edit data method from the Content Model.
+ * @return boolean $success
+ */
+ public function removeEditMetadataMethod() {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $rootEl = $this->xml->getElementsByTagName('content_model')->item(0);
+ $method = $rootEl->getElementsByTagName('edit_metadata_method');
+ if ($method->length > 0) {
+ $rootEl->removeChild($method->item(0));
+ $ret = TRUE;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Update the Edit Metadata Method defined in the Content Model
+ * @param String $module
+ * @param String $file
+ * @param String $class
+ * @param String $method
+ * @param String $handler
+ * @param String $dsid
+ * @return boolean $success
+ */
+ public function updateEditMetadataMethod($module, $file, $class, $method, $handler, $dsid) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && $this->validate()) {
+ $methodEl = $this->xml->getElementsByTagName('content_model')->item(0)->getElementsByTagName('edit_metadata_method');
+ if ($methodEl->length > 0) {
+ $methodEl = $methodEl->item(0);
+ }
+ else {
+ $methodEl = $this->xml->createElement('edit_metadata_method');
+ $this->xml->getElementsByTagName('content_model')->item(0)->appendChild($methodEl);
+ }
+ $methodEl->setAttribute('module', $module);
+ $methodEl->setAttribute('file', $file);
+ $methodEl->setAttribute('class', $class);
+ $methodEl->setAttribute('method', $method);
+ $methodEl->setAttribute('handler', $handler);
+ $methodEl->setAttribute('dsid', $dsid);
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * Executes the add datastream method for the specified datastream on the specified file.
+ * Returns FALSE on failure.
+ *
+ * @param string $dsid
+ * @param string $filen
+ * @return $result
+ */
+ public function execAddDatastreamMethods($dsid, $file) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && $this->validate() && ($ds = $this->getDSModel($dsid)) !== FALSE) {
+ $addMethod = $ds->getElementsByTagName('add_datastream_method');
+ if ($addMethod->length > 0) {
+ $addMethod = $addMethod->item(0);
+ $paramArray = array();
+ $params = $addMethod->getElementsByTagName('parameters');
+ if ($params->length > 0) {
+ $params = $params->item(0)->getElementsByTagName('parameter');
+ for ($i = 0; $i < $params->length; $i++) {
+ $paramsArray[$params->item($i)->getAttribute('name')] = $params->item($i)->nodeValue;
+ }
+ }
+ $module = $addMethod->getAttribute('module');
+ $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $addMethod->getAttribute('file');
+ if (!file_exists($path)) {
+ self::$errors[] = 'Execute Add Datastream Methods: file \'' . $path . '\' does not exist.';
+ }
+ else {
+ @require_once($path);
+ $className = $addMethod->getAttribute('class');
+ $methodName = $addMethod->getAttribute('method');
+ if (!class_exists($className)) {
+ self::$errors[] = 'Execute Add Datastream Methods: class \'' . $className . '\' does not exist.';
+ }
+ else {
+ $class = new $className;
+ if (!method_exists($class, $methodName)) {
+ self::$errors[] = 'Execute Add Datastream Methods: method \'' . $className . '->' . $methodName . '\' does not exist.';
+ }
+ else {
+ $ret = $class->$methodName($paramsArray, $addMethod->getAttribute('dsid'), $file, $addMethod->getAttribute('modified_files_ext'));
+ }
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Executes the ingest rules that apply to the specified file/mimetype.
+ * Returns FALSE on failure.
+ *
+ * If $preview is TRUE, then only execute rules with
+ * a parameter 'preview'. Used to generate previews for the file chooser.
+ *
+ * @param string $file
+ * @param string $mimetype
+ * @param boolean $preview
+ * @return $result
+ */
+ public function execIngestRules($file, $mimetype, $preview = FALSE) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $ret = TRUE;
+ $rules = $this->xml->getElementsByTagName('ingest_rules')->item(0)->getElementsByTagName('rule');
+ for ($i = 0; $i < $rules->length; $i++) {
+ $rule = $rules->item($i);
+ $types = $rule->getElementsbyTagName('applies_to');
+ $valid_types = array();
+ for ($j = 0; $j < $types->length; $j++) {
+ $valid_types[] = trim($types->item($j)->nodeValue);
+ }
+
+ if (in_array($mimetype, $valid_types)) {
+ $methods = $rule->getElementsByTagName('ingest_methods');
+ if ($methods->length > 0) {
+ $methods = $methods->item(0)->getElementsbyTagName('ingest_method');
+ for ($j = 0; $j < $methods->length; $j++) {
+ $method = $methods->item($j);
+ $param_array = array();
+ $params = $method->getElementsByTagName('parameters');
+ $param_array['model_pid'] = $this->pid;
+ if ($params->length > 0) {
+ $params = $params->item(0)->getElementsByTagName('parameter');
+ for ($k = 0; $k < $params->length; $k++)
+ $param_array[$params->item($k)->getAttribute('name')] = $params->item($k)->nodeValue;
+ }
+
+
+ if (!$preview || isset($param_array['preview'])) {
+ $module = $method->getAttribute('module');
+ $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
+
+ if (!file_exists($path) || substr_compare($path, 'fedora_repository/', -strlen('fedora_repository/'), strlen('fedora_repository/')) === 0) {
+ self::$errors[] = 'Execute Ingest Rules: file \'' . $path . '\' does not exist.';
+ $ret = FALSE;
+ }
+ else {
+ require_once($path);
+ $className = $method->getAttribute('class');
+ $methodName = ($method->getAttribute('method'));
+ if (!class_exists($className)) {
+ self::$errors[] = 'Execute Ingest Rules: class \'' . $className . '\' does not exist.';
+ $ret = FALSE;
+ }
+ else
+ $class = new $className;
+ if (!method_exists($class, $methodName)) {
+ self::$errors[] = 'Execute Ingest Rules: method \'' . $className . '->' . $methodName . '\' does not exist.';
+ $ret = FALSE;
+ }
+ else {
+ $status = $class->$methodName($param_array, $method->getAttribute('dsid'), $file, $method->getAttribute('modified_files_ext'));
+ if ($status !== TRUE) {
+ $ret = FALSE;
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Executes the form handler from the element of .
+ *
+ * @param &$formData
+ * @param &$form_state
+ * @return boolean $success
+ */
+ public function execFormHandler(&$data, &$form_state) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $method = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0);
+ $module = $method->getAttribute('module');
+ $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
+ if (!file_exists($path)) {
+ self::$errors[] = 'Execute Form Handler: file \'' . $path . '\' does not exist.';
+ }
+ else {
+ require_once($path);
+ $className = $method->getAttribute('class');
+ $methodName = ($method->getAttribute('handler'));
+ if (!class_exists($className)) {
+ self::$errors[] = 'Execute Form Handler: class \'' . $className . '\' does not exist.';
+ }
+ else {
+ $class = new $className;
+ if (!method_exists($class, $methodName)) {
+ self::$errors[] = 'Execute Form Handler: method \'' . $className . '->' . $methodName . '\' does not exist.';
+ }
+ else {
+ $class->$methodName($data, $form_state);
+ $ret = TRUE;
+ }
+ }
+ }
+ }
+
+ return $ret;
+ }
+
+ /**
+ * Gets a list of valid mimetypes that can apply to this model.
+ * Returns FALSE on failure.
+ *
+ * @return string[] $mimetypes
+ */
+ public function getMimetypes() {
+ //only proceed if the xml is valid.
+ if ($this->validate()) {
+ if ($this->mimes === NULL) {
+ $result = $this->xml->getElementsByTagName('mimetypes');
+ $result = $result->item(0)->getElementsByTagName('type');
+ $mimes = array();
+ for ($i = 0; $i < $result->length; $i++) {
+ $mimes[] = trim($result->item($i)->nodeValue);
+ }
+ $this->mimes = $mimes;
+ }
+ return $this->mimes;
+ }
+ }
+
+ /**
+ * Calls all defined display methods for the ContentModel.
+ * The PID specified is passed to the constructor of the display
+ * class(es) specified in the Content Model.
+ *
+ * @param string $pid
+ * @return string $output
+ */
+ public function displayExtraFieldset($pid, $page_number) {
+ $output = '';
+ if ($this->validate()) {
+ $datastreams = $this->xml->getElementsByTagName('datastreams');
+ if ($datastreams->length > 0) {
+ $datastreams = $datastreams->item(0)->getElementsByTagName('datastream');
+ for ($i = 0; $i < $datastreams->length; $i++) {
+ $ds = $datastreams->item($i);
+ if ($ds->attributes->getNamedItem('display_in_fieldset') == NULL || strtolower($ds->getAttribute('display_in_fieldset')) != 'false') {
+ $dispMethods = $ds->getElementsByTagName('display_method');
+ for ($j = 0; $j < $dispMethods->length; $j++) {
+ $method = $dispMethods->item($j);
+ $module = $method->getAttribute('module');
+ $path = drupal_get_path('module', !empty($module) ? $module : 'fedora_repository') . '/' . $method->getAttribute('file');
+ if (!file_exists($path)) {
+ self::$errors[] = 'Execute Form Handler: file \'' . $path . '\' does not exist.';
+ }
+ else {
+ require_once($path);
+ $className = $method->getAttribute('class');
+ $methodName = ($method->getAttribute('method'));
+ if (!class_exists($className)) {
+ self::$errors[] = 'Execute Form Handler: class \'' . $className . '\' does not exist.';
+ }
+ else {
+ $class = new $className($pid);
+ if (!method_exists($class, $methodName)) {
+ self::$errors[] = 'Execute Form Handler: method \'' . $className . '->' . $methodName . '\' does not exist.';
+ }
+ else {
+ $output = $class->$methodName($page_number);
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+ }
+
+ return $output;
+ }
+
+ /**
+ * Gets a list of datastreams from the ContentModel
+ * (not including the QDC ds if it is listed).
+ * Returns FALSE on failure.
+ *
+ * @return string[] $datastreams
+ */
+ public function listDatastreams() {
+ $ds_array = array();
+ if ($this->validate()) {
+ $datastreams = $this->xml->getElementsByTagName('datastreams');
+ if ($datastreams->length > 0) {
+ $datastreams = $datastreams->item(0)->getElementsByTagName('datastream');
+ for ($i = 0; $i < $datastreams->length; $i++) {
+ $dsName = $datastreams->item($i)->getAttribute('dsid');
+ // if ($dsName != 'QDC')
+ // {
+ $ds_array[] = $dsName;
+ // }
+ }
+ }
+ }
+
+ return $ds_array;
+ }
+
+ /**
+ * Adds an allowed mimetype to the model.
+ *
+ * @param String $type
+ * @return boolean $success
+ */
+ public function addMimetype($type) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $mimetypesEl = $this->xml->getElementsByTagName('mimetypes')->item(0);
+ $types = $mimetypesEl->getElementsByTagName('type');
+
+ $found = FALSE;
+ for ($i = 0; !$found && $i < $types->length; $i++) {
+ if ($types->item($i)->nodeValue == $type)
+ $found = TRUE;
+ }
+
+ if (!$found) {
+ $newTypeEl = $this->xml->createElement('type', $type);
+ $mimetypesEl->appendChild($newTypeEl);
+ $ret = TRUE;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * Removes an allowed mimetype from the model.
+ *
+ * @param String $type
+ * @return boolean $success
+ */
+ public function removeMimetype($type) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $mimetypesEl = $this->xml->getElementsByTagName('mimetypes')->item(0);
+ $types = $mimetypesEl->getElementsByTagName('type');
+ $found = FALSE;
+ for ($i = 0; !$found && $i < $types->length; $i++) {
+ if ($types->item($i)->nodeValue == $type)
+ $found = $types->item($i);
+ }
+
+ if ($found !== FALSE && $types->length > 1) {
+ $mimetypesEl->removeChild($found);
+ $ret = TRUE;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * getDisplayMethods ??
+ * @param type $ds
+ * @return type
+ */
+ public function getDisplayMethods($ds) {
+ $ret = FALSE;
+ if (($ds = $this->getDSModel($ds)) !== FALSE) {
+ $ret = array();
+ $dispMethods = $ds->getElementsByTagName('display_method');
+ for ($i = 0; $i < $dispMethods->length; $i++) {
+ $ret[] = array('module' => $dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module'),
+ 'file' => $dispMethods->item($i)->getAttribute('file'),
+ 'class' => $dispMethods->item($i)->getAttribute('class'),
+ 'method' => $dispMethods->item($i)->getAttribute('method'),
+ 'default' => ($dispMethods->item($i)->attributes->getNamedItem('default') !== NULL ? strtolower($dispMethods->item($i)->getAttribute('default')) == 'true' : FALSE));
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * addDs ??
+ * @param type $dsid
+ * @param type $display_in_fieldset
+ * @return boolean
+ */
+ public function addDs($dsid, $display_in_fieldset = FALSE) {
+ $ret = FALSE;
+
+ if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) === FALSE) {
+ $datastreamsEl = $this->xml->getElementsByTagName('datastreams');
+ if ($datastreamsEl->length > 0) {
+ $datastreamsEl = $datastreamsEl->item(0);
+ }
+ else {
+ $datastreamsEl = $this->xml->createElement('datastreams');
+ $this->xml->getElementsByTagName('content_model')->item(0)->appendChild($datastreamsEl);
+ }
+
+ $dsEl = $this->xml->createElement('datastream');
+ $dsEl->setAttribute('dsid', $dsid);
+ if ($display_in_fieldset == TRUE) {
+ $dsEl->setAttribute('display_in_fieldset', 'true');
+ }
+ $datastreamsEl->appendChild($dsEl);
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * removeDs ??
+ * @param type $dsid
+ * @return boolean
+ */
+ public function removeDs($dsid) {
+ $ret = FALSE;
+
+ if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
+ $datastreamsEl = $this->xml->getElementsByTagName('datastreams')->item(0);
+ $datastreamsEl->removeChild($ds);
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * displayInFieldset ??
+ * @param type $dsid
+ * @return type
+ */
+ public function displayInFieldset($dsid) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
+ $ret = strtolower($ds->getAttribute('display_in_fieldset')) == 'true';
+ }
+ return $ret;
+ }
+
+ /**
+ * setDisplayInFieldset ??
+ * @param type $dsid
+ * @param type $value
+ * @return boolean
+ */
+ public function setDisplayInFieldset($dsid, $value = TRUE) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
+ if ($value == FALSE && $ds->attributes->getNamedItem('display_in_fieldset') !== NULL) {
+ $ds->removeAttribute('display_in_fieldset');
+ $ret = TRUE;
+ }
+ elseif ($value == TRUE) {
+ $ds->setAttribute('display_in_fieldset', 'true');
+ $ret = TRUE;
+ }
+ }
+ 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) {
+ $ret = FALSE;
+
+ if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
+ $found = FALSE;
+ $dispMethods = $ds->getElementsByTagName('display_method');
+ for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
+ if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module')) &&
+ $file == $dispMethods->item($i)->getAttribute('file') &&
+ $class == $dispMethods->item($i)->getAttribute('class') &&
+ $method == $dispMethods->item($i)->getAttribute('method')) {
+ $found = $dispMethods->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+
+ for ($i = 0; $i < $dispMethods->length; $i++) {
+ if ($dispMethods->item($i)->attributes->getNamedItem('default') !== NULL) {
+ $dispMethods->item($i)->removeAttribute('default');
+ }
+ }
+
+ $found->setAttribute('default', 'true');
+ $ret = TRUE;
+ }
+ }
+ 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) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
+ $found = FALSE;
+ $dispMethods = $ds->getElementsByTagName('display_method');
+ for ($i = 0; !$found && $i < $dispMethods->length; $i++) {
+ if ($module == ($dispMethods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $dispMethods->item($i)->getAttribute('module') == '') &&
+ $file == $dispMethods->item($i)->getAttribute('file') &&
+ $class == $dispMethods->item($i)->getAttribute('class') &&
+ $method == $dispMethods->item($i)->getAttribute('method')) {
+ $found = $dispMethods->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+ $ds->removeChild($found);
+ $ret = TRUE;
+ }
+ }
+ 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) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && ($ds = $this->getDSModel($dsid)) !== FALSE) {
+ $dispMethEl = $this->xml->createElement('display_method');
+ $dispMethEl->setAttribute('module', $module);
+ $dispMethEl->setAttribute('file', $file);
+ $dispMethEl->setAttribute('class', $class);
+ $dispMethEl->setAttribute('method', $method);
+ if ($default == TRUE) {
+ $dispMethEl->setAttribute('default', TRUE);
+ }
+ $ds->appendChild($dispMethEl);
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * getAddDsMethod ??
+ * @param type $ds
+ * @return type
+ */
+ public function getAddDsMethod($ds) {
+ $ret = FALSE;
+ if (($ds = $this->getDSModel($ds)) !== FALSE) {
+ $addDsMethod = $ds->getElementsByTagName('add_datastream_method');
+ if ($addDsMethod !== FALSE && $addDsMethod->length > 0) {
+ $ret = array('module' => $addDsMethod->item(0)->getAttribute('module') == '' ? 'fedora_repository' : $addDsMethod->item(0)->getAttribute('module'),
+ 'file' => $addDsMethod->item(0)->getAttribute('file'),
+ 'class' => $addDsMethod->item(0)->getAttribute('class'),
+ 'method' => $addDsMethod->item(0)->getAttribute('method'),
+ 'modified_files_ext' => $addDsMethod->item(0)->getAttribute('modified_files_ext'),
+ 'dsid' => $addDsMethod->item(0)->getAttribute('dsid')
+ );
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * getIngestRule ??
+ * @param type $rule_id
+ * @return type
+ */
+ public function getIngestRule($rule_id) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $rules = $this->xml->getElementsByTagName('ingest_rules')->item(0)->getElementsByTagName('rule');
+ if ($rule_id < $rules->length)
+ $ret = $rules->item($rule_id);
+ }
+ return $ret;
+ }
+
+ /**
+ * removeAppliesTo ??
+ * @param type $rule_id
+ * @param type $type
+ * @return boolean
+ */
+ public function removeAppliesTo($rule_id, $type) {
+ $ret = FALSE;
+ if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
+ $applies = $rule->getElementsByTagName('applies_to');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $applies->length; $i++) {
+ if ($type == $applies->item($i)->nodeValue) {
+ $found = $applies->item($i);
+ }
+ }
+
+ if ($found) {
+ $rule->removeChild($found);
+ $ret = TRUE;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * addAppliesTo ??
+ * @param type $rule_id
+ * @param type $type
+ * @return boolean
+ */
+ public function addAppliesTo($rule_id, $type) {
+ $ret = FALSE;
+ if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
+ $applies = $rule->getElementsByTagName('applies_to');
+ $found = FALSE;
+ for ($i = 0; !$found && $i < $applies->length; $i++) {
+ $found = ($type == $applies->item($i)->nodeValue);
+ }
+
+ if (!$found) {
+ $newAppliesTo = $this->xml->createElement('applies_to', $type);
+ $rule->insertBefore($newAppliesTo, $rule->getElementsByTagName('ingest_methods')->item(0));
+ $ret = TRUE;
+ }
+ }
+ 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) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && ($rule = $this->getIngestRule($rule_id)) !== FALSE) {
+ $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
+ $meth = $this->xml->createElement('ingest_method');
+ $meth->setAttribute('module', $module);
+ $meth->setAttribute('file', $file);
+ $meth->setAttribute('class', $class);
+ $meth->setAttribute('method', $method);
+ $meth->setAttribute('dsid', $dsid);
+ $meth->setAttribute('modified_files_ext', $modified_files_ext);
+
+ $methodsEl->appendChild($meth);
+ $ret = TRUE;
+ }
+ 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) {
+ $ret = FALSE;
+ if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
+ $found = FALSE;
+ $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
+ $methods = $methodsEl->getElementsByTagName('ingest_method');
+ for ($i = 0; !$found && $i < $methods->length; $i++) {
+ if ($methods->item($i)->getAttribute('module') == $module && $methods->item($i)->getAttribute('file') == $file && $methods->item($i)->getAttribute('class') == $class && $methods->item($i)->getAttribute('method') == $method) {
+ $found = $methods->item($i);
+ }
+ }
+
+ if ($found !== FALSE && $methods->length > 1) {
+ $methodsEl->removeChild($found);
+ $ret = TRUE;
+ }
+ }
+ 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) {
+ $ret = FALSE;
+ if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
+ $methods = $rule->getElementsByTagName('ingest_methods')->item(0)->getElementsByTagName('ingest_method');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $methods->length; $i++) {
+ if (($methods->item($i)->getAttribute('module') == '' ? 'fedora_repository' : $methods->item($i)->getAttribute('module')) == $module &&
+ $methods->item($i)->getAttribute('file') == $file &&
+ $methods->item($i)->getAttribute('class') == $class &&
+ $methods->item($i)->getAttribute('method') == $method) {
+ $found = $methods->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+ $paramsEl = $found->getElementsByTagName('parameters');
+ if ($paramsEl->length == 0) {
+ $paramsEl = $found->appendChild($this->xml->createElement('parameters'));
+ }
+ else {
+ $paramsEl = $paramsEl->item(0);
+ }
+
+ $params = $paramsEl->getElementsByTagName('parameter');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $params->length; $i++) {
+ if ($params->item($i)->getAttribute('name') == $name) {
+ $found = $params->item($i);
+ }
+ }
+
+ if ($found === FALSE) {
+ $param = $this->xml->createElement('parameter', $value);
+ $param->setAttribute('name', $name);
+ $paramsEl->appendChild($param);
+ $ret = TRUE;
+ }
+ }
+ }
+ 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) {
+ $ret = FALSE;
+ if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
+ $found = FALSE;
+ $methodsEl = $rule->getElementsByTagName('ingest_methods')->item(0);
+ $methods = $methodsEl->getElementsByTagName('ingest_method');
+ for ($i = 0; !$found && $i < $methods->length; $i++) {
+ if (( trim($methods->item($i)->getAttribute('module')) == $module || (trim($methods->item($i)->getAttribute('module')) == '' && $module == 'fedora_repository')) && trim($methods->item($i)->getAttribute('file')) == $file && trim($methods->item($i)->getAttribute('class')) == $class && trim($methods->item($i)->getAttribute('method')) == $method) {
+ $found = $methods->item($i);
+ }
+ }
+ if ($found !== FALSE) {
+ $methodEl = $found;
+ $paramsEl = $found->getElementsByTagName('parameters');
+ if ($paramsEl->length > 0) {
+ $paramsEl = $paramsEl->item(0);
+ $params = $paramsEl->getElementsByTagName('parameter');
+ $found = FALSE;
+ for ($i = 0; $found === FALSE && $i < $params->length; $i++) {
+ if ($params->item($i)->getAttribute('name') == $name) {
+ $found = $params->item($i);
+ }
+ }
+
+ if ($found !== FALSE) {
+ $paramsEl->removeChild($found);
+ if ($params->length == 0) {
+ $methodEl->removeChild($paramsEl);
+ }
+
+ $ret = TRUE;
+ }
+ }
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * removeIngestRule ??
+ * @param type $rule_id
+ * @return type
+ */
+ public function removeIngestRule($rule_id) {
+ $ret = FALSE;
+ if (($rule = $this->getIngestRule($rule_id)) !== FALSE) {
+ $ret = $this->xml->getElementsByTagName('ingest_rules')->item(0)->removeChild($rule);
+ }
+ 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) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && $this->validate()) {
+ $ingestRulesEl = $this->xml->getElementsByTagName('ingest_rules')->item(0);
+ $rule = $this->xml->createElement('rule');
+ $ingestMethodsEl = $this->xml->createElement('ingest_methods');
+ $rule->appendChild($ingestMethodsEl);
+ $ingestRulesEl->appendChild($rule);
+ $newRuleId = $ingestRulesEl->getElementsByTagName('rule')->length - 1;
+ $ret = ($this->addAppliesTo($newRuleId, $applies_to) && $this->addIngestMethod($newRuleId, $module, $file, $class, $method, $dsid, $modified_files_ext));
+ }
+ return $ret;
+ }
+
+ /**
+ * getIngestRules ??
+ * @return type
+ */
+ public function getIngestRules() {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $ret = array();
+ $rules = $this->xml->getElementsByTagName('ingest_rules')->item(0)->getElementsByTagName('rule');
+ for ($i = 0; $i < $rules->length; $i++) {
+ $rule = array('applies_to' => array(),
+ 'ingest_methods' => array());
+ $applies_to = $rules->item($i)->getElementsByTagName('applies_to');
+ for ($j = 0; $j < $applies_to->length; $j++) {
+ $rule['applies_to'][] = trim($applies_to->item($j)->nodeValue);
+ }
+
+ $methods = $rules->item($i)->getElementsByTagName('ingest_methods')->item(0)->getElementsByTagName('ingest_method');
+ for ($j = 0; $j < $methods->length; $j++) {
+ $method = array('module' => $methods->item($j)->getAttribute('module') == '' ? 'fedora_repository' : $methods->item($j)->getAttribute('module'),
+ 'file' => $methods->item($j)->getAttribute('file'),
+ 'class' => $methods->item($j)->getAttribute('class'),
+ 'method' => $methods->item($j)->getAttribute('method'),
+ 'dsid' => $methods->item($j)->getAttribute('dsid'),
+ 'modified_files_ext' => $methods->item($j)->getAttribute('modified_files_ext'),
+ 'parameters' => array());
+
+ $params = $methods->item($j)->getElementsByTagName('parameters');
+ if ($params->length > 0) {
+ $params = $params->item(0)->getElementsByTagName('parameter');
+ for ($k = 0; $k < $params->length; $k++) {
+ $method['parameters'][$params->item($k)->getAttribute('name')] = $params->item($k)->nodeValue;
+ }
+ }
+
+ $rule['ingest_methods'][] = $method;
+ }
+
+ $ret[] = $rule;
+ }
+ }
+ return $ret;
+ }
+
+ /**
+ * getIngestFormAttributes ??
+ * @return type
+ */
+ public function getIngestFormAttributes() {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
+ $ret = array('dsid' => $ingest_formEl->getAttribute('dsid'),
+ 'page' => $ingest_formEl->getAttribute('page'),
+ 'hide_file_chooser' => strtolower($ingest_formEl->getAttribute('hide_file_chooser')) == 'true',
+ 'redirect' => strtolower($ingest_formEl->getAttribute('redirect')) == 'false' ? FALSE : TRUE);
+ }
+ 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) {
+ $ret = FALSE;
+ if (self::valid_dsid($dsid) && $this->validate()) {
+ $ingest_formEl = $this->xml->getElementsByTagName('ingest_form')->item(0);
+ $ingest_formEl->setAttribute('dsid', $dsid);
+ $ingest_formEl->setAttribute('page', $page);
+ if (!$redirect) {
+ $ingest_formEl->setAttribute('redirect', 'false');
+ }
+ else {
+ $ingest_formEl->removeAttribute('redirect');
+ }
+ if ($hide_file_chooser) {
+ $ingest_formEl->setAttribute('hide_file_chooser', 'true');
+ }
+ else {
+ $ingest_formEl->removeAttribute('hide_file_chooser');
+ }
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * getIngestFormBuilderMethod
+ * @return type
+ */
+ public function getIngestFormBuilderMethod() {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $method = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0);
+ $ret = array('module' => ($method->getAttribute('module') == '' ? 'fedora_repository' : $method->getAttribute('module')),
+ 'file' => $method->getAttribute('file'),
+ 'class' => $method->getAttribute('class'),
+ 'method' => $method->getAttribute('method'),
+ 'handler' => $method->getAttribute('handler'));
+ }
+ 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) {
+ $ret = FALSE;
+ if ($this->validate()) {
+ $methodEl = $this->xml->getElementsByTagName('ingest_form')->item(0)->getElementsByTagName('form_builder_method')->item(0);
+ $methodEl->setAttribute('module', $module);
+ $methodEl->setAttribute('file', $file);
+ $methodEl->setAttribute('class', $class);
+ $methodEl->setAttribute('method', $method);
+ $methodEl->setAttribute('handler', $handler);
+ $ret = TRUE;
+ }
+ return $ret;
+ }
+
+ /**
+ * Find the form element with name $name.
+ *
+ * @param string $name
+ * The name of the form element to find.
+ * @return DOMElement
+ * The form element $name, if found FALSE otherwise.
+ */
+ public function getForm($name) {
+ $result = $this->xpath->query("//cm:form[@name='$name']");
+ return $result->length == 1 ? $result->item(0) : FALSE;
+ }
+
+ /**
+ *
+ * @return array
+ * An array of form names that exist in this content model.
+ */
+ public function getFormNames() {
+ if (!$this->validate()) {
+ return FALSE;
+ }
+ $names = FALSE;
+ $result = $this->xpath->query('//cm:forms/cm:form/@name'); // Select the name attribute of all forms.
+ for ($i = 0; $i < $result->length; $i++) {
+ $attribute = $result->item($i);
+ $name = $attribute->value;
+ $names[$name] = $name;
+ }
+ return $names;
+ }
+
+ /**
+ *
+ * @return array
+ * An array of form names that exist in this content model.
+ */
+ public function getIngestFormNames() {
+ if (!$this->validate()) {
+ return FALSE;
+ }
+ $result = $this->xpath->query('//cm:forms/cm:form[@ingest_class and @ingest_file and @ingest_module]/@name'); // Select the name attribute of all forms.
+ for ($i = 0; $i < $result->length; $i++) {
+ $attribute = $result->item($i);
+ $name = $attribute->value;
+ $names[$name] = $name;
+ }
+ return $names;
+ }
+
+ /**
+ *
+ * @return array
+ * An array of form names that exist in this content model.
+ */
+ public function getEditFormNames() {
+ if (!$this->validate()) {
+ return FALSE;
+ }
+ $result = $this->xpath->query('//cm:forms/cm:form[@edit_class and @edit_file and @edit_module]/@name'); // Select the name attribute of all forms.
+ for ($i = 0; $i < $result->length; $i++) {
+ $attribute = $result->item($i);
+ $name = $attribute->value;
+ $names[$name] = $name;
+ }
+ return $names;
+ }
+
+ /**
+ * Removes the named form.
+ *
+ * @param string $name
+ * Name of the form to remove.
+ *
+ * @return boolean
+ * TRUE on success, FALSE otherwise.
+ */
+ public function removeForm($name) {
+ $result = $this->xpath->query("//cm:form[@name='$name']");
+ if ($result->length == 1) {
+ $form = $result->item(0);
+ $form->parentNode->removeChild($form);
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ /**
+ * Adds the named form.
+ *
+ * @param string $element
+ * Name of the form to add.
+ *
+ * @return boolean
+ * TRUE on success, FALSE otherwise.
+ */
+ public function addForm($element) {
+ $result = $this->xpath->query("//cm:forms");
+ if ($result->length == 0) { // Forms doesn't exist
+ $forms = $this->xml->createElement('forms');
+ $element = $this->xml->importNode($element);
+ $forms->appendChild($element);
+ $result = $this->xpath->query("//cm:content_model");
+ $result->item(0)->appendChild($forms);
+ return TRUE;
+ }
+ elseif ($result->length == 1) {
+ $element = $this->xml->importNode($element);
+ $result->item(0)->appendChild($element);
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ /**
+ * Edits a form element with attribute name='$name' from the 'forms' element.
+ *
+ * @param String $name
+ */
+ public function editForm($name, $element) {
+ if (!$this->validate()) {
+ return FALSE;
+ }
+ $result = $this->xpath->query("//cm:form[@name='$name']");
+ if ($result->length == 1) {
+ $form = $result->item(0);
+ $result = $this->xpath->query("child::node()", $form);
+ $element = $this->xml->importNode($element);
+ for ($i = 0; $i < $result->length; $i++) {
+ $child = $result->item($i);
+ $element->appendChild($child);
+ }
+ $form->parentNode->replaceChild($element, $form);
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ /**
+ *
+ * @param $element_definition
+ * @param $parent_element
+ * @return
+ */
+ public function addElementToForm($element, $parent_element) {
+ $element = $this->xml->importNode($element, TRUE);
+ $parent_element->appendChild($element);
+ return TRUE;
+ }
+
+ /**
+ *
+ * @param $element_definition
+ * @param $parent_element
+ */
+ public function editFormElement($new_element, $edit_element) {
+ $new_element = $this->xml->importNode($new_element, TRUE);
+ $name = $new_element->tagName;
+ $result = $new_element->getElementsByTagName('content');
+ if ($result->length == 1) {
+ $new_content = $result->item(0);
+ $result = $this->xpath->query("child::cm:content/child::node()", $edit_element);
+ for ($i = 0; $i < $result->length; $i++) {
+ $child = $result->item($i);
+ $new_content->appendChild($child);
+ }
+ }
+ $edit_element->parentNode->replaceChild($new_element, $edit_element);
+ return TRUE;
+ }
+
+ /**
+ *
+ * @param $new_element
+ * @param $element
+ */
+ private function insertElementInPlace($new_element, $element) {
+ $next = $element->nextSibling;
+ if ($next) {
+ $element->parentNode->insertBefore($new_element, $next);
+ }
+ else {
+ $element->parentNode->appendChild($new_element);
+ }
+ }
+
+ /**
+ *
+ * @param $form_element
+ * @return
+ */
+ public function incFormElement($form_element) {
+ $prev = $form_element;
+ $name = $prev->getAttribute('name');
+ while ($prev = $prev->previousSibling) {
+ if (get_class($prev) == 'DOMElement') {
+ $form_element->parentNode->insertBefore($form_element, $prev);
+ break;
+ }
+ }
+ return TRUE;
+ }
+
+ /**
+ *
+ * @param $form_element
+ * @return
+ */
+ public function decFormElement($form_element) {
+ $next = $form_element;
+ while ($next = $next->nextSibling) {
+ if (get_class($next) == 'DOMElement') {
+ $this->insertElementInPlace($form_element, $next);
+ break;
+ }
+ }
+ return TRUE;
+ }
+
+}
diff --git a/MimeClass.inc b/MimeClass.inc
index 82ba3b7f..73e7be26 100644
--- a/MimeClass.inc
+++ b/MimeClass.inc
@@ -3,7 +3,7 @@
// $Id$
/**
- *
+ * @file
* This class inspired by Chris Jean's work, here:
* http://chrisjean.com/2009/02/14/generating-mime-type-in-php-is-not-magic/
*
diff --git a/ObjectHelper.inc b/ObjectHelper.inc
index 734edab4..4bf1c31d 100644
--- a/ObjectHelper.inc
+++ b/ObjectHelper.inc
@@ -60,7 +60,7 @@ class ObjectHelper {
}
$headers = module_invoke_all('file_download', "/fedora/repository/$pid/$dsID");
if (in_array(-1, $headers)) {
- drupal_set_message('hello');
+ drupal_set_message(t('hello'));
drupal_access_denied();
return ' ';
@@ -300,8 +300,8 @@ class ObjectHelper {
}
if ($allow) {
$purgeImage = ' ';
+ $pid . '/' . $dataStreamValue->ID . '/' . $dataStreamValue->label . '"> ';
}
}
else {
@@ -329,7 +329,7 @@ class ObjectHelper {
$mimeType = $dataStreamValue->MIMEType;
$view = '' . t('View') . ' ';
+ '" target="_blank" >' . t('View') . '';
$action = "$base_url/fedora/repository/object_download/" . drupal_urlencode($pid) . '/' . $id . '/' . drupal_urlencode(preg_replace('/\//i', '${1}_', $label)); // Necessary to handle the case of Datastream labels that contain slashes. Ugh.
$downloadVersion = '';
if (user_access(ObjectHelper :: $EDIT_FEDORA_METADATA)) {
@@ -383,7 +383,7 @@ class ObjectHelper {
$input = new DomDocument();
$input->loadXML(trim($xmlstr));
} catch (exception $e) {
- watchdog(t("Fedora_Repository"), t("Problem loading XSL file: !e", array('!e' => $e)), NULL, WATCHDOG_ERROR);
+ watchdog(t("Fedora_Repository"), "Problem loading XSL file: !e", array('!e' => $e), NULL, WATCHDOG_ERROR);
}
$xsl = $proc->importStylesheet($xsl);
$newdom = $proc->transformToDoc($input);
@@ -416,7 +416,7 @@ class ObjectHelper {
if ($allow) {
$output .= ' ';
+ $dsid . '"> ';
}
}
return $output;
@@ -560,7 +560,7 @@ class ObjectHelper {
try {
$sxml = new SimpleXMLElement($content_models);
} catch (exception $e) {
- watchdog(t("Fedora_Repository"), t("Could not find a parent object for %s", $pid), NULL, WATCHDOG_ERROR);
+ watchdog(t("Fedora_Repository"), "Could not find a parent object for %s", $pid, NULL, WATCHDOG_ERROR);
return $pids;
}
@@ -673,8 +673,8 @@ class ObjectHelper {
if ($allow) {
// $ingestObject = ' $collectionName, '!collection_pid' => $collection_pid)) . '" href="' . base_path() .
- 'fedora/ingestObject/' . $collection_pid . '/' . $collectionName . '"> ' . t(' Add to this Collection');
+ 'fedora/ingestObject/' . $collection_pid . '/' . $collectionName . '"> ' . t('Add to this Collection');
}
}
}
@@ -763,7 +763,7 @@ class ObjectHelper {
$parent_collections_HTML .= '' . $collection_label . ' ';
}
if (!empty($parent_collections_HTML)) {
- $parent_collections_HTML = '' . t("Belongs to these collections: ") . ' ' . $parent_collections_HTML . ' ';
+ $parent_collections_HTML = '' . t("Belongs to these collections:") . ' ' . $parent_collections_HTML . ' ';
}
return $parent_collections_HTML;
@@ -855,10 +855,10 @@ class ObjectHelper {
// Get pid, title and description for children of object $pid
$query_string = 'select $o $title from <#ri> ' .
// $query_string = 'select $o $title $desc from <#ri> '.
- 'where $s $o ' .
- 'and $o $title ' .
+ 'where $s $o ' .
+ 'and $o $title ' .
// 'and $o $desc '.
- 'and ( ';
+ 'and ( ';
foreach ($pids as $pid) {
$query_string .= '$s or ';
@@ -972,8 +972,8 @@ class ObjectHelper {
$warnMess = "Creation of one or more datastreams failed. ";
$configMess = "Please ensure that %app is installed and configured for this site. ";
- drupal_set_message($warnMess, 'warning', false);
- drupal_set_message(t($configMess . " " . $messMap[$app] . " ", array('%app' => $app)), 'warning', false);
+ drupal_set_message($warnMess, 'warning', FALSE);
+ drupal_set_message(t($configMess . " " . $messMap[$app] . " ", array('%app' => $app)), 'warning', FALSE);
}
}
diff --git a/SearchClass.inc b/SearchClass.inc
index 70e18b71..40334374 100644
--- a/SearchClass.inc
+++ b/SearchClass.inc
@@ -33,7 +33,7 @@ class SearchClass {
try {
$implementation = new $solrClass();
} catch (Exception $e) {
- watchdog(t("Fedora_Repository"), t("Error getting solr search results class: !message", array('!message' => $e->getMessage())), NULL, WATCHDOG_ERROR);
+ watchdog(t("Fedora_Repository"), "Error getting solr search results class: !message", array('!message' => $e->getMessage()), NULL, WATCHDOG_ERROR);
return 'Error getting solr search results class. Check watchdog for more info.';
}
return $implementation->$solrFunction($query, $startPage, $fq, $dismax);
@@ -55,7 +55,7 @@ class SearchClass {
$andOrArray = array(
'AND' => 'and',
- //'OR' => 'or' //removed or for now as it would be a pain to parse
+ //'OR' => 'or' //removed or for now as it would be a pain to parse
);
$form = array();
@@ -137,7 +137,7 @@ class SearchClass {
'#size' => '30',
'#type' => 'textfield',
'#title' => t(''),
- // '#default_value' => (count($field_and_term) >= 2 ? trim($field_and_term[1]) : ''),
+ // '#default_value' => (count($field_and_term) >= 2 ? trim($field_and_term[1]) : ''),
);
$form['submit'] = array(
'#type' => 'submit',
@@ -367,7 +367,7 @@ class SearchClass {
$path = drupal_get_path('module', 'Fedora_Repository');
$test = $xslt_file;
$isRestricted = variable_get('fedora_namespace_restriction_enforced', TRUE);
- if (!isRestricted && $xslt_file == null) {
+ if (!isRestricted && $xslt_file == NULL) {
$xslt_file = '/xsl/unfilteredresults.xsl';
}
$proc = NULL;
@@ -431,7 +431,7 @@ class SearchClass {
try {
$proc = new XsltProcessor();
} catch (Exception $e) {
- drupal_set_message(t('Error loading results xslt! ') . $e->getMessage());
+ drupal_set_message(t('Error loading results xslt!') . " " . $e->getMessage());
return ' ';
}
@@ -507,7 +507,7 @@ class SearchClass {
$andOrArray = array(
'AND' => 'and',
- //'OR' => 'or' //removed or for now as it would be a pain to parse
+ //'OR' => 'or' //removed or for now as it would be a pain to parse
);
$form = array();
diff --git a/SecurityClass.inc b/SecurityClass.inc
index 588239e5..0cdb2cbe 100644
--- a/SecurityClass.inc
+++ b/SecurityClass.inc
@@ -1,223 +1,223 @@
-getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE);
-
- if ($policyStream == NULL) {
- // 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.
- return TRUE;
- }
- $allowedUsersAndRoles = $this->getAllowedUsersAndRoles($policyStream);
- if (!$allowedUsersAndRoles) {
- // error processing stream so don't let them ingest here.
- return FALSE;
- }
- $allowedUsers = $allowedUsersAndRoles["users"];
- $allowedRoles = $allowedUsersAndRoles["roles"];
-
- foreach ($user->roles as $role) {
- if (in_array($role, $allowedRoles)) {
- return TRUE;
- }
- }
-
- if (in_array($user->name, $allowedUsers)) {
- return TRUE;
- }
- return FALSE;
- }
-
- /**
- * parses our simple xacml policies checking for users or roles that are allowed to ingest
- * @param type $policyStream
- * @return type
- */
- function getAllowedUsersAndRoles($policyStream) {
- $allowedRoles = array();
- $allowedUsers = array();
- $usersAndRoles = array();
- try {
- $xml = new SimpleXMLElement($policyStream);
- } catch (Exception $e) {
- 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.
- drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => $e->getMessage())), 'error');
- return NULL;
- }
- $xml->registerXPathNamespace('default', 'urn:oasis:names:tc:xacml:1.0:policy');
-
- $conditions = $xml->xpath("//default:Condition");
-
- foreach ($conditions as $condition) {
- $designator = $condition->Apply->SubjectAttributeDesignator;
- if (empty($designator)) {//$disignator may be wrapped by an or
- $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") {
- foreach ($condition->Apply->Apply->AttributeValue as $attributeValue) {
- $allowedUsers[] = strip_tags($attributeValue->asXML());
- }
- foreach ($condition->Apply->Apply->Apply->AttributeValue as $attributeValue) {
- $allowedUsers[] = strip_tags($attributeValue->asXML());
- }
- }
- }
- $usersAndRoles['users'] = $allowedUsers;
- $usersAndRoles['roles'] = $allowedRoles;
- 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.
- * @param type $user
- * @return DOMDocument
- */
- function createPersonalPolicy($user) {
- $doc = new DOMDocument();
- try {
- $doc->load(drupal_get_path('module', 'Fedora_Repository') . '/policies/noObjectEditPolicy.xml');
- } catch (exception $e) {
- watchdog(t("Fedora_Repository"), t("Problem loading policy file."), NULL, WATCHDOG_ERROR);
- }
- $conditions = $doc->getElementsByTagName('Condition');
- foreach ($conditions as $condition) {
- $designator = $condition->getElementsByTagName('SubjectAttributeDesignator');
- foreach ($designator as $des) {
- $attributeId = $des->getAttribute('AttributeId');
- if ($attributeId == 'fedoraRole') {
- $applies = $condition->getElementsByTagName('Apply');
- foreach ($applies as $apply) {
- $functionId = $apply->getAttribute('FunctionId');
- if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
- foreach ($user->roles as $role) {
- if (!($role == 'authenticated user' || $role == 'administrator')) { //don't want authenticated user included administrator already is included'
- $newAttributeValue = $doc->createElement('AttributeValue', '');
- $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
- // $newAttributeValue->setAttribute('MustBePresent', 'FALSE');
- $apply->appendChild($newAttributeValue);
- }
- }
- }
- }
- }
-
- if ($attributeId == 'urn:fedora:names:fedora:2.1:subject:loginId') {
- $applies = $condition->getElementsByTagName('Apply');
- foreach ($applies as $apply) {
- $functionId = $apply->getAttribute('FunctionId');
- if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
- $newAttributeValue = $doc->createElement('AttributeValue', $user->name);
- $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
- //$newAttributeValue->setAttribute('MustBePresent', 'FALSE');
- $apply->appendChild($newAttributeValue);
- }
- }
- }
- }
- }
-
- return $doc; //NULL; //$xml;
- }
-
- /**
- * Add a list of allowed users and roles to the given policy stream and return it.
- *
- * @param string $policy_stream
- * @param array $users_and_roles
- * @return DOMDocument
- */
- function set_allowed_users_and_roles(&$policy_stream, $users_and_roles) {
- $allowed_roles = $users_and_roles['roles'];
- $allowed_users = $users_and_roles['users'];
- $dom = new DOMDocument();
- $dom->loadXML($policy_stream);
- $conditions = $dom->getElementsByTagName('Condition');
- foreach ($conditions as $condition) {
- $designator = $condition->getElementsByTagName('SubjectAttributeDesignator');
- foreach ($designator as $des) {
- $attributeId = $des->getAttribute('AttributeId');
- if ($attributeId == 'fedoraRole') {
- // $applies = $condition->getElementsByTagName('Apply');
- $applies = $des->parentNode->getElementsByTagName('Apply');
- foreach ($applies as $apply) {
- $functionId = $apply->getAttribute('FunctionId');
- if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
- foreach ($allowed_roles as $role) {
- if (!($role == 'authenticated user' || $role == 'administrator')) { //don't want authenticated user included administrator already is included'
- $newAttributeValue = $dom->createElement('AttributeValue', $role);
- $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
- //$newAttributeValue->setAttribute('MustBePresent', 'FALSE');
- $apply->appendChild($newAttributeValue);
- }
- }
- }
- }
- }
-
- if ($attributeId == 'urn:fedora:names:fedora:2.1:subject:loginId') {
- // $applies = $condition->getElementsByTagName('Apply');
- $applies = $des->parentNode->getElementsByTagName('Apply');
- foreach ($applies as $apply) {
- $functionId = $apply->getAttribute('FunctionId');
- if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
- foreach ($allowed_users as $username) {
- $newAttributeValue = $dom->createElement('AttributeValue', $username);
- $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
- //$newAttributeValue->setAttribute('MustBePresent', 'FALSE');
- $apply->appendChild($newAttributeValue);
- }
- }
- }
- }
- }
- }
- // $this->collection_policy_stream = $dom->saveXML();
- return $dom->saveXML();
- }
-
-}
+getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE);
+
+ if ($policyStream == NULL) {
+ // 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.
+ return TRUE;
+ }
+ $allowedUsersAndRoles = $this->getAllowedUsersAndRoles($policyStream);
+ if (!$allowedUsersAndRoles) {
+ // error processing stream so don't let them ingest here.
+ return FALSE;
+ }
+ $allowedUsers = $allowedUsersAndRoles["users"];
+ $allowedRoles = $allowedUsersAndRoles["roles"];
+
+ foreach ($user->roles as $role) {
+ if (in_array($role, $allowedRoles)) {
+ return TRUE;
+ }
+ }
+
+ if (in_array($user->name, $allowedUsers)) {
+ return TRUE;
+ }
+ return FALSE;
+ }
+
+ /**
+ * parses our simple xacml policies checking for users or roles that are allowed to ingest
+ * @param type $policyStream
+ * @return type
+ */
+ function getAllowedUsersAndRoles($policyStream) {
+ $allowedRoles = array();
+ $allowedUsers = array();
+ $usersAndRoles = array();
+ try {
+ $xml = new SimpleXMLElement($policyStream);
+ } catch (Exception $e) {
+ 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.
+ drupal_set_message(t('No roles found in security policy, could not parse policy stream: !message', array('!message' => $e->getMessage())), 'error');
+ return NULL;
+ }
+ $xml->registerXPathNamespace('default', 'urn:oasis:names:tc:xacml:1.0:policy');
+
+ $conditions = $xml->xpath("//default:Condition");
+
+ foreach ($conditions as $condition) {
+ $designator = $condition->Apply->SubjectAttributeDesignator;
+ if (empty($designator)) {//$disignator may be wrapped by an or
+ $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") {
+ foreach ($condition->Apply->Apply->AttributeValue as $attributeValue) {
+ $allowedUsers[] = strip_tags($attributeValue->asXML());
+ }
+ foreach ($condition->Apply->Apply->Apply->AttributeValue as $attributeValue) {
+ $allowedUsers[] = strip_tags($attributeValue->asXML());
+ }
+ }
+ }
+ $usersAndRoles['users'] = $allowedUsers;
+ $usersAndRoles['roles'] = $allowedRoles;
+ 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.
+ * @param type $user
+ * @return DOMDocument
+ */
+ function createPersonalPolicy($user) {
+ $doc = new DOMDocument();
+ try {
+ $doc->load(drupal_get_path('module', 'Fedora_Repository') . '/policies/noObjectEditPolicy.xml');
+ } catch (exception $e) {
+ watchdog(t("Fedora_Repository"), t("Problem loading policy file."), NULL, WATCHDOG_ERROR);
+ }
+ $conditions = $doc->getElementsByTagName('Condition');
+ foreach ($conditions as $condition) {
+ $designator = $condition->getElementsByTagName('SubjectAttributeDesignator');
+ foreach ($designator as $des) {
+ $attributeId = $des->getAttribute('AttributeId');
+ if ($attributeId == 'fedoraRole') {
+ $applies = $condition->getElementsByTagName('Apply');
+ foreach ($applies as $apply) {
+ $functionId = $apply->getAttribute('FunctionId');
+ if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
+ foreach ($user->roles as $role) {
+ if (!($role == 'authenticated user' || $role == 'administrator')) { //don't want authenticated user included administrator already is included'
+ $newAttributeValue = $doc->createElement('AttributeValue', '');
+ $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
+ // $newAttributeValue->setAttribute('MustBePresent', 'FALSE');
+ $apply->appendChild($newAttributeValue);
+ }
+ }
+ }
+ }
+ }
+
+ if ($attributeId == 'urn:fedora:names:fedora:2.1:subject:loginId') {
+ $applies = $condition->getElementsByTagName('Apply');
+ foreach ($applies as $apply) {
+ $functionId = $apply->getAttribute('FunctionId');
+ if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
+ $newAttributeValue = $doc->createElement('AttributeValue', $user->name);
+ $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
+ //$newAttributeValue->setAttribute('MustBePresent', 'FALSE');
+ $apply->appendChild($newAttributeValue);
+ }
+ }
+ }
+ }
+ }
+
+ return $doc; //NULL; //$xml;
+ }
+
+ /**
+ * Add a list of allowed users and roles to the given policy stream and return it.
+ *
+ * @param string $policy_stream
+ * @param array $users_and_roles
+ * @return DOMDocument
+ */
+ function set_allowed_users_and_roles(&$policy_stream, $users_and_roles) {
+ $allowed_roles = $users_and_roles['roles'];
+ $allowed_users = $users_and_roles['users'];
+ $dom = new DOMDocument();
+ $dom->loadXML($policy_stream);
+ $conditions = $dom->getElementsByTagName('Condition');
+ foreach ($conditions as $condition) {
+ $designator = $condition->getElementsByTagName('SubjectAttributeDesignator');
+ foreach ($designator as $des) {
+ $attributeId = $des->getAttribute('AttributeId');
+ if ($attributeId == 'fedoraRole') {
+ // $applies = $condition->getElementsByTagName('Apply');
+ $applies = $des->parentNode->getElementsByTagName('Apply');
+ foreach ($applies as $apply) {
+ $functionId = $apply->getAttribute('FunctionId');
+ if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
+ foreach ($allowed_roles as $role) {
+ if (!($role == 'authenticated user' || $role == 'administrator')) { //don't want authenticated user included administrator already is included'
+ $newAttributeValue = $dom->createElement('AttributeValue', $role);
+ $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
+ //$newAttributeValue->setAttribute('MustBePresent', 'FALSE');
+ $apply->appendChild($newAttributeValue);
+ }
+ }
+ }
+ }
+ }
+
+ if ($attributeId == 'urn:fedora:names:fedora:2.1:subject:loginId') {
+ // $applies = $condition->getElementsByTagName('Apply');
+ $applies = $des->parentNode->getElementsByTagName('Apply');
+ foreach ($applies as $apply) {
+ $functionId = $apply->getAttribute('FunctionId');
+ if ($functionId == 'urn:oasis:names:tc:xacml:1.0:function:string-bag') {
+ foreach ($allowed_users as $username) {
+ $newAttributeValue = $dom->createElement('AttributeValue', $username);
+ $newAttributeValue->setAttribute('DataType', 'http://www.w3.org/2001/XMLSchema#string');
+ //$newAttributeValue->setAttribute('MustBePresent', 'FALSE');
+ $apply->appendChild($newAttributeValue);
+ }
+ }
+ }
+ }
+ }
+ }
+ // $this->collection_policy_stream = $dom->saveXML();
+ return $dom->saveXML();
+ }
+
+}
diff --git a/XMLDatastream.inc b/XMLDatastream.inc
index 611a54cb..d3afed09 100644
--- a/XMLDatastream.inc
+++ b/XMLDatastream.inc
@@ -1,6 +1,9 @@
registerNamespace('rdf', 'http://www.w3.org/1999/02/22-rdf-syntax-ns#');
- $descNode = $xpath->query("//rdf:RDF/rdf:Description")->item(0);
+ $desc_node = $xpath->query("//rdf:RDF/rdf:Description")->item(0);
- if ($model = $descNode->getElementsByTagName('hasModel')->item(0)) {
- $descNode->removeChild($model);
+ if ($model = $desc_node->getElementsByTagName('hasModel')->item(0)) {
+ $desc_node->removeChild($model);
}
- if ($member = $descNode->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
- $descNode->removeChild($member);
+ if ($member = $desc_node->getElementsByTagName('rel:isMemberOfCollection')->item(0)) {
+ $desc_node->removeChild($member);
}
}
@@ -121,24 +121,24 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
// Update datastream uris
$xpath->registerNamespace('foxml', 'info:fedora/fedora-system:def/foxml#');
- foreach ($xpath->query("//foxml:datastream[@ID]") as $dsNode) {
+ foreach ($xpath->query("//foxml:datastream[@ID]") as $ds_node) {
// Don't update datastreams having external uris
- if (in_array($dsNode->getAttribute('CONTROL_GROUP'), $disallowed_groups)) {
+ if (in_array($ds_node->getAttribute('CONTROL_GROUP'), $disallowed_groups)) {
continue;
}
- $dsId = $dsNode->getAttribute('ID');
+ $ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream
- if ($dsId == "QUERY") {
- $parentNode = $xpath->query('/foxml:digitalObject')->item(0);
- $parentNode->removeChild($dsNode);
+ if ($ds_id == "QUERY") {
+ $parent_node = $xpath->query('/foxml:digitalObject')->item(0);
+ $parent_node->removeChild($ds_node);
}
- foreach ($dsNode->getElementsByTagName('*') as $contentNode) {
- if ($str = $contentNode->getAttribute('REF')) {
- $contentNode->setAttribute('REF', url($paths[$dsId], array('absolute' => TRUE)));
+ foreach ($ds_node->getElementsByTagName('*') as $content_node) {
+ if ($str = $content_node->getAttribute('REF')) {
+ $content_node->setAttribute('REF', url($paths[$ds_id], array('absolute' => TRUE)));
}
}
}
@@ -148,29 +148,29 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
case METS_11:
// Update datastream uris
$xpath->registerNamespace('METS', 'http://www.loc.gov/METS/');
- foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $dsNode) {
+ foreach ($xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]/METS:fileGrp') as $ds_node) {
- $dsId = $dsNode->getAttribute('ID');
+ $ds_id = $ds_node->getAttribute('ID');
// Remove QUERY datastream
- if ($dsId == "QUERY") {
- $parentNode = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
- $parentNode->removeChild($dsNode);
+ if ($ds_id == "QUERY") {
+ $parent_node = $xpath->query('//METS:fileGrp[@ID="DATASTREAMS"]')->item(0);
+ $parent_node->removeChild($ds_node);
}
$xpath->registerNamespace('xlink', 'http://www.loc.gov/METS/');
- foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $dsNode) as $Floc) {
- $Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => TRUE)));
+ foreach ($xpath->query('METS:file[@OWNERID!="E"][@OWNERID!="R"]/METS:FLocat[@xlink:href]', $ds_node) as $floc) {
+ $floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => TRUE)));
}
/*
- foreach ($dsNode->getElementsByTagName('METS:file') as $contentNode) {
+ foreach ($ds_node->getElementsByTagName('METS:file') as $content_node) {
// Don't update datastreams having external uris
- if (in_array($dsNode->getAttribute('OWNERID'), $disallowed_groups)) {
+ if (in_array($ds_node->getAttribute('OWNERID'), $disallowed_groups)) {
continue;
}
- foreach ($xpath->('METS:FLocat[@xlink:href]', $contentNode) as $Floc) {
- $Floc->setAttribute('xlink:href', url($paths[$dsId], array('absolute' => true)));
+ foreach ($xpath->('METS:FLocat[@xlink:href]', $content_node) as $floc) {
+ $floc->setAttribute('xlink:href', url($paths[$ds_id], array('absolute' => true)));
}
`}
*/
@@ -201,8 +201,8 @@ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $re
* @param type $mimeType
* @return type
*/
-function get_file_extension($mimeType) {
- return substr(strstr($mimeType, '/'), 1);
+function get_file_extension($mime_type) {
+ return substr(strstr($mime_type, '/'), 1);
}
/**
diff --git a/api/fedora_item.inc b/api/fedora_item.inc
index 9750ec70..1ef687ec 100644
--- a/api/fedora_item.inc
+++ b/api/fedora_item.inc
@@ -1,6 +1,10 @@
'A',
'checksumType' => 'DISABLED',
'checksum' => 'none',
- 'logMessage' => ($logMessage != null) ? $logMessage : 'Ingested object ' . $datastream_id
+ 'logMessage' => ($logMessage != NULL) ? $logMessage : 'Ingested object ' . $datastream_id
);
@@ -142,7 +146,7 @@ class Fedora_Item {
* @param type $logMessage
* @return type
*/
- function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = null) {
+ function add_datastream_from_string($str, $datastream_id, $datastream_label = NULL, $datastream_mimetype = 'text/xml', $controlGroup = 'M', $logMessage = NULL) {
$dir = sys_get_temp_dir();
$tmpfilename = tempnam($dir, 'fedoratmp');
$tmpfile = fopen($tmpfilename, 'w');
@@ -310,7 +314,7 @@ class Fedora_Item {
}
$cursor += count($resultelements->resultList->objectFields);
if (count($resultelements->resultList->objectFields) < $max_results
- || count($resultelements->resultList->objectFields) == 0) {
+ || count($resultelements->resultList->objectFields) == 0) {
$done = TRUE;
}
foreach ($resultelements->resultList->objectFields as $obj) {
@@ -402,7 +406,7 @@ class Fedora_Item {
* @param type $as_of_date_time
* @return string
*/
- function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = null) {
+ function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = NULL) {
$params = array(
'pid' => $this->pid,
'serviceDefinitionPid' => $service_definition_pid,
@@ -546,7 +550,7 @@ class Fedora_Item {
try {
$relsext = $this->get_datastream_dissemination('RELS-EXT');
} catch (exception $e) {
- drupal_set_message("Error retrieving RELS-EXT of object $pid", 'error');
+ drupal_set_message(t("Error retrieving RELS-EXT of object $pid"), 'error');
return $relationships;
}
@@ -582,12 +586,12 @@ class Fedora_Item {
// Verify the array format and that it isn't empty.
if (!empty($relationships)) {
$relsextxml = ''
- . '';
+ . '';
foreach ($relationships as $rel) {
if (empty($rel['subject']) || empty($rel['predicate']) || empty($rel['object']) || $rel['subject'] != 'info:fedora/' . $this->pid) {
// drupal_set_message should use parameterized variables, not interpolated.
- drupal_set_message("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object'], "error");
+ drupal_set_message(t("Error with relationship format: " . $rel['subject'] . " - " . $rel['predicate'] . ' - ' . $rel['object']), "error");
return FALSE;
}
}
@@ -727,7 +731,7 @@ class Fedora_Item {
* @param type $quiet
* @return type
*/
- function modify_object($label = '', $state = null, $ownerId = null, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
+ function modify_object($label = '', $state = NULL, $ownerId = NULL, $logMessage = 'Modified by Islandora API', $quiet=TRUE) {
$params = array(
'pid' => $this->pid,
@@ -828,7 +832,7 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
}
else {
- watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
+ watchdog(t("FEDORA_REPOSITORY"), "Error trying to get SOAP client connection.");
return NULL;
}
} catch (exception $e) {
@@ -841,7 +845,7 @@ class Fedora_Item {
drupal_set_message(t("Error trying to call SOAP function $function_name. Check watchdog logs for more information."), 'error');
}
- watchdog(t("FEDORA_REPOSITORY"), t("Error Trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR);
+ watchdog(t("FEDORA_REPOSITORY"), "Error Trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e), NULL, WATCHDOG_ERROR);
}
return NULL;
}
@@ -854,13 +858,13 @@ class Fedora_Item {
$result = $soap_client->__soapCall($function_name, array('parameters' => $params_array));
}
else {
- watchdog(t("FEDORA_REPOSITORY"), t("Error trying to get SOAP client connection."));
+ watchdog(t("FEDORA_REPOSITORY"), "Error trying to get SOAP client connection.");
return NULL;
}
} catch (exception $e) {
if (!$quiet) {
- watchdog(t("FEDORA_REPOSITORY"), t("Error trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e)), NULL, WATCHDOG_ERROR);
+ watchdog(t("FEDORA_REPOSITORY"), "Error trying to call SOAP function !fn: !e", array('!fn' => $function_name, '!e' => $e), NULL, WATCHDOG_ERROR);
}
return NULL;
}
diff --git a/api/fedora_utils.inc b/api/fedora_utils.inc
index e722b8c4..1991e84c 100644
--- a/api/fedora_utils.inc
+++ b/api/fedora_utils.inc
@@ -12,7 +12,7 @@
*/
if (!function_exists('str_getcsv')) {
- function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=null, $eol=null) {
+ function str_getcsv($input, $delimiter=',', $enclosure='"', $escape=NULL, $eol=NULL) {
$temp = fopen("php://memory", "rw");
fwrite($temp, $input);
fseek($temp, 0);
@@ -109,7 +109,7 @@ function fix_encoding($in_str) {
* @param type $pid
* @return boolean
*/
-function validPid($pid) {
+function valid_pid($pid) {
$valid = FALSE;
if (strlen(trim($pid)) <= 64 && preg_match('/^([A-Za-z0-9]|-|\.)+:(([A-Za-z0-9])|-|\.|~|_|(%[0-9A-F]{2}))+$/', trim($pid))) {
$valid = TRUE;
@@ -123,7 +123,7 @@ function validPid($pid) {
* @param type $dsid
* @return boolean
*/
-function validDsid($dsid) {
+function valid_dsid($dsid) {
$valid = FALSE;
if (strlen(trim($dsid)) <= 64 && preg_match('/^[a-zA-Z0-9\_\-\.]+$/', trim($dsid))) {
$valid = TRUE;
@@ -137,7 +137,7 @@ function validDsid($dsid) {
* @param type $dsid
* @return string
*/
-function fixDsid($dsid) {
+function fix_dsid($dsid) {
$new_dsid = trim($dsid);
$find = '/[^a-zA-Z0-9\.\_\-]/';
diff --git a/api/rels-ext.inc b/api/rels-ext.inc
index 7ddce028..4714b4ed 100644
--- a/api/rels-ext.inc
+++ b/api/rels-ext.inc
@@ -21,7 +21,6 @@ class RelsExt {
* the repository for the given Fedora_Item.
* @param Fedora_Item $item
*/
-
function RelsExt($item) {
$relsextxml = $item->get_datastream_dissemination('RELS-EXT');
}
diff --git a/api/tagging.inc b/api/tagging.inc
index a4191303..5d58358b 100644
--- a/api/tagging.inc
+++ b/api/tagging.inc
@@ -69,7 +69,7 @@ class TagSet {
$this->item->modify_datastream_by_value($tagdoc->saveXML(), $this->tagsDSID, 'Tags', 'text/xml', 'X');
}
} catch (exception $e) {
- drupal_set_message('There was an error saving the tags datastream: !e', array('!e' => $e), 'error');
+ drupal_set_message(t('There was an error saving the tags datastream: !e'), array('!e' => $e), 'error');
return FALSE;
}
return TRUE;
diff --git a/collection_policies/COLLECTION-COLLECTION POLICY.xml b/collection_policies/COLLECTION-COLLECTION POLICY.xml
index 5888fd35..4eaaf48b 100644
--- a/collection_policies/COLLECTION-COLLECTION POLICY.xml
+++ b/collection_policies/COLLECTION-COLLECTION POLICY.xml
@@ -1,21 +1,22 @@
+
-
-
-
-
- dc.title
- dc.creator
- dc.description
- dc.date
- dc.identifier
- dc.language
- dc.publisher
- dc.rights
- dc.subject
- dc.relation
- dcterms.temporal
- dcterms.spatial
- Full Text
-
- isMemberOfCollection
+
+
+
+
+ dc.title
+ dc.creator
+ dc.description
+ dc.date
+ dc.identifier
+ dc.language
+ dc.publisher
+ dc.rights
+ dc.subject
+ dc.relation
+ dcterms.temporal
+ dcterms.spatial
+ Full Text
+
+ isMemberOfCollection
diff --git a/collection_policies/FLV-COLLECTION POLICY.xml b/collection_policies/FLV-COLLECTION POLICY.xml
index e7ea27a8..e8037a2c 100644
--- a/collection_policies/FLV-COLLECTION POLICY.xml
+++ b/collection_policies/FLV-COLLECTION POLICY.xml
@@ -7,8 +7,8 @@
vre:contentmodel
STANDARD_FLV
-
-
+
+
dc.description
@@ -63,5 +63,5 @@
fgs.DS.first.text
Full Text
-
+
\ No newline at end of file
diff --git a/collection_policies/JPG-COLLECTION POLICY.xml b/collection_policies/JPG-COLLECTION POLICY.xml
index e66cd198..1b80514c 100644
--- a/collection_policies/JPG-COLLECTION POLICY.xml
+++ b/collection_policies/JPG-COLLECTION POLICY.xml
@@ -1,22 +1,22 @@
-
-
-
-
- dc.title
- dc.creator
- dc.description
- dc.date
- dc.identifier
- dc.language
- dc.publisher
- dc.rights
- dc.subject
- dc.relation
- dcterms.temporal
- dcterms.spatial
- Full Text
-
- isMemberOf
+
+
+
+
+ dc.title
+ dc.creator
+ dc.description
+ dc.date
+ dc.identifier
+ dc.language
+ dc.publisher
+ dc.rights
+ dc.subject
+ dc.relation
+ dcterms.temporal
+ dcterms.spatial
+ Full Text
+
+ isMemberOf
diff --git a/collection_policies/PDF-COLLECTION POLICY.xml b/collection_policies/PDF-COLLECTION POLICY.xml
index 3f86bf16..4821da06 100644
--- a/collection_policies/PDF-COLLECTION POLICY.xml
+++ b/collection_policies/PDF-COLLECTION POLICY.xml
@@ -1 +1,24 @@
- dc.title dc.creator dc.description dc.date dc.identifier dc.language dc.publisher dc.rights dc.subject dc.relation dcterms.temporal dcterms.spatial Full Text isMemberOfCollection
\ No newline at end of file
+
+
+
+
+
+
+
+
+ dc.title
+ dc.creator
+ dc.description
+ dc.date
+ dc.identifier
+ dc.language
+ dc.publisher
+ dc.rights
+ dc.subject
+ dc.relation
+ dcterms.temporal
+ dcterms.spatial
+ Full Text
+
+ isMemberOfCollection
+
\ No newline at end of file
diff --git a/collection_policies/PERSONAL-COLLECTION-POLICY.xml b/collection_policies/PERSONAL-COLLECTION-POLICY.xml
index be51e65b..9605c1d9 100644
--- a/collection_policies/PERSONAL-COLLECTION-POLICY.xml
+++ b/collection_policies/PERSONAL-COLLECTION-POLICY.xml
@@ -1,3 +1,4 @@
+
@@ -11,7 +12,7 @@
vre:contentmodel
STANDARD_PDF
-
+
ir:image
vre:contentmodel
STANDARD_IMAGE
diff --git a/collection_policies/RIRI COLLECTION POLICY.xml b/collection_policies/RIRI COLLECTION POLICY.xml
index 8424f9e9..11f726af 100644
--- a/collection_policies/RIRI COLLECTION POLICY.xml
+++ b/collection_policies/RIRI COLLECTION POLICY.xml
@@ -63,5 +63,5 @@
fgs.DS.first.text
Full Text
-
+
diff --git a/collection_policies/book_collection_policy.xml b/collection_policies/book_collection_policy.xml
index 4a6c4a0f..f17f1df9 100644
--- a/collection_policies/book_collection_policy.xml
+++ b/collection_policies/book_collection_policy.xml
@@ -1,69 +1,70 @@
+
-
-
- islandora
- ilives:bookCModel
- ISLANDORACM
-
-
+
+
+ islandora
+ ilives:bookCModel
+ ISLANDORACM
+
+
- isMemberOfCollection
-
+ isMemberOfCollection
+
- dc.description
-
- dc.title
- dc.title
-
-
- dc.creator
- dc.creator
-
-
- dc.description
- dc.description
-
-
- dc.date
- dc.date
-
-
- dc.identifier
- dc.identifier
-
-
- dc.language
- dc.language
-
-
- dc.publisher
- dc.publisher
-
-
- dc.rights
- dc.rights
-
-
- dc.subject
- dc.subject
-
-
- dc.relation
- dc.relation
-
-
- dcterms.temporal
- dcterms.temporal
-
-
- dcterms.spatial
- dcterms.spatial
-
-
- fgs.DS.first.text
- Full Text
-
-
+ dc.description
+
+ dc.title
+ dc.title
+
+
+ dc.creator
+ dc.creator
+
+
+ dc.description
+ dc.description
+
+
+ dc.date
+ dc.date
+
+
+ dc.identifier
+ dc.identifier
+
+
+ dc.language
+ dc.language
+
+
+ dc.publisher
+ dc.publisher
+
+
+ dc.rights
+ dc.rights
+
+
+ dc.subject
+ dc.subject
+
+
+ dc.relation
+ dc.relation
+
+
+ dcterms.temporal
+ dcterms.temporal
+
+
+ dcterms.spatial
+ dcterms.spatial
+
+
+ fgs.DS.first.text
+ Full Text
+
+
diff --git a/collection_policies/large_image_collection_policy.xml b/collection_policies/large_image_collection_policy.xml
index 4f9793a6..8a158940 100644
--- a/collection_policies/large_image_collection_policy.xml
+++ b/collection_policies/large_image_collection_policy.xml
@@ -6,79 +6,79 @@
Purpose of the document follows.
-->
-
-
- islandora:slide
- islandora:slideCModel
- ISLANDORACM
-
-
- islandora:map
- islandora:mapCModel
- ISLANDORACM
-
-
- islandora:herb
- islandora:herbCModel
- ISLANDORACM
-
-
+
+
+ islandora:slide
+ islandora:slideCModel
+ ISLANDORACM
+
+
+ islandora:map
+ islandora:mapCModel
+ ISLANDORACM
+
+
+ islandora:herb
+ islandora:herbCModel
+ ISLANDORACM
+
+
- isMemberOfCollection
-
- dc.description
-
- dc.title
- dc.title
-
-
- dc.creator
- dc.creator
-
-
- dc.description
- dc.description
-
-
- dc.date
- dc.date
-
-
- dc.identifier
- dc.identifier
-
-
- dc.language
- dc.language
-
-
- dc.publisher
- dc.publisher
-
-
- dc.rights
- dc.rights
-
-
- dc.subject
- dc.subject
-
-
- dc.relation
- dc.relation
-
-
- dcterms.temporal
- dcterms.temporal
-
-
- dcterms.spatial
- dcterms.spatial
-
-
- fgs.DS.first.text
- Full Text
-
-
+ isMemberOfCollection
+
+ dc.description
+
+ dc.title
+ dc.title
+
+
+ dc.creator
+ dc.creator
+
+
+ dc.description
+ dc.description
+
+
+ dc.date
+ dc.date
+
+
+ dc.identifier
+ dc.identifier
+
+
+ dc.language
+ dc.language
+
+
+ dc.publisher
+ dc.publisher
+
+
+ dc.rights
+ dc.rights
+
+
+ dc.subject
+ dc.subject
+
+
+ dc.relation
+ dc.relation
+
+
+ dcterms.temporal
+ dcterms.temporal
+
+
+ dcterms.spatial
+ dcterms.spatial
+
+
+ fgs.DS.first.text
+ Full Text
+
+
diff --git a/collection_policies/qt_collection_policy.xml b/collection_policies/qt_collection_policy.xml
index 2f8df517..70ba7b49 100644
--- a/collection_policies/qt_collection_policy.xml
+++ b/collection_policies/qt_collection_policy.xml
@@ -1,35 +1,48 @@
-
-
-
-
-
-
-dc.title
-
-dc.creator
-
-dc.description
-
-dc.date
-
-dc.identifier
-
-dc.language
-
-dc.publisher
-
-dc.rights
-
-dc.subject
-
-dc.relation
-
-dcterms.temporal
-
-dcterms.spatial
-
-
-isMemberOfCollection
-
+
+
+
+
+
+
+dc.title
+
+
+dc.creator
+
+
+dc.description
+
+
+dc.date
+
+
+dc.identifier
+
+
+dc.language
+
+
+dc.publisher
+
+
+dc.rights
+
+
+dc.subject
+
+
+dc.relation
+
+
+dcterms.temporal
+
+
+dcterms.spatial
+
+
+
+isMemberOfCollection
+
+
diff --git a/collection_policy.xsd b/collection_policy.xsd
index 8822f103..d5ea6637 100644
--- a/collection_policy.xsd
+++ b/collection_policy.xsd
@@ -1,47 +1,48 @@
+
-
-
+
+
Islandora Collection Policy Schema
Islandora, Robertson Library, University of Prince Edward Island, 550 University Ave., Charlottetown, Prince Edward Island
-
-
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/collection_views/COLLECTION_VIEW.xml b/collection_views/COLLECTION_VIEW.xml
index 7b30307d..4d7def0e 100644
--- a/collection_views/COLLECTION_VIEW.xml
+++ b/collection_views/COLLECTION_VIEW.xml
@@ -1,264 +1,264 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- -
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/
- /-/
-
-
-
- /fedora/repository/
- /
- /
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /
+ /
+
+
+
+
+
-
-
- /fedora/repository/
- /TN
-
-
-
+
+
+ /fedora/repository/
+ /TN
+
+
+
-
+
-
- --
-
-
- /fedora/repository/
- /-/
-
-
+
+ --
+
+
+ /fedora/repository/
+ /-/
+
+
DETAILS
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/collection_views/Coverflow_Collection_View.xsl b/collection_views/Coverflow_Collection_View.xsl
index 1e67f79f..243ce893 100644
--- a/collection_views/Coverflow_Collection_View.xsl
+++ b/collection_views/Coverflow_Collection_View.xsl
@@ -1,59 +1,61 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
- Testing YUI's CoverFlow version 0.1 (beta)
-
-
-
-
-
-
+ };
+
+
+ Testing YUI's CoverFlow version 0.1 (beta)
+
+
+
+
+
+
diff --git a/collection_views/Coverflow_PRE_Collection_View.xsl b/collection_views/Coverflow_PRE_Collection_View.xsl
index e9bae87d..091fbfe1 100644
--- a/collection_views/Coverflow_PRE_Collection_View.xsl
+++ b/collection_views/Coverflow_PRE_Collection_View.xsl
@@ -1,63 +1,65 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
- Testing YUI's CoverFlow version 0.1 (beta)
-
-
-
-
-
-
+ };
+
+
+ Testing YUI's CoverFlow version 0.1 (beta)
+
+
+
+
+
+
diff --git a/collection_views/FLV-COLLECTION VIEW(2).xml b/collection_views/FLV-COLLECTION VIEW(2).xml
index e591de97..7eebe2f3 100644
--- a/collection_views/FLV-COLLECTION VIEW(2).xml
+++ b/collection_views/FLV-COLLECTION VIEW(2).xml
@@ -1,65 +1,96 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ /OBJ/
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ /TN
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /OBJ/
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+
+ /fedora/repository/
+ /TN
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/collection_views/REFWORKS-COLLECTION_VIEW.xml b/collection_views/REFWORKS-COLLECTION_VIEW.xml
index 26d637e4..9a8eebdd 100644
--- a/collection_views/REFWORKS-COLLECTION_VIEW.xml
+++ b/collection_views/REFWORKS-COLLECTION_VIEW.xml
@@ -1,65 +1,96 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ /OBJ/
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /OBJ/
+
+
+
+
+
+
-
-
- /fedora/repository/ /-/
-
-
-
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/collection_views/SIMPLE-COLLECTION_VIEW.xml b/collection_views/SIMPLE-COLLECTION_VIEW.xml
index a01e66e0..8f67e1c0 100644
--- a/collection_views/SIMPLE-COLLECTION_VIEW.xml
+++ b/collection_views/SIMPLE-COLLECTION_VIEW.xml
@@ -1,65 +1,96 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ /OBJ/
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /TN
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /OBJ/
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /TN
+
+
+
+
+
+
+
-
-
- /fedora/repository/ /-/
-
-
-
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/collection_views/SmileyStuff-COLLECTION_VIEW.xml b/collection_views/SmileyStuff-COLLECTION_VIEW.xml
index 58e28287..5aa853bc 100644
--- a/collection_views/SmileyStuff-COLLECTION_VIEW.xml
+++ b/collection_views/SmileyStuff-COLLECTION_VIEW.xml
@@ -1,67 +1,69 @@
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
diff --git a/collection_views/Video-COLLECTION_VIEW.xml b/collection_views/Video-COLLECTION_VIEW.xml
index f52dea89..39f9fe52 100644
--- a/collection_views/Video-COLLECTION_VIEW.xml
+++ b/collection_views/Video-COLLECTION_VIEW.xml
@@ -1,64 +1,66 @@
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
+
-
+
diff --git a/collection_views/default-sparqltoHtml.xsl b/collection_views/default-sparqltoHtml.xsl
index 2f88acb5..8701c66d 100644
--- a/collection_views/default-sparqltoHtml.xsl
+++ b/collection_views/default-sparqltoHtml.xsl
@@ -1,124 +1,189 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/collection_views/demo_image_collection_dc_record.xml b/collection_views/demo_image_collection_dc_record.xml
index a0879d69..72433b60 100644
--- a/collection_views/demo_image_collection_dc_record.xml
+++ b/collection_views/demo_image_collection_dc_record.xml
@@ -1,7 +1,7 @@
- Demo Image Collection
- islandora:demo_image_collection
- Demo image collection
+ Demo Image Collection
+ islandora:demo_image_collection
+ Demo image collection
diff --git a/collection_views/simple_list_view.xml b/collection_views/simple_list_view.xml
index e8711651..37ada1d5 100644
--- a/collection_views/simple_list_view.xml
+++ b/collection_views/simple_list_view.xml
@@ -1,28 +1,30 @@
+
-
-
-
-
+
+
+
+
-
-
+
diff --git a/collection_views/standard_jpeg_collection_view.xml b/collection_views/standard_jpeg_collection_view.xml
index 40a8c96a..4604b454 100644
--- a/collection_views/standard_jpeg_collection_view.xml
+++ b/collection_views/standard_jpeg_collection_view.xml
@@ -1,66 +1,68 @@
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
diff --git a/collection_views/yui_coverflow/css/test.css b/collection_views/yui_coverflow/css/test.css
index c6f215a7..0442d49e 100644
--- a/collection_views/yui_coverflow/css/test.css
+++ b/collection_views/yui_coverflow/css/test.css
@@ -1,18 +1,18 @@
body {
- font-family: Arial;
- font-size: 12px;
- color: gray;
- background: black;
+ font-family: Arial;
+ font-size: 12px;
+ color: gray;
+ background: black;
}
.title {
- font-size: 18px;
- font-weight: bold;
+ font-size: 18px;
+ font-weight: bold;
}
#coverFlowTest .coverFlowLabel {
- margin-top: 10px;
- font-size: 14px;
- color: #C0C0C0;
- font-weight: bold;
+ margin-top: 10px;
+ font-size: 14px;
+ color: #C0C0C0;
+ font-weight: bold;
}
\ No newline at end of file
diff --git a/collection_views/yui_coverflow/js/CoverFlow.js b/collection_views/yui_coverflow/js/CoverFlow.js
index 3b041592..4a521745 100644
--- a/collection_views/yui_coverflow/js/CoverFlow.js
+++ b/collection_views/yui_coverflow/js/CoverFlow.js
@@ -19,7 +19,7 @@ YAHOO.namespace("ext");
//(function(){
- /**
+/**
* @class CoverFlow
* @namespace YAHOO.ext
* @constructor
@@ -31,906 +31,966 @@ YAHOO.namespace("ext");
* config.bgColor {String} Background color. Could be in the form #00000 or black. Optional. Default: CoverFlow.DEFAULT_BG_COLOR.
*
*/
- YAHOO.ext.CoverFlow = function(el, userConfig){
- if(el)
- this.init(el, userConfig || {});
- };
+YAHOO.ext.CoverFlow = function(el, userConfig){
+ if(el)
+ this.init(el, userConfig || {});
+};
- //shortcuts
- var CoverFlow = YAHOO.ext.CoverFlow;
- var Dom = YAHOO.util.Dom;
+//shortcuts
+var CoverFlow = YAHOO.ext.CoverFlow;
+var Dom = YAHOO.util.Dom;
- /**
+/**
* Defaults
*/
- CoverFlow.DEFAULT_HEIGHT = 300;
- CoverFlow.DEFAULT_WIDTH = 800;
- CoverFlow.DEFAULT_BG_COLOR = '#000000';
- CoverFlow.IMAGE_SEPARATION = 50;
- CoverFlow.RIGHT = 'right';
- CoverFlow.LEFT = 'left';
- CoverFlow.LABEL_CLASS = 'coverFlowLabel';
+CoverFlow.DEFAULT_HEIGHT = 300;
+CoverFlow.DEFAULT_WIDTH = 800;
+CoverFlow.DEFAULT_BG_COLOR = '#000000';
+CoverFlow.IMAGE_SEPARATION = 50;
+CoverFlow.RIGHT = 'right';
+CoverFlow.LEFT = 'left';
+CoverFlow.LABEL_CLASS = 'coverFlowLabel';
- CoverFlow.prototype = {
- //Images array (it's a sort of transient var)
- images: [],
- //Items array {CoverFlowItem[]}
- coverFlowItems: [],
+CoverFlow.prototype = {
+ //Images array (it's a sort of transient var)
+ images: [],
+ //Items array {CoverFlowItem[]}
+ coverFlowItems: [],
- remainingImages: 9999,
+ remainingImages: 9999,
- element: null,
- labelElement: null,
- containerHeight: 0,
- containerWidth: 0,
+ element: null,
+ labelElement: null,
+ containerHeight: 0,
+ containerWidth: 0,
- imageHeightRatio: 0.6,
- imageWidthRatio: 0.2,
- reflectionRatio: 0.6, // this causes: imageTotalHeightRatio = imageHeightRatio + imageHeightRatio*reflectionRatio
- topRatio: 0.1,
- sideRatio: 0.4,
+ imageHeightRatio: 0.6,
+ imageWidthRatio: 0.2,
+ reflectionRatio: 0.6, // this causes: imageTotalHeightRatio = imageHeightRatio + imageHeightRatio*reflectionRatio
+ topRatio: 0.1,
+ sideRatio: 0.4,
- perspectiveAngle: 20,
- imageZIndex: 1000,
- selectedImageZIndex: 9999,
- selectedItem: 0,
+ perspectiveAngle: 20,
+ imageZIndex: 1000,
+ selectedImageZIndex: 9999,
+ selectedItem: 0,
- moveQueue: [],
- animationWorking: false,
+ moveQueue: [],
+ animationWorking: false,
- init: function(el, userConfig){
+ init: function(el, userConfig){
- this.element = Dom.get(el);
- this.applyConfig(userConfig);
+ this.element = Dom.get(el);
+ this.applyConfig(userConfig);
- if(userConfig.images)
- this.addImages(userConfig.images);
+ if(userConfig.images)
+ this.addImages(userConfig.images);
- this.attachEventListeners();
- this.createLabelElement();
- },
-
- applyConfig: function(config){
- this.containerHeight = config.height || CoverFlow.DEFAULT_HEIGHT;
- this.containerWidth = config.width || CoverFlow.DEFAULT_WIDTH;
- this.backgroundColor = config.bgColor || CoverFlow.DEFAULT_BG_COLOR;
+ this.attachEventListeners();
+ this.createLabelElement();
+ },
+
+ applyConfig: function(config){
+ this.containerHeight = config.height || CoverFlow.DEFAULT_HEIGHT;
+ this.containerWidth = config.width || CoverFlow.DEFAULT_WIDTH;
+ this.backgroundColor = config.bgColor || CoverFlow.DEFAULT_BG_COLOR;
- this.element.style.position = 'relative';
- this.element.style.height = this.containerHeight + 'px';
- this.element.style.width = this.containerWidth + 'px';
- this.element.style.background = this.backgroundColor;
- this.element.style.overflow = 'hidden';
- },
-
- addImages: function(images){
- this.images = [];
- this.remainingImages = images.length;
+ this.element.style.position = 'relative';
+ this.element.style.height = this.containerHeight + 'px';
+ this.element.style.width = this.containerWidth + 'px';
+ this.element.style.background = this.backgroundColor;
+ this.element.style.overflow = 'hidden';
+ },
+
+ addImages: function(images){
+ this.images = [];
+ this.remainingImages = images.length;
- for(var i=0; i < images.length; i++){
- var img = images[i];
- var image = new Image();
- image.id = Dom.generateId();
- image.index = i;
- image.onclick = img.onclick;
- image.label = img.label;
+ for(var i=0; i < images.length; i++){
+ var img = images[i];
+ var image = new Image();
+ image.id = Dom.generateId();
+ image.index = i;
+ image.onclick = img.onclick;
+ image.label = img.label;
- //hide images
- image.style.visibility = 'hidden';
- image.style.display = 'none';
- //this is to maintain image order since image.onload will be called randomly
- this.element.appendChild(image);
- //a shortcut to not create another context to call onload
- var me = this;
-// image.onload = function(){
-// CoverFlow.preloadImage(me, this); // this = image
-// };
- YAHOO.util.Event.on(image, 'load', this.preloadImage, image, this);
- image.src = img.src;
+ //hide images
+ image.style.visibility = 'hidden';
+ image.style.display = 'none';
+ //this is to maintain image order since image.onload will be called randomly
+ this.element.appendChild(image);
+ //a shortcut to not create another context to call onload
+ var me = this;
+ // image.onload = function(){
+ // CoverFlow.preloadImage(me, this); // this = image
+ // };
+ YAHOO.util.Event.on(image, 'load', this.preloadImage, image, this);
+ image.src = img.src;
- };
+ };
- },
+ },
- /**
+ /**
* @function preloadImage
* @param event
* @param image
* @return void
*/
- preloadImage : function(e, image){
- this.images.push(image);
- this.checkAllImagesLoaded();
- },
-
- checkAllImagesLoaded: function(){
- this.remainingImages--;
- if(!this.remainingImages){
- this.setup();
- }
- },
-
- setup: function(){
- this.createCoverFlowItems();
- this.sortCoverFlowItems();
- this.initCoverFlow();
- },
-
- initCoverFlow: function(){
+ preloadImage : function(e, image){
+ this.images.push(image);
+ this.checkAllImagesLoaded();
+ },
+
+ checkAllImagesLoaded: function(){
+ this.remainingImages--;
+ if(!this.remainingImages){
+ this.setup();
+ }
+ },
+
+ setup: function(){
+ this.createCoverFlowItems();
+ this.sortCoverFlowItems();
+ this.initCoverFlow();
+ },
+
+ initCoverFlow: function(){
- for(var i=0; i < this.coverFlowItems.length; i++){
- var coverFlowItem = this.coverFlowItems[i];
+ for(var i=0; i < this.coverFlowItems.length; i++){
+ var coverFlowItem = this.coverFlowItems[i];
- var angle = 0;
- var direction;
+ var angle = 0;
+ var direction;
- if(i==0){
- coverFlowItem.setZIndex(this.selectedImageZIndex);
- coverFlowItem.setLeft(this.getCenter() - coverFlowItem.element.width/2);
- coverFlowItem.isSelected(true);
- this.selectedItem = 0;
- this.showLabel(coverFlowItem.getLabel());
- }else{
- angle = this.perspectiveAngle;
- direction = CoverFlow.LEFT;
- coverFlowItem.setZIndex(this.imageZIndex - i);
- coverFlowItem.setLeft( this.getRightStart()+ (i - 1)* CoverFlow.IMAGE_SEPARATION);
- coverFlowItem.isSelected(false);
- }
- coverFlowItem.setAngle(angle);
- coverFlowItem.drawInPerspective(direction);
- }
- },
-
- createLabelElement: function(){
- var label = document.createElement('div');
- label.id = Dom.generateId();
- label.style.position = 'absolute';
- label.style.top = this.getFooterOffset() + 'px';
- label.innerHTML = ' ';
- label.style.textAlign = 'center';
- label.style.width = this.containerWidth + 'px';
- label.style.zIndex = this.selectedImageZIndex + 10;
- label.className = CoverFlow.LABEL_CLASS;
- this.labelElement = this.element.appendChild(label);
- },
-
- showLabel: function(text){
- if(text)
- this.labelElement.innerHTML = text;
- else
- this.labelElement.innerHTML = '';
- },
-
- attachEventListeners: function(){
- new YAHOO.util.KeyListener(this.element, { keys:39 },
- { fn:this.selectNext,
- scope:this,
- correctScope:true } ).enable();
+ if(i==0){
+ coverFlowItem.setZIndex(this.selectedImageZIndex);
+ coverFlowItem.setLeft(this.getCenter() - coverFlowItem.element.width/2);
+ coverFlowItem.isSelected(true);
+ this.selectedItem = 0;
+ this.showLabel(coverFlowItem.getLabel());
+ }else{
+ angle = this.perspectiveAngle;
+ direction = CoverFlow.LEFT;
+ coverFlowItem.setZIndex(this.imageZIndex - i);
+ coverFlowItem.setLeft( this.getRightStart()+ (i - 1)* CoverFlow.IMAGE_SEPARATION);
+ coverFlowItem.isSelected(false);
+ }
+ coverFlowItem.setAngle(angle);
+ coverFlowItem.drawInPerspective(direction);
+ }
+ },
+
+ createLabelElement: function(){
+ var label = document.createElement('div');
+ label.id = Dom.generateId();
+ label.style.position = 'absolute';
+ label.style.top = this.getFooterOffset() + 'px';
+ label.innerHTML = ' ';
+ label.style.textAlign = 'center';
+ label.style.width = this.containerWidth + 'px';
+ label.style.zIndex = this.selectedImageZIndex + 10;
+ label.className = CoverFlow.LABEL_CLASS;
+ this.labelElement = this.element.appendChild(label);
+ },
+
+ showLabel: function(text){
+ if(text)
+ this.labelElement.innerHTML = text;
+ else
+ this.labelElement.innerHTML = '';
+ },
+
+ attachEventListeners: function(){
+ new YAHOO.util.KeyListener(this.element, {
+ keys:39
+ },
+{
+ fn:this.selectNext,
+ scope:this,
+ correctScope:true
+ } ).enable();
- new YAHOO.util.KeyListener(this.element, { keys:37 },
- { fn:this.selectPrevious,
- scope:this,
- correctScope:true } ).enable();
+ new YAHOO.util.KeyListener(this.element, {
+ keys:37
+ },
+{
+ fn:this.selectPrevious,
+ scope:this,
+ correctScope:true
+ } ).enable();
- },
-
- select: function(e,coverFlowItem){
- var distance = this.selectedItem - coverFlowItem.index;
- if(distance < 0){
- for(var i=0; i < -distance; i++)
- this.selectNext();
- }else{
- for(var i=0; i < distance; i++)
- this.selectPrevious();
- }
- },
-
-
- selectNext: function(){
- if(this.animationWorking){
- this.moveQueue.push('moveLeft');
- return;
- }
+ },
+
+ select: function(e,coverFlowItem){
+ var distance = this.selectedItem - coverFlowItem.index;
+ if(distance < 0){
+ for(var i=0; i < -distance; i++)
+ this.selectNext();
+ }else{
+ for(var i=0; i < distance; i++)
+ this.selectPrevious();
+ }
+ },
+
+
+ selectNext: function(){
+ if(this.animationWorking){
+ this.moveQueue.push('moveLeft');
+ return;
+ }
- var animateItems = [];
+ var animateItems = [];
- for(var i=0; i < this.coverFlowItems.length; i++){
- var coverFlowItem = this.coverFlowItems[i];
- var isLast = (this.selectedItem == this.coverFlowItems.length -1);
- if(!isLast){
- var distance = i-this.selectedItem;
+ for(var i=0; i < this.coverFlowItems.length; i++){
+ var coverFlowItem = this.coverFlowItems[i];
+ var isLast = (this.selectedItem == this.coverFlowItems.length -1);
+ if(!isLast){
+ var distance = i-this.selectedItem;
- if(distance == 0){// selected
- coverFlowItem.setZIndex(this.imageZIndex);
- coverFlowItem.isSelected(false);
- animateItems.push({item: coverFlowItem, attribute:{angle: {start: 0, end: this.perspectiveAngle} } });
+ if(distance == 0){// selected
+ coverFlowItem.setZIndex(this.imageZIndex);
+ coverFlowItem.isSelected(false);
+ animateItems.push({
+ item: coverFlowItem,
+ attribute:{
+ angle: {
+ start: 0,
+ end: this.perspectiveAngle
+ }
+ }
+ });
- coverFlowItem = this.coverFlowItems[++i];
- coverFlowItem.isSelected(true);
- this.showLabel(coverFlowItem.getLabel());
- animateItems.push({item: coverFlowItem, attribute:{angle: {start: this.perspectiveAngle, end: 0} } });
+ coverFlowItem = this.coverFlowItems[++i];
+ coverFlowItem.isSelected(true);
+ this.showLabel(coverFlowItem.getLabel());
+ animateItems.push({
+ item: coverFlowItem,
+ attribute:{
+ angle: {
+ start: this.perspectiveAngle,
+ end: 0
+ }
+ }
+ });
- }else{
- animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION} }});
- }
- }
- }
+ }else{
+ animateItems.push({
+ item: coverFlowItem,
+ attribute: {
+ left: {
+ start:coverFlowItem.getLeft(),
+ end: coverFlowItem.getLeft() - CoverFlow.IMAGE_SEPARATION
+ }
+ }
+ });
+}
+}
+}
- var animation = new CoverFlowAnimation({
- direction: CoverFlow.LEFT,
- center: this.getCenter(),
- startLeftPos: this.getLeftStart(),
- startRightPos: this.getRightStart()
- },
- animateItems, 0.5);
+var animation = new CoverFlowAnimation({
+ direction: CoverFlow.LEFT,
+ center: this.getCenter(),
+ startLeftPos: this.getLeftStart(),
+ startRightPos: this.getRightStart()
+},
+animateItems, 0.5);
- animation.onStart.subscribe(this.handleAnimationWorking, this);
- animation.onComplete.subscribe(this.handleQueuedMove, this);
+animation.onStart.subscribe(this.handleAnimationWorking, this);
+animation.onComplete.subscribe(this.handleQueuedMove, this);
- animation.animate();
+animation.animate();
- if(this.selectedItem + 1 < this.coverFlowItems.length)
- this.selectedItem++;
- },
+if(this.selectedItem + 1 < this.coverFlowItems.length)
+ this.selectedItem++;
+},
- selectPrevious: function(){
- if(this.animationWorking){
- this.moveQueue.push('moveRight');
- return;
- }
+selectPrevious: function(){
+ if(this.animationWorking){
+ this.moveQueue.push('moveRight');
+ return;
+ }
- var animateItems = [];
+ var animateItems = [];
- for(var i=0; i < this.coverFlowItems.length; i++){
- var coverFlowItem = this.coverFlowItems[i];
- var isFirst = (this.selectedItem == 0);
- var distance = i-this.selectedItem;
- if(!isFirst){
- if(distance == - 1){
- coverFlowItem.setZIndex(this.selectedImageZIndex);
- coverFlowItem.isSelected(true);
- this.showLabel(coverFlowItem.getLabel());
- animateItems.push({item: coverFlowItem, attribute: {angle: {start: this.perspectiveAngle, end: 0}}});
+ for(var i=0; i < this.coverFlowItems.length; i++){
+ var coverFlowItem = this.coverFlowItems[i];
+ var isFirst = (this.selectedItem == 0);
+ var distance = i-this.selectedItem;
+ if(!isFirst){
+ if(distance == - 1){
+ coverFlowItem.setZIndex(this.selectedImageZIndex);
+ coverFlowItem.isSelected(true);
+ this.showLabel(coverFlowItem.getLabel());
+ animateItems.push({
+ item: coverFlowItem,
+ attribute: {
+ angle: {
+ start: this.perspectiveAngle,
+ end: 0
+ }
+ }
+ });
- coverFlowItem = this.coverFlowItems[++i];
- coverFlowItem.isSelected(false);
- coverFlowItem.setZIndex(this.imageZIndex);
- animateItems.push({item: coverFlowItem, attribute: {angle: {start: 0, end: this.perspectiveAngle}}});
- }else{
- coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1);
- animateItems.push({item: coverFlowItem, attribute: {left: {start:coverFlowItem.getLeft(), end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION} }});
- }
- }
- }
- var animation = new CoverFlowAnimation({
- direction: CoverFlow.RIGHT,
- center: this.getCenter(),
- startLeftPos: this.getLeftStart(),
- startRightPos: this.getRightStart()
- },
- animateItems, 0.5);
+ coverFlowItem = this.coverFlowItems[++i];
+ coverFlowItem.isSelected(false);
+ coverFlowItem.setZIndex(this.imageZIndex);
+ animateItems.push({
+ item: coverFlowItem,
+ attribute: {
+ angle: {
+ start: 0,
+ end: this.perspectiveAngle
+ }
+ }
+ });
+}else{
+ coverFlowItem.setZIndex(coverFlowItem.getZIndex() - 1);
+ animateItems.push({
+ item: coverFlowItem,
+ attribute: {
+ left: {
+ start:coverFlowItem.getLeft(),
+ end: coverFlowItem.getLeft() + CoverFlow.IMAGE_SEPARATION
+ }
+ }
+ });
+}
+}
+}
+var animation = new CoverFlowAnimation({
+ direction: CoverFlow.RIGHT,
+ center: this.getCenter(),
+ startLeftPos: this.getLeftStart(),
+ startRightPos: this.getRightStart()
+},
+animateItems, 0.5);
- animation.onStart.subscribe(this.handleAnimationWorking, this);
- animation.onComplete.subscribe(this.handleQueuedMove, this);
+animation.onStart.subscribe(this.handleAnimationWorking, this);
+animation.onComplete.subscribe(this.handleQueuedMove, this);
- animation.animate();
+animation.animate();
- if(this.selectedItem > 0)
- this.selectedItem--;
- },
+if(this.selectedItem > 0)
+ this.selectedItem--;
+},
- handleAnimationWorking: function(a, b, cf){
- cf.animationWorking = true;
- },
+handleAnimationWorking: function(a, b, cf){
+ cf.animationWorking = true;
+},
- handleQueuedMove: function(msg, data, cf){
- cf.animationWorking = false;
+handleQueuedMove: function(msg, data, cf){
+ cf.animationWorking = false;
- var next = cf.moveQueue.pop();
- if(next == 'moveLeft')
- cf.selectNext();
- if(next == 'moveRight')
- cf.selectPrevious();
- },
-
- getCenter: function(){
- return this.containerWidth / 2;
- },
-
- getRightStart: function() {
- return this.containerWidth - this.sideRatio * this.containerWidth;
- },
-
- getLeftStart: function() {
- return this.sideRatio * this.containerWidth;
- },
-
- sortCoverFlowItems: function(){
- function sortFunction(aCoverFlowItem, bCoverFlowItem){
- return aCoverFlowItem.index - bCoverFlowItem.index;
- }
+ var next = cf.moveQueue.pop();
+ if(next == 'moveLeft')
+ cf.selectNext();
+ if(next == 'moveRight')
+ cf.selectPrevious();
+},
+
+getCenter: function(){
+ return this.containerWidth / 2;
+},
+
+getRightStart: function() {
+ return this.containerWidth - this.sideRatio * this.containerWidth;
+},
+
+getLeftStart: function() {
+ return this.sideRatio * this.containerWidth;
+},
+
+sortCoverFlowItems: function(){
+ function sortFunction(aCoverFlowItem, bCoverFlowItem){
+ return aCoverFlowItem.index - bCoverFlowItem.index;
+ }
- this.coverFlowItems.sort(sortFunction);
- },
-
- createCoverFlowItems: function(){
- this.coverFlowItems = [];
- for(var i=0; i this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
- height = ((image.height / this.getMaxImageHeight())) * image.height;
- }
- if(image.height <= this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
- height = ((image.width / this.getMaxImageWidth())) * image.height;
- }
- if(image.height > this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
- if(image.height > image.width)
- height = ((this.getMaxImageHeight() / image.height)) * image.height;
- else
- height = ((this.getMaxImageWidth() / image.width)) * image.height;
- }
- return height;
- },
+},
+
+scaleHeight: function(image){
+ var height = 0;
+ if(image.height <= this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
+ height = image.height;
+ }
+ if(image.height > this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
+ height = ((image.height / this.getMaxImageHeight())) * image.height;
+ }
+ if(image.height <= this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
+ height = ((image.width / this.getMaxImageWidth())) * image.height;
+ }
+ if(image.height > this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
+ if(image.height > image.width)
+ height = ((this.getMaxImageHeight() / image.height)) * image.height;
+ else
+ height = ((this.getMaxImageWidth() / image.width)) * image.height;
+ }
+ return height;
+},
- scaleWidth: function(image){
- var width = 0;
- if(image.height <= this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
- width = image.width;
- }
- if(image.height > this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
- width = ((image.height / this.getMaxImageHeight())) * image.width;
- }
- if(image.height <= this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
- width = ((image.width / this.getMaxImageWidth())) * image.width;
- }
- if(image.height > this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
- if(image.height > image.width)
- width = ((this.getMaxImageHeight() / image.height)) * image.width;
- else
- width = ((this.getMaxImageWidth() / image.width)) * image.width;
- }
- return width;
- },
-
-
- getMaxImageHeight: function(){
- return (this.containerHeight * this.imageHeightRatio);
- },
-
- getMaxImageWidth: function(){
- return (this.containerWidth * this.imageWidthRatio);
- },
-
- getTopOffset: function(){
- return this.containerHeight * this.topRatio;
- },
-
- getFooterOffset: function(){
- return this.containerHeight * (this.topRatio + this.imageHeightRatio);
- }
- };
+scaleWidth: function(image){
+ var width = 0;
+ if(image.height <= this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
+ width = image.width;
+ }
+ if(image.height > this.getMaxImageHeight() && image.width <= this.getMaxImageWidth()){
+ width = ((image.height / this.getMaxImageHeight())) * image.width;
+ }
+ if(image.height <= this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
+ width = ((image.width / this.getMaxImageWidth())) * image.width;
+ }
+ if(image.height > this.getMaxImageHeight() && image.width > this.getMaxImageWidth()){
+ if(image.height > image.width)
+ width = ((this.getMaxImageHeight() / image.height)) * image.width;
+ else
+ width = ((this.getMaxImageWidth() / image.width)) * image.width;
+ }
+ return width;
+},
+
+
+getMaxImageHeight: function(){
+ return (this.containerHeight * this.imageHeightRatio);
+},
+
+getMaxImageWidth: function(){
+ return (this.containerWidth * this.imageWidthRatio);
+},
+
+getTopOffset: function(){
+ return this.containerHeight * this.topRatio;
+},
+
+getFooterOffset: function(){
+ return this.containerHeight * (this.topRatio + this.imageHeightRatio);
+}
+};
- /**
+/**
* @class CoverFlowItem
*
*/
- CoverFlowItem = function(image, config){
- if(image)
- this.init(image, config);
- };
+CoverFlowItem = function(image, config){
+ if(image)
+ this.init(image, config);
+};
- CoverFlowItem.prototype = {
- canvas: null,
- element: null,
- index: null,
- id: null,
- angle: 0,
- selected: false,
- onclickFn: null,
- selectedOnclickFn: null,
- label: null,
-
- onSelected: null,
-
- init: function(image, config){
- var scaledWidth = config.scaledWidth;
- var scaledHeight = config.scaledHeight;
- var reflectionRatio = config.reflectionRatio;
- var bgColor = config.bgColor;
+CoverFlowItem.prototype = {
+ canvas: null,
+ element: null,
+ index: null,
+ id: null,
+ angle: 0,
+ selected: false,
+ onclickFn: null,
+ selectedOnclickFn: null,
+ label: null,
+
+ onSelected: null,
+
+ init: function(image, config){
+ var scaledWidth = config.scaledWidth;
+ var scaledHeight = config.scaledHeight;
+ var reflectionRatio = config.reflectionRatio;
+ var bgColor = config.bgColor;
- this.id = image.id;
- this.index = image.index;
- this.onclickFn = config.onclick;
- this.selectedOnclickFn = image.onclick;
- this.label = image.label;
- var parent = image.parentNode;
- this.canvas = this.createImageCanvas(image,scaledWidth,scaledHeight,reflectionRatio, bgColor);
- this.element = this.canvas.cloneNode(false);
- this.element.id = this.id;
- parent.replaceChild(this.element, image);
+ this.id = image.id;
+ this.index = image.index;
+ this.onclickFn = config.onclick;
+ this.selectedOnclickFn = image.onclick;
+ this.label = image.label;
+ var parent = image.parentNode;
+ this.canvas = this.createImageCanvas(image,scaledWidth,scaledHeight,reflectionRatio, bgColor);
+ this.element = this.canvas.cloneNode(false);
+ this.element.id = this.id;
+ parent.replaceChild(this.element, image);
- this.onSelected = new YAHOO.util.CustomEvent('onSelected', this);
- this.onSelected.subscribe(this.handleOnclick);
+ this.onSelected = new YAHOO.util.CustomEvent('onSelected', this);
+ this.onSelected.subscribe(this.handleOnclick);
- },
-
- getLabel: function(){
- return this.label;
- },
-
- handleOnclick: function(){
- YAHOO.util.Event.removeListener(this.element, 'click');
- if(!this.selected){
- YAHOO.util.Event.addListener(this.element, 'click', this.onclickFn.fn, this, this.onclickFn.scope);
- }else{
- if(this.selectedOnclickFn && this.selectedOnclickFn.fn)
- YAHOO.util.Event.addListener(this.element, 'click', this.selectedOnclickFn.fn, this, this.selectedOnclickFn.scope);
- else
- YAHOO.util.Event.addListener(this.element, 'click', this.selectedOnclickFn);
- }
- },
-
- isSelected: function(selected){
- this.selected = selected;
- this.onSelected.fire();
- },
-
- setAngle: function(angle){
- this.angle = angle;
- },
-
- getAngle: function(){
- return this.angle;
- },
-
- setTop: function(top){
- this.element.style.top = top + 'px';
- },
-
- setLeft: function(left){
- this.element.style.left = left + 'px';
- },
-
- getLeft: function(){
- var ret = this.element.style.left;
- return new Number(ret.replace("px", ""));
- },
-
- getZIndex: function(){
- return this.element.style.zIndex;
- },
-
- setZIndex: function(zIndex){
- this.element.style.zIndex = zIndex;
- },
-
- createImageCanvas: function(image, sWidth, sHeight, reflectionRatio, bgColor){
+ },
+
+ getLabel: function(){
+ return this.label;
+ },
+
+ handleOnclick: function(){
+ YAHOO.util.Event.removeListener(this.element, 'click');
+ if(!this.selected){
+ YAHOO.util.Event.addListener(this.element, 'click', this.onclickFn.fn, this, this.onclickFn.scope);
+ }else{
+ if(this.selectedOnclickFn && this.selectedOnclickFn.fn)
+ YAHOO.util.Event.addListener(this.element, 'click', this.selectedOnclickFn.fn, this, this.selectedOnclickFn.scope);
+ else
+ YAHOO.util.Event.addListener(this.element, 'click', this.selectedOnclickFn);
+ }
+ },
+
+ isSelected: function(selected){
+ this.selected = selected;
+ this.onSelected.fire();
+ },
+
+ setAngle: function(angle){
+ this.angle = angle;
+ },
+
+ getAngle: function(){
+ return this.angle;
+ },
+
+ setTop: function(top){
+ this.element.style.top = top + 'px';
+ },
+
+ setLeft: function(left){
+ this.element.style.left = left + 'px';
+ },
+
+ getLeft: function(){
+ var ret = this.element.style.left;
+ return new Number(ret.replace("px", ""));
+ },
+
+ getZIndex: function(){
+ return this.element.style.zIndex;
+ },
+
+ setZIndex: function(zIndex){
+ this.element.style.zIndex = zIndex;
+ },
+
+ createImageCanvas: function(image, sWidth, sHeight, reflectionRatio, bgColor){
- var imageCanvas = document.createElement('canvas');
+ var imageCanvas = document.createElement('canvas');
- if(imageCanvas.getContext){
+ if(imageCanvas.getContext){
- var scaledWidth = sWidth;
- var scaledHeight = sHeight;
- var reflectionHeight = scaledHeight * reflectionRatio;
+ var scaledWidth = sWidth;
+ var scaledHeight = sHeight;
+ var reflectionHeight = scaledHeight * reflectionRatio;
- imageCanvas.height = scaledHeight + reflectionHeight;
- imageCanvas.width = scaledWidth;
+ imageCanvas.height = scaledHeight + reflectionHeight;
+ imageCanvas.width = scaledWidth;
- var ctx = imageCanvas.getContext('2d');
+ var ctx = imageCanvas.getContext('2d');
- ctx.clearRect(0, 0, imageCanvas.width, imageCanvas.height);
- ctx.globalCompositeOperation = 'source-over';
- ctx.fillStyle = 'rgba(0, 0, 0, 1)';
- ctx.fillRect(0, 0, imageCanvas.width, imageCanvas.height);
+ ctx.clearRect(0, 0, imageCanvas.width, imageCanvas.height);
+ ctx.globalCompositeOperation = 'source-over';
+ ctx.fillStyle = 'rgba(0, 0, 0, 1)';
+ ctx.fillRect(0, 0, imageCanvas.width, imageCanvas.height);
- //draw the reflection image
- ctx.save();
- ctx.translate(0, (2*scaledHeight));
- ctx.scale(1, -1);
- ctx.drawImage(image, 0, 0, scaledWidth, scaledHeight);
- ctx.restore();
- //create the gradient effect
- ctx.save();
- ctx.translate(0, scaledHeight);
- ctx.globalCompositeOperation = 'destination-out';
- var grad = ctx.createLinearGradient( 0, 0, 0, scaledHeight);
- grad.addColorStop(1, 'rgba(0, 0, 0, 1)');
- grad.addColorStop(0, 'rgba(0, 0, 0, 0.75)');
- ctx.fillStyle = grad;
- ctx.fillRect(0, 0, scaledWidth, scaledHeight);
- //apply the background color to the gradient
- ctx.globalCompositeOperation = 'destination-over';
- ctx.fillStyle = bgColor; '#000';
- ctx.globalAlpha = 0.8;
- ctx.fillRect(0, 0 , scaledWidth, scaledHeight);
- ctx.restore();
- //draw the image
- ctx.save();
- ctx.translate(0, 0);
- ctx.globalCompositeOperation = 'source-over';
- ctx.drawImage(image, 0, 0, scaledWidth, scaledHeight);
- ctx.restore();
+ //draw the reflection image
+ ctx.save();
+ ctx.translate(0, (2*scaledHeight));
+ ctx.scale(1, -1);
+ ctx.drawImage(image, 0, 0, scaledWidth, scaledHeight);
+ ctx.restore();
+ //create the gradient effect
+ ctx.save();
+ ctx.translate(0, scaledHeight);
+ ctx.globalCompositeOperation = 'destination-out';
+ var grad = ctx.createLinearGradient( 0, 0, 0, scaledHeight);
+ grad.addColorStop(1, 'rgba(0, 0, 0, 1)');
+ grad.addColorStop(0, 'rgba(0, 0, 0, 0.75)');
+ ctx.fillStyle = grad;
+ ctx.fillRect(0, 0, scaledWidth, scaledHeight);
+ //apply the background color to the gradient
+ ctx.globalCompositeOperation = 'destination-over';
+ ctx.fillStyle = bgColor;
+ '#000';
+ ctx.globalAlpha = 0.8;
+ ctx.fillRect(0, 0 , scaledWidth, scaledHeight);
+ ctx.restore();
+ //draw the image
+ ctx.save();
+ ctx.translate(0, 0);
+ ctx.globalCompositeOperation = 'source-over';
+ ctx.drawImage(image, 0, 0, scaledWidth, scaledHeight);
+ ctx.restore();
- return imageCanvas;
- }
- },
-
- drawInPerspective: function(direction, frameSize){
- var canvas = this.element;
- var image = this.canvas;
- var angle = Math.ceil(this.angle);
- var ctx;
- var originalWidth = image.width;
- var originalHeight = image.height;
- var destinationWidth = destinationWidth || originalWidth; // for future use
- var destinationHeight = destinationHeight || originalHeight; // for future use
+ return imageCanvas;
+ }
+ },
+
+ drawInPerspective: function(direction, frameSize){
+ var canvas = this.element;
+ var image = this.canvas;
+ var angle = Math.ceil(this.angle);
+ var ctx;
+ var originalWidth = image.width;
+ var originalHeight = image.height;
+ var destinationWidth = destinationWidth || originalWidth; // for future use
+ var destinationHeight = destinationHeight || originalHeight; // for future use
- var perspectiveCanvas = document.createElement('canvas');
- perspectiveCanvas.height = destinationHeight;
- perspectiveCanvas.width = destinationWidth;
- var perspectiveCtx = perspectiveCanvas.getContext('2d');
+ var perspectiveCanvas = document.createElement('canvas');
+ perspectiveCanvas.height = destinationHeight;
+ perspectiveCanvas.width = destinationWidth;
+ var perspectiveCtx = perspectiveCanvas.getContext('2d');
- var alpha = angle * Math.PI/180; // Math uses radian
+ var alpha = angle * Math.PI/180; // Math uses radian
- if(alpha > 0){ // if we have an angle greater than 0 then apply the perspective
- var right = (direction == CoverFlow.RIGHT);
+ if(alpha > 0){ // if we have an angle greater than 0 then apply the perspective
+ var right = (direction == CoverFlow.RIGHT);
- var initialX=0, finalX=0, initialY=0, finalY=0;
+ var initialX=0, finalX=0, initialY=0, finalY=0;
- frameSize = frameSize || 1;
- var xDes, yDes;
- var heightDes, widthDes;
- var perspectiveWidht = destinationWidth;
+ frameSize = frameSize || 1;
+ var xDes, yDes;
+ var heightDes, widthDes;
+ var perspectiveWidht = destinationWidth;
- var frameFactor = frameSize / originalWidth;
- var frames = Math.floor(originalWidth / frameSize);
+ var frameFactor = frameSize / originalWidth;
+ var frames = Math.floor(originalWidth / frameSize);
- var widthSrc = frameSize ;
- var heightSrc = originalHeight;
+ var widthSrc = frameSize ;
+ var heightSrc = originalHeight;
- for(var i=0; i < frames; i++){
- var xSrc = (i) * frameSize;
- var ySrc = 0;
- var betaTan = 0;
- width = destinationWidth * (i) * frameFactor;
- horizon = destinationHeight / 2;
+ for(var i=0; i < frames; i++){
+ var xSrc = (i) * frameSize;
+ var ySrc = 0;
+ var betaTan = 0;
+ width = destinationWidth * (i) * frameFactor;
+ horizon = destinationHeight / 2;
- if(right){
- betaTan = horizon/((Math.tan(alpha)*horizon) + width);
- xDes = (betaTan*width)/(Math.tan(alpha) + betaTan);
- yDes = Math.tan(alpha) * xDes;
+ if(right){
+ betaTan = horizon/((Math.tan(alpha)*horizon) + width);
+ xDes = (betaTan*width)/(Math.tan(alpha) + betaTan);
+ yDes = Math.tan(alpha) * xDes;
- if(i == frames -1){
- finalX=xDes;
- finalY=yDes;
- }
- }else{
- betaTan = horizon/((Math.tan(alpha)*horizon) +(destinationWidth-width));
- xDes = (Math.tan(alpha)*(destinationWidth) + (betaTan * width))/(Math.tan(alpha) + betaTan);
- yDes = -Math.tan(alpha)*xDes + (Math.tan(alpha)*(destinationWidth));
+ if(i == frames -1){
+ finalX=xDes;
+ finalY=yDes;
+ }
+ }else{
+ betaTan = horizon/((Math.tan(alpha)*horizon) +(destinationWidth-width));
+ xDes = (Math.tan(alpha)*(destinationWidth) + (betaTan * width))/(Math.tan(alpha) + betaTan);
+ yDes = -Math.tan(alpha)*xDes + (Math.tan(alpha)*(destinationWidth));
- if(i == 0){
- initialX = xDes;
- initialY = yDes;
- finalX = destinationWidth;
- finalY = 0;
- }
- }
+ if(i == 0){
+ initialX = xDes;
+ initialY = yDes;
+ finalX = destinationWidth;
+ finalY = 0;
+ }
+ }
- heightDes = destinationHeight - (2*yDes);
- widthDes = heightDes / destinationHeight * destinationWidth;
+ heightDes = destinationHeight - (2*yDes);
+ widthDes = heightDes / destinationHeight * destinationWidth;
- perspectiveCtx.drawImage(image, xSrc, ySrc, widthSrc, heightSrc, xDes, yDes, widthDes, heightDes);
+ perspectiveCtx.drawImage(image, xSrc, ySrc, widthSrc, heightSrc, xDes, yDes, widthDes, heightDes);
- }
+ }
- perspectiveWidth = finalX - initialX;
- originalCanvasWidth = destinationWidth;
- canvas.width = perspectiveWidth;
+ perspectiveWidth = finalX - initialX;
+ originalCanvasWidth = destinationWidth;
+ canvas.width = perspectiveWidth;
- ctx = canvas.getContext('2d');
+ ctx = canvas.getContext('2d');
- //remove exceeded pixels
- ctx.beginPath();
- if(right){
- ctx.moveTo(0, 0);
- ctx.lineTo(finalX, finalY);
- ctx.lineTo(finalX, finalY + (destinationHeight - 2*finalY));
- ctx.lineTo(0, destinationHeight);
- ctx.lineTo(0,0);
- }else{
- var initialX1 = initialX - (originalCanvasWidth - perspectiveWidth);
- var finalX1 = finalX - (originalCanvasWidth - perspectiveWidth);
- ctx.moveTo(0, initialY);
- ctx.lineTo(finalX1, finalY);
- ctx.lineTo(finalX1, destinationHeight);
- ctx.lineTo(initialX1, initialY + (destinationHeight - 2*initialY));
- ctx.lineTo(0, initialY);
- }
- ctx.closePath();
- ctx.clip();
+ //remove exceeded pixels
+ ctx.beginPath();
+ if(right){
+ ctx.moveTo(0, 0);
+ ctx.lineTo(finalX, finalY);
+ ctx.lineTo(finalX, finalY + (destinationHeight - 2*finalY));
+ ctx.lineTo(0, destinationHeight);
+ ctx.lineTo(0,0);
+ }else{
+ var initialX1 = initialX - (originalCanvasWidth - perspectiveWidth);
+ var finalX1 = finalX - (originalCanvasWidth - perspectiveWidth);
+ ctx.moveTo(0, initialY);
+ ctx.lineTo(finalX1, finalY);
+ ctx.lineTo(finalX1, destinationHeight);
+ ctx.lineTo(initialX1, initialY + (destinationHeight - 2*initialY));
+ ctx.lineTo(0, initialY);
+ }
+ ctx.closePath();
+ ctx.clip();
- ctx.drawImage(perspectiveCanvas, initialX, 0, perspectiveWidth, destinationHeight, 0, 0, perspectiveWidth, destinationHeight);
+ ctx.drawImage(perspectiveCanvas, initialX, 0, perspectiveWidth, destinationHeight, 0, 0, perspectiveWidth, destinationHeight);
- }else{
+ }else{
- canvas.width = perspectiveCanvas.width;
- canvas.height = perspectiveCanvas.height;
- perspectiveCtx.drawImage(image, 0, 0, originalWidth, originalHeight, 0, 0, destinationWidth, destinationHeight);
- ctx = canvas.getContext('2d');
- ctx.clearRect(0, 0, canvas.width, canvas.height);
- ctx.drawImage(perspectiveCanvas, 0, 0);
- }
- }
-
- };
+ canvas.width = perspectiveCanvas.width;
+ canvas.height = perspectiveCanvas.height;
+ perspectiveCtx.drawImage(image, 0, 0, originalWidth, originalHeight, 0, 0, destinationWidth, destinationHeight);
+ ctx = canvas.getContext('2d');
+ ctx.clearRect(0, 0, canvas.width, canvas.height);
+ ctx.drawImage(perspectiveCanvas, 0, 0);
+ }
+ }
+
+};
- /**
+/**
* @class CoverFlowAnimation
* @requires YAHOO.util.AnimMgr
*/
- CoverFlowAnimation = function(config, animationItems, duration){
- this.init(config, animationItems, duration);
- };
+CoverFlowAnimation = function(config, animationItems, duration){
+ this.init(config, animationItems, duration);
+};
- CoverFlowAnimation.prototype = {
- direction: null,
+CoverFlowAnimation.prototype = {
+ direction: null,
- center: null,
+ center: null,
- startLeftPos: null,
+ startLeftPos: null,
- startRightPos: null,
+ startRightPos: null,
- animationItems: null,
+ animationItems: null,
- method : YAHOO.util.Easing.easeNone,
+ method : YAHOO.util.Easing.easeNone,
- animated: false,
+ animated: false,
- startTime: null,
+ startTime: null,
- actualFrames : 0,
+ actualFrames : 0,
- useSeconds : true, // default to seconds
+ useSeconds : true, // default to seconds
- currentFrame : 0,
+ currentFrame : 0,
- totalFrames : YAHOO.util.AnimMgr.fps,
+ totalFrames : YAHOO.util.AnimMgr.fps,
- init: function(config, animationItems, duration){
- this.direction = config.direction;
- this.center = config.center;
- this.startLeftPos = config.startLeftPos;
- this.startRightPos = config.startRightPos;
- this.animationItems = animationItems;
- this.duration = duration || 1;
- this.registerEvents();
- },
-
- registerEvents: function(){
- /**
+ init: function(config, animationItems, duration){
+ this.direction = config.direction;
+ this.center = config.center;
+ this.startLeftPos = config.startLeftPos;
+ this.startRightPos = config.startRightPos;
+ this.animationItems = animationItems;
+ this.duration = duration || 1;
+ this.registerEvents();
+ },
+
+ registerEvents: function(){
+ /**
* Custom event that fires after onStart, useful in subclassing
* @private
*/
- this._onStart = new YAHOO.util.CustomEvent('_start', this, true);
+ this._onStart = new YAHOO.util.CustomEvent('_start', this, true);
- /**
+ /**
* Custom event that fires when animation begins
* Listen via subscribe method (e.g. myAnim.onStart.subscribe(someFunction)
* @event onStart
*/
- this.onStart = new YAHOO.util.CustomEvent('start', this);
+ this.onStart = new YAHOO.util.CustomEvent('start', this);
- /**
+ /**
* Custom event that fires between each frame
* Listen via subscribe method (e.g. myAnim.onTween.subscribe(someFunction)
* @event onTween
*/
- this.onTween = new YAHOO.util.CustomEvent('tween', this);
+ this.onTween = new YAHOO.util.CustomEvent('tween', this);
- /**
+ /**
* Custom event that fires after onTween
* @private
*/
- this._onTween = new YAHOO.util.CustomEvent('_tween', this, true);
+ this._onTween = new YAHOO.util.CustomEvent('_tween', this, true);
- /**
+ /**
* Custom event that fires when animation ends
* Listen via subscribe method (e.g. myAnim.onComplete.subscribe(someFunction)
* @event onComplete
*/
- this.onComplete = new YAHOO.util.CustomEvent('complete', this);
- /**
+ this.onComplete = new YAHOO.util.CustomEvent('complete', this);
+ /**
* Custom event that fires after onComplete
* @private
*/
- this._onComplete = new YAHOO.util.CustomEvent('_complete', this, true);
+ this._onComplete = new YAHOO.util.CustomEvent('_complete', this, true);
- this._onStart.subscribe(this.doOnStart);
- this._onTween.subscribe(this.doOnTween);
- this._onComplete.subscribe(this.doOnComplete);
+ this._onStart.subscribe(this.doOnStart);
+ this._onTween.subscribe(this.doOnTween);
+ this._onComplete.subscribe(this.doOnComplete);
- },
+ },
- isAnimated : function() {
- return this.animated;
- },
+ isAnimated : function() {
+ return this.animated;
+ },
- getStartTime : function() {
- return this.startTime;
- },
+ getStartTime : function() {
+ return this.startTime;
+ },
- doMethod: function(start, end) {
- return this.method(this.currentFrame, start, end - start, this.totalFrames);
- },
+ doMethod: function(start, end) {
+ return this.method(this.currentFrame, start, end - start, this.totalFrames);
+ },
- animate : function() {
- if ( this.isAnimated() ) {
- return false;
- }
+ animate : function() {
+ if ( this.isAnimated() ) {
+ return false;
+ }
- this.currentFrame = 0;
+ this.currentFrame = 0;
- this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration;
+ this.totalFrames = ( this.useSeconds ) ? Math.ceil(YAHOO.util.AnimMgr.fps * this.duration) : this.duration;
- if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration
- this.totalFrames = 1;
- }
- YAHOO.util.AnimMgr.registerElement(this);
- return true;
- },
+ if (this.duration === 0 && this.useSeconds) { // jump to last frame if zero second duration
+ this.totalFrames = 1;
+ }
+ YAHOO.util.AnimMgr.registerElement(this);
+ return true;
+ },
- stop : function(finish) {
- if (!this.isAnimated()) { // nothing to stop
- return false;
- }
+ stop : function(finish) {
+ if (!this.isAnimated()) { // nothing to stop
+ return false;
+ }
- if (finish) {
- this.currentFrame = this.totalFrames;
- this._onTween.fire();
- }
- YAHOO.util.AnimMgr.stop(this);
- },
+ if (finish) {
+ this.currentFrame = this.totalFrames;
+ this._onTween.fire();
+ }
+ YAHOO.util.AnimMgr.stop(this);
+ },
- doOnStart : function() {
- this.onStart.fire();
+ doOnStart : function() {
+ this.onStart.fire();
- this.runtimeItems = [];
- for (var i=0; i 0){
- runtimeItem.attribute[attr].perspectiveDirection = this.direction;
- runtimeItem.attribute[attr].center = true;
- }else{
- runtimeItem.attribute[attr].perspectiveDirection = this.direction == CoverFlow.RIGHT ? CoverFlow.LEFT : CoverFlow.RIGHT;
- runtimeItem.attribute[attr].center = false;
- }
- }
- }
- this.runtimeItems.push(runtimeItem);
- },
+ setRuntimeItem: function(item){
+ var runtimeItem = {};
+ runtimeItem.item = item.item;
+ runtimeItem.attribute = {};
+ for(var attr in item.attribute){
+ runtimeItem.attribute[attr] = item.attribute[attr];
+ if(attr == 'angle'){
+ if(item.attribute[attr].start - item.attribute[attr].end > 0){
+ runtimeItem.attribute[attr].perspectiveDirection = this.direction;
+ runtimeItem.attribute[attr].center = true;
+ }else{
+ runtimeItem.attribute[attr].perspectiveDirection = this.direction == CoverFlow.RIGHT ? CoverFlow.LEFT : CoverFlow.RIGHT;
+ runtimeItem.attribute[attr].center = false;
+ }
+ }
+ }
+ this.runtimeItems.push(runtimeItem);
+ },
- setItemAttributes: function(item){
+ setItemAttributes: function(item){
- for(var attr in item.attribute){
+ for(var attr in item.attribute){
- var value = Math.ceil(this.doMethod(item.attribute[attr].start, item.attribute[attr].end));
+ var value = Math.ceil(this.doMethod(item.attribute[attr].start, item.attribute[attr].end));
- if(attr == 'angle'){
- item.item.setAngle(value);
- var frameSize = Math.ceil(this.doMethod(3, 1));
- item.item.drawInPerspective(item.attribute[attr].perspectiveDirection, frameSize);
- var left;
- if(item.attribute[attr].center){
- left = this.doMethod(item.item.getLeft(), this.center - item.item.element.width/2);
- }else{
- if(this.direction == CoverFlow.LEFT)
- left = this.doMethod(item.item.getLeft(), this.startLeftPos - item.item.element.width);
- else
- left = this.doMethod(item.item.getLeft(), this.startRightPos);
- }
- item.item.setLeft(Math.ceil(left));
+ if(attr == 'angle'){
+ item.item.setAngle(value);
+ var frameSize = Math.ceil(this.doMethod(3, 1));
+ item.item.drawInPerspective(item.attribute[attr].perspectiveDirection, frameSize);
+ var left;
+ if(item.attribute[attr].center){
+ left = this.doMethod(item.item.getLeft(), this.center - item.item.element.width/2);
+ }else{
+ if(this.direction == CoverFlow.LEFT)
+ left = this.doMethod(item.item.getLeft(), this.startLeftPos - item.item.element.width);
+ else
+ left = this.doMethod(item.item.getLeft(), this.startRightPos);
+ }
+ item.item.setLeft(Math.ceil(left));
- }else{
- item.item.setLeft(value);
- }
- }
+ }else{
+ item.item.setLeft(value);
+ }
}
- };
+ }
+};
//});
\ No newline at end of file
diff --git a/collection_views/yui_coverflow/js/test.js b/collection_views/yui_coverflow/js/test.js
index 7ba4d637..e200d949 100644
--- a/collection_views/yui_coverflow/js/test.js
+++ b/collection_views/yui_coverflow/js/test.js
@@ -3,34 +3,83 @@
YAHOO.util.Event.onDOMReady(function(){
- var images = [
- {src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
- {src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'},
- {src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
- {src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'},
- {src: 'images/msn2.jpg', label: 'My Mac'},
- {src: 'images/msn2.jpg', label: 'My Mac again...'}
+ var images = [
+ {
+ src: 'images/ardillitaMac.jpg',
+ label: 'Ardileta!',
+ onclick: function(){
+ alert('image1');
+ }
+ },
+{
+ src: 'http://farm2.static.flickr.com/1380/1426855399_b4b8eccbdb.jpg?v=0'
+},
+{
+ src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
+},
+{
+ src: 'http://farm1.static.flickr.com/69/213130158_0d1aa23576_d.jpg'
+},
+{
+ src: 'images/msn2.jpg',
+ label: 'My Mac'
+},
+{
+ src: 'images/msn2.jpg',
+ label: 'My Mac again...'
+}
- ];
- var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {height: 200, width: 600, images: images});
-
- function moveLeft(e, coverFlow){
- coverFlow.selectNext();
- }
- function moveRight(e, coverFlow){
- coverFlow.selectPrevious();
- }
- var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {onclick: {fn: moveLeft, obj: myCoverFlow}});
- var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {onclick: {fn: moveRight, obj: myCoverFlow}});
+];
+var myCoverFlow = new YAHOO.ext.CoverFlow('coverFlowTest', {
+ height: 200,
+ width: 600,
+ images: images
+});
+
+function moveLeft(e, coverFlow){
+ coverFlow.selectNext();
+}
+function moveRight(e, coverFlow){
+ coverFlow.selectPrevious();
+}
+var myMoveLeftBtn = new YAHOO.widget.Button('moveLeftButton', {
+ onclick: {
+ fn: moveLeft,
+ obj: myCoverFlow
+ }
+});
+var myMoveRightBtn = new YAHOO.widget.Button('moveRightButton', {
+ onclick: {
+ fn: moveRight,
+ obj: myCoverFlow
+ }
+});
- var otherImages = [
- {src: 'images/ardillitaMac.jpg', label: 'Ardileta!', onclick: function(){alert('image1');}},
- {src: 'images/msn2.jpg', label: 'My Mac'},
- {src: 'images/msn2.jpg', label: 'My Mac again...'}
+var otherImages = [
+{
+ src: 'images/ardillitaMac.jpg',
+ label: 'Ardileta!',
+ onclick: function(){
+ alert('image1');
+ }
+},
+{
+ src: 'images/msn2.jpg',
+ label: 'My Mac'
+},
+{
+ src: 'images/msn2.jpg',
+ label: 'My Mac again...'
+}
- ];
- var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {height: 150, width: 500, images: otherImages, bgColor: '#C0C0C0'});
+];
+var anotherCoverFlow = new YAHOO.ext.CoverFlow('anotherCoverFlowTest', {
+ height: 150,
+ width: 500,
+ images: otherImages,
+ bgColor: '#C0C0C0'
+});
diff --git a/content_models/BASIC_AUDIO.xml b/content_models/BASIC_AUDIO.xml
index e3030f9f..21dc668c 100644
--- a/content_models/BASIC_AUDIO.xml
+++ b/content_models/BASIC_AUDIO.xml
@@ -1,8 +1,8 @@
-
- video/quicktime
-
+
+ video/quicktime
+
@@ -28,15 +28,15 @@
-
+
plugins/QtFormBuilder.php
QtFormBuilder
buildQDCForm
handleQDCForm
-
-
+
+
Title/Caption/Video Name
dc:title
@@ -215,4 +215,4 @@
-
+
diff --git a/content_models/BASIC_VIDEO.xml b/content_models/BASIC_VIDEO.xml
index e3030f9f..21dc668c 100644
--- a/content_models/BASIC_VIDEO.xml
+++ b/content_models/BASIC_VIDEO.xml
@@ -1,8 +1,8 @@
-
- video/quicktime
-
+
+ video/quicktime
+
@@ -28,15 +28,15 @@
-
+
plugins/QtFormBuilder.php
QtFormBuilder
buildQDCForm
handleQDCForm
-
-
+
+
Title/Caption/Video Name
dc:title
@@ -215,4 +215,4 @@
-
+
diff --git a/content_models/COLLECTIONCM.xml b/content_models/COLLECTIONCM.xml
index d20711c9..91d6f8f9 100644
--- a/content_models/COLLECTIONCM.xml
+++ b/content_models/COLLECTIONCM.xml
@@ -1,88 +1,89 @@
+
-
- text/xml
- text/plain
- application/xml
-
-
-
-
-
-
-
-
-
-
-
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
- - none
- - Multi Media
- - image
- - meeting
- - presentation
- - sound
- - text
-
-
-
- Examples include an abstract, table of contents, or free-text account of the content of the resource.
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
- - none
- - collection
- - dataset
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
+
+ text/xml
+ text/plain
+ application/xml
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+ - none
+ - Multi Media
+ - image
+ - meeting
+ - presentation
+ - sound
+ - text
+
+
+
+ Examples include an abstract, table of contents, or free-text account of the content of the resource.
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+ - none
+ - collection
+ - dataset
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
diff --git a/content_models/FAS_slideCModel.xml b/content_models/FAS_slideCModel.xml
index 5d37ba49..aa4e5b4a 100644
--- a/content_models/FAS_slideCModel.xml
+++ b/content_models/FAS_slideCModel.xml
@@ -1,166 +1,167 @@
+
-
- image/tiff
- image/tif
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
-
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
+
image/tiff
-
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
+
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
diff --git a/content_models/REFWORKSCM.xml b/content_models/REFWORKSCM.xml
index 6948278c..ecab1543 100644
--- a/content_models/REFWORKSCM.xml
+++ b/content_models/REFWORKSCM.xml
@@ -7,14 +7,14 @@
ShowStreamsInFieldSets
showQdc
-
-
-
- plugins/ShowStreamsInFieldSets.inc
- ShowStreamsInFieldSets
- showRefworks
-
-
+
+
+
+ plugins/ShowStreamsInFieldSets.inc
+ ShowStreamsInFieldSets
+ showRefworks
+
+
plugins/ShowStreamsInFieldSets.inc
@@ -29,10 +29,10 @@
-
+
text/xml
- text/plain
- application/xml
+ text/plain
+ application/xml
@@ -59,8 +59,8 @@
buildForm
handleForm
-
-
+
+
Ingest
hiddenvalue
diff --git a/content_models/REFWORKSCM_1.xml b/content_models/REFWORKSCM_1.xml
index 6948278c..ecab1543 100644
--- a/content_models/REFWORKSCM_1.xml
+++ b/content_models/REFWORKSCM_1.xml
@@ -7,14 +7,14 @@
ShowStreamsInFieldSets
showQdc
-
-
-
- plugins/ShowStreamsInFieldSets.inc
- ShowStreamsInFieldSets
- showRefworks
-
-
+
+
+
+ plugins/ShowStreamsInFieldSets.inc
+ ShowStreamsInFieldSets
+ showRefworks
+
+
plugins/ShowStreamsInFieldSets.inc
@@ -29,10 +29,10 @@
-
+
text/xml
- text/plain
- application/xml
+ text/plain
+ application/xml
@@ -59,8 +59,8 @@
buildForm
handleForm
-
-
+
+
Ingest
hiddenvalue
diff --git a/content_models/STANDARD JPG.xml b/content_models/STANDARD JPG.xml
index 911b1f91..fd3f49ec 100644
--- a/content_models/STANDARD JPG.xml
+++ b/content_models/STANDARD JPG.xml
@@ -1,95 +1,95 @@
-
- image/jpeg
-
-
-
- image/jpeg
-
-
-
- 160
- 120
-
-
-
-
- 120
- 120
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 120
- 160
-
-
-
-
-
-
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- Subject
-
- - image
- - photograph
- - presentation
- - art
-
-
-
- Description of the Image
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
+
+ image/jpeg
+
+
+
+ image/jpeg
+
+
+
+ 160
+ 120
+
+
+
+
+ 120
+ 120
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 120
+ 160
+
+
+
+
+
+
+
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ Subject
+
+ - image
+ - photograph
+ - presentation
+ - art
+
+
+
+ Description of the Image
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
\ No newline at end of file
diff --git a/content_models/STANDARD PDF.xml b/content_models/STANDARD PDF.xml
index 2880bc10..0d1b5ec4 100644
--- a/content_models/STANDARD PDF.xml
+++ b/content_models/STANDARD PDF.xml
@@ -1,14 +1,14 @@
-
+
application/pdf
-
+
application/pdf
-
+
plugins/ImageManipulation.inc
ImageManipulation
@@ -32,7 +32,7 @@
- a868aef684fa34923d4fe697db1e785b
+ a868aef684fa34923d4fe697db1e785b
plugins/FormBuilder.inc
@@ -40,8 +40,8 @@
buildQDCForm
handleQDCForm
-
-
+
+
Title/Caption/Object Name
dc:title
@@ -233,4 +233,4 @@
-
+
diff --git a/content_models/STANDARD_FLVCM.xml b/content_models/STANDARD_FLVCM.xml
index 75a691b5..6089f8a1 100644
--- a/content_models/STANDARD_FLVCM.xml
+++ b/content_models/STANDARD_FLVCM.xml
@@ -1,8 +1,8 @@
-
- video/x-flv
-
+
+ video/x-flv
+
@@ -28,15 +28,15 @@
-
+
plugins/FlvFormBuilder.inc
FlvFormBuilder
buildQDCForm
handleQDCForm
-
-
+
+
Title/Caption/Video Name
dc:title
@@ -215,4 +215,4 @@
-
+
diff --git a/content_models/STANDARD_IMAGECM.xml b/content_models/STANDARD_IMAGECM.xml
index 635b745c..9d48ebc0 100644
--- a/content_models/STANDARD_IMAGECM.xml
+++ b/content_models/STANDARD_IMAGECM.xml
@@ -1,11 +1,11 @@
-
+
image/jpeg
image/gif
image/png
- image/tiff
- image/tif
+ image/tiff
+ image/tif
@@ -29,7 +29,7 @@
plugins/ImageManipulation.inc
ImageManipulation
- createThumbnail
+ createThumbnail
jpg
TN
@@ -43,7 +43,7 @@
createPNG
png
PNG
-
+
plugins/ImageManipulation.inc
ImageManipulation
@@ -67,7 +67,7 @@
- a868aef684fa34923d4fe697db1e785b
+ a868aef684fa34923d4fe697db1e785b
plugins/FormBuilder.inc
@@ -75,8 +75,8 @@
buildQDCForm
handleQDCForm
-
-
+
+
Title/Caption/Object Name
dc:title
@@ -268,4 +268,4 @@
-
+
diff --git a/content_models/STANDARD_JPG.xml b/content_models/STANDARD_JPG.xml
index 911b1f91..fd3f49ec 100644
--- a/content_models/STANDARD_JPG.xml
+++ b/content_models/STANDARD_JPG.xml
@@ -1,95 +1,95 @@
-
- image/jpeg
-
-
-
- image/jpeg
-
-
-
- 160
- 120
-
-
-
-
- 120
- 120
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- 120
- 160
-
-
-
-
-
-
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- Subject
-
- - image
- - photograph
- - presentation
- - art
-
-
-
- Description of the Image
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
+
+ image/jpeg
+
+
+
+ image/jpeg
+
+
+
+ 160
+ 120
+
+
+
+
+ 120
+ 120
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ 120
+ 160
+
+
+
+
+
+
+
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ Subject
+
+ - image
+ - photograph
+ - presentation
+ - art
+
+
+
+ Description of the Image
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
\ No newline at end of file
diff --git a/content_models/STANDARD_QT.xml b/content_models/STANDARD_QT.xml
index 5d95e27b..39a16543 100644
--- a/content_models/STANDARD_QT.xml
+++ b/content_models/STANDARD_QT.xml
@@ -1,137 +1,148 @@
-
- video/quicktime
- video/mp4
+
+ video/quicktime
+ video/mp4
- audio/mp3
- audio/x-aiff
-
-
-
- video/quicktime
- video/mp4
+ audio/mp3
+ audio/x-aiff
+
+
+
+ video/quicktime
+ video/mp4
- audio/mp3
- audio/x-aiff
-
-
-
-
+ audio/mp3
+ audio/x-aiff
+
+
+
+
-
-
-
-
+
+
+
+
-
-
- 92x92
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The name given to the file
-
-
- An entity primarily responsible for making the
+
+
+ 92x92
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The name given to the file
+
+
+ An entity primarily responsible for making the
content of the resource such as a person, organization or
- service.
-
-
- An entity primarily responsible for making the
+ service.
+
+
+
+ An entity primarily responsible for making the
content of the resource such as a person, organization or
- service.
-
- - home recording
- - meeting
- - presentation
- - sound
-
-
-
- Examples include an abstract, table of
+ service.
+
+
+ - home recording
+ - meeting
+ - presentation
+ - sound
+
+
+
+ Examples include an abstract, table of
contents, or free-text account of the content of the
- resource.
-
-
- An entity, (including persons, organizations,
+ resource.
+
+
+
+ An entity, (including persons, organizations,
or services), responsible for making the resource
- available.
-
-
- An entity responsible for contributing to the
+ available.
+
+
+
+ An entity responsible for contributing to the
content of the resource such as a person, organization or
- service.
-
-
- Temporal scope of the content if known. Date
+ service.
+
+
+
+ Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
- 2007-10-23)
-
-
- Genre of the content of the resource. Examples
+ 2007-10-23)
+
+
+
+ Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
- report, essay, dictionary.
-
- - none
- - video
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the
- present resource is derived.
-
-
- A unique reference to the resource; In this
+ report, essay, dictionary.
+
+
+ - none
+ - video
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the
+ present resource is derived.
+
+
+
+ A unique reference to the resource; In this
instance, the accession number or collection
- number.
-
-
- The language of the intellectual content of
- the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property
+ number.
+
+
+
+ The language of the intellectual content of
+ the resource.
+
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property
rights, copyright, and various property
- rights.
-
-
-
+ rights.
+
+
+
+
diff --git a/content_models/STRICT_PDFCM.xml b/content_models/STRICT_PDFCM.xml
index 313d4ca4..bd9a5450 100644
--- a/content_models/STRICT_PDFCM.xml
+++ b/content_models/STRICT_PDFCM.xml
@@ -1,107 +1,108 @@
+
-
- application/pdf
-
-
-
- application/pdf
-
-
+ application/pdf
+
+
+
+ application/pdf
+
+
-
- 100
- 120
-
-
-
-
-
-
-
-
-
-
-
+ 100
+ 120
+
+
+
+
+
+
+
+
+
+
+
-
- 100
- 120
-
-
-
-
-
-
+ 100
+ 120
+
+
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
- - experiment session
- - home recording
- - image
- - meeting
- - presentation
- - sound
- - text
-
-
-
- Examples include an abstract, table of contents, or free-text account of the content of the resource.
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
- - none
- - collection
- - dataset
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
+
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+ - experiment session
+ - home recording
+ - image
+ - meeting
+ - presentation
+ - sound
+ - text
+
+
+
+ Examples include an abstract, table of contents, or free-text account of the content of the resource.
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+ - none
+ - collection
+ - dataset
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
diff --git a/content_models/demo_Collection.xml b/content_models/demo_Collection.xml
index a2e804eb..05b32730 100644
--- a/content_models/demo_Collection.xml
+++ b/content_models/demo_Collection.xml
@@ -1,65 +1,65 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2011-03-29T14:15:20.712Z
- Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_Collection.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2011-03-29T14:15:20.712Z
+ Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_Collection.xml
+
+
+
+
+
+
+
-
-
+
- Service Definition Object (Collection) for Image Collection Demo
- demo:Collection
-
-
-
-
-
- Service Definition Object (Collection) for Image Collection Demo
+ demo:Collection
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/content_models/demo_CollectionImpl.xml b/content_models/demo_CollectionImpl.xml
index b907afb9..071e9923 100644
--- a/content_models/demo_CollectionImpl.xml
+++ b/content_models/demo_CollectionImpl.xml
@@ -1,196 +1,196 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2011-03-29T14:15:20.819Z
- Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_CollectionImpl.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2011-03-29T14:15:20.819Z
+ Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_CollectionImpl.xml
+
+
+
+
+
+
+
-
-
+
- Service Deployment Object (Collection) for Image Collection Demo
- demo:ImageCollectionImpl
- demo:CollectionImpl
-
-
-
-
-
- Service Deployment Object (Collection) for Image Collection Demo
+ demo:ImageCollectionImpl
+ demo:CollectionImpl
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
+
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- XSLT Binding
- text/xml
-
-
-
- LIST Binding
- text/xml
-
-
-
- QUERY Binding
- text/plain
-
-
-
-
-
-
-
-
+
+
+ XSLT Binding
+ text/xml
+
+
+
+ LIST Binding
+ text/xml
+
+
+
+ QUERY Binding
+ text/plain
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content_models/demo_DualResImage.xml b/content_models/demo_DualResImage.xml
index 0bb7dd8c..6dbbca0f 100644
--- a/content_models/demo_DualResImage.xml
+++ b/content_models/demo_DualResImage.xml
@@ -1,76 +1,76 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2011-03-29T14:15:19.456Z
- Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImage.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2011-03-29T14:15:19.456Z
+ Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImage.xml
+
+
+
+
+
+
+
-
-
+
- Content Model Object (Image) for Image Collection Demo
- demo:DualResImage
-
-
-
-
-
- Content Model Object (Image) for Image Collection Demo
+ demo:DualResImage
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content_models/demo_DualResImageCollection.xml b/content_models/demo_DualResImageCollection.xml
index f4e1962f..b9eb819e 100644
--- a/content_models/demo_DualResImageCollection.xml
+++ b/content_models/demo_DualResImageCollection.xml
@@ -1,73 +1,73 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2011-03-29T14:15:19.509Z
- Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImageCollection.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2011-03-29T14:15:19.509Z
+ Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/cModelObjects/demo_DualResImageCollection.xml
+
+
+
+
+
+
+
-
-
+
- Content Model Object (Image Collection) for Image Collection Demo
- demo:DualResImageCollection
-
-
-
-
-
- Content Model Object (Image Collection) for Image Collection Demo
+ demo:DualResImageCollection
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content_models/demo_DualResImageImpl.xml b/content_models/demo_DualResImageImpl.xml
index 36df937a..6019aaab 100644
--- a/content_models/demo_DualResImageImpl.xml
+++ b/content_models/demo_DualResImageImpl.xml
@@ -1,162 +1,162 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2011-03-29T14:15:20.881Z
- Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_DualResImageImpl.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2011-03-29T14:15:20.881Z
+ Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDepObjects/demo_DualResImageImpl.xml
+
+
+
+
+
+
+
-
-
+
- Service Deployment Object (Image) for Image Collection Demo
- demo:DualResImageImpl
-
-
-
-
-
- Service Deployment Object (Image) for Image Collection Demo
+ demo:DualResImageImpl
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
-
-
- FULL_SIZE Binding
- image/jpeg
-
-
-
- MEDIUM_SIZE Binding
- image/jpeg
-
-
-
-
-
-
-
-
+
+
+ FULL_SIZE Binding
+ image/jpeg
+
+
+
+ MEDIUM_SIZE Binding
+ image/jpeg
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content_models/demo_DualResolution.xml b/content_models/demo_DualResolution.xml
index 62348a34..d8bacfe8 100644
--- a/content_models/demo_DualResolution.xml
+++ b/content_models/demo_DualResolution.xml
@@ -1,65 +1,65 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2011-03-29T14:15:20.765Z
- Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_DualResolution.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2011-03-29T14:15:20.765Z
+ Ingested from local file /usr/local/fedora/client/demo/foxml/local-server-demos/image-collection-demo/sDefObjects/demo_DualResolution.xml
+
+
+
+
+
+
+
-
-
+
- Service Definition Object (Image) for Image Collection Demo
- demo:DualResolution
-
-
-
-
-
- Service Definition Object (Image) for Image Collection Demo
+ demo:DualResolution
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/content_models/ilives_bookCModel.xml b/content_models/ilives_bookCModel.xml
index 8c52cc1d..7f95b8ca 100644
--- a/content_models/ilives_bookCModel.xml
+++ b/content_models/ilives_bookCModel.xml
@@ -1,162 +1,162 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:56:58.331Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_bookCModel.xml
-
-
-
- ingest
-
- fedoraAdmin
- 2010-05-31T19:56:44.131Z
- Ingested from source repository with pid ilives:bookCModel
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-10T17:43:56.335Z
- Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_bookCModel.xml
-
-
-
- addDatastream
- ISLANDORACM
- fedoraAdmin
- 2010-06-10T19:01:39.144Z
- DatastreamsPane generated this logMessage.
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-10T19:29:20.220Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-10T19:46:24.930Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-15T07:01:30.019Z
- Ingested from local file /Users/al/fedora_repository/content_models/ilives_bookCModel.xml
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-16T08:56:09.156Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-16T08:59:35.673Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-16T08:59:52.831Z
-
-
-
-
- addDatastream
- MODS
- fedoraAdmin
- 2010-06-16T09:13:08.428Z
- DatastreamsPane generated this logMessage.
-
-
-
- purgeDatastream
- MODS
- fedoraAdmin
- 2010-06-16T09:13:32.732Z
- 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.
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-16T09:21:14.357Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-08-30T13:14:03.487Z
- Ingested from local file /Users/aoneill/fedora_repository/ilives/xml/ilives_bookCModel.xml
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-11-26T15:24:13.742Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:56:58.331Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_bookCModel.xml
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-05-31T19:56:44.131Z
+ Ingested from source repository with pid ilives:bookCModel
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-10T17:43:56.335Z
+ Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_bookCModel.xml
+
+
+
+ addDatastream
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-10T19:01:39.144Z
+ DatastreamsPane generated this logMessage.
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-10T19:29:20.220Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-10T19:46:24.930Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-15T07:01:30.019Z
+ Ingested from local file /Users/al/fedora_repository/content_models/ilives_bookCModel.xml
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-16T08:56:09.156Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-16T08:59:35.673Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-16T08:59:52.831Z
+
+
+
+
+ addDatastream
+ MODS
+ fedoraAdmin
+ 2010-06-16T09:13:08.428Z
+ DatastreamsPane generated this logMessage.
+
+
+
+ purgeDatastream
+ MODS
+ fedoraAdmin
+ 2010-06-16T09:13:32.732Z
+ 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.
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-16T09:21:14.357Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-08-30T13:14:03.487Z
+ Ingested from local file /Users/aoneill/fedora_repository/ilives/xml/ilives_bookCModel.xml
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-11-26T15:24:13.742Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
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
@@ -169,507 +169,507 @@
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- Book Content Model
- ilives:bookCModel
-
-
-
-
-
- Book Content Model
+ ilives:bookCModel
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- ilives
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ ilives
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- fedora_ilives
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ fedora_ilives
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- fedora_ilives
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+
+
+
+
+ fedora_ilives
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- showFieldSet
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ showFieldSet
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- showFieldSets
-
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ showFieldSets
+
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
- text/xml
-
-
+
+
+ image/tiff
+
+
+
+ text/xml
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/content_models/ilives_jp2Sdef.xml b/content_models/ilives_jp2Sdef.xml
index 9fa5e9a7..e7580656 100644
--- a/content_models/ilives_jp2Sdef.xml
+++ b/content_models/ilives_jp2Sdef.xml
@@ -1,73 +1,73 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:56:59.840Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdef.xml
-
-
-
- ingest
-
- admin
- 2010-05-25T13:17:14.106Z
- Fedora Object Ingested
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:56:59.840Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdef.xml
+
+
+
+ ingest
+
+ admin
+ 2010-05-25T13:17:14.106Z
+ Fedora Object Ingested
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:jp2Sdef
- ilives:jp2Sdef
-
-
-
-
-
- ilives:jp2Sdef
+ ilives:jp2Sdef
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/content_models/ilives_jp2Sdep-pageCModel.xml b/content_models/ilives_jp2Sdep-pageCModel.xml
index 7eedea6d..0aa21432 100644
--- a/content_models/ilives_jp2Sdep-pageCModel.xml
+++ b/content_models/ilives_jp2Sdep-pageCModel.xml
@@ -1,179 +1,179 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:57:00.246Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdep-pageCModel.xml
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-01T00:46:19.239Z
- Ingested from local file /Users/al/Desktop/ilives_jp2Sdep-pageCModel.xml
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-06-01T00:48:39.302Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:57:00.246Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdep-pageCModel.xml
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-01T00:46:19.239Z
+ Ingested from local file /Users/al/Desktop/ilives_jp2Sdep-pageCModel.xml
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-06-01T00:48:39.302Z
+
+
+
+
+
+
+
+
-
-
+
- ilives:jp2Sdep-pageCModel
- ilives:jp2Sdep-pageCModel
-
-
-
-
-
- ilives:jp2Sdep-pageCModel
+ ilives:jp2Sdep-pageCModel
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- DC
- text/xml
-
-
-
-
-
-
-
-
+
+
+ DC
+ text/xml
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content_models/ilives_tei2htmlSdef.xml b/content_models/ilives_tei2htmlSdef.xml
index a65ded77..225df813 100644
--- a/content_models/ilives_tei2htmlSdef.xml
+++ b/content_models/ilives_tei2htmlSdef.xml
@@ -1,72 +1,72 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:57:01.057Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdef.xml
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-01T00:46:19.652Z
- Ingested from local file /Users/al/Desktop/ilives_tei2htmlSdef.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:57:01.057Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdef.xml
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-01T00:46:19.652Z
+ Ingested from local file /Users/al/Desktop/ilives_tei2htmlSdef.xml
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:tei2htmlSdef
- ilives:tei2htmlSdef
-
-
-
-
-
- ilives:tei2htmlSdef
+ ilives:tei2htmlSdef
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/content_models/ilives_tei2htmlSdep-pageCModel.xml b/content_models/ilives_tei2htmlSdep-pageCModel.xml
index b3d38549..fbc8f585 100644
--- a/content_models/ilives_tei2htmlSdep-pageCModel.xml
+++ b/content_models/ilives_tei2htmlSdep-pageCModel.xml
@@ -1,234 +1,241 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:57:01.366Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdep-pageCModel.xml
-
-
-
- modifyDatastreamByValue
- XSL
- fedoraAdmin
- 2009-12-11T19:09:52.417Z
-
-
-
-
- modifyDatastreamByValue
- XSL
- fedoraAdmin
- 2009-12-11T19:22:11.096Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-01T00:46:19.847Z
- Ingested from local file /Users/al/Desktop/ilives_tei2htmlSdep-pageCModel.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:57:01.366Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdep-pageCModel.xml
+
+
+
+ modifyDatastreamByValue
+ XSL
+ fedoraAdmin
+ 2009-12-11T19:09:52.417Z
+
+
+
+
+ modifyDatastreamByValue
+ XSL
+ fedoraAdmin
+ 2009-12-11T19:22:11.096Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-01T00:46:19.847Z
+ Ingested from local file /Users/al/Desktop/ilives_tei2htmlSdep-pageCModel.xml
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:tei2htmlSdep-pageCModel
- ilives:tei2htmlSdep-pageCModel
-
-
-
-
-
- ilives:tei2htmlSdep-pageCModel
+ ilives:tei2htmlSdep-pageCModel
+
+
+
+
+
+
-
-
-
- TEI
- text/xml
-
-
-
- XSL
- text/xml
-
-
-
-
-
-
-
-
+
+
+ TEI
+ text/xml
+
+
+
+ XSL
+ text/xml
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- search persName
- _blank
- http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22 + %22+AND+dc.type:collection
-
-
-
-
-
-
-
-
-
-
-
- search placeName
- _blank
- http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22 %22+AND+dc.type:collection
-
-
-
-
-
- search orgName
- _blank
- http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22 %22+AND+dc.type:collection
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ search persName
+ _blank
+ http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
+ +
+ %22+AND+dc.type:collection
+
+
+
+
+
+
+
+
+
+
+
+
+ search placeName
+ _blank
+ http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
+ %22+AND+dc.type:collection
+
+
+
+
+
+
+ search orgName
+ _blank
+ http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
+ %22+AND+dc.type:collection
+
+
+
+
+
+
+
+
+
diff --git a/content_models/ilives_viewerSdef.xml b/content_models/ilives_viewerSdef.xml
index 94a0031e..c0031d70 100644
--- a/content_models/ilives_viewerSdef.xml
+++ b/content_models/ilives_viewerSdef.xml
@@ -1,72 +1,72 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T17:09:29.912Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdef.xml
-
-
-
- ingest
-
- admin
- 2010-05-25T13:17:14.247Z
- Fedora Object Ingested
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T17:09:29.912Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdef.xml
+
+
+
+ ingest
+
+ admin
+ 2010-05-25T13:17:14.247Z
+ Fedora Object Ingested
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:viewerSdef
- ilives:viewerSdef
-
-
-
-
-
- ilives:viewerSdef
+ ilives:viewerSdef
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/content_models/ilives_viewerSdep-bookCModel.xml b/content_models/ilives_viewerSdep-bookCModel.xml
index e91d3ce8..1332ac82 100644
--- a/content_models/ilives_viewerSdep-bookCModel.xml
+++ b/content_models/ilives_viewerSdep-bookCModel.xml
@@ -1,157 +1,157 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T17:09:41.797Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-bookCModel.xml
-
-
-
- ingest
-
- fedoraAdmin
- 2010-05-31T20:03:42.709Z
- Ingested from source repository with pid ilives:viewerSdep-bookCModel
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-05-31T20:04:57.893Z
-
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-05-31T20:57:49.117Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T17:09:41.797Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-bookCModel.xml
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-05-31T20:03:42.709Z
+ Ingested from source repository with pid ilives:viewerSdep-bookCModel
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-05-31T20:04:57.893Z
+
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-05-31T20:57:49.117Z
+
+
+
+
+
+
+
+
-
-
+
- ilives:viewerSdep-bookCModel
- ilives:viewerSdep-bookCModel
-
-
-
-
-
- ilives:viewerSdep-bookCModel
+ ilives:viewerSdep-bookCModel
+
+
+
+
+
+
-
-
-
- DC
- text/xml
-
-
-
-
-
-
-
-
+
+
+ DC
+ text/xml
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
diff --git a/content_models/islandora_collectionCModel.xml b/content_models/islandora_collectionCModel.xml
index 330a62cf..129d2f50 100644
--- a/content_models/islandora_collectionCModel.xml
+++ b/content_models/islandora_collectionCModel.xml
@@ -1,584 +1,584 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- admin
- 2010-12-20T16:14:50.165Z
- Fedora Object Ingested
-
-
-
- addDatastream
- RELS-EXT
- admin
- 2010-12-20T16:14:50.352Z
- Ingested object RELS-EXT
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- admin
- 2010-12-20T16:14:50.407Z
- Modified by Islandora API
-
-
-
- addDatastream
- ISLANDORACM
- admin
- 2010-12-20T16:14:50.475Z
- Ingested object ISLANDORACM
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2011-01-17T15:04:59.169Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2011-01-17T15:06:08.023Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2011-01-21T19:40:39.790Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2011-01-21T19:41:19.709Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ admin
+ 2010-12-20T16:14:50.165Z
+ Fedora Object Ingested
+
+
+
+ addDatastream
+ RELS-EXT
+ admin
+ 2010-12-20T16:14:50.352Z
+ Ingested object RELS-EXT
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ admin
+ 2010-12-20T16:14:50.407Z
+ Modified by Islandora API
+
+
+
+ addDatastream
+ ISLANDORACM
+ admin
+ 2010-12-20T16:14:50.475Z
+ Ingested object ISLANDORACM
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2011-01-17T15:04:59.169Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2011-01-17T15:06:08.023Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2011-01-21T19:40:39.790Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2011-01-21T19:41:19.709Z
+
+
+
+
+
+
+
+
-
-
+
- Islandora Collection Content Model
- islandora:collectionCModel
-
-
-
-
-
- Islandora Collection Content Model
+ islandora:collectionCModel
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
-
- text/xml
- text/plain
- application/xml
-
-
-
-
+ text/xml
+ text/plain
+ application/xml
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
- - none
- - Multi Media
- - image
- - meeting
- - presentation
- - sound
- - text
-
-
-
- Examples include an abstract, table of contents, or free-text account of the content of the resource.
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
- - none
- - collection
- - dataset
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
-
-
-
-
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+ - none
+ - Multi Media
+ - image
+ - meeting
+ - presentation
+ - sound
+ - text
+
+
+
+ Examples include an abstract, table of contents, or free-text account of the content of the resource.
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+ - none
+ - collection
+ - dataset
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
+
+
+
+
-
-
+
-
- text/xml
- text/plain
- application/xml
-
-
-
-
-
-
-
-
-
+ text/xml
+ text/plain
+ application/xml
+
+
+
+
+
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
- - none
- - Multi Media
- - image
- - meeting
- - presentation
- - sound
- - text
-
-
-
- Examples include an abstract, table of contents, or free-text account of the content of the resource.
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
- - none
- - collection
- - dataset
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
-
-
-
-
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+ - none
+ - Multi Media
+ - image
+ - meeting
+ - presentation
+ - sound
+ - text
+
+
+
+ Examples include an abstract, table of contents, or free-text account of the content of the resource.
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+ - none
+ - collection
+ - dataset
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
+
+
+
+
-
-
+
-
- text/xml
- text/plain
- application/xml
-
-
-
-
-
-
-
-
-
+ text/xml
+ text/plain
+ application/xml
+
+
+
+
+
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
- - none
- - Multi Media
- - image
- - meeting
- - presentation
- - sound
- - text
-
-
-
- Examples include an abstract, table of contents, or free-text account of the content of the resource.
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
- - none
- - collection
- - dataset
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
-
-
-
-
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+ - none
+ - Multi Media
+ - image
+ - meeting
+ - presentation
+ - sound
+ - text
+
+
+
+ Examples include an abstract, table of contents, or free-text account of the content of the resource.
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+ - none
+ - collection
+ - dataset
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
+
+
+
+
-
-
+
-
- text/xml
- text/plain
- application/xml
-
-
-
-
-
-
-
-
-
-
-
-
+ text/xml
+ text/plain
+ application/xml
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
- - none
- - Multi Media
- - image
- - meeting
- - presentation
- - sound
- - text
-
-
-
- Examples include an abstract, table of contents, or free-text account of the content of the resource.
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
- - none
- - collection
- - dataset
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
-
-
-
-
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+ - none
+ - Multi Media
+ - image
+ - meeting
+ - presentation
+ - sound
+ - text
+
+
+
+ Examples include an abstract, table of contents, or free-text account of the content of the resource.
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+ - none
+ - collection
+ - dataset
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
+
+
+
+
-
-
+
-
- text/xml
- text/plain
- application/xml
-
-
-
-
-
-
-
-
-
-
-
+ text/xml
+ text/plain
+ application/xml
+
+
+
+
+
+
+
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
- - none
- - Multi Media
- - image
- - meeting
- - presentation
- - sound
- - text
-
-
-
- Examples include an abstract, table of contents, or free-text account of the content of the resource.
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
- - none
- - collection
- - dataset
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
-
-
-
-
+
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+ - none
+ - Multi Media
+ - image
+ - meeting
+ - presentation
+ - sound
+ - text
+
+
+
+ Examples include an abstract, table of contents, or free-text account of the content of the resource.
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+ - none
+ - collection
+ - dataset
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
+
+
+
+
diff --git a/content_models/islandora_herbCModel.xml b/content_models/islandora_herbCModel.xml
index 4ad9e72c..6763cdc6 100644
--- a/content_models/islandora_herbCModel.xml
+++ b/content_models/islandora_herbCModel.xml
@@ -1,187 +1,187 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-03-05T19:52:46.133Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-10T06:43:54.714Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-05-10T15:42:10.930Z
- Ingested from local file /Applications/MAMP/htdocs/f3/sites/default/modules/fedora_repository/content_models/islandora_herbCModel.xml
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-10T16:56:37.065Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-10T16:58:56.685Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-10T19:07:11.023Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-11T19:12:28.380Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-13T19:30:13.540Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-17T20:10:15.478Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-18T18:58:52.382Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-19T18:16:39.272Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-19T18:36:31.560Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-19T19:52:41.316Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-19T20:06:17.332Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-05-20T19:12:33.099Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-07T14:01:43.997Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-09-16T16:15:28.762Z
- Ingested from local file /Applications/MAMP/htdocs/f3/sites/default/modules/fedora_repository/content_models/islandora_herbCModel.xml
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-09-16T17:32:21.037Z
-
-
-
-
-
-
-
-
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-03-05T19:52:46.133Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-10T06:43:54.714Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-05-10T15:42:10.930Z
+ Ingested from local file /Applications/MAMP/htdocs/f3/sites/default/modules/fedora_repository/content_models/islandora_herbCModel.xml
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-10T16:56:37.065Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-10T16:58:56.685Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-10T19:07:11.023Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-11T19:12:28.380Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-13T19:30:13.540Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-17T20:10:15.478Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-18T18:58:52.382Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-19T18:16:39.272Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-19T18:36:31.560Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-19T19:52:41.316Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-19T20:06:17.332Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-20T19:12:33.099Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-07T14:01:43.997Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-09-16T16:15:28.762Z
+ Ingested from local file /Applications/MAMP/htdocs/f3/sites/default/modules/fedora_repository/content_models/islandora_herbCModel.xml
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-09-16T17:32:21.037Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
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
@@ -194,1658 +194,1658 @@
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
- Herbarium Content Model
- islandora:herbCModel
-
-
-
-
-
- Herbarium Content Model
+ islandora:herbCModel
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- plugins/slide_viewer.php
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+
+
+
+
+ plugins/slide_viewer.php
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
-
- plugins/ImageManipulation.php
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.php
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.php
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.php
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- plugins/herb_viewer.php
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+
+
+
+
+ plugins/herb_viewer.php
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
-
- plugins/ImageManipulation.php
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.php
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.php
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.php
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- plugins/herb_viewer.inc
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+
+
+
+
+ plugins/herb_viewer.inc
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
- image/tif
-
-
-
-
- plugins/herb_viewer.inc
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+
+
+ image/tif
+
+
+
+
+ plugins/herb_viewer.inc
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herb_viewer.inc
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herb_viewer.inc
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herb_viewer.inc
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herb_viewer.inc
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herb_viewer.inc
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herb_viewer.inc
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DarwinCore.inc
- DarwinCore
- buildDrupalForm
- handleDarwinCoreForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DarwinCore.inc
+ DarwinCore
+ buildDrupalForm
+ handleDarwinCoreForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herb_viewer.inc
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herb_viewer.inc
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DarwinCore.inc
- DarwinCore
- buildDrupalForm
- handleIngestForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DarwinCore.inc
+ DarwinCore
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herb_viewer.inc
- HerbStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herb_viewer.inc
+ HerbStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildEditMetadataForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildEditMetadataForm
-
-
- plugins/Herbarium.inc
- Herbarium
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildEditMetadataForm
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/Herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- buildEditMetadataForm
-
-
- plugins/herbarium.inc
- Herbarium
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/Herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ buildEditMetadataForm
+
+
+ plugins/herbarium.inc
+ Herbarium
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- buildDrupalForm
- handleIngestForm
-
-
-
-
- plugins/herbarium.inc
- Herbarium
- buildEditMetadataForm
-
-
- plugins/herbarium.inc
- Herbarium
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ plugins/herbarium.inc
+ Herbarium
+ buildEditMetadataForm
+
+
+ plugins/herbarium.inc
+ Herbarium
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
+
-
- image/tiff
- image/tif
-
-
-
- image/tiff
- image/tif
-
-
+ image/tiff
+ image/tif
+
+
+
+ image/tiff
+ image/tif
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/content_models/islandora_jp2Sdep-slideCModel.xml b/content_models/islandora_jp2Sdep-slideCModel.xml
index 47a14dc0..67cbe24d 100644
--- a/content_models/islandora_jp2Sdep-slideCModel.xml
+++ b/content_models/islandora_jp2Sdep-slideCModel.xml
@@ -3,197 +3,197 @@
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">
-
-
-
-
-
-
-
-
-
-
-
-
-
-ingest
-
-fedoraAdmin
-2009-11-27T18:25:48.654Z
-Created with Admin GUI "New Object" command
-
-
-
-modifyDatastreamByValue
-METHODMAP
-fedoraAdmin
-2009-11-27T18:30:03.064Z
-
-
-
-
-modifyDatastreamByValue
-DSINPUTSPEC
-fedoraAdmin
-2009-11-27T18:30:34.272Z
-
-
-
-
-modifyDatastreamByValue
-WSDL
-fedoraAdmin
-2009-11-27T18:31:33.967Z
-
-
-
-
-modifyDatastreamByValue
-RELS-EXT
-fedoraAdmin
-2009-11-27T18:36:14.648Z
-
-
-
-
-ingest
-
-fedoraAdmin
-2010-01-26T20:06:07.452Z
-Ingested from local file /Users/aoneill/Desktop/tmp/islandora_jp2Sdep-slideCModel.xml
-
-
-
-modifyDatastreamByValue
-RELS-EXT
-fedoraAdmin
-2010-03-05T16:47:23.192Z
-
-
-
-
-modifyDatastreamByValue
-RELS-EXT
-fedoraAdmin
-2010-03-11T20:58:05.234Z
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-27T18:25:48.654Z
+ Created with Admin GUI "New Object" command
+
+
+
+ modifyDatastreamByValue
+ METHODMAP
+ fedoraAdmin
+ 2009-11-27T18:30:03.064Z
+
+
+
+
+ modifyDatastreamByValue
+ DSINPUTSPEC
+ fedoraAdmin
+ 2009-11-27T18:30:34.272Z
+
+
+
+
+ modifyDatastreamByValue
+ WSDL
+ fedoraAdmin
+ 2009-11-27T18:31:33.967Z
+
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2009-11-27T18:36:14.648Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-01-26T20:06:07.452Z
+ Ingested from local file /Users/aoneill/Desktop/tmp/islandora_jp2Sdep-slideCModel.xml
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-03-05T16:47:23.192Z
+
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-03-11T20:58:05.234Z
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
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.
-
-
-
-
-
-
-
- DC
- text/xml
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ DC
+ text/xml
+
+
+
+
+
+
+
+
+
+
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
@@ -205,73 +205,73 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
demo:2, demo:13, demo:20, and demo:28.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- islandora:jp2Sdep-slideCModel
- islandora:jp2Sdep-slideCModel
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ islandora:jp2Sdep-slideCModel
+ islandora:jp2Sdep-slideCModel
+
+
+
+
\ No newline at end of file
diff --git a/content_models/islandora_largeimages.xml b/content_models/islandora_largeimages.xml
index f78168d4..e4d59de4 100644
--- a/content_models/islandora_largeimages.xml
+++ b/content_models/islandora_largeimages.xml
@@ -1,247 +1,247 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- admin
- 2010-12-20T16:02:16.800Z
- Fedora Object Ingested
-
-
-
- addDatastream
- RELS-EXT
- admin
- 2010-12-20T16:02:17.020Z
- Ingested object RELS-EXT
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- admin
- 2010-12-20T16:02:17.091Z
- Modified by Islandora API
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- admin
- 2010-12-20T16:02:17.142Z
- Modified by Islandora API
-
-
-
- addDatastream
- COLLECTION_POLICY
- admin
- 2010-12-20T16:02:17.213Z
- Ingested object COLLECTION_POLICY
-
-
-
- ingest
-
- admin
- 2010-12-20T16:08:27.075Z
- Fedora Object Ingested
-
-
-
- addDatastream
- TN
- admin
- 2010-12-20T16:08:27.131Z
- Ingested object TN
-
-
-
- purgeDatastream
- TN
- fedoraAdmin
- 2010-12-20T16:09:24.726Z
- 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.
-
-
-
- modifyDatastreamByValue
- COLLECTION_POLICY
- fedoraAdmin
- 2010-12-20T16:09:32.544Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ admin
+ 2010-12-20T16:02:16.800Z
+ Fedora Object Ingested
+
+
+
+ addDatastream
+ RELS-EXT
+ admin
+ 2010-12-20T16:02:17.020Z
+ Ingested object RELS-EXT
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ admin
+ 2010-12-20T16:02:17.091Z
+ Modified by Islandora API
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ admin
+ 2010-12-20T16:02:17.142Z
+ Modified by Islandora API
+
+
+
+ addDatastream
+ COLLECTION_POLICY
+ admin
+ 2010-12-20T16:02:17.213Z
+ Ingested object COLLECTION_POLICY
+
+
+
+ ingest
+
+ admin
+ 2010-12-20T16:08:27.075Z
+ Fedora Object Ingested
+
+
+
+ addDatastream
+ TN
+ admin
+ 2010-12-20T16:08:27.131Z
+ Ingested object TN
+
+
+
+ purgeDatastream
+ TN
+ fedoraAdmin
+ 2010-12-20T16:09:24.726Z
+ 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.
+
+
+
+ modifyDatastreamByValue
+ COLLECTION_POLICY
+ fedoraAdmin
+ 2010-12-20T16:09:32.544Z
+
+
+
+
+
+
+
+
-
-
+
- Large Images Collection
- islandora:largeimages
-
-
-
-
-
- Large Images Collection
+ islandora:largeimages
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
- islandora:slide
- islandora:slideCModel
- ISLANDORACM
-
-
- islandora:map
- islandora:mapCModel
- ISLANDORACM
-
-
- islandora:herb
- islandora:herbCModel
- ISLANDORACM
-
-
- isMemberOfCollection
-
- dc.description
-
- dc.title
- dc.title
-
-
- dc.creator
- dc.creator
-
-
- dc.description
- dc.description
-
-
- dc.date
- dc.date
-
-
- dc.identifier
- dc.identifier
-
-
- dc.language
- dc.language
-
-
- dc.publisher
- dc.publisher
-
-
- dc.rights
- dc.rights
-
-
- dc.subject
- dc.subject
-
-
- dc.relation
- dc.relation
-
-
- dcterms.temporal
- dcterms.temporal
-
-
- dcterms.spatial
- dcterms.spatial
-
-
- fgs.DS.first.text
- Full Text
-
-
-
-
-
-
+
+
+
+ islandora:slide
+ islandora:slideCModel
+ ISLANDORACM
+
+
+ islandora:map
+ islandora:mapCModel
+ ISLANDORACM
+
+
+ islandora:herb
+ islandora:herbCModel
+ ISLANDORACM
+
+
+ isMemberOfCollection
+
+ dc.description
+
+ dc.title
+ dc.title
+
+
+ dc.creator
+ dc.creator
+
+
+ dc.description
+ dc.description
+
+
+ dc.date
+ dc.date
+
+
+ dc.identifier
+ dc.identifier
+
+
+ dc.language
+ dc.language
+
+
+ dc.publisher
+ dc.publisher
+
+
+ dc.rights
+ dc.rights
+
+
+ dc.subject
+ dc.subject
+
+
+ dc.relation
+ dc.relation
+
+
+ dcterms.temporal
+ dcterms.temporal
+
+
+ dcterms.spatial
+ dcterms.spatial
+
+
+ fgs.DS.first.text
+ Full Text
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
- dc.title
- dc.creator
- dc.description
- dc.date
- dc.identifier
- dc.language
- dc.publisher
- dc.rights
- dc.subject
- dc.relation
- dcterms.temporal
- dcterms.spatial
- Full Text
-
- isMemberOfCollection
-
-
-
-
+
+
+
+
+
+
+ dc.title
+ dc.creator
+ dc.description
+ dc.date
+ dc.identifier
+ dc.language
+ dc.publisher
+ dc.rights
+ dc.subject
+ dc.relation
+ dcterms.temporal
+ dcterms.spatial
+ Full Text
+
+ isMemberOfCollection
+
+
+
+
diff --git a/content_models/islandora_mapCModel.xml b/content_models/islandora_mapCModel.xml
index e1026ea7..4820b6cf 100644
--- a/content_models/islandora_mapCModel.xml
+++ b/content_models/islandora_mapCModel.xml
@@ -1,73 +1,73 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-05-25T12:52:58.656Z
- Created with Admin GUI "New Object" command
-
-
-
- addDatastream
- ISLANDORACM
- fedoraAdmin
- 2010-05-25T12:53:38.788Z
- DatastreamsPane generated this logMessage.
-
-
-
- ingest
-
- fedoraAdmin
- 2010-09-16T16:13:13.388Z
- Ingested from local file /Users/aoneill/fedora_repository/content_models/islandora_mapCModel.xml
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-09-16T16:13:49.927Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-05-25T12:52:58.656Z
+ Created with Admin GUI "New Object" command
+
+
+
+ addDatastream
+ ISLANDORACM
+ fedoraAdmin
+ 2010-05-25T12:53:38.788Z
+ DatastreamsPane generated this logMessage.
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-09-16T16:13:13.388Z
+ Ingested from local file /Users/aoneill/fedora_repository/content_models/islandora_mapCModel.xml
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-09-16T16:13:49.927Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
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
@@ -80,287 +80,287 @@
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
- Islandora Map Content Model
- islandora:mapCModel
-
-
-
-
-
- Islandora Map Content Model
+ islandora:mapCModel
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/map_viewer.inc
- ShowMapStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/map_viewer.inc
+ ShowMapStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
+
-
- image/tiff
- image/tif
-
-
-
- image/tiff
- image/tif
-
-
+ image/tiff
+ image/tif
+
+
+
+ image/tiff
+ image/tif
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- Subject
-
- - image
- - photograph
- - presentation
- - art
-
-
-
- Description of the Image
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
-
-
-
-
+
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ Subject
+
+ - image
+ - photograph
+ - presentation
+ - art
+
+
+
+ Description of the Image
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
+
+
+
+
diff --git a/content_models/islandora_mods2htmlSdef.xml b/content_models/islandora_mods2htmlSdef.xml
index 5eaae20a..ac9a5bf6 100644
--- a/content_models/islandora_mods2htmlSdef.xml
+++ b/content_models/islandora_mods2htmlSdef.xml
@@ -1,73 +1,73 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-03-12T14:57:03.509Z
- Created with Admin GUI "New Object" command
-
-
-
- modifyDatastreamByValue
- METHODMAP
- fedoraAdmin
- 2010-03-12T15:12:03.341Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-03-12T17:28:34.323Z
- Ingested from local file /Users/aoneill/fedora_repository/content_models/islandora-mods2htmlSdef.xml
-
-
-
- ingest
-
- admin
- 2010-05-25T13:17:13.492Z
- Fedora Object Ingested
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-03-12T14:57:03.509Z
+ Created with Admin GUI "New Object" command
+
+
+
+ modifyDatastreamByValue
+ METHODMAP
+ fedoraAdmin
+ 2010-03-12T15:12:03.341Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-03-12T17:28:34.323Z
+ Ingested from local file /Users/aoneill/fedora_repository/content_models/islandora-mods2htmlSdef.xml
+
+
+
+ ingest
+
+ admin
+ 2010-05-25T13:17:13.492Z
+ Fedora Object Ingested
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
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
@@ -79,32 +79,32 @@
demo:1, demo:12, demo: 19, and demo:27.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
+
- MODS to HTML Disseminator
- islandora:mods2htmlSdef
-
-
-
-
+ MODS to HTML Disseminator
+ islandora:mods2htmlSdef
+
+
+
+
diff --git a/content_models/islandora_mods2htmlSdep.xml b/content_models/islandora_mods2htmlSdep.xml
index f5fd2cd9..af4e67e3 100644
--- a/content_models/islandora_mods2htmlSdep.xml
+++ b/content_models/islandora_mods2htmlSdep.xml
@@ -1,188 +1,188 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-03-12T15:14:29.138Z
- Created with Admin GUI "New Object" command
-
-
-
- addDatastream
- XSL
- fedoraAdmin
- 2010-03-12T15:17:20.270Z
- DatastreamsPane generated this logMessage.
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-03-12T15:18:27.234Z
-
-
-
-
- modifyDatastreamByValue
- METHODMAP
- fedoraAdmin
- 2010-03-12T15:21:44.430Z
-
-
-
-
- modifyDatastreamByValue
- DSINPUTSPEC
- fedoraAdmin
- 2010-03-12T15:23:21.361Z
-
-
-
-
- modifyDatastreamByValue
- WSDL
- fedoraAdmin
- 2010-03-12T15:27:58.299Z
-
-
-
-
- ingest
-
- admin
- 2010-05-25T13:17:13.612Z
- Fedora Object Ingested
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-06-01T01:05:17.111Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-03-12T15:14:29.138Z
+ Created with Admin GUI "New Object" command
+
+
+
+ addDatastream
+ XSL
+ fedoraAdmin
+ 2010-03-12T15:17:20.270Z
+ DatastreamsPane generated this logMessage.
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-03-12T15:18:27.234Z
+
+
+
+
+ modifyDatastreamByValue
+ METHODMAP
+ fedoraAdmin
+ 2010-03-12T15:21:44.430Z
+
+
+
+
+ modifyDatastreamByValue
+ DSINPUTSPEC
+ fedoraAdmin
+ 2010-03-12T15:23:21.361Z
+
+
+
+
+ modifyDatastreamByValue
+ WSDL
+ fedoraAdmin
+ 2010-03-12T15:27:58.299Z
+
+
+
+
+ ingest
+
+ admin
+ 2010-05-25T13:17:13.612Z
+ Fedora Object Ingested
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-06-01T01:05:17.111Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
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.
-
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
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.
-
-
-
-
+
+
+
-
-
-
- MODS
- text/xml
-
-
-
- XSL
- text/xml
-
-
-
-
-
-
-
-
+
+
+ MODS
+ text/xml
+
+
+
+ XSL
+ text/xml
+
+
+
+
+
+
+
+
-
-
+
+
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
@@ -194,271 +194,279 @@
demo:2, demo:13, demo:20, and demo:28.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- MODS to HTML Disseminator Service Deployment
- islandora:mods2htmlSdep
-
-
-
-
-
- MODS to HTML Disseminator Service Deployment
+ islandora:mods2htmlSdep
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- :
-
-
-
-
-
-
- (
-
-
-
-
-
- Edition
- )
-
-
- =" ",
-
-
- ( )
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+ (
+
+
+
+
+
+
+ Edition
+
+ )
+
+
+
+ ="
+ ",
+
+
+
+ (
+ )
+
+
+
+
+
+
diff --git a/content_models/islandora_qtCModel.xml b/content_models/islandora_qtCModel.xml
index 0323fc31..e1798417 100644
--- a/content_models/islandora_qtCModel.xml
+++ b/content_models/islandora_qtCModel.xml
@@ -3,161 +3,172 @@
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">
-
-
-
-
-
-
-
-
-
-
-
- Quicktime Content Model
- islandora:qtCModel
-
-
-
-
-
-
-
-
-
- video/quicktime
- video/mp4
- audio/mp3
- audio/x-aiff
-
-
-
- video/quicktime
- video/mp4
+
+
+
+
+
+
+
+
+
+
+
+ Quicktime Content Model
+ islandora:qtCModel
+
+
+
+
+
+
+
+
+
+ video/quicktime
+ video/mp4
+ audio/mp3
+ audio/x-aiff
+
+
+
+ video/quicktime
+ video/mp4
- audio/mp3
- audio/x-aiff
-
-
-
-
+ audio/mp3
+ audio/x-aiff
+
+
+
+
-
-
-
-
+
+
+
+
-
-
- 92x92
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- The name given to the file
-
-
- An entity primarily responsible for making the
+
+
+ 92x92
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ The name given to the file
+
+
+ An entity primarily responsible for making the
content of the resource such as a person, organization or
- service.
-
-
- An entity primarily responsible for making the
+ service.
+
+
+
+ An entity primarily responsible for making the
content of the resource such as a person, organization or
- service.
-
- - home recording
- - meeting
- - presentation
- - sound
-
-
-
- Examples include an abstract, table of
+ service.
+
+
+ - home recording
+ - meeting
+ - presentation
+ - sound
+
+
+
+ Examples include an abstract, table of
contents, or free-text account of the content of the
- resource.
-
-
- An entity, (including persons, organizations,
+ resource.
+
+
+
+ An entity, (including persons, organizations,
or services), responsible for making the resource
- available.
-
-
- An entity responsible for contributing to the
+ available.
+
+
+
+ An entity responsible for contributing to the
content of the resource such as a person, organization or
- service.
-
-
- Temporal scope of the content if known. Date
+ service.
+
+
+
+ Temporal scope of the content if known. Date
format is YYYY-MM-DD (e.g. 1890,1910-10,or
- 2007-10-23)
-
-
- Genre of the content of the resource. Examples
+ 2007-10-23)
+
+
+
+ Genre of the content of the resource. Examples
include: home page, novel, poem, working paper, technical
- report, essay, dictionary.
-
- - none
- - video
- - event
- - image
- - interactive resource
- - model
- - party
- - physical object
- - place
- - service
- - software
- - sound
- - text
-
-
-
- A reference to a resource from which the
- present resource is derived.
-
-
- A unique reference to the resource; In this
+ report, essay, dictionary.
+
+
+ - none
+ - video
+ - event
+ - image
+ - interactive resource
+ - model
+ - party
+ - physical object
+ - place
+ - service
+ - software
+ - sound
+ - text
+
+
+
+ A reference to a resource from which the
+ present resource is derived.
+
+
+
+ A unique reference to the resource; In this
instance, the accession number or collection
- number.
-
-
- The language of the intellectual content of
- the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property
+ number.
+
+
+
+ The language of the intellectual content of
+ the resource.
+
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property
rights, copyright, and various property
- rights.
-
-
-
-
-
-
-
+ rights.
+
+
+
+
+
+
+
+
diff --git a/content_models/islandora_slideCModel.xml b/content_models/islandora_slideCModel.xml
index 9d0386e3..b11eaa2f 100644
--- a/content_models/islandora_slideCModel.xml
+++ b/content_models/islandora_slideCModel.xml
@@ -1,205 +1,205 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-10-15T16:00:27.323Z
- Created with Admin GUI "New Object" command
-
-
-
- addDatastream
- ISLANDORACM
- fedoraAdmin
- 2009-10-15T16:01:56.633Z
- DatastreamsPane generated this logMessage.
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2009-10-16T16:30:09.592Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2009-10-16T16:40:10.323Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2009-10-16T17:50:03.365Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2009-10-16T17:59:16.270Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2009-11-27T15:22:48.433Z
-
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2009-11-27T15:47:29.716Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-01-12T20:39:20.430Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-01-13T17:59:36.652Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-01-13T19:08:21.266Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-01-13T19:56:37.843Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-01-26T20:06:21.726Z
- Ingested from local file /Users/aoneill/Desktop/tmp/islandora_slideCModel.xml
-
-
-
- ingest
-
- aoneill
- 2010-03-31T22:51:13.964Z
- Fedora Object Ingested
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-03-31T22:54:03.479Z
-
-
-
-
- ingest
-
- aoneill
- 2010-04-01T18:17:22.725Z
- Fedora Object Ingested
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-04-01T18:25:12.904Z
-
-
-
-
- ingest
-
- admin
- 2010-08-26T18:57:07.237Z
- Fedora Object Ingested
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-09-16T16:01:27.415Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-10-15T16:00:27.323Z
+ Created with Admin GUI "New Object" command
+
+
+
+ addDatastream
+ ISLANDORACM
+ fedoraAdmin
+ 2009-10-15T16:01:56.633Z
+ DatastreamsPane generated this logMessage.
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2009-10-16T16:30:09.592Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2009-10-16T16:40:10.323Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2009-10-16T17:50:03.365Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2009-10-16T17:59:16.270Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2009-11-27T15:22:48.433Z
+
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2009-11-27T15:47:29.716Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-01-12T20:39:20.430Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-01-13T17:59:36.652Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-01-13T19:08:21.266Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-01-13T19:56:37.843Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-01-26T20:06:21.726Z
+ Ingested from local file /Users/aoneill/Desktop/tmp/islandora_slideCModel.xml
+
+
+
+ ingest
+
+ aoneill
+ 2010-03-31T22:51:13.964Z
+ Fedora Object Ingested
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-03-31T22:54:03.479Z
+
+
+
+
+ ingest
+
+ aoneill
+ 2010-04-01T18:17:22.725Z
+ Fedora Object Ingested
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-04-01T18:25:12.904Z
+
+
+
+
+ ingest
+
+ admin
+ 2010-08-26T18:57:07.237Z
+ Fedora Object Ingested
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-09-16T16:01:27.415Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
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
@@ -212,1255 +212,1255 @@
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
- Slide Content Model
- islandora:slideCModel
-
-
-
-
-
- Slide Content Model
+ islandora:slideCModel
+
+
+
+
+
+
-
-
-
- image/jpeg
-
-
-
-
- plugins/image_rotator_tagger_block.inc
- ShowILivesStreamsInFieldSets
- showJPG
-
-
-
- image/jpeg
-
-
-
-
-
-
-
+
+
+ image/jpeg
+
+
+
+
+ plugins/image_rotator_tagger_block.inc
+ ShowILivesStreamsInFieldSets
+ showJPG
+
+
+
+ image/jpeg
+
+
+
+
+
+
+
-
-
-
- image/jpeg
-
-
-
-
- plugins/image_rotator_tagger_block.inc
- ShowILivesStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
+
+
+ image/jpeg
+
+
+
+
+ plugins/image_rotator_tagger_block.inc
+ ShowILivesStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
-
-
-
- image/jpeg
-
-
-
-
- ilives/image_rotator_tagger_block.inc
- ShowILivesStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
+
+
+ image/jpeg
+
+
+
+
+ ilives/image_rotator_tagger_block.inc
+ ShowILivesStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
-
-
-
- image/jpeg
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
+
+
+ image/jpeg
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
-
-
-
- image/jpeg
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
- plugins/ShowStreamsInFieldSets.inc
- ShowStreamsInFieldSets
- showQdc
-
-
-
-
-
-
-
-
+
+
+ image/jpeg
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+ plugins/ShowStreamsInFieldSets.inc
+ ShowStreamsInFieldSets
+ showQdc
+
+
+
+
+
+
+
+
-
-
-
- image/jpeg
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
-
-
+
+
+ image/jpeg
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/jpeg
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- manipulateImage
- jpg
- MEDIUM_SIZE
-
- 160
- 120
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- manipulateImage
- jpg
- TN
-
- 120
- 120
-
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ manipulateImage
+ jpg
+ MEDIUM_SIZE
+
+ 160
+ 120
+
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ manipulateImage
+ jpg
+ TN
+
+ 120
+ 120
+
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jpg
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jpg
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- manipulateImage
- jpg
- TN
-
- 120
- 120
-
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ manipulateImage
+ jpg
+ TN
+
+ 120
+ 120
+
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- plugins/slide_viewer.inc
- ShowSlideStreamsInFieldSets
- showJPG
-
-
-
-
-
-
+
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ plugins/slide_viewer.inc
+ ShowSlideStreamsInFieldSets
+ showJPG
+
+
+
+
+
+
image/tiff
-
-
+
+
image/tif
-
-
-
- plugins/ImageManipulation.inc
- ImageManipulation
- createJP2
- jp2
- JP2
-
-
-
-
-
-
- plugins/DemoFormBuilder.inc
- DemoFormBuilder
- buildQDCForm
- handleQDCForm
-
-
-
- Title/Caption/Image Name
- dc:title
- textfield
- The name given to the resource
- true
-
-
- Creator/Photographer
- dc:creator
- textfield
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
- false
-
-
- Subject
- dc:subject
- select
- Subject
- false
-
- -
-
image
- image
-
- -
-
photograph
- photograph
-
- -
-
presentation
- presentation
-
- -
-
art
- art
-
-
-
-
- Description
- dc:description
- textarea
- Description of the Image
- true
-
-
- Publisher
- dc:publisher
- textfield
- An entity, (including persons, organizations, or services), responsible for making the resource available.
- false
-
-
- Contributor
- dc:contributor
- textfield
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
- false
-
-
- Date
- dc:date
- textfield
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
- false
-
-
- Resource Type
- dc:type
- textfield
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
- false
-
-
- Source
- dc:source
- textfield
- A reference to a resource from which the present resource is derived.
- false
-
-
- Identifier
- dc:identifier
- textfield
- A unique reference to the resource; In this instance, the accession number or collection number.
- false
-
-
- Language
- dc:language
- select
- The language of the intellectual content of the resource.
- false
-
- -
-
eng
- English
-
- -
-
fre
- French
-
-
-
-
- Relation
- dc:relation
- textfield
- Reference to a related resource.
- false
-
-
- Rights Management
- dc:rights
- textarea
- Information about intellectual property rights, copyright, and various property rights.
- false
-
-
-
-
-
-
-
+
+
+ plugins/ImageManipulation.inc
+ ImageManipulation
+ createJP2
+ jp2
+ JP2
+
+
+
+
+
+
+ plugins/DemoFormBuilder.inc
+ DemoFormBuilder
+ buildQDCForm
+ handleQDCForm
+
+
+
+ Title/Caption/Image Name
+ dc:title
+ textfield
+ The name given to the resource
+ true
+
+
+ Creator/Photographer
+ dc:creator
+ textfield
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+ false
+
+
+ Subject
+ dc:subject
+ select
+ Subject
+ false
+
+ -
+
image
+ image
+
+ -
+
photograph
+ photograph
+
+ -
+
presentation
+ presentation
+
+ -
+
art
+ art
+
+
+
+
+ Description
+ dc:description
+ textarea
+ Description of the Image
+ true
+
+
+ Publisher
+ dc:publisher
+ textfield
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+ false
+
+
+ Contributor
+ dc:contributor
+ textfield
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+ false
+
+
+ Date
+ dc:date
+ textfield
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+ false
+
+
+ Resource Type
+ dc:type
+ textfield
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+ false
+
+
+ Source
+ dc:source
+ textfield
+ A reference to a resource from which the present resource is derived.
+ false
+
+
+ Identifier
+ dc:identifier
+ textfield
+ A unique reference to the resource; In this instance, the accession number or collection number.
+ false
+
+
+ Language
+ dc:language
+ select
+ The language of the intellectual content of the resource.
+ false
+
+ -
+
eng
+ English
+
+ -
+
fre
+ French
+
+
+
+
+ Relation
+ dc:relation
+ textfield
+ Reference to a related resource.
+ false
+
+
+ Rights Management
+ dc:rights
+ textarea
+ Information about intellectual property rights, copyright, and various property rights.
+ false
+
+
+
+
+
+
+
-
-
+
-
- image/tiff
- image/tif
-
-
-
- image/tiff
- image/tif
-
-
+ image/tiff
+ image/tif
+
+
+
+ image/tiff
+ image/tif
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
- The name given to the resource
-
-
- An entity primarily responsible for making the content of the resource such as a person, organization or service.
-
-
- Subject
-
- - image
- - photograph
- - presentation
- - art
-
-
-
- Description of the Image
-
-
- An entity, (including persons, organizations, or services), responsible for making the resource available.
-
-
- An entity responsible for contributing to the content of the resource such as a person, organization or service.
-
-
- Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
-
-
- Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
-
-
- A reference to a resource from which the present resource is derived.
-
-
- A unique reference to the resource; In this instance, the accession number or collection number.
-
-
- The language of the intellectual content of the resource.
-
- - English
- - French
-
-
-
- Reference to a related resource.
-
-
- Information about intellectual property rights, copyright, and various property rights.
-
-
-
-
-
-
-
+
+
+ The name given to the resource
+
+
+ An entity primarily responsible for making the content of the resource such as a person, organization or service.
+
+
+ Subject
+
+ - image
+ - photograph
+ - presentation
+ - art
+
+
+
+ Description of the Image
+
+
+ An entity, (including persons, organizations, or services), responsible for making the resource available.
+
+
+ An entity responsible for contributing to the content of the resource such as a person, organization or service.
+
+
+ Temporal scope of the content if known. Date format is YYYY-MM-DD (e.g. 1890,1910-10,or 2007-10-23)
+
+
+ Genre of the content of the resource. Examples include: home page, novel, poem, working paper, technical report, essay, dictionary.
+
+
+ A reference to a resource from which the present resource is derived.
+
+
+ A unique reference to the resource; In this instance, the accession number or collection number.
+
+
+ The language of the intellectual content of the resource.
+
+ - English
+ - French
+
+
+
+ Reference to a related resource.
+
+
+ Information about intellectual property rights, copyright, and various property rights.
+
+
+
+
+
+
+
diff --git a/content_models/islandora_viewerSdep-slideCModel.xml b/content_models/islandora_viewerSdep-slideCModel.xml
index d45fddb8..694c66f8 100644
--- a/content_models/islandora_viewerSdep-slideCModel.xml
+++ b/content_models/islandora_viewerSdep-slideCModel.xml
@@ -1,199 +1,199 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-27T17:57:45.462Z
- Created with Admin GUI "New Object" command
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2009-11-27T18:02:20.095Z
-
-
-
-
- modifyDatastreamByValue
- METHODMAP
- fedoraAdmin
- 2009-11-27T18:17:31.165Z
-
-
-
-
- modifyDatastreamByValue
- DSINPUTSPEC
- fedoraAdmin
- 2009-11-27T18:20:50.036Z
-
-
-
-
- modifyDatastreamByValue
- WSDL
- fedoraAdmin
- 2009-11-27T18:22:44.560Z
-
-
-
-
- modifyDatastreamByValue
- WSDL
- fedoraAdmin
- 2009-11-27T18:37:33.153Z
-
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-03-11T21:01:10.851Z
-
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-05-14T20:05:44.278Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-27T17:57:45.462Z
+ Created with Admin GUI "New Object" command
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2009-11-27T18:02:20.095Z
+
+
+
+
+ modifyDatastreamByValue
+ METHODMAP
+ fedoraAdmin
+ 2009-11-27T18:17:31.165Z
+
+
+
+
+ modifyDatastreamByValue
+ DSINPUTSPEC
+ fedoraAdmin
+ 2009-11-27T18:20:50.036Z
+
+
+
+
+ modifyDatastreamByValue
+ WSDL
+ fedoraAdmin
+ 2009-11-27T18:22:44.560Z
+
+
+
+
+ modifyDatastreamByValue
+ WSDL
+ fedoraAdmin
+ 2009-11-27T18:37:33.153Z
+
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-03-11T21:01:10.851Z
+
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-05-14T20:05:44.278Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
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.
-
-
-
-
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
+
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.
-
-
-
-
+
+
+
-
-
-
- DC
- text/xml
-
-
-
-
-
-
-
-
+
+
+ DC
+ text/xml
+
+
+
+
+
+
+
+
-
-
+
+
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
@@ -205,107 +205,107 @@
demo:2, demo:13, demo:20, and demo:28.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- viewerSdep-slideCModel
- islandora:viewerSdep-slideCModel
-
-
-
-
+ viewerSdep-slideCModel
+ islandora:viewerSdep-slideCModel
+
+
+
+
diff --git a/example_collection_views/MHL-sparqltoHtml.xsl b/example_collection_views/MHL-sparqltoHtml.xsl
index 2b3295fe..4a2904f6 100644
--- a/example_collection_views/MHL-sparqltoHtml.xsl
+++ b/example_collection_views/MHL-sparqltoHtml.xsl
@@ -1,196 +1,270 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ / /
-
-
-
-
-
-
-
-
- /fedora/repository/ /TN
-
-
-
-
-
-
-
-
- --
-
- /fedora/repository/ /-/
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /
+ /
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /TN
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+ /fedora/repository/
+ /-/
+
+
DETAILS
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/example_collection_views/critter.xsl b/example_collection_views/critter.xsl
index 294218ed..cbfcd81b 100644
--- a/example_collection_views/critter.xsl
+++ b/example_collection_views/critter.xsl
@@ -1,33 +1,96 @@
-
+
-
+
-
- Date Collected:
- Type:
- Phylum:
- SubPhylum:
- Class:
- Order:
- Family:
- Genus:
- Species:
+
+
+ Date Collected:
+
+
+
+
+ Type:
+
+
+
+
+ Phylum:
+
+
+
+
+ SubPhylum:
+
+
+
+
+ Class:
+
+
+
+
+ Order:
+
+
+
+
+ Family:
+
+
+
+
+ Genus:
+
+
+
+
+ Species:
+
+
+
-
+
- Collection Location
-
- Site Name:
- Country:
- Region:
- Latitude:
- Longitude:
- Depth: Feet
-
- Description
-
+ Collection Location
+
+
+ Site Name:
+
+
+
+
+ Country:
+
+
+
+
+ Region:
+
+
+
+
+ Latitude:
+
+
+
+
+ Longitude:
+
+
+
+
+ Depth:
+
+
+ Feet
+
+
+ Description
+
+
+
-
+
\ No newline at end of file
diff --git a/example_collection_views/flv-sparqltoHtml.xsl b/example_collection_views/flv-sparqltoHtml.xsl
index e591de97..7eebe2f3 100644
--- a/example_collection_views/flv-sparqltoHtml.xsl
+++ b/example_collection_views/flv-sparqltoHtml.xsl
@@ -1,65 +1,96 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ /OBJ/
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ /TN
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /OBJ/
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+
+ /fedora/repository/
+ /TN
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/example_collection_views/mlp-sparqltoHtml.xsl b/example_collection_views/mlp-sparqltoHtml.xsl
index 63688c08..892d8ed2 100644
--- a/example_collection_views/mlp-sparqltoHtml.xsl
+++ b/example_collection_views/mlp-sparqltoHtml.xsl
@@ -1,193 +1,264 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ / /
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /
+ /
+
+
+
+
+
-
- /fedora/repository/ /TN
-
-
+
+
+ /fedora/repository/
+ /TN
+
+
+
-
+
-
- --
-
- /fedora/repository/ /-/
-
+
+ --
+
+
+ /fedora/repository/
+ /-/
+
+
DETAILS
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/example_collection_views/refworks.xsl b/example_collection_views/refworks.xsl
index 2ef0c8df..e021ef2b 100644
--- a/example_collection_views/refworks.xsl
+++ b/example_collection_views/refworks.xsl
@@ -1,92 +1,216 @@
-
+
-
-
- General Information
-
- Periodical:
- Abbreviation:
- Volume:
- Issue:
- Publisher:
- Place of Publication:
- Edition:
- Year:
- Date:
- Start Page:
- Other Pages:
- ISSN/ISBN:
- Language:
- UL:
-
-
-
- Titles
-
-
-
-
- Secondary Titles
-
-
-
-
-
-
- Authors
-
-
+
+
+ General Information
+
+
+
+ Periodical:
+
+
+
+
+
+
+
+ Abbreviation:
+
+
+
+
+
+
+
+ Volume:
+
+
+
+
+
+
+
+ Issue:
+
+
+
+
+
+
+
+ Publisher:
+
+
+
+
+
+
+
+ Place of Publication:
+
+
+
+
+
+
+
+ Edition:
+
+
+
+
+
+
+
+ Year:
+
+
+
+
+
+
+
+ Date:
+
+
+
+
+
+
+
+ Start Page:
+
+
+
+
+
+
+
+ Other Pages:
+
+
+
+
+
+
+
+ ISSN/ISBN:
+
+
+
+
+
+
+
+ Language:
+
+
+
+
+
+
+
+ UL:
+
+
+
+
+
+
+
+
+ Titles
+
+
+
+
+ Secondary Titles
+
+
+
+
+
+
+
+
+ Authors
+
+
-
-
- Secondary Authors
-
-
-
-
-
-
- Keywords
-
-
-
- Abstract
-
-
-
-
-
- Notes
-
-
-
-
-
-
-
-
- http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&issn= &date= &volume= &issue= &spage= &atitle= &stitle=
-
-
-
-
-
-
+
+
+ Secondary Authors
+
+
+
+
+
+
+
+
+ Keywords
+
+
+
+ Abstract
+
+
+
+
+
+
+
+ Notes
+
+
+
+
+
+
+
+
+
+
+ http://articles.library.upei.ca:7888/godot/hold_tab.cgi?hold_tab_branch=PCU&issn=
+ &date=
+ &volume=
+ &issue=
+ &spage=
+ &atitle=
+ &stitle=
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/example_collection_views/riri-sparqltoHtml.xsl b/example_collection_views/riri-sparqltoHtml.xsl
index 72907d1c..28f4e663 100644
--- a/example_collection_views/riri-sparqltoHtml.xsl
+++ b/example_collection_views/riri-sparqltoHtml.xsl
@@ -1,65 +1,96 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- /fedora/repository/ /-/
-
-
- /fedora/repository/ /OBJ/ .pdf
-
-
-
-
-
-
-
-
- /fedora/repository/ /TN
-
-
-
-
-
-
-
-
-
-
- --
-
- /fedora/repository/ /-/
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /-/
+
+
+
+ /fedora/repository/
+ /OBJ/
+ .pdf
+
+
+
+
+
+
+
+
+
+
+ /fedora/repository/
+ /TN
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
+
+ /fedora/repository/
+ /-/
+
+
DETAILS
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
\ No newline at end of file
diff --git a/example_collection_views/sparqltoHtml.xsl b/example_collection_views/sparqltoHtml.xsl
index 15e2e35e..7bb1f0d6 100644
--- a/example_collection_views/sparqltoHtml.xsl
+++ b/example_collection_views/sparqltoHtml.xsl
@@ -1,125 +1,190 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
-
-
+
+
+
+
+
+
\ No newline at end of file
diff --git a/fedora_repository.install b/fedora_repository.install
index 84016939..27cd4ffe 100644
--- a/fedora_repository.install
+++ b/fedora_repository.install
@@ -1,5 +1,6 @@
collection settings are correct.',
- array('@collection-settings' => $base_url.'/admin/settings/fedora_repository'));
+ array('@collection-settings' => $base_url . '/admin/settings/fedora_repository'));
}
else {
$requirements['fedora-repository']['value'] = t("Available");
diff --git a/fedora_repository.module b/fedora_repository.module
index 4aba23cb..83247bc2 100644
--- a/fedora_repository.module
+++ b/fedora_repository.module
@@ -53,9 +53,10 @@ function fedora_repository_purge_object($pid = NULL, $name = NULL) {
drupal_set_message(t('You must specify an object pid to purge an object.'), 'error');
return '';
}
- $output = t('Are you sure you wish to purge object %name %pid!This cannot be undone ', array(
- '%name' => $name,
- '%pid' => $pid)
+ $output = t('Are you sure you wish to purge object %name %pid!This cannot be undone ',
+ array(
+ '%name' => $name,
+ '%pid' => $pid)
);
$output .= drupal_get_form('fedora_repository_purge_object_form', $pid);
@@ -93,8 +94,8 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
return '';
}
- if (!validPid($collection_pid)) {
- if (validPid(urldecode($collection_pid))) {
+ if (!valid_pid($collection_pid)) {
+ if (valid_pid(urldecode($collection_pid))) {
$collection_pid = urldecode($collection_pid);
}
else {
@@ -210,7 +211,7 @@ function fedora_repository_ingest_form_validate($form, &$form_state) {
if (!empty($file)) {
if (!in_array($dformat, $allowedMimeTypes)) {
form_set_error('ingest-file-location', t('The uploaded file\'s mimetype (' . $dformat . ') is not associated with this Content Model. The allowed types are ' .
- implode(' ', $allowedMimeTypes)));
+ implode(' ', $allowedMimeTypes)));
file_delete($file);
return;
}
@@ -286,7 +287,7 @@ function fedora_repository_purge_object_form(&$form_state, $pid, $referrer = NUL
function add_stream($collection_pid=NULL, $collectionName=NULL) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
- if (!validPid($collection_pid)) {
+ if (!valid_pid($collection_pid)) {
drupal_set_message(t("This PID is not valid!"), 'error');
return ' ';
}
@@ -377,9 +378,9 @@ function add_stream_form_validate($form, &$form_state) {
return FALSE;
}
$validators = array(
-// 'file_validate_is_image' => array(),
-// 'file_validate_image_resolution' => array('85x85'),
-// 'file_validate_size' => array(30 * 1024),
+ // 'file_validate_is_image' => array(),
+ // 'file_validate_image_resolution' => array('85x85'),
+ // 'file_validate_size' => array(30 * 1024),
);
$fileObject = file_save_upload('add-stream-file-location', $validators);
@@ -403,8 +404,9 @@ function fedora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NULL)
return ' ';
}
- $output = t('Are you sure you wish to purge this datastream %name ', array(
- '%name' => $name)
+ $output = t('Are you sure you wish to purge this datastream %name ',
+ array(
+ '%name' => $name)
);
$output .= drupal_get_form('fedora_repository_purge_stream_form', $pid, $dsId);
return $output;
@@ -534,7 +536,7 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) {
$pid = $form_state['values']['pid'];
$dsid = $form_state['values']['dsId'];
$dsLabel = $form_state['values']['dsLabel'];
-// Remove the original file extension from the label and add the new one
+ // Remove the original file extension from the label and add the new one
$indexOfDot = strrpos($dsLabel, '.'); //use strrpos to get the last dot
if ($indexOfDot !== FALSE) {
$dsLabel = substr($dsLabel, 0, $indexOfDot);
@@ -706,12 +708,12 @@ function fedora_repository_access($op, $node, $account) {
*/
function makeObject($pid, $dsID) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
- if (!validPid($pid)) {
+ if (!valid_pid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error');
return ' ';
}
- if (!validDsid($dsID)) {
+ if (!valid_dsid($dsID)) {
drupal_set_message(t("Invalid dsID!"), 'error');
return ' ';
}
@@ -742,27 +744,29 @@ function makeObject($pid, $dsID) {
function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NULL, $page_number = NULL, $limit = NULL) {
module_load_include('inc', 'fedora_repository', 'ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
global $user;
-
if (!fedora_available()) {
- drupal_set_message('The Fedora repository server is currently unavailable. Please contact the site administrator.', 'warning', FALSE);
+ drupal_set_message(t('The Fedora repository server is currently unavailable. Please contact the site administrator.'), 'warning', FALSE);
return '';
}
- if ($pid & !validPid($pid)) {
+ $item = new fedora_item($pid);
+ if (!$item->exists()) {
+ drupal_not_found();
+ }
+ if ($pid & !validPid($pid)) {
drupal_set_message(t("Invalid PID!"), 'error');
return ' ';
}
- if ($dsId & !validDsid($dsId)) {
+ if ($dsId & !valid_dsid($dsId)) {
drupal_set_message(t("Invalid dsID!"), 'error');
return ' ';
}
if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) {
-//drupal_set_message(t("You do not have access to Fedora objects within the attempted namespace or access to Fedora denied"), 'error');
-
if (user_access('access administration pages')) {
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning');
}
@@ -790,13 +794,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
module_load_include('inc', 'fedora_repository', 'CollectionClass');
$collectionClass = new CollectionClass();
-//if(!isset($pageNumber)){
-// $pageNumber=0;
-//}
-//if(!isset($limit)){
-// $limit=20;
-//}
-
module_load_include('inc', 'fedora_repository', 'ContentModel');
module_load_include('inc', 'fedora_repository', 'plugins/fedoraObject');
$breadcrumbs = array();
@@ -804,15 +801,12 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
drupal_set_breadcrumb(array_reverse($breadcrumbs));
$offset = $limit * $page_number;
-//$results = $collectionClass->getRelatedObjects($pid, $limit, $offset, NULL); //updated so we can do paging in query not in xslt
-//$results = $collectionClass->getRelatedItems($pid, NULL);
$content_models = $objectHelper->get_content_models_list($pid);
// Each content model may return either a tabset array or plain HTML. If it's HTML, stick it in a tab.
$cmodels_tabs = array(
'#type' => 'tabset',
);
foreach ($content_models as $content_model) {
-//$content_model_fieldsets = $objectHelper->createExtraFieldsets($pid, $content_model, $pageNumber);
$content_model_fieldset = $content_model->displayExtraFieldset($pid, $page_number);
if (is_array($content_model_fieldset)) {
$cmodels_tabs = array_merge($cmodels_tabs, $content_model_fieldset);
@@ -829,13 +823,6 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
$obj = new FedoraObject($pid);
$object_details = $obj->showFieldSets();
$cmodels_tabs = array_merge($cmodels_tabs, $object_details);
-
-
-//$content .= $objectHelper
-//$content .= $objectHelper->parseContent($results, $pid, $dsId, $collection, $pageNumber);
-//the below is for islandlives we should be able to do this in the xslt though
-//$css=$path.'/stylesheets/container-large.css';
-//drupal_add_css($css);
return tabs_render($cmodels_tabs);
}
@@ -892,7 +879,7 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU
$item = new Fedora_Item($pid);
- if ($item !== false) {
+ if ($item !== FALSE) {
echo $item->get_dissemination($servicePid, $serviceMethod);
}
@@ -1285,10 +1272,10 @@ function fedora_repository_demo_objects_form() {
);
foreach (array(
-'islandora:collectionCModel' => 'Islandora default content models',
- 'islandora:top' => 'Islandora top-level collection',
- 'islandora:demos' => 'Islandora demos collection',
- 'islandora:largeimages' => 'Sample large image content model (requires Djatoka and Kakadu .)',
+ 'islandora:collectionCModel' => 'Islandora default content models',
+ 'islandora:top' => 'Islandora top-level collection',
+ 'islandora:demos' => 'Islandora demos collection',
+ 'islandora:largeimages' => 'Sample large image content model (requires Djatoka and Kakadu .)',
)
as $available_demo => $available_demo_desc) {
try {
@@ -1391,7 +1378,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$cmodel_collection->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_views/simple_list_view.xml', 'COLLECTION_VIEW', 'Collection View', 'text/xml', 'X');
$cmodel_collection->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/contentModel.jpg', 'TN', 'Thumbnail', 'image/jpg', 'M');
- drupal_set_message("Successfully installed islandora:ContentModelCollection .", 'message');
+ drupal_set_message(t("Successfully installed islandora:ContentModelCollection ."), 'message');
} catch (exception $e) {
}
@@ -1403,7 +1390,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/COLLECTION-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
try {
$tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
- drupal_set_message("Successfully installed islandora:top .", 'message');
+ drupal_set_message(t("Successfully installed islandora:top ."), 'message');
} catch (exception $e) {
}
@@ -1423,7 +1410,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$new_item->add_relationship('hasModel', 'islandora:collectionCModel', FEDORA_MODEL_URI);
$cp = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/collection_policies/PDF-COLLECTION POLICY.xml', 'COLLECTION_POLICY', 'Collection Policy', 'text/xml', 'X');
$tn = $new_item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Crystal_Clear_mimetype_pdf.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
- drupal_set_message("Successfully installed islandora:demos .", 'message');
+ drupal_set_message(t("Successfully installed islandora:demos ."), 'message');
} catch (exception $e) {
}
@@ -1445,7 +1432,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
$dual_res_image_collection_cmodel = new Fedora_Item('demo:DualResImageCollection');
try {
$cmstream = $dual_res_image_collection_cmodel->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/content_models/COLLECTIONCM.xml', 'ISLANDORACM', 'Islandora Content Model.xml', 'application/xml', 'X');
- drupal_set_message("Successfully installed demo:SmileyStuff collection view.", 'message');
+ drupal_set_message(t("Successfully installed demo:SmileyStuff collection view."), 'message');
} catch (exception $e) {
}
@@ -1454,7 +1441,7 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
if (!empty($form_state['values']['demo_collections']['islandora:largeimages'])) {
$error = '';
foreach (array('islandora_jp2Sdep-slideCModel.xml', 'islandora_mods2htmlSdef.xml', 'islandora_mods2htmlSdep.xml',
- 'islandora_slideCModel.xml', 'islandora_viewerSdep-slideCModel.xml', 'ilives_jp2Sdef.xml', 'ilives_viewerSdef.xml') as $foxml_file) {
+ 'islandora_slideCModel.xml', 'islandora_viewerSdep-slideCModel.xml', 'ilives_jp2Sdef.xml', 'ilives_viewerSdef.xml') as $foxml_file) {
try {
$item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/' . $foxml_file);
} catch (exception $e) {
@@ -1464,14 +1451,14 @@ function fedora_repository_demo_objects_form_submit($form, &$form_state) {
try {
$item = Fedora_Item::ingest_from_FOXML_file(drupal_get_path('module', 'fedora_repository') . '/content_models/islandora_largeimages.xml');
$tn = $item->add_datastream_from_file(drupal_get_path('module', 'fedora_repository') . '/images/Gnome-emblem-photos.png', 'TN', 'Thumbnail.png', 'image/png', 'M');
- drupal_set_message("Successfully installed islandora:largeimages .", 'message');
+ drupal_set_message(t("Successfully installed islandora:largeimages ."), 'message');
} catch (exception $e) {
$error .= " - Problem ingesting islandora:largeimages collection";
}
}
if (!empty($error)) {
- drupal_set_message('Some problems occurred: ' . $error);
+ drupal_set_message(t('Some problems occurred: ' . $error));
}
}
}
@@ -1919,7 +1906,7 @@ function _fedora_repository_empty_basket() {
function fedora_repository_add_to_basket($pid, $warn = TRUE, $searchResultsFlag = FALSE) {
if ($warn && _is_added_to_basket($pid)) {
- drupal_set_message("Object already in basket");
+ drupal_set_message(t("Object already in basket"));
}
if (!isset($_SESSION['basket'])) {
@@ -1960,7 +1947,9 @@ function theme_add_to_basket_link($pid, $type = 'object') {
*/
if (!_is_added_to_basket($pid)) {
return l(
- theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))), "fedora/repository/addToBasket/" . $path, array('html' => TRUE)
+ theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))),
+ "fedora/repository/addToBasket/" . $path,
+ array('html' => TRUE)
);
}
@@ -1988,7 +1977,7 @@ function fedora_repository_batch_reingest_object($object, &$context) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
if (!empty($object) && is_array($object)) {
$pid = $object['pid'];
- if (!validPid($pid)) {
+ if (!valid_pid($pid)) {
return NULL;
}
// Does the object exist? If so, purge it.
diff --git a/fedora_repository.solutionpacks.inc b/fedora_repository.solutionpacks.inc
index ad49ce86..de4ce137 100644
--- a/fedora_repository.solutionpacks.inc
+++ b/fedora_repository.solutionpacks.inc
@@ -1,7 +1,7 @@
exists()) {
$object_status = 'Missing';
$needs_install = TRUE;
- } else {
+ }
+ else {
if (isset($object['dsid']) && isset($object['datastream_file']) && isset($object['dsversion'])) {
$datastreams = array(
array(
@@ -96,7 +97,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
'dsversion' => $object['dsversion'],
),
);
- } elseif (!empty($object['datastreams'])) {
+ }
+ elseif (!empty($object['datastreams'])) {
$datastreams = $object['datastreams'];
}
if (!empty($datastreams) && is_array($datastreams)) {
@@ -118,7 +120,7 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
}
}
}
- }
+ }
}
array_push($table_row, $object_status);
$table_rows[] = $table_row;
@@ -137,7 +139,8 @@ function fedora_repository_solution_pack_form(&$form_state, $solution_pack_modul
);
if (!$needs_install && !$needs_update) {
$form['install_status']['#value'] = theme_image('misc/watchdog-ok.png') . t('All required objects are installed and up-to-date.');
- } else {
+ }
+ else {
$form['install_status']['#value'] = theme_image('misc/watchdog-warning.png') . t('Some objects must be re-ingested. See Objects list for details.');
}
$form['submit'] = array(
diff --git a/formClass.inc b/formClass.inc
index f22be8dc..5392a513 100644
--- a/formClass.inc
+++ b/formClass.inc
@@ -1,856 +1,869 @@
- t('Fedora collection list'),
- 'description' => t('Enter the Fedora Collection information here'),
- 'page callback' => 'drupal_get_form',
- 'page arguments' => array('fedora_repository_admin'),
- 'access arguments' => array('administer site configuration'),
- 'type' => MENU_NORMAL_ITEM,
- );
- $items['admin/settings/fedora_repository/collection'] = array(
- 'title' => t('Collection list'),
- 'description' => t('Enter the Fedora collection information here.'),
- 'access arguments' => array('administer site configuration'),
- 'type' => MENU_DEFAULT_LOCAL_TASK,
- 'weight' => 0,
- );
-
- $items['admin/settings/fedora_repository/demoobjects'] = array(
- 'title' => t('Solution Packs'),
- 'description' => t('Install content models and collections required by installed solution packs.'),
- 'page callback' => 'fedora_repository_solution_packs_page',
- 'access arguments' => array('add fedora datastreams'),
- 'file' => 'fedora_repository.solutionpacks.inc',
- 'type' => MENU_LOCAL_TASK,
- );
-
- $items['islandoracm.xsd'] = array(
- 'title' => t('Islandoracm XML Schema Definition'),
- 'page callback' => 'fedora_repository_display_schema',
- 'page arguments' => array('islandoracm.xsd'),
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection'),
- );
-
- $items['collection_policy.xsd'] = array(
- 'title' => t('Islandoracm XML Schema Definition'),
- 'page callback' => 'fedora_repository_display_schema',
- 'page arguments' => array('collection_policy.xsd'),
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection'),
- );
-
- $items['fedora'] = array(
- 'page callback' => 'repository_page',
- 'type' => MENU_CALLBACK,
- '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(
- 'title' => $repository_title,
- 'page callback' => 'repository_page',
- 'type' => MENU_NORMAL_ITEM,
- 'access arguments' => array('view fedora collection'),
- // 'access' => TRUE
- );
-
- $items['fedora/repository/service'] = array(
- 'page callback' => 'repository_service',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection'),
- );
-
- $items['fedora/repository/object_download'] = array(
- 'title' => t('Download object'),
- 'page callback' => 'fedora_object_as_attachment',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection')
- );
- $items['fedora/repository/editmetadata'] = array(
- 'title' => t('Edit metadata'),
- 'page callback' => 'fedora_repository_edit_qdc_page',
- // 'page arguments' => array(1),
- //'type' => MENU_LOCAL_TASK,
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('edit fedora meta data')
- );
- $items['fedora/repository/purgeStream'] = array(
- 'title' => t('Purge data stream'),
- 'page callback' => 'fedora_repository_purge_stream',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('purge objects and datastreams')
- );
- $items['fedora/repository/replaceStream'] = array(
- 'title' => t('Replace Stream'),
- 'page callback' => 'fedora_repository_replace_stream',
-// 'callback arguments' => array(3, 4),
- 'type' => MENU_CALLBACK,
-// 'access callback' => 'fedora_repository_user_access',
- 'access arguments' => array('add fedora datastreams'),
- );
- $items['fedora/repository/purgeObject'] = array(
- 'title' => t('Purge object'),
- 'page callback' => 'fedora_repository_purge_object',
- // 'type' => MENU_LOCAL_TASK,
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('purge objects and datastreams')
- );
- $items['fedora/repository/addStream'] = array(
- 'title' => t('Add stream'),
- 'page callback' => 'add_stream',
- // 'type' => MENU_LOCAL_TASK,
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('add fedora datastreams')
- );
-
- $items['fedora/repository/collection'] = array(
- 'title' => t('Collection view'),
- 'page callback' => 'fedora_collection_view',
- 'type' => MENU_CALLBACK,
- 'access argruments' => array('view fedora collection')
- );
- //new for mnpl******************************************
- $items['fedora/repository/mnpl_advanced_search'] = array(
- 'title' => t('Repository advanced search'),
- 'page callback' => 'fedora_repository_mnpl_advanced_search',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection')
- );
- $items['fedora/ingestObject'] = array(
- 'title' => t('Ingest object'),
- 'page callback' => 'fedora_repository_ingest_object',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('add fedora datastreams')
- );
-
- $items['fedora/repository/list_terms'] = array(
- 'title' => t('List terms'),
- 'page callback' => 'fedora_repository_list_terms',
- 'type' => MENU_CALLBACK,
- '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 */
- $items['fedora/basket'] = array(
- 'title' => t('Fedora Basket'),
- 'description' => t('View and download objects added to your basket'),
- 'page callback' => 'fedora_repository_basket',
- 'access arguments' => array('view fedora collection'),
- 'type' => MENU_CALLBACK,
- );
-
- $items['fedora/repository/addToBasket'] = array(
- 'page callback' => 'fedora_repository_add_to_basket',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection'),
- );
-
- $items['fedora/repository/removeFromBasket'] = array(
- 'page callback' => 'fedora_repository_remove_from_basket',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection'),
- );
-
- $items['fedora/repository/add_search_results_to_basket'] = array(
- 'page callback' => 'fedora_repository_add_search_results_to_basket',
- 'type' => MENU_CALLBACK,
- 'access arguments' => array('view fedora collection'),
- );
-
- return $items;
- }
-
- function createAdminForm() {
- if (!user_access('administer site configuration')) {
- drupal_set_message(t('You must be a site administrator to edit the Fedora collecitons list.'), 'error');
- return;
- }
- module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
- module_load_include('inc', 'fedora_repository', 'ObjectHelper');
- $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(
- '#type' => 'textfield',
- '#title' => t('Default collection PID'),
- '#default_value' => variable_get('fedora_repository_pid', 'islandora:top'),
- '#description' => t('The PID of the collection object to grab the list of items from'),
- '#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,
- '#weight' => -2
- );
-
- $form['fedora_content_model_collection_pid'] = array(
- '#type' => 'textfield',
- '#title' => t('Default Content Model Collection PID'),
- '#default_value' => variable_get('fedora_content_model_collection_pid', 'islandora:ContentModelCollection'),
- '#description' => t('The PID of the Content Model Collection Object'),
- '#required' => TRUE,
- '#weight' => -2
- );
-
-
- $form['fedora_repository_url'] = array(
- '#type' => 'textfield',
- '#title' => t('Fedora RISearch URL'),
- '#default_value' => variable_get('fedora_repository_url', 'http://localhost:8080/fedora/risearch'),
- '#description' => t('The url of the Fedora server'), '#required' => TRUE,
- '#weight' => 0
- );
- $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(
- '#type' => 'textfield',
- '#title' => t('Fedora SOAP Url'),
- '#default_value' => variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'),
- '#description' => t('The URL to use for SOAP connections'),
- '#required' => TRUE,
- '#weight' => 0,
- '#suffix' => '
' . (fedora_available() ? ' ' . t('Successfully connected to Fedora server at !fedora_soap_url', array('!fedora_soap_url' => variable_get('fedora_soap_url', ''))) : ' ' . t('Unable to connect to Fedora server at !fedora_soap_url
', array('!fedora_soap_url' => variable_get('fedora_soap_url', '')))),
- );
- $form['fedora_base_url'] = array(
- '#type' => 'textfield',
- '#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(
- '#type' => 'textfield',
- '#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'),
- '#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,
- '#weight' => 0
- );
-
-// will allow admin user to remove namepsace restrictions if not explicitly disallowed in settings.php
- if (variable_get('allow_open_namespace', TRUE)) {
- $form['fedora_namespace'] = array(
- '#type' => 'fieldset',
- );
-
- $form['fedora_namespace']['fedora_namespace_restriction_enforced'] = array(
- '#weight' => -1,
- '#type' => 'radios',
- '#title' => t('Enforce namespace restrictions'),
- '#options' => array(
- TRUE => t('Enabled'),
- FALSE => t('Disabled')
- ),
- '#description' => t('Allow administrator to restrict user\'s access to the PID namepaces listed below'),
- '#default_value' => variable_get('fedora_namespace_restriction_enforced', TRUE)
- );
-
- $form['fedora_namespace']['fedora_pids_allowed'] = array(
- '#type' => 'textfield',
- '#title' => t('PID namespaces allowed in this Drupal install'),
- '#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '),
- '#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. This could be more than a simple namespace ie demo:mydemos.'),
- '#weight' => 0
- );
- }
- else {
- $form['fedora_pids_allowed'] = array(
- '#type' => 'textfield',
- '#title' => t('PID namespaces allowed in this Drupal install'),
- '#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '),
- '#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. This could be more than a simple namespace ie demo:mydemos.'),
- '#weight' => 0
- );
- }
- $form['fedora_repository_title'] = array(
- '#type' => 'textfield',
- '#title' => t('Fedora Repository Title'),
- '#default_value' => variable_get('fedora_repository_title', 'Digital Repository'),
- '#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.'),
- );
-
- $form['fedora_object_display_title'] = array(
- '#type' => 'select',
- '#title' => t('Display Object Title Behaviour'),
- '#default_value' => variable_get('fedora_object_display_title', ObjectHelper::$DISPLAY_ALWAYS),
- '#options' => array(ObjectHelper::$DISPLAY_ALWAYS => t('Always'), ObjectHelper::$DISPLAY_NEVER => t('Never'), ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT => t('Only if no Content Model display output.')),
- '#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'),
- );
-
- $form['fedora_object_display_description'] = array(
- '#type' => 'select',
- '#title' => t('Display Object Description Behaviour'),
- '#default_value' => variable_get('fedora_object_display_description', ObjectHelper::$DISPLAY_ALWAYS),
- '#options' => array(ObjectHelper::$DISPLAY_ALWAYS => t('Always'), ObjectHelper::$DISPLAY_NEVER => t('Never'), ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT => t('Only if no Content Model display output.')),
- '#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(
- '#type' => 'checkbox',
- '#title' => t('Restrict Access to Fedora Object Datastreams'),
- '#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).'),
- );
-
- $form['fedora_collection_display_list'] = array(
- '#type' => 'select',
- '#title' => t('Display Collection List Behaviour'),
- '#default_value' => variable_get('fedora_collection_display_list', ObjectHelper::$DISPLAY_ALWAYS),
- '#options' => array(ObjectHelper::$DISPLAY_ALWAYS => t('Always'), ObjectHelper::$DISPLAY_NEVER => t('Never'), ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT => t('Only if no Content Model display output.')),
- '#description' => t('Determines when to display the list of objects when viewing a collection page.'),
- );
-
- //Export functionality
- $form['module']['export_area'] = array(
- '#type' => 'textfield',
- '#title' => t('Export area'),
- '#default_value' => variable_get('export_area', file_directory_path() . '/fedora_export_area'),
- '#description' => t("Path to the export area. It must be accessible by druapl (i.e. apache user)."),
- '#required' => TRUE,
- );
-
- $form['#attributes'] = array('enctype' => "multipart/form-data");
-
-
- return system_settings_form($form);
- }
-
- function updateMetaData($form_id, $form_values, $client) {
- // ======================================
- // = begin creation of foxml dom object =
- // ======================================
- $dom = new DomDocument("1.0", "UTF-8");
- $dom->formatOutput = TRUE;
-
- ///begin writing qdc
-
- $oai = $dom->createElement("oai_dc:dc");
- $oai->setAttribute('xmlns:oai_dc', "http://www.openarchives.org/OAI/2.0/oai_dc/");
- $oai->setAttribute('xmlns:dc', "http://purl.org/dc/elements/1.1/");
- $oai->setAttribute('xmlns:dcterms', "http://purl.org/dc/terms/");
- $oai->setAttribute('xmlns:xsi', "http://www.w3.org/2001/XMLSchema-instance");
-
- // DC elements
- $previousElement = NULL; // Used in case we have to nest elements for qualified dublin core.
- foreach ($form_values as $key => $value) {
- $index = strrpos($key, '-');
- $key = substr($key, 0, $index);
- $test = substr($key, 0, 2);
- if ($test == 'dc' || $test == 'ap') { // Don't try to process other form values.
- try {
- if (!strcmp(substr($key, 0, 4), 'app_')) {
- $key = substr($key, 4);
- $previousElement->appendChild($dom->createElement($key, $value));
- }
- else {
- $previousElement = $dom->createElement($key, $value);
- $oai->appendChild($previousElement);
- }
- } catch (exception $e) {
- drupal_set_message(t($e->getMessage()), 'error');
- continue;
- }
- }
- }
-
- $dom->appendChild($oai);
-
- if (!$client) {
- return;
- }
-
- $pid = $form_values['pid'];
- $dsId = $form_values['dsid'];
- $params = array(
- "pid" => $pid,
- "dsID" => $dsId,
- "altIDs" => "",
- "dsLabel" => "Qualified Dublin Core",
- "MIMEType" => "text/xml",
- "formatURI" => "URL",
- "dsContent" => $dom->saveXML(), "checksumType" => "DISABLED", "checksum" => "none",
- "logMessage" => "datastream_modified", "force" => "TRUE");
- try {
- $object = $client->__soapCall('ModifyDatastreamByValue', array($params));
- } catch (exception $e) {
- drupal_set_message(t("Error updating metadata ") . $e->getMessage(), 'error');
- }
- }
-
- function can_ingest_here($collection_pid) {
- module_load_include('inc', 'fedora_repository', 'SecurityClass');
- $securityClass = new SecurityClass();
- return $securityClass->canIngestHere($collection_pid);
- }
-
- /**
- * Drupal's permissions at this point no xacml yet. xacml decisions are made by fedora
- *
- * @param type $collection_pid
- * @return type
- */
- function canShowIngestForm($collection_pid) {
- if (!user_access('ingest new fedora objects')) {
- drupal_set_message(t('You do not have permission to ingest.'), 'error');
- return FALSE;
- }
- module_load_include('inc', 'fedora_repository', 'SecurityClass');
- $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.'));
- return FALSE;
- }
- if ($collection_pid == NULL) {
- drupal_set_message(t('You must specify an collection object pid to ingest an object.'), 'error');
- return 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 . '\'.'));
- return FALSE;
- }
- if (!($content_models = $collection_policy->getContentModels())) {
- 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;
- }
- $potential_models = array();
- foreach ($content_models as $content_model) {
- $identifier = $content_model->getIdentifier();
- $name = $content_model->name;
- $potential_models["$identifier"] = "$name";
- }
- $identifier = key($potential_models);
- $selected_model = isset($form_state['values']['models']) ? $form_state['values']['models'] : $identifier;
- return array(
- 'indicator' => array(
- '#type' => 'fieldset',
- '#title' => t('Ingest digital object into collection_pid !collection_label Step #1', array('collection_pid' => $collection_pid, '!collection_label' => $collection_label)),
- 'models' => array(
- '#type' => 'select',
- '#title' => t('Content models available'),
- '#options' => $potential_models,
- '#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. Additional information may be found here. '),
- ),
- ),
- 'collection_pid' => array(
- '#type' => 'hidden',
- '#value' => $collection_pid
- ),
- 'submit' => array(
- '#type' => 'submit',
- '#submit' => array('fedora_repository_ingest_form_submit'),
- '#value' => t('Next')
- ),
- );
- }
-
- /**
- * 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) {
- drupal_set_message(t("Error Building Ingest Form."), 'error');
- foreach (ContentModel::$errors as $error) {
- drupal_set_message($error, 'error');
- }
- }
- $form['collection_pid'] = array(
- '#type' => 'hidden',
- '#value' => $collection_pid
- );
- $form['submit'] = array(
- '#type' => 'submit',
- '#submit' => array('fedora_repository_ingest_form_submit'),
- '#value' => t('Ingest')
- );
- }
- return $form;
- }
-
- /**
- * 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 {
- return $this->createQDCIngestFormPageTwo($collection_pid, $collection_label, $form_state);
- }
- }
-
- /**
- * Create a multi step form (wizard) for ingesting objects into Fedora
- *
- * @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;
- }
- 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) {
- $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
- function createAddDataStreamForm($pid, &$form_state) {
- //dump_vars($form_state);
- // Populate the list of datastream IDs.
-
- module_load_include('inc', 'fedora_repository', 'ObjectHelper');
- module_load_include('inc', 'fedora_repository', 'ContentModel');
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
-
- $obj_helper = new ObjectHelper();
- $content_models = $obj_helper->get_content_models_list($pid);
- $available_dsids = array();
- if (!empty($content_models)) {
- foreach ($content_models as $content_model) {
-
-
- $newElements = $content_model->listDatastreams();
- if (!empty($newElements)) {
- $available_dsids = array_merge($available_dsids, $newElements);
- }
- }
- }
-
- $item = new Fedora_Item($pid);
- $used_datastreams = $item->get_datastreams_list_as_SimpleXML();
- $used_datastream_ids = array();
- foreach ($used_datastreams->datastreamDef as $used_datastream) {
- array_push($used_datastream_ids, $used_datastream->ID);
- }
- $unused_dsids = array();
-
- if ($form_state['submitted'] && $form_state['clicked_button']['#value'] != 'OK') {
- $form['add_datastream_label'] = array(
- '#value' => t('The datastream has been uploaded. '),
- '#weight' => -10,
- );
- $form['#redirect'] = "fedora/repository/$pid/";
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('OK')
- );
- return $form;
- }
- if (!empty($available_dsids)) {
- $unused_dsids = array_diff($available_dsids, $used_datastream_ids);
- if (empty($unused_dsids)) {
- return;
- }
- }
-
- $form['add_datastream_label'] = array(
- '#value' => t('Add Datastream: '),
- '#weight' => -10,
- );
-
- $form['pid'] = array(
- '#type' => 'hidden',
- '#value' => "$pid"
- );
-
- $form['stream_label'] = array(
- '#title' => 'Datastream Label',
- '#required' => 'TRUE',
- '#description' => t('A Human readable label'),
- '#type' => 'textfield'
- );
-
- $form['#attributes']['enctype'] = 'multipart/form-data';
- $form['add-stream-file-location'] = array(
- '#type' => 'file',
- '#title' => t('Upload Document'),
- '#size' => 48,
- // '#required'=>'TRUE',
- '#description' => t('The file to upload.')
- );
- $form['#redirect'] = "fedora/repository/$pid/";
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Add Datastream')
- );
-
- if (!empty($unused_dsids)) {
- $dsidsForForm = array();
- foreach ($unused_dsids as $dsid) {
- $dsidsForForm[$dsid] = $dsid;
- }
- $form['stream_id'] = array(
- '#type' => 'select',
- '#title' => t('Datastream ID'),
- '#default_value' => variable_get('feed_item_length', 'teaser'),
- '#weight' => '-1',
- '#description' => t('Datastream IDs defined by the content model.'),
- );
- $form['stream_id']['#options'] = array_combine($unused_dsids, $unused_dsids);
- }
- else {
- $form['stream_id'] = array(
- '#title' => 'Datastream ID',
- '#required' => 'TRUE',
- '#description' => t('An ID for this stream that is unique to this object. Must start with a letter and contain only alphanumeric characters and dashes and underscores.'),
- '#type' => 'textfield',
- '#weight' => -1,
- );
- }
- return $form;
- }
-
- /**
- * Create edit form.
- *
- * @param string $pid
- * @param string $dsid
- * @param object $client
- * @param array $form_state
- *
- * @return string
- */
- function createQDCEditForm($pid, $dsid, $client, &$form_state) {
- $dsid = empty($dsid) ? 'QDC' : $dsid;
- try {
- $params = array('pid' => "$pid", 'dsID' => "$dsid", 'asOfDateTime' => "");
- $object = $client->__soapCall('getDatastreamDissemination', array('parameters' => $params));
- } catch (Exception $e) {
- return array();
- }
- $content = $object->dissemination->stream;
- $content = trim($content);
- $doc = new DOMDocument();
- if (!$doc->loadXML($content)) {
- echo "error loading xml";
- }
- $oai_dc = $doc->getElementsByTagName('dc');
- $dcItems = $oai_dc->item(0)->getElementsByTagName('*');
- $form = array();
- for ($i = 0; $i < $dcItems->length; $i++) {
- $name = $dcItems->item($i)->nodeName;
- if ($name == 'dc:description') {
- $form["$name" . '-' . "$i"] = array(
- '#title' => $name,
- '#type' => 'textarea',
- '#default_value' => $dcItems->item($i)->nodeValue,
- '#description' => 'Dublin Core ' . substr($dcItems->item($i)->nodeName, 3)
- );
- }
- elseif ($name == 'dc:title') {
- $form["$name" . '-' . "$i"] = array(
- '#title' => $name,
- '#type' => 'textfield',
- '#required' => 'TRUE',
- '#default_value' => $dcItems->item($i)->nodeValue,
- '#description' => 'Dublin Core ' . substr($dcItems->item($i)->nodeName, 3)
- );
- }
- else {
- if ($oai_dc->item(0)->nodeName != $dcItems->item($i)->parentNode->nodeName) {
- $description = strstr($name, ':');
- $form['app_' . "$name" . '-' . "$i"] = array(
- '#title' => $name,
- '#type' => 'textfield',
- '#default_value' => $dcItems->item($i)->nodeValue,
- '#description' => 'Dublin Core ' . substr($description, 1)
- );
- }
- else {
- $field_type = 'textfield';
- $value = $dcItems->item($i)->nodeValue;
- if ($name == 'dc:coverage') {
- $value = '';
- }
- if ($name == 'dc:rights') {
- $field_type = 'textarea';
- }
- $description = strstr($name, ':');
- $form["$name" . '-' . "$i"] = array(
- '#title' => $name,
- '#type' => $field_type,
- '#default_value' => $value,
- '#description' => 'Dublin Core ' . substr($description, 1)
- );
- }
- }
- }
- $form['pid'] = array(
- '#type' => 'hidden',
- '#value' => "$pid"
- );
- $form['dsid'] = array(
- '#type' => 'hidden',
- '#value' => "$dsid"
- );
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Update Metadata'),
- );
- return $form;
- }
-
- /**
- * Creates a drupal form to edit either the QDC or DC datastream
- */
- 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
- */
- function createReplaceDataStreamForm($pid, $dsId, $dsLabel, &$form_state) {
- $form = array();
-
- $form['#attributes']['enctype'] = 'multipart/form-data';
- $form['file'] = array(
- '#type' => 'file',
- '#title' => t('Upload Document'),
- '#description' => t('The file to upload.')
- );
-
- $form['pid'] = array(
- '#type' => 'value',
- '#value' => $pid,
- );
-
- $form['dsId'] = array(
- '#type' => 'value',
- '#value' => $dsId,
- );
-
- $form['dsLabel'] = array(
- '#type' => 'value',
- '#value' => $dsLabel,
- );
-
- $form['submit'] = array(
- '#type' => 'submit',
- '#value' => t('Replace Datastream')
- );
-
- return $form;
- }
-
+ t('Fedora collection list'),
+ 'description' => t('Enter the Fedora Collection information here'),
+ 'page callback' => 'drupal_get_form',
+ 'page arguments' => array('fedora_repository_admin'),
+ 'access arguments' => array('administer site configuration'),
+ 'type' => MENU_NORMAL_ITEM,
+ );
+ $items['admin/settings/fedora_repository/collection'] = array(
+ 'title' => t('Collection list'),
+ 'description' => t('Enter the Fedora collection information here.'),
+ 'access arguments' => array('administer site configuration'),
+ 'type' => MENU_DEFAULT_LOCAL_TASK,
+ 'weight' => 0,
+ );
+
+ $items['admin/settings/fedora_repository/demoobjects'] = array(
+ 'title' => t('Solution Packs'),
+ 'description' => t('Install content models and collections required by installed solution packs.'),
+ 'page callback' => 'fedora_repository_solution_packs_page',
+ 'access arguments' => array('add fedora datastreams'),
+ 'file' => 'fedora_repository.solutionpacks.inc',
+ 'type' => MENU_LOCAL_TASK,
+ );
+
+ $items['islandoracm.xsd'] = array(
+ 'title' => t('Islandoracm XML Schema Definition'),
+ 'page callback' => 'fedora_repository_display_schema',
+ 'page arguments' => array('islandoracm.xsd'),
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection'),
+ );
+
+ $items['collection_policy.xsd'] = array(
+ 'title' => t('Islandoracm XML Schema Definition'),
+ 'page callback' => 'fedora_repository_display_schema',
+ 'page arguments' => array('collection_policy.xsd'),
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection'),
+ );
+
+ $items['fedora'] = array(
+ 'page callback' => 'repository_page',
+ 'type' => MENU_CALLBACK,
+ '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(
+ 'title' => $repository_title,
+ 'page callback' => 'repository_page',
+ 'type' => MENU_NORMAL_ITEM,
+ 'access arguments' => array('view fedora collection'),
+ // 'access' => TRUE
+ );
+
+ $items['fedora/repository/service'] = array(
+ 'page callback' => 'repository_service',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection'),
+ );
+
+ $items['fedora/repository/object_download'] = array(
+ 'title' => t('Download object'),
+ 'page callback' => 'fedora_object_as_attachment',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection')
+ );
+ $items['fedora/repository/editmetadata'] = array(
+ 'title' => t('Edit metadata'),
+ 'page callback' => 'fedora_repository_edit_qdc_page',
+ // 'page arguments' => array(1),
+ //'type' => MENU_LOCAL_TASK,
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('edit fedora meta data')
+ );
+ $items['fedora/repository/purgeStream'] = array(
+ 'title' => t('Purge data stream'),
+ 'page callback' => 'fedora_repository_purge_stream',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('purge objects and datastreams')
+ );
+ $items['fedora/repository/replaceStream'] = array(
+ 'title' => t('Replace Stream'),
+ 'page callback' => 'fedora_repository_replace_stream',
+// 'callback arguments' => array(3, 4),
+ 'type' => MENU_CALLBACK,
+// 'access callback' => 'fedora_repository_user_access',
+ 'access arguments' => array('add fedora datastreams'),
+ );
+ $items['fedora/repository/purgeObject'] = array(
+ 'title' => t('Purge object'),
+ 'page callback' => 'fedora_repository_purge_object',
+ // 'type' => MENU_LOCAL_TASK,
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('purge objects and datastreams')
+ );
+ $items['fedora/repository/addStream'] = array(
+ 'title' => t('Add stream'),
+ 'page callback' => 'add_stream',
+ // 'type' => MENU_LOCAL_TASK,
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('add fedora datastreams')
+ );
+
+ $items['fedora/repository/collection'] = array(
+ 'title' => t('Collection view'),
+ 'page callback' => 'fedora_collection_view',
+ 'type' => MENU_CALLBACK,
+ 'access argruments' => array('view fedora collection')
+ );
+ //new for mnpl******************************************
+ $items['fedora/repository/mnpl_advanced_search'] = array(
+ 'title' => t('Repository advanced search'),
+ 'page callback' => 'fedora_repository_mnpl_advanced_search',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection')
+ );
+ $items['fedora/ingestObject'] = array(
+ 'title' => t('Ingest object'),
+ 'page callback' => 'fedora_repository_ingest_object',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('add fedora datastreams')
+ );
+
+ $items['fedora/repository/list_terms'] = array(
+ 'title' => t('List terms'),
+ 'page callback' => 'fedora_repository_list_terms',
+ 'type' => MENU_CALLBACK,
+ '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 */
+ $items['fedora/basket'] = array(
+ 'title' => t('Fedora Basket'),
+ 'description' => t('View and download objects added to your basket'),
+ 'page callback' => 'fedora_repository_basket',
+ 'access arguments' => array('view fedora collection'),
+ 'type' => MENU_CALLBACK,
+ );
+
+ $items['fedora/repository/addToBasket'] = array(
+ 'page callback' => 'fedora_repository_add_to_basket',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection'),
+ );
+
+ $items['fedora/repository/removeFromBasket'] = array(
+ 'page callback' => 'fedora_repository_remove_from_basket',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection'),
+ );
+
+ $items['fedora/repository/add_search_results_to_basket'] = array(
+ 'page callback' => 'fedora_repository_add_search_results_to_basket',
+ 'type' => MENU_CALLBACK,
+ 'access arguments' => array('view fedora collection'),
+ );
+
+ return $items;
+ }
+
+ function createAdminForm() {
+ if (!user_access('administer site configuration')) {
+ drupal_set_message(t('You must be a site administrator to edit the Fedora collecitons list.'), 'error');
+ return;
+ }
+ module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
+ module_load_include('inc', 'fedora_repository', 'ObjectHelper');
+ $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(
+ '#type' => 'textfield',
+ '#title' => t('Default collection PID'),
+ '#default_value' => variable_get('fedora_repository_pid', 'islandora:top'),
+ '#description' => t('The PID of the collection object to grab the list of items from'),
+ '#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,
+ '#weight' => -2
+ );
+
+ $form['fedora_content_model_collection_pid'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Default Content Model Collection PID'),
+ '#default_value' => variable_get('fedora_content_model_collection_pid', 'islandora:ContentModelCollection'),
+ '#description' => t('The PID of the Content Model Collection Object'),
+ '#required' => TRUE,
+ '#weight' => -2
+ );
+
+
+ $form['fedora_repository_url'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Fedora RISearch URL'),
+ '#default_value' => variable_get('fedora_repository_url',
+ 'http://localhost:8080/fedora/risearch'),
+ '#description' => t('The url of the Fedora server'), '#required' => TRUE,
+ '#weight' => 0
+ );
+ $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(
+ '#type' => 'textfield',
+ '#title' => t('Fedora SOAP Url'),
+ '#default_value' => variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl'),
+ '#description' => t('The URL to use for SOAP connections'),
+ '#required' => TRUE,
+ '#weight' => 0,
+ '#suffix' => '' . (fedora_available() ? ' ' . t('Successfully connected to Fedora server at !fedora_soap_url', array('!fedora_soap_url' => variable_get('fedora_soap_url', ''))) : ' ' . t('Unable to connect to Fedora server at !fedora_soap_url
', array('!fedora_soap_url' => variable_get('fedora_soap_url', '')))),
+ );
+ $form['fedora_base_url'] = array(
+ '#type' => 'textfield',
+ '#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(
+ '#type' => 'textfield',
+ '#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'),
+ '#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,
+ '#weight' => 0
+ );
+
+// will allow admin user to remove namepsace restrictions if not explicitly disallowed in settings.php
+ if (variable_get('allow_open_namespace', TRUE)) {
+ $form['fedora_namespace'] = array(
+ '#type' => 'fieldset',
+ );
+
+ $form['fedora_namespace']['fedora_namespace_restriction_enforced'] = array(
+ '#weight' => -1,
+ '#type' => 'radios',
+ '#title' => t('Enforce namespace restrictions'),
+ '#options' => array(
+ TRUE => t('Enabled'),
+ FALSE => t('Disabled')
+ ),
+ '#description' => t('Allow administrator to restrict user\'s access to the PID namepaces listed below'),
+ '#default_value' => variable_get('fedora_namespace_restriction_enforced', TRUE)
+ );
+
+ $form['fedora_namespace']['fedora_pids_allowed'] = array(
+ '#type' => 'textfield',
+ '#title' => t('PID namespaces allowed in this Drupal install'),
+ '#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '),
+ '#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. This could be more than a simple namespace ie demo:mydemos.'),
+ '#weight' => 0
+ );
+ }
+ else {
+ $form['fedora_pids_allowed'] = array(
+ '#type' => 'textfield',
+ '#title' => t('PID namespaces allowed in this Drupal install'),
+ '#default_value' => variable_get('fedora_pids_allowed', 'default: demo: changeme: islandora: ilives: '),
+ '#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. This could be more than a simple namespace ie demo:mydemos.'),
+ '#weight' => 0
+ );
+ }
+ $form['fedora_repository_title'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Fedora Repository Title'),
+ '#default_value' => variable_get('fedora_repository_title', 'Digital Repository'),
+ '#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.'),
+ );
+
+ $form['fedora_object_display_title'] = array(
+ '#type' => 'select',
+ '#title' => t('Display Object Title Behaviour'),
+ '#default_value' => variable_get('fedora_object_display_title', ObjectHelper::$DISPLAY_ALWAYS),
+ '#options' => array(ObjectHelper::$DISPLAY_ALWAYS => t('Always'), ObjectHelper::$DISPLAY_NEVER => t('Never'), ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT => t('Only if no Content Model display output.')),
+ '#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'),
+ );
+
+ $form['fedora_object_display_description'] = array(
+ '#type' => 'select',
+ '#title' => t('Display Object Description Behaviour'),
+ '#default_value' => variable_get('fedora_object_display_description', ObjectHelper::$DISPLAY_ALWAYS),
+ '#options' => array(ObjectHelper::$DISPLAY_ALWAYS => t('Always'), ObjectHelper::$DISPLAY_NEVER => t('Never'), ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT => t('Only if no Content Model display output.')),
+ '#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(
+ '#type' => 'checkbox',
+ '#title' => t('Restrict Access to Fedora Object Datastreams'),
+ '#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).'),
+ );
+
+ $form['fedora_collection_display_list'] = array(
+ '#type' => 'select',
+ '#title' => t('Display Collection List Behaviour'),
+ '#default_value' => variable_get('fedora_collection_display_list', ObjectHelper::$DISPLAY_ALWAYS),
+ '#options' => array(ObjectHelper::$DISPLAY_ALWAYS => t('Always'), ObjectHelper::$DISPLAY_NEVER => t('Never'), ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT => t('Only if no Content Model display output.')),
+ '#description' => t('Determines when to display the list of objects when viewing a collection page.'),
+ );
+
+ //Export functionality
+ $form['module']['export_area'] = array(
+ '#type' => 'textfield',
+ '#title' => t('Export area'),
+ '#default_value' => variable_get('export_area', file_directory_path() . '/fedora_export_area'),
+ '#description' => t("Path to the export area. It must be accessible by druapl (i.e. apache user)."),
+ '#required' => TRUE,
+ );
+
+ $form['#attributes'] = array('enctype' => "multipart/form-data");
+
+
+ return system_settings_form($form);
+ }
+
+ function updateMetaData($form_id, $form_values, $client) {
+ // ======================================
+ // = begin creation of foxml dom object =
+ // ======================================
+ $dom = new DomDocument("1.0", "UTF-8");
+ $dom->formatOutput = TRUE;
+
+ ///begin writing qdc
+
+ $oai = $dom->createElement("oai_dc:dc");
+ $oai->setAttribute('xmlns:oai_dc', "http://www.openarchives.org/OAI/2.0/oai_dc/");
+ $oai->setAttribute('xmlns:dc', "http://purl.org/dc/elements/1.1/");
+ $oai->setAttribute('xmlns:dcterms', "http://purl.org/dc/terms/");
+ $oai->setAttribute('xmlns:xsi', "http://www.w3.org/2001/XMLSchema-instance");
+
+ // DC elements
+ $previousElement = NULL; // Used in case we have to nest elements for qualified dublin core.
+ foreach ($form_values as $key => $value) {
+ $index = strrpos($key, '-');
+ $key = substr($key, 0, $index);
+ $test = substr($key, 0, 2);
+ if ($test == 'dc' || $test == 'ap') { // Don't try to process other form values.
+ try {
+ if (!strcmp(substr($key, 0, 4), 'app_')) {
+ $key = substr($key, 4);
+ $previousElement->appendChild($dom->createElement($key, $value));
+ }
+ else {
+ $previousElement = $dom->createElement($key, $value);
+ $oai->appendChild($previousElement);
+ }
+ } catch (exception $e) {
+ drupal_set_message(t($e->getMessage()), 'error');
+ continue;
+ }
+ }
+ }
+
+ $dom->appendChild($oai);
+
+ if (!$client) {
+ return;
+ }
+
+ $pid = $form_values['pid'];
+ $dsId = $form_values['dsid'];
+ $params = array(
+ "pid" => $pid,
+ "dsID" => $dsId,
+ "altIDs" => "",
+ "dsLabel" => "Qualified Dublin Core",
+ "MIMEType" => "text/xml",
+ "formatURI" => "URL",
+ "dsContent" => $dom->saveXML(), "checksumType" => "DISABLED", "checksum" => "none",
+ "logMessage" => "datastream_modified", "force" => "TRUE");
+ try {
+ $object = $client->__soapCall('ModifyDatastreamByValue', array($params));
+ } catch (exception $e) {
+ drupal_set_message(t("Error updating metadata") . " " . $e->getMessage(), 'error');
+ }
+ }
+
+ /**
+ * queries the collection object for a childsecurity datastream and if found parses it
+ * to determine if this user is allowed to ingest in this collection
+ */ we assume if they are able to modify objects in the collection they can ingest as well.
+ function can_ingest_here($collection_pid) {
+ module_load_include('inc', 'fedora_repository', 'SecurityClass');
+ $securityClass = new SecurityClass();
+ return $securityClass->canIngestHere($collection_pid);
+ }
+
+ /**
+ * Drupal's permissions at this point no xacml yet. xacml decisions are made by fedora
+ *
+ * @param type $collection_pid
+ * @return type
+ */
+ function canShowIngestForm($collection_pid) {
+ if (!user_access('ingest new fedora objects')) {
+ drupal_set_message(t('You do not have permission to ingest.'), 'error');
+ return FALSE;
+ }
+ module_load_include('inc', 'fedora_repository', 'SecurityClass');
+ $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.'));
+ return FALSE;
+ }
+ if ($collection_pid == NULL) {
+ drupal_set_message(t('You must specify an collection object pid to ingest an object.'), 'error');
+ return 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 . '\'.'));
+ return FALSE;
+ }
+ if (!($content_models = $collection_policy->getContentModels())) {
+ 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;
+ }
+ $potential_models = array();
+ foreach ($content_models as $content_model) {
+ $identifier = $content_model->getIdentifier();
+ $name = $content_model->name;
+ $potential_models["$identifier"] = "$name";
+ }
+ $identifier = key($potential_models);
+ $selected_model = isset($form_state['values']['models']) ? $form_state['values']['models'] : $identifier;
+ return array(
+ 'indicator' => array(
+ '#type' => 'fieldset',
+ '#title' => t('Ingest digital object into collection_pid !collection_label Step #1', array('collection_pid' => $collection_pid, '!collection_label' => $collection_label)),
+ 'models' => array(
+ '#type' => 'select',
+ '#title' => t('Content models available'),
+ '#options' => $potential_models,
+ '#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. Additional information may be found here. '),
+ ),
+ ),
+ 'collection_pid' => array(
+ '#type' => 'hidden',
+ '#value' => $collection_pid
+ ),
+ 'submit' => array(
+ '#type' => 'submit',
+ '#submit' => array('fedora_repository_ingest_form_submit'),
+ '#value' => t('Next')
+ ),
+ );
+ }
+
+ /**
+ * 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) {
+ drupal_set_message(t("Error Building Ingest Form."), 'error');
+ foreach (ContentModel::$errors as $error) {
+ drupal_set_message($error, 'error');
+ }
+ }
+ $form['collection_pid'] = array(
+ '#type' => 'hidden',
+ '#value' => $collection_pid
+ );
+ $form['submit'] = array(
+ '#type' => 'submit',
+ '#submit' => array('fedora_repository_ingest_form_submit'),
+ '#value' => t('Ingest')
+ );
+ }
+ return $form;
+ }
+
+ /**
+ * 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 {
+ return $this->createQDCIngestFormPageTwo($collection_pid, $collection_label, $form_state);
+ }
+ }
+
+ /**
+ * Create a multi step form (wizard) for ingesting objects into Fedora
+ *
+ * @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;
+ }
+ 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) {
+ $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
+ function createAddDataStreamForm($pid, &$form_state) {
+ //dump_vars($form_state);
+ // Populate the list of datastream IDs.
+
+ module_load_include('inc', 'fedora_repository', 'ObjectHelper');
+ module_load_include('inc', 'fedora_repository', 'ContentModel');
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+
+ $obj_helper = new ObjectHelper();
+ $content_models = $obj_helper->get_content_models_list($pid);
+ $available_dsids = array();
+ if (!empty($content_models)) {
+ foreach ($content_models as $content_model) {
+
+
+ $newElements = $content_model->listDatastreams();
+ if (!empty($newElements)) {
+ $available_dsids = array_merge($available_dsids, $newElements);
+ }
+ }
+ }
+
+ $item = new Fedora_Item($pid);
+ $used_datastreams = $item->get_datastreams_list_as_SimpleXML();
+ $used_datastream_ids = array();
+ foreach ($used_datastreams->datastreamDef as $used_datastream) {
+ array_push($used_datastream_ids, $used_datastream->ID);
+ }
+ $unused_dsids = array();
+
+ if ($form_state['submitted'] && $form_state['clicked_button']['#value'] != 'OK') {
+ $form['add_datastream_label'] = array(
+ '#value' => t('The datastream has been uploaded. '),
+ '#weight' => -10,
+ );
+ $form['#redirect'] = "fedora/repository/$pid/";
+ $form['submit'] = array(
+ '#type' => 'submit',
+ '#value' => t('OK')
+ );
+ return $form;
+ }
+ if (!empty($available_dsids)) {
+ $unused_dsids = array_diff($available_dsids, $used_datastream_ids);
+ if (empty($unused_dsids)) {
+ return;
+ }
+ }
+
+ $form['add_datastream_label'] = array(
+ '#value' => t('Add Datastream: '),
+ '#weight' => -10,
+ );
+
+ $form['pid'] = array(
+ '#type' => 'hidden',
+ '#value' => "$pid"
+ );
+
+ $form['stream_label'] = array(
+ '#title' => 'Datastream Label',
+ '#required' => 'TRUE',
+ '#description' => t('A Human readable label'),
+ '#type' => 'textfield'
+ );
+
+ $form['#attributes']['enctype'] = 'multipart/form-data';
+ $form['add-stream-file-location'] = array(
+ '#type' => 'file',
+ '#title' => t('Upload Document'),
+ '#size' => 48,
+ // '#required'=>'TRUE',
+ '#description' => t('The file to upload.')
+ );
+ $form['#redirect'] = "fedora/repository/$pid/";
+ $form['submit'] = array(
+ '#type' => 'submit',
+ '#value' => t('Add Datastream')
+ );
+
+ if (!empty($unused_dsids)) {
+ $dsidsForForm = array();
+ foreach ($unused_dsids as $dsid) {
+ $dsidsForForm[$dsid] = $dsid;
+ }
+ $form['stream_id'] = array(
+ '#type' => 'select',
+ '#title' => t('Datastream ID'),
+ '#default_value' => variable_get('feed_item_length', 'teaser'),
+ '#weight' => '-1',
+ '#description' => t('Datastream IDs defined by the content model.'),
+ );
+ $form['stream_id']['#options'] = array_combine($unused_dsids, $unused_dsids);
+ }
+ else {
+ $form['stream_id'] = array(
+ '#title' => 'Datastream ID',
+ '#required' => 'TRUE',
+ '#description' => t('An ID for this stream that is unique to this object. Must start with a letter and contain only alphanumeric characters and dashes and underscores.'),
+ '#type' => 'textfield',
+ '#weight' => -1,
+ );
+ }
+ return $form;
+ }
+
+ /**
+ * Create edit form.
+ *
+ * @param string $pid
+ * @param string $dsid
+ * @param object $client
+ * @param array $form_state
+ *
+ * @return string
+ */
+ function createQDCEditForm($pid, $dsid, $client, &$form_state) {
+ $dsid = empty($dsid) ? 'QDC' : $dsid;
+ try {
+ $params = array('pid' => "$pid", 'dsID' => "$dsid", 'asOfDateTime' => "");
+ $object = $client->__soapCall('getDatastreamDissemination', array('parameters' => $params));
+ } catch (Exception $e) {
+ return array();
+ }
+ $content = $object->dissemination->stream;
+ $content = trim($content);
+ $doc = new DOMDocument();
+ if (!$doc->loadXML($content)) {
+ echo "error loading xml";
+ }
+ $oai_dc = $doc->getElementsByTagName('dc');
+ $dcItems = $oai_dc->item(0)->getElementsByTagName('*');
+ $form = array();
+ for ($i = 0; $i < $dcItems->length; $i++) {
+ $name = $dcItems->item($i)->nodeName;
+ if ($name == 'dc:description') {
+ $form["$name" . '-' . "$i"] = array(
+ '#title' => $name,
+ '#type' => 'textarea',
+ '#default_value' => $dcItems->item($i)->nodeValue,
+ '#description' => 'Dublin Core ' . substr($dcItems->item($i)->nodeName, 3)
+ );
+ }
+ elseif ($name == 'dc:title') {
+ $form["$name" . '-' . "$i"] = array(
+ '#title' => $name,
+ '#type' => 'textfield',
+ '#required' => 'TRUE',
+ '#default_value' => $dcItems->item($i)->nodeValue,
+ '#description' => 'Dublin Core ' . substr($dcItems->item($i)->nodeName, 3)
+ );
+ }
+ else {
+ if ($oai_dc->item(0)->nodeName != $dcItems->item($i)->parentNode->nodeName) {
+ $description = strstr($name, ':');
+ $form['app_' . "$name" . '-' . "$i"] = array(
+ '#title' => $name,
+ '#type' => 'textfield',
+ '#default_value' => $dcItems->item($i)->nodeValue,
+ '#description' => 'Dublin Core ' . substr($description, 1)
+ );
+ }
+ else {
+ $field_type = 'textfield';
+ $value = $dcItems->item($i)->nodeValue;
+ if ($name == 'dc:coverage') {
+ $value = '';
+ }
+ if ($name == 'dc:rights') {
+ $field_type = 'textarea';
+ }
+ $description = strstr($name, ':');
+ $form["$name" . '-' . "$i"] = array(
+ '#title' => $name,
+ '#type' => $field_type,
+ '#default_value' => $value,
+ '#description' => 'Dublin Core ' . substr($description, 1)
+ );
+ }
+ }
+ }
+ $form['pid'] = array(
+ '#type' => 'hidden',
+ '#value' => "$pid"
+ );
+ $form['dsid'] = array(
+ '#type' => 'hidden',
+ '#value' => "$dsid"
+ );
+ $form['submit'] = array(
+ '#type' => 'submit',
+ '#value' => t('Update Metadata'),
+ );
+ return $form;
+ }
+
+ /**
+ * Creates a drupal form to edit either the QDC or DC datastream
+ */
+ 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
+ */
+ function createReplaceDataStreamForm($pid, $dsId, $dsLabel, &$form_state) {
+ $form = array();
+
+ $form['#attributes']['enctype'] = 'multipart/form-data';
+ $form['file'] = array(
+ '#type' => 'file',
+ '#title' => t('Upload Document'),
+ '#description' => t('The file to upload.')
+ );
+
+ $form['pid'] = array(
+ '#type' => 'value',
+ '#value' => $pid,
+ );
+
+ $form['dsId'] = array(
+ '#type' => 'value',
+ '#value' => $dsId,
+ );
+
+ $form['dsLabel'] = array(
+ '#type' => 'value',
+ '#value' => $dsLabel,
+ );
+
+ $form['submit'] = array(
+ '#type' => 'submit',
+ '#value' => t('Replace Datastream')
+ );
+
+ return $form;
+ }
+
}
\ No newline at end of file
diff --git a/ilives/book.inc b/ilives/book.inc
index 52524a9a..6480dec1 100644
--- a/ilives/book.inc
+++ b/ilives/book.inc
@@ -1,6 +1,9 @@
handleForm($form_values);
$this->item->purge_datastream('DARWIN_CORE');
$this->item->add_datastream_from_string($dwc->darwinCoreXML, 'DARWIN_CORE',
- 'Darwin Core Metadata', 'text/xml', 'X');
+ 'Darwin Core Metadata', 'text/xml', 'X');
return TRUE;
}
@@ -134,10 +137,10 @@ class IslandoraBook {
$mimetype = new MimeClass();
$new_item = Fedora_Item::ingest_new_item(!empty($form_values['custom_pid']) ? $form_values['custom_pid'] : $form_values['pid'], 'A', $title,
- $user->name);
+ $user->name);
$new_item->add_datastream_from_string($mods_text, 'MODS',
- 'MODS Metadata', 'text/xml', 'X');
+ 'MODS Metadata', 'text/xml', 'X');
$dc = transform_mods_to_dc($mods_text);
if ($dc) {
@@ -193,7 +196,7 @@ class IslandoraBook {
'#content' => $html
);
}
-
+
if (!$hasPage && user_access('ingest new fedora objects')) {
$tabset['third_tab'] = array(
'#type' => 'tabpage',
diff --git a/ilives/fedora_ilives.install b/ilives/fedora_ilives.install
index 3c8c6575..04ed6064 100644
--- a/ilives/fedora_ilives.install
+++ b/ilives/fedora_ilives.install
@@ -1,5 +1,6 @@
IIV app is deployed.',
- array('@iiv-home' => 'http://github.com/islandora/iiv'));
+ array('@iiv-home' => 'http://github.com/islandora/iiv'));
}
else {
$requirements['iiv-war']['value'] = ("Available");
diff --git a/ilives/image_rotator_tagger_block.inc b/ilives/image_rotator_tagger_block.inc
index eb29e23f..d5177101 100755
--- a/ilives/image_rotator_tagger_block.inc
+++ b/ilives/image_rotator_tagger_block.inc
@@ -1,7 +1,8 @@
$title';
$results = $collection->getRelatedItems('ilives:figures', $itqlquery);
//drupal_set_message($results);
-
+
if (empty($results)) {
return NULL;
}
$resultsdoc = new DomDocument();
$resultsdoc->loadXML($results);
-
+
$resultslist = $resultsdoc->getElementsByTagName('result');
- if ( $resultslist->length == 0 ) {
+ if ($resultslist->length == 0) {
return NULL;
}
//return htmlentities(substr($results, 0, 1000));
- $randresult = $resultslist->item( rand()%$resultslist->length );
+ $randresult = $resultslist->item(rand() % $resultslist->length);
if (empty($randresult)) {
return NULL;
}
$objs = $randresult->getElementsByTagName('object');
$obj = $objs->item(0);
- $pid = substr( $obj->getAttribute('uri'), 12);
+ $pid = substr($obj->getAttribute('uri'), 12);
$titles = $randresult->getElementsByTagName('title');
$title = $titles->item(0);
return array('pid' => $pid,
- //'title' => $randresult->textContent);
- 'title' => $title->nodeValue);
-
+ //'title' => $randresult->textContent);
+ 'title' => $title->nodeValue);
}
-
function _fedora_image_rotator_tagger_block_content() {
module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form');
@@ -64,36 +63,39 @@ function _fedora_image_rotator_tagger_block_content() {
}
else {
$result = get_random_image();
-
+
$image_item = new Fedora_Item($result['pid']);
}
- if (!empty ($result)) {
+ if (!empty($result)) {
+
+ $image = theme_image( . $base_url . '/fedora/imageapi/' . $result['pid'] . '/JPG?op=scale&height=500&width=300');
+
return ''
- . l( ' ', 'fedora/repository/'. $result['pid'], array('html' => TRUE, 'alias' => TRUE))
- .'
This image is from '. l($result['title'], 'fedora/ilives_book_viewer/'. substr($image_item->pid, 0, strrpos($image_item->pid, '-')), array('html' => TRUE, 'alias' => TRUE)) . '.'
- . drupal_get_form('fedora_repository_image_tagging_form', $result['pid']) . '
';
- }
+ . l(' ', 'fedora/repository/' . $result['pid'], array('html' => TRUE, 'alias' => TRUE))
+ //. l(t("!image", array(image => $image))
+ . 'This image is from ' . l($result['title'], 'fedora/ilives_book_viewer/' . substr($image_item->pid, 0, strrpos($image_item->pid, '-')), array('html' => TRUE, 'alias' => TRUE)) . '.'
+ . drupal_get_form('fedora_repository_image_tagging_form', $result['pid']) . '
';
+ }
else {
return '';
}
}
-
/*
-function fedora_ilives_preprocess_page(&$variables) {
+ function fedora_ilives_preprocess_page(&$variables) {
drupal_add_js(drupal_get_path('module', 'fedora_ilives').'/fedora_ilives_ajax.js', 'theme');
return TRUE;
-}*/
+ } */
class ShowILivesStreamsInFieldSets {
- private $pid =NULL;
+ private $pid = NULL;
function ShowILivesStreamsInFieldSets($pid) {
//drupal_bootstrap(DRUPAL_BOOTSTRAP_FULL);
- $this->pid=$pid;
+ $this->pid = $pid;
}
-
+
function showJPG() {
module_load_include('inc', 'fedora_repository', 'plugins/tagging_form');
global $base_url;
@@ -102,6 +104,7 @@ class ShowILivesStreamsInFieldSets {
'#value' => ' ',
);
return theme('fieldset', $collection_fieldset)
- . drupal_get_form('fedora_repository_image_tagging_form', $this->pid);
- }
+ . drupal_get_form('fedora_repository_image_tagging_form', $this->pid);
+ }
+
}
diff --git a/ilives/searchTerms.xml b/ilives/searchTerms.xml
index b224c959..651c96a1 100644
--- a/ilives/searchTerms.xml
+++ b/ilives/searchTerms.xml
@@ -1,32 +1,32 @@
-
+
- dc.title
- 1000
-
- dc.title
- Title
-
-
- mods.sor
- Author
-
-
- mods.subject
- Subject
-
+ dc.title
+ 1000
+
+ dc.title
+ Title
+
+
+ mods.sor
+ Author
+
+
+ mods.subject
+ Subject
+
-
- tei.fullText
- Text
-
-
- tei.persName
- People
-
+
+ tei.fullText
+ Text
+
+
+ tei.persName
+ People
+
-
- tei.placeName
- Places
-
-
- tei.orgName
- Organization Name
-
+
+ tei.placeName
+ Places
+
+
+ tei.orgName
+ Organization Name
+
-
+
diff --git a/ilives/tests/fedora_ilives.test b/ilives/tests/fedora_ilives.test
index be8c0ffd..7b1fbae9 100644
--- a/ilives/tests/fedora_ilives.test
+++ b/ilives/tests/fedora_ilives.test
@@ -1,132 +1,133 @@
'Fedora Book',
- 'description' => t('The Fedora repository book content model.'),
- 'group' => t('fedora repository'),
- );
- }
-
- function setUp() {
- parent::setUp('fedora_repository', 'fedora_ilives', 'tabs');
-
- module_load_include('inc', 'fedora_repository', 'api/fedora_item');
-
- // Create and login user.
- $repository_user = $this->drupalCreateFedoraUser(array('add fedora datastreams',
- 'edit fedora meta data',
- 'edit tags datastream',
- 'ingest new fedora objects',
- 'purge objects and datastreams',
- 'view fedora collection',
- 'view detailed list of content'));
-
-
- $this->drupalLogin($repository_user);
-
- }
-
- public function testBookCModel() {
- // First add a book collection
-
- $pid_list = array();
- // Create a collection for ingesting book content model objects.
-
- $ingest_form = array();
- $ingest_form['models'] = 'islandora:collectionCModel/ISLANDORACM';
-
- $this->drupalPost('fedora/ingestObject/islandora:top/Islandora%20Top-Level%20Collection', $ingest_form, 'Next');
-
- $ingest_title = $this->randomName(32);
- $ingest_form_step_2['dc:title'] = $ingest_title;
- $ingest_form_step_2['dc:description'] = $this->randomName(256);
- $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'fedora_ilives') . '/xml/book_collection_policy.xml');
- $this->drupalPost(NULL, $ingest_form_step_2, 'Ingest');
- $this->assertPattern('/Item .* created successfully./', "Verified item created.");
-
- $pid = $this->getIngestedPid();
- $this->drupalGet("fedora/repository/$pid");
- $pid_list[] = $pid;
-
- // Now add a book into the new collection
- $this->pass("Create book collection $pid below top-level collection.", 'fedora book');
- $ingest_book_form = array();
- $ingest_book_form['models'] = 'ilives:bookCModel/ISLANDORACM';
- $this->drupalPost("fedora/ingestObject/$pid/", $ingest_book_form, 'Next');
- $ingest_book_form_step_2 = array();
-
- $ingest_book_form_step_2['mods[mods_record]'] = file_get_contents(drupal_get_path('module', 'fedora_ilives') . '/tests/test_files/mods_record.xml');
- $this->outputScreenContents();
- $this->drupalPost(NULL, $ingest_book_form_step_2, 'Ingest');
- $this->outputScreenContents();
- $book_pid = $this->getIngestedPid();
- $pid_list[] = $book_pid;
- if (!empty($book_pid)) {
- $this->pass("Successfully ingested book object $book_pid.");
- }
- $this->cleanUpRepository($pid_list);
-
- }
-
- private function cleanUpRepository($pid_list = array()) {
- $this->pass("This is the PID list to purge: ". implode(", ", $pid_list) );
- foreach ($pid_list as $pid) {
- $this->drupalPost("fedora/repository/purgeObject/$pid", array(), 'Purge');
- $this->drupalPost(NULL, array(), 'Delete');
- }
- }
-
- private function getIngestedPid() {
- $subject = $this->drupalGetContent();
- $pattern = '/">(.*)<\/a> created successfully./';
- $matches = array();
- $res = preg_match($pattern, $subject, $matches);
- return $matches[1];
- }
-
- private function outputScreenContents($description = '', $basename = '') {
- // This is a hack to get a directory that won't be cleaned up by SimpleTest.
- $file_dir = file_directory_path() . '../simpletest_output_pages';
- if (!is_dir($file_dir)) {
- mkdir($file_dir, 0777, TRUE);
- }
- $output_path = "$file_dir/$basename.". $this->randomName(10) . '.html';
- $rv = file_put_contents($output_path, $this->drupalGetContent());
- $this->pass("$description: Contents of result page are ". l('here', $output_path));
- }
+ public static function getInfo() {
+ return array(
+ 'name' => 'Fedora Book',
+ 'description' => t('The Fedora repository book content model.'),
+ 'group' => t('fedora repository'),
+ );
+ }
+
+ function setUp() {
+ parent::setUp('fedora_repository', 'fedora_ilives', 'tabs');
+
+ module_load_include('inc', 'fedora_repository', 'api/fedora_item');
+
+ // Create and login user.
+ $repository_user = $this->drupalCreateFedoraUser(array('add fedora datastreams',
+ 'edit fedora meta data',
+ 'edit tags datastream',
+ 'ingest new fedora objects',
+ 'purge objects and datastreams',
+ 'view fedora collection',
+ 'view detailed list of content'));
+
+
+ $this->drupalLogin($repository_user);
+ }
+
+ public function testBookCModel() {
+ // First add a book collection
+
+ $pid_list = array();
+ // Create a collection for ingesting book content model objects.
+
+ $ingest_form = array();
+ $ingest_form['models'] = 'islandora:collectionCModel/ISLANDORACM';
+
+ $this->drupalPost('fedora/ingestObject/islandora:top/Islandora%20Top-Level%20Collection', $ingest_form, 'Next');
+
+ $ingest_title = $this->randomName(32);
+ $ingest_form_step_2['dc:title'] = $ingest_title;
+ $ingest_form_step_2['dc:description'] = $this->randomName(256);
+ $ingest_form_step_2['files[ingest-file-location]'] = realpath(drupal_get_path('module', 'fedora_ilives') . '/xml/book_collection_policy.xml');
+ $this->drupalPost(NULL, $ingest_form_step_2, 'Ingest');
+ $this->assertPattern('/Item .* created successfully./', "Verified item created.");
+
+ $pid = $this->getIngestedPid();
+ $this->drupalGet("fedora/repository/$pid");
+ $pid_list[] = $pid;
+
+ // Now add a book into the new collection
+ $this->pass("Create book collection $pid below top-level collection.", 'fedora book');
+ $ingest_book_form = array();
+ $ingest_book_form['models'] = 'ilives:bookCModel/ISLANDORACM';
+ $this->drupalPost("fedora/ingestObject/$pid/", $ingest_book_form, 'Next');
+ $ingest_book_form_step_2 = array();
+
+ $ingest_book_form_step_2['mods[mods_record]'] = file_get_contents(drupal_get_path('module', 'fedora_ilives') . '/tests/test_files/mods_record.xml');
+ $this->outputScreenContents();
+ $this->drupalPost(NULL, $ingest_book_form_step_2, 'Ingest');
+ $this->outputScreenContents();
+ $book_pid = $this->getIngestedPid();
+ $pid_list[] = $book_pid;
+ if (!empty($book_pid)) {
+ $this->pass("Successfully ingested book object $book_pid.");
+ }
+ $this->cleanUpRepository($pid_list);
+ }
+
+ private function cleanUpRepository($pid_list = array()) {
+ $this->pass("This is the PID list to purge: " . implode(", ", $pid_list));
+ foreach ($pid_list as $pid) {
+ $this->drupalPost("fedora/repository/purgeObject/$pid", array(), 'Purge');
+ $this->drupalPost(NULL, array(), 'Delete');
+ }
+ }
+
+ private function getIngestedPid() {
+ $subject = $this->drupalGetContent();
+ $pattern = '/">(.*)<\/a> created successfully./';
+ $matches = array();
+ $res = preg_match($pattern, $subject, $matches);
+ return $matches[1];
+ }
+
+ private function outputScreenContents($description = '', $basename = '') {
+ // This is a hack to get a directory that won't be cleaned up by SimpleTest.
+ $file_dir = file_directory_path() . '../simpletest_output_pages';
+ if (!is_dir($file_dir)) {
+ mkdir($file_dir, 0777, TRUE);
+ }
+ $output_path = "$file_dir/$basename." . $this->randomName(10) . '.html';
+ $rv = file_put_contents($output_path, $this->drupalGetContent());
+ $this->pass("$description: Contents of result page are " . l(t('here'), $output_path));
+ }
protected function drupalCreateFedoraUser($permissions = array('access comments', 'access content', 'post comments', 'post comments without approval')) {
- // Create a role with the given permission set.
- if (!($rid = $this->drupalCreateRole($permissions))) {
- return FALSE;
- }
-
- // Create a user assigned to that role.
- $edit = array();
- $edit['name'] = 'simpletestuser';
- $edit['mail'] = $edit['name'] . '@example.com';
- $edit['roles'] = array($rid => $rid);
- $edit['pass'] = 'simpletestpass';
- $edit['status'] = 1;
-
- $account = user_save('', $edit);
-
- $this->assertTrue(!empty($account->uid), t('User created with name %name and pass %pass', array('%name' => $edit['name'], '%pass' => $edit['pass'])), t('User login'));
- if (empty($account->uid)) {
- return FALSE;
- }
-
- // Add the raw password so that we can log in as this user.
- $account->pass_raw = $edit['pass'];
- return $account;
- }
-
-}
\ No newline at end of file
+ // Create a role with the given permission set.
+ if (!($rid = $this->drupalCreateRole($permissions))) {
+ return FALSE;
+ }
+
+ // Create a user assigned to that role.
+ $edit = array();
+ $edit['name'] = 'simpletestuser';
+ $edit['mail'] = $edit['name'] . '@example.com';
+ $edit['roles'] = array($rid => $rid);
+ $edit['pass'] = 'simpletestpass';
+ $edit['status'] = 1;
+
+ $account = user_save('', $edit);
+
+ $this->assertTrue(!empty($account->uid), t('User created with name %name and pass %pass', array('%name' => $edit['name'], '%pass' => $edit['pass'])), t('User login'));
+ if (empty($account->uid)) {
+ return FALSE;
+ }
+
+ // Add the raw password so that we can log in as this user.
+ $account->pass_raw = $edit['pass'];
+ return $account;
+ }
+
+}
+
diff --git a/ilives/tests/test_files/mods_record.xml b/ilives/tests/test_files/mods_record.xml
index 6ec2a1d2..c9dc081b 100644
--- a/ilives/tests/test_files/mods_record.xml
+++ b/ilives/tests/test_files/mods_record.xml
@@ -1,83 +1,83 @@
-
-
- The
- amazing Maurice and his educated rodents
-
-
- Pratchett, Terry.
-
- creator
-
-
- text
- novel
-
-
- enk
-
-
- London
-
- Corgi Books
- 2002
- 2001
- monographic
-
-
- eng
-
-
-
- 269 p. ; 22 cm.
-
- A talking cat, intelligent rats, and a strange boy cooperate in a Pied Piper scam until they try to con the wrong town and are confronted by a deadly evil rat king.
- juvenile
- Terry Pratchett.
- Carnegie Medal winner.
-
- Discworld (Imaginary place)
- Fiction
-
-
- Discworld (Imaginary place)
- Fiction
-
-
- Rats
- Fiction
-
-
- Cats
- Fiction
-
-
- Fantasy fiction
-
-
- Humorous stories
-
- PZ7.P8865 Am 2002
-
-
- Discworld series
-
-
- Pratchett, Terry.
-
-
- 006001234X (library binding)
- 0385601239
- 0552546933 (pbk.)
-
- CaNWHRN
- 010730
- 20020314 .0
-
- eng
-
-
-
+
+
+ The
+ amazing Maurice and his educated rodents
+
+
+ Pratchett, Terry.
+
+ creator
+
+
+ text
+ novel
+
+
+ enk
+
+
+ London
+
+ Corgi Books
+ 2002
+ 2001
+ monographic
+
+
+ eng
+
+
+
+ 269 p. ; 22 cm.
+
+ A talking cat, intelligent rats, and a strange boy cooperate in a Pied Piper scam until they try to con the wrong town and are confronted by a deadly evil rat king.
+ juvenile
+ Terry Pratchett.
+ Carnegie Medal winner.
+
+ Discworld (Imaginary place)
+ Fiction
+
+
+ Discworld (Imaginary place)
+ Fiction
+
+
+ Rats
+ Fiction
+
+
+ Cats
+ Fiction
+
+
+ Fantasy fiction
+
+
+ Humorous stories
+
+ PZ7.P8865 Am 2002
+
+
+ Discworld series
+
+
+ Pratchett, Terry.
+
+
+ 006001234X (library binding)
+ 0385601239
+ 0552546933 (pbk.)
+
+ CaNWHRN
+ 010730
+ 20020314 .0
+
+ eng
+
+
+
diff --git a/ilives/xml/book_collection_policy.xml b/ilives/xml/book_collection_policy.xml
index 8c4639f5..07a01745 100644
--- a/ilives/xml/book_collection_policy.xml
+++ b/ilives/xml/book_collection_policy.xml
@@ -1,22 +1,22 @@
-
-
-
-
- dc.title
- dc.creator
- dc.description
- dc.date
- dc.identifier
- dc.language
- dc.publisher
- dc.rights
- dc.subject
- dc.relation
- dcterms.temporal
- dcterms.spatial
- Full Text
-
- isMemberOfCollection
+
+
+
+
+ dc.title
+ dc.creator
+ dc.description
+ dc.date
+ dc.identifier
+ dc.language
+ dc.publisher
+ dc.rights
+ dc.subject
+ dc.relation
+ dcterms.temporal
+ dcterms.spatial
+ Full Text
+
+ isMemberOfCollection
\ No newline at end of file
diff --git a/ilives/xml/ilives_CollectionModel.xml b/ilives/xml/ilives_CollectionModel.xml
index c5d4d7bd..bc9d58a9 100644
--- a/ilives/xml/ilives_CollectionModel.xml
+++ b/ilives/xml/ilives_CollectionModel.xml
@@ -3,95 +3,95 @@
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">
-
-
-
-
-
-
-
-
-
-
-
-
-
-ingest
-
-fedoraAdmin
-2009-01-23T20:43:42.518Z
-Created with Admin GUI "New Object" command
-
-
-
-modifyDatastreamByValue
-RELS-EXT
-fedoraAdmin
-2009-01-23T20:45:33.190Z
-
-
-
-
-modifyDatastreamByValue
-DC
-fedoraAdmin
-2009-01-23T20:48:22.246Z
-
-
-
-
-ingest
-
-fedoraAdmin
-2009-01-26T20:27:14.697Z
-Ingested from local file /opt/fedora/export/ilives_CollectionModel.xml
-
-
-
-ingest
-
-fedoraAdmin
-2009-03-21T22:35:49.622Z
-Ingested from local file /Volumes/iLives/iLivesTexts/215258_jpg/Content_Models/CollectionCModel.xml
-
-
-
-ingest
-
-admin
-2009-09-14T14:09:41.955Z
-Fedora Object Ingested
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-01-23T20:43:42.518Z
+ Created with Admin GUI "New Object" command
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2009-01-23T20:45:33.190Z
+
+
+
+
+ modifyDatastreamByValue
+ DC
+ fedoraAdmin
+ 2009-01-23T20:48:22.246Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-01-26T20:27:14.697Z
+ Ingested from local file /opt/fedora/export/ilives_CollectionModel.xml
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-03-21T22:35:49.622Z
+ Ingested from local file /Volumes/iLives/iLivesTexts/215258_jpg/Content_Models/CollectionCModel.xml
+
+
+
+ ingest
+
+ admin
+ 2009-09-14T14:09:41.955Z
+ Fedora Object Ingested
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
This DS-COMPOSITE-MODEL datastream is included as a starting point to
assist in the creation of a content model. The DS-COMPOSITE-MODEL
should define the datastreams that are required for any objects
@@ -104,35 +104,36 @@ xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
-
-
- IslandLives Collection Model
- ilives:CollectionModel
-
-
-
-
-
-
- IslandLives Collection
- Made possible through a generous private donation, the IslandLives project builds on the Robertson Library’s mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI's ongoing commitment to making PEI's cultural and published heritage available to all.
+
+
+
+
+
+
+
+
+
+
+
+
+ IslandLives Collection Model
+ ilives:CollectionModel
+
+
+
+
+
+
+ IslandLives Collection
+ Made possible through a generous private donation, the IslandLives project builds on the Robertson Library’s mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI's ongoing commitment to making PEI's cultural and published heritage available to all.
Utilizing the library’s “Prince Edward Island Collection” and the latest in digitization technology, IslandLives will start by digitizing 300 or so published community histories dating from the mid-1800’s to the present day. These transformed community histories will form the basis of a rich online repository.
IslandLives will provide a variety of search interfaces that will allow users to browse and search the content by name, community, time period, and keyword. The Island community will have a whole new way to rediscover, search and share their stories.
-This project will engage and build community – recruiting interested individuals from the cultural heritage community and everyday Islanders. Project staff will travel to communities and host ‘digitization days’, introducing community members to the project and its goals, providing them with an opportunity to digitize their own content, and to contribute their content to the IslandLives collection.
- Robertson Library, University of Prince Edward Island
- ilives:CollectionModel
-
-
-
-
+This project will engage and build community – recruiting interested individuals from the cultural heritage community and everyday Islanders. Project staff will travel to communities and host ‘digitization days’, introducing community members to the project and its goals, providing them with an opportunity to digitize their own content, and to contribute their content to the IslandLives collection.
+
+ Robertson Library, University of Prince Edward Island
+ ilives:CollectionModel
+
+
+
+
\ No newline at end of file
diff --git a/ilives/xml/ilives_bookCModel.xml b/ilives/xml/ilives_bookCModel.xml
index b6042042..99195fc5 100644
--- a/ilives/xml/ilives_bookCModel.xml
+++ b/ilives/xml/ilives_bookCModel.xml
@@ -1,130 +1,130 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:56:58.331Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_bookCModel.xml
-
-
-
- ingest
-
- fedoraAdmin
- 2010-05-31T19:56:44.131Z
- Ingested from source repository with pid ilives:bookCModel
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-10T17:43:56.335Z
- Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_bookCModel.xml
-
-
-
- addDatastream
- ISLANDORACM
- fedoraAdmin
- 2010-06-10T19:01:39.144Z
- DatastreamsPane generated this logMessage.
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-10T19:29:20.220Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-10T19:46:24.930Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-16T11:27:32.059Z
- Ingested from local file /Users/aoneill/Dropbox/fedora_repository/content_models/ilives_bookCModel.xml
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-16T11:29:54.285Z
-
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-06-16T18:36:16.581Z
-
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-16T16:14:12.989Z
- Ingested from local file /Applications/MAMP/htdocs/f3/sites/default/modules/fedora_repository/content_models/ilives_bookCModel.xml
-
-
-
- modifyDatastreamByValue
- ISLANDORACM
- fedoraAdmin
- 2010-09-16T17:43:54.445Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:56:58.331Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_bookCModel.xml
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-05-31T19:56:44.131Z
+ Ingested from source repository with pid ilives:bookCModel
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-10T17:43:56.335Z
+ Ingested from local file /Users/aoneill/fedora_repository/content_models/ilives_bookCModel.xml
+
+
+
+ addDatastream
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-10T19:01:39.144Z
+ DatastreamsPane generated this logMessage.
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-10T19:29:20.220Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-10T19:46:24.930Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-16T11:27:32.059Z
+ Ingested from local file /Users/aoneill/Dropbox/fedora_repository/content_models/ilives_bookCModel.xml
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-16T11:29:54.285Z
+
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-06-16T18:36:16.581Z
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-16T16:14:12.989Z
+ Ingested from local file /Applications/MAMP/htdocs/f3/sites/default/modules/fedora_repository/content_models/ilives_bookCModel.xml
+
+
+
+ modifyDatastreamByValue
+ ISLANDORACM
+ fedoraAdmin
+ 2010-09-16T17:43:54.445Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
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
@@ -137,388 +137,388 @@
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- Book Content Model
- ilives:bookCModel
-
-
-
-
-
- Book Content Model
+ ilives:bookCModel
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- ilives
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ ilives
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
- image/tif
-
-
-
-
- fedora_ilives
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+ image/tif
+
+
+
+
+ fedora_ilives
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- fedora_ilives
- plugins/herbarium.inc
- Herbarium
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+
+
+
+
+ fedora_ilives
+ plugins/herbarium.inc
+ Herbarium
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- image/tiff
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- showFieldSets
-
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ image/tiff
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ showFieldSets
+
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- text/xml
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- showFieldSets
-
-
-
-
-
-
-
- text/xml
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- ingestBook
- MODS
-
-
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildDrupalForm
- handleIngestForm
-
-
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- buildEditMetadataForm
-
-
- fedora_ilives
- book.inc
- IslandoraBook
- handleEditMetadataForm
-
-
-
-
-
-
+
+
+ text/xml
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ showFieldSets
+
+
+
+
+
+
+
+ text/xml
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ ingestBook
+ MODS
+
+
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildDrupalForm
+ handleIngestForm
+
+
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ buildEditMetadataForm
+
+
+ fedora_ilives
+ book.inc
+ IslandoraBook
+ handleEditMetadataForm
+
+
+
+
+
+
-
-
-
- text/xml
-
-
-
- text/xml
-
-
+
+
+ text/xml
+
+
+
+ text/xml
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
-
+
+
+
+
diff --git a/ilives/xml/ilives_collection.xml b/ilives/xml/ilives_collection.xml
index 23801263..a2803960 100644
--- a/ilives/xml/ilives_collection.xml
+++ b/ilives/xml/ilives_collection.xml
@@ -3,54 +3,54 @@
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
-
-
-
-
-
-
-
-
-
-
-
-
-
-ingest
-
-fedoraAdmin
-2009-05-14T19:32:21.132Z
-Created with Admin GUI "New Object" command
-
-
-
-modifyDatastreamByValue
-DC
-fedoraAdmin
-2009-05-14T19:35:11.912Z
-
-
-
-
-
-
-
-
-
-
- IslandLives Collection
- ilives:collection
-
-
-
-
-
-
- IslandLives Collection
- Made possible through a generous private donation, IslandLives contains community and church histories and it builds on the Robertson Library's mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI"s ongoing commitment to making PEI"s cultural and published heritage available to all. Welcome.
- ilives:collection
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-05-14T19:32:21.132Z
+ Created with Admin GUI "New Object" command
+
+
+
+ modifyDatastreamByValue
+ DC
+ fedoraAdmin
+ 2009-05-14T19:35:11.912Z
+
+
+
+
+
+
+
+
+
+
+ IslandLives Collection
+ ilives:collection
+
+
+
+
+
+
+ IslandLives Collection
+ Made possible through a generous private donation, IslandLives contains community and church histories and it builds on the Robertson Library's mission to preserve and share unique material relating to Prince Edward Island and demonstrates UPEI"s ongoing commitment to making PEI"s cultural and published heritage available to all. Welcome.
+ ilives:collection
+
+
+
+
\ No newline at end of file
diff --git a/ilives/xml/ilives_figuresCModel.xml b/ilives/xml/ilives_figuresCModel.xml
index 7b63ae7b..05ea5f02 100644
--- a/ilives/xml/ilives_figuresCModel.xml
+++ b/ilives/xml/ilives_figuresCModel.xml
@@ -1,20 +1,20 @@
-
- image/jpeg
-
-
-
-
- fedora_ilives
- image_rotator_tagger_block.inc
- ShowILivesStreamsInFieldSets
- showJPG
-
-
-
- image/jpeg
-
-
-
+
+ image/jpeg
+
+
+
+
+ fedora_ilives
+ image_rotator_tagger_block.inc
+ ShowILivesStreamsInFieldSets
+ showJPG
+
+
+
+ image/jpeg
+
+
+
diff --git a/ilives/xml/ilives_jp2Sdef.xml b/ilives/xml/ilives_jp2Sdef.xml
index f7212084..0f21ef52 100644
--- a/ilives/xml/ilives_jp2Sdef.xml
+++ b/ilives/xml/ilives_jp2Sdef.xml
@@ -1,81 +1,81 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:56:59.840Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdef.xml
-
-
-
- ingest
-
- admin
- 2010-05-25T13:17:14.106Z
- Fedora Object Ingested
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-01T01:40:47.337Z
- Ingested from local file /Users/al/fedora_repository/content_models/ilives_jp2Sdef.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:56:59.840Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdef.xml
+
+
+
+ ingest
+
+ admin
+ 2010-05-25T13:17:14.106Z
+ Fedora Object Ingested
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-01T01:40:47.337Z
+ Ingested from local file /Users/al/fedora_repository/content_models/ilives_jp2Sdef.xml
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:jp2Sdef
- ilives:jp2Sdef
-
-
-
-
-
- ilives:jp2Sdef
+ ilives:jp2Sdef
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
diff --git a/ilives/xml/ilives_jp2Sdep-pageCModel.xml b/ilives/xml/ilives_jp2Sdep-pageCModel.xml
index 7eedea6d..0aa21432 100644
--- a/ilives/xml/ilives_jp2Sdep-pageCModel.xml
+++ b/ilives/xml/ilives_jp2Sdep-pageCModel.xml
@@ -1,179 +1,179 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:57:00.246Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdep-pageCModel.xml
-
-
-
- ingest
-
- fedoraAdmin
- 2010-06-01T00:46:19.239Z
- Ingested from local file /Users/al/Desktop/ilives_jp2Sdep-pageCModel.xml
-
-
-
- modifyDatastreamByValue
- RELS-EXT
- fedoraAdmin
- 2010-06-01T00:48:39.302Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:57:00.246Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_jp2Sdep-pageCModel.xml
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2010-06-01T00:46:19.239Z
+ Ingested from local file /Users/al/Desktop/ilives_jp2Sdep-pageCModel.xml
+
+
+
+ modifyDatastreamByValue
+ RELS-EXT
+ fedoraAdmin
+ 2010-06-01T00:48:39.302Z
+
+
+
+
+
+
+
+
-
-
+
- ilives:jp2Sdep-pageCModel
- ilives:jp2Sdep-pageCModel
-
-
-
-
-
- ilives:jp2Sdep-pageCModel
+ ilives:jp2Sdep-pageCModel
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- DC
- text/xml
-
-
-
-
-
-
-
-
+
+
+ DC
+ text/xml
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ilives/xml/ilives_pageCModel.xml b/ilives/xml/ilives_pageCModel.xml
index 0f24edeb..2e5e5638 100644
--- a/ilives/xml/ilives_pageCModel.xml
+++ b/ilives/xml/ilives_pageCModel.xml
@@ -1,52 +1,52 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:57:00.652Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_pageCModel.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:57:00.652Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_pageCModel.xml
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
This DS-COMPOSITE-MODEL datastream is included as a starting point to
assist in the creation of a content model. The DS-COMPOSITE-MODEL
should define the datastreams that are required for any objects
@@ -59,43 +59,43 @@
demo:TEI_TO_PDFDOC, and demo:XML_TO_HTMLDOC.
For more information about the demonstration objects, see:
http://fedora-commons.org/confluence/x/AwFI.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- Page Content Model
- ilives:pageCModel
-
-
-
-
+ Page Content Model
+ ilives:pageCModel
+
+
+
+
diff --git a/ilives/xml/ilives_tei2htmlSdef.xml b/ilives/xml/ilives_tei2htmlSdef.xml
index f626c690..a387e512 100644
--- a/ilives/xml/ilives_tei2htmlSdef.xml
+++ b/ilives/xml/ilives_tei2htmlSdef.xml
@@ -1,64 +1,64 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:57:01.057Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdef.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:57:01.057Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdef.xml
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:tei2htmlSdef
- ilives:tei2htmlSdef
-
-
-
-
-
- ilives:tei2htmlSdef
+ ilives:tei2htmlSdef
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/ilives/xml/ilives_tei2htmlSdep-pageCModel.xml b/ilives/xml/ilives_tei2htmlSdep-pageCModel.xml
index 3a2c5d9a..07351348 100644
--- a/ilives/xml/ilives_tei2htmlSdep-pageCModel.xml
+++ b/ilives/xml/ilives_tei2htmlSdep-pageCModel.xml
@@ -1,226 +1,233 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T14:57:01.366Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdep-pageCModel.xml
-
-
-
- modifyDatastreamByValue
- XSL
- fedoraAdmin
- 2009-12-11T19:09:52.417Z
-
-
-
-
- modifyDatastreamByValue
- XSL
- fedoraAdmin
- 2009-12-11T19:22:11.096Z
-
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T14:57:01.366Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_tei2htmlSdep-pageCModel.xml
+
+
+
+ modifyDatastreamByValue
+ XSL
+ fedoraAdmin
+ 2009-12-11T19:09:52.417Z
+
+
+
+
+ modifyDatastreamByValue
+ XSL
+ fedoraAdmin
+ 2009-12-11T19:22:11.096Z
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:tei2htmlSdep-pageCModel
- ilives:tei2htmlSdep-pageCModel
-
-
-
-
-
- ilives:tei2htmlSdep-pageCModel
+ ilives:tei2htmlSdep-pageCModel
+
+
+
+
+
+
-
-
-
- TEI
- text/xml
-
-
-
- XSL
- text/xml
-
-
-
-
-
-
-
-
+
+
+ TEI
+ text/xml
+
+
+
+ XSL
+ text/xml
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- search persName
- _blank
- http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22 + %22+AND+dc.type:collection
-
-
-
-
-
-
-
-
-
-
-
- search placeName
- _blank
- http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22 %22+AND+dc.type:collection
-
-
-
-
-
- search orgName
- _blank
- http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22 %22+AND+dc.type:collection
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ search persName
+ _blank
+ http://islandlives.net/fedora/ilives_book_search/tei.persNameTERM:%22
+ +
+ %22+AND+dc.type:collection
+
+
+
+
+
+
+
+
+
+
+
+
+ search placeName
+ _blank
+ http://islandlives.net/fedora/ilives_book_search/tei.placeNameTERM:%22
+ %22+AND+dc.type:collection
+
+
+
+
+
+
+ search orgName
+ _blank
+ http://islandlives.net/fedora/ilives_book_search/tei.orgNameTERM:%22
+ %22+AND+dc.type:collection
+
+
+
+
+
+
+
+
+
diff --git a/ilives/xml/ilives_viewerSdef.xml b/ilives/xml/ilives_viewerSdef.xml
index a97c50a2..18018cfa 100644
--- a/ilives/xml/ilives_viewerSdef.xml
+++ b/ilives/xml/ilives_viewerSdef.xml
@@ -1,64 +1,64 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T17:09:29.912Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdef.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T17:09:29.912Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdef.xml
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:viewerSdef
- ilives:viewerSdef
-
-
-
-
-
- ilives:viewerSdef
+ ilives:viewerSdef
+
+
+
+
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
diff --git a/ilives/xml/ilives_viewerSdep-bookCModel.xml b/ilives/xml/ilives_viewerSdep-bookCModel.xml
index e5688998..ec7993b1 100644
--- a/ilives/xml/ilives_viewerSdep-bookCModel.xml
+++ b/ilives/xml/ilives_viewerSdep-bookCModel.xml
@@ -1,133 +1,133 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-12T17:09:41.797Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-bookCModel.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-12T17:09:41.797Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-bookCModel.xml
+
+
+
+
+
+
+
-
-
+
- ilives:viewerSdep-bookCModel
- ilives:viewerSdep-bookCModel
-
-
-
-
-
- ilives:viewerSdep-bookCModel
+ ilives:viewerSdep-bookCModel
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
- DC
- text/xml
-
-
-
-
-
-
-
-
+
+
+ DC
+ text/xml
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ilives/xml/ilives_viewerSdep-pageCModel.xml b/ilives/xml/ilives_viewerSdep-pageCModel.xml
index 6b30cd67..e19fe7c5 100644
--- a/ilives/xml/ilives_viewerSdep-pageCModel.xml
+++ b/ilives/xml/ilives_viewerSdep-pageCModel.xml
@@ -1,133 +1,133 @@
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
-
-
-
- ingest
-
- fedoraAdmin
- 2009-11-24T14:52:27.296Z
- Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-pageCModel.xml
-
-
-
-
-
-
-
+
+
+
+ ingest
+
+ fedoraAdmin
+ 2009-11-24T14:52:27.296Z
+ Ingested from local file /Users/aoneill/dev/iiv/iiv/etc/fedora-objects/ilives_viewerSdep-pageCModel.xml
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
- ilives:viewerSdep-pageCModel
- ilives:viewerSdep-pageCModel
-
-
-
-
-
- ilives:viewerSdep-pageCModel
+ ilives:viewerSdep-pageCModel
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
-
-
-
- DC
- text/xml
-
-
-
-
-
-
-
-
+
+
+ DC
+ text/xml
+
+
+
+
+
+
+
+
-
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/ilives/xsl/MODS3-22simpleDC.xsl b/ilives/xsl/MODS3-22simpleDC.xsl
index 4a4eff8d..eb147a42 100644
--- a/ilives/xsl/MODS3-22simpleDC.xsl
+++ b/ilives/xsl/MODS3-22simpleDC.xsl
@@ -37,372 +37,375 @@ Version 1.0 2007-05-04 Tracy Meehleib
-->
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
- :
-
-
-
- .
-
-
-
- .
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+ :
+
+
+
+ .
+
+
+
+ .
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- --
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ --
+
-
-
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- -
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Collection
-
-
- DataSet
-
-
- Service
-
-
- Software
-
-
- Image
-
-
- InteractiveResource
-
-
- MovingImage
-
-
- PhysicalObject
-
-
- Sound
-
-
- StillImage
-
-
- Text
-
-
- Text
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- :
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ -
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Collection
+
+
+ DataSet
+
+
+ Service
+
+
+ Software
+
+
+ Image
+
+
+ InteractiveResource
+
+
+ MovingImage
+
+
+ PhysicalObject
+
+
+ Sound
+
+
+ StillImage
+
+
+ Text
+
+
+ Text
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ :
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
- --
-
-
-
-
-
-
-
-
+
+ --
+
+
+
+
+
+
+
+
-
-
- --
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- ,
-
-
-
- ,
-
-
-
-
- (
-
- )
-
-
- (
-
- )
-
-
-
-
-
-
-
-
- -
-
-
+
+
+ --
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ ,
+
+
+
+ ,
+
+
+
+
+ (
+
+ )
+
+
+ (
+
+ )
+
+
+
+
+
+
+
+
+ -
+
+
+
-
- -
-
+
+ -
+
+
-
-
-
+
+
+
-
+
diff --git a/ilives/xsl/book_view.xsl b/ilives/xsl/book_view.xsl
index a8bfb825..47559c12 100644
--- a/ilives/xsl/book_view.xsl
+++ b/ilives/xsl/book_view.xsl
@@ -1,65 +1,174 @@
-
-
+
+
-
-
-
-
-
-
-
+
+
+
+
+
+
+
-
+
-
- :
-
+
+
+
+
+
+ :
+
+
+
+
+
-
-
-
-
- fedora/repository/ /TN
-
-
+
+
+
+
+
+
+
+
+
+ fedora/repository/
+ /TN
+
+
-
+
+
+
+
+
+
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
+
\ No newline at end of file
diff --git a/ilives/xsl/pageResults.xsl b/ilives/xsl/pageResults.xsl
index fccee47a..e9476308 100644
--- a/ilives/xsl/pageResults.xsl
+++ b/ilives/xsl/pageResults.xsl
@@ -1,160 +1,165 @@
-
-
-
+
+
+
-
-
+
+
-
+
-
+
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
Total Hits =
-
- ,
-
+
+ ,
+
- We have repeated your search within this book and found results on the following pages.
+ We have repeated your search within this book and found results on the following pages.
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
-
-
+
+
+
-
-
-
+
+
+
-
+
-
+
-
+
-
-
-
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
-
-
-
-
- fedora/ilives_book_viewer/
-
-
- Thumbnail
-
+
+
+
+
+
+
+ fedora/ilives_book_viewer/
+
+
+
+ Thumbnail
+
+
+
- fedora/repository/ /TN
-
-
-
-
-
-
- fedora/ilives_book_viewer/
-
-
+ fedora/repository/
+ /TN
+
+
+
-
+
+
+ fedora/ilives_book_viewer/
+
+
+
+
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/ilives/xsl/results.xsl b/ilives/xsl/results.xsl
index 0757ea1e..c62fb169 100644
--- a/ilives/xsl/results.xsl
+++ b/ilives/xsl/results.xsl
@@ -1,76 +1,89 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
- Total Hits = ,
- Number of Hits/page =
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+ Total Hits =
+
+ ,
+
+ Number of Hits/page =
+
-
+
-
-
-
-