Browse Source

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

pull/110/head
jonathangreen 13 years ago
parent
commit
bda288d3df
  1. 158
      includes/datastream.inc
  2. 19
      includes/islandora_dublin_core.inc
  3. BIN
      islandora_basic_collection/Crystal_Clear_filesystem_folder_grey.png
  4. 95
      islandora_basic_collection/islandora_basic_collection.install
  5. 58
      islandora_basic_collection/xml/islandora_collection_CModel.xml
  6. 68
      islandora_basic_collection/xml/islandora_root_collection.xml
  7. BIN
      islandora_basic_image/Crystal_Clear_filesystem_folder_grey.png
  8. 98
      islandora_basic_image/islandora_basic_image.install
  9. 35
      islandora_basic_image/islandora_basic_image.module
  10. 818
      islandora_basic_image/xml/islandora_basic_imageCM.xml
  11. 48
      islandora_basic_image/xml/islandora_basic_image_collection.xml
  12. 11
      islandora_basic_image/xml/islandora_basic_image_collection_policy.xml
  13. 75
      islandora_basic_image/xml/simple_islandora_basic_imageCM.xml

158
includes/datastream.inc

@ -12,6 +12,9 @@
* @return stream
* prints datastream to browser
*/
define('DS_COMP_STREAM', 'DS-COMPOSITE-MODEL');
function islandora_datastream_as_attachment($object_id, $dsid) {
module_load_include('inc', 'islandora', 'RestConnection');
global $user;
@ -33,3 +36,158 @@ function islandora_datastream_as_attachment($object_id, $dsid) {
exit();
}
/**
*
* @param array $arr
* an array of dsids that are defined by this objects cmodels
* @param string $ds_comp_stream
* the dscomposite stream as xml
*/
function islandora_update_available_dsids_array(&$arr, $ds_comp_stream){
$sxml = new SimpleXMLElement($ds_comp_stream);
foreach($sxml->dsTypeModel as $ds){
//$arr[$ds['ID']]
$mimes = array();
foreach($ds->form as $form){
$mimetype = (string)$form['MIME'];
$mimes[] = $mimetype;
}
$dsid = (string)$ds['ID'];
if($dsid != 'AUDIT'){
$arr[(string)$ds['ID']] = $mimes;
}
}
}
/**
* this function may not be being used
* @param type $pid
* @param type $form_state
* @return string
*/
function islandora_add_datastream_form($object_id, &$form_state) {
//dump_vars($form_state);
// Populate the list of datastream IDs.
module_load_include('inc', 'islandora', 'RestConnection');
global $user;
try {
$restConnection = new RestConnection($user);
$fedora_object = new FedoraObject($object_id, $restConnection->repository);
} catch (Exception $e) {
drupal_set_message(t('Error getting Islandora object %s ', array('%s' => $object_id)), 'error');
return "";
}
if (!isset($fedora_object)) {
drupal_set_message(t('Could not create add datastream form for %s'), array('%s' => $object_id));
return;
}
$models = $fedora_object->models;
$available_dsids = array();
if (isset($models)) {
foreach ($models as $model) {
try {
$model_object = new FedoraObject($model, $restConnection->repository);
$dscomposite_stream = $model_object[DS_COMP_STREAM]->content;
islandora_update_available_dsids_array($available_dsids, $dscomposite_stream);
} catch (Exception $e) {
//do nothing as other objects may have a dscompsite stream
}
//$model_ds_comp =
}
}
/*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('<br /><h3>The datastream has been uploaded.</h3>'),
'#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('<br /><h3>Add Datastream:</h3>'),
'#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;*/
}

19
includes/islandora_dublin_core.inc

@ -99,6 +99,25 @@ class Dublin_Core {
}
function as_formatted_array() {
$dc_array = array();
foreach ($this as $element) {
if (!empty($element)) {
foreach ($element as $field => $value) {
// split value if the result value is an array
if (is_array($value)) {
$value = implode(", ", $value);
}
$dc_label = explode(':', $field);
$element_label = ucfirst($dc_label[1]);
$dc_array[$field]['label'] = $element_label;
$dc_array[$field]['value'] = strip_tags($value);
$dc_array[$field]['class'] = strtolower(preg_replace('/[^A-Za-z0-9]/', '-', $field));
}
}
}
return $dc_array;
}
/**

BIN
islandora_basic_collection/Crystal_Clear_filesystem_folder_grey.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

95
islandora_basic_collection/islandora_basic_collection.install

@ -0,0 +1,95 @@
<?php
/**
* @file islandora_basic_collection.install
*/
function islandora_basic_collection_install() {
module_load_include('inc', 'islandora', 'RestConnection');
global $user;
global $base_root;
try {
$restConnection = new RestConnection($user);
} catch (Exception $e) {
drupal_set_message(t('Unable to connect to the repository %e', array('%e' => $e)), 'error');
return;
}
$content_model_query = $restConnection->api->a->findObjects('query', 'pid=islandora:collectionCModel');
if (empty($content_model_query['results'])) {
try {
$xml = file_get_contents(drupal_get_path('module', 'islandora_basic_collection') . '/xml/islandora_collection_CModel.xml');
$restConnection->api->m->ingest(array('string' => $xml));
} catch (Exception $e) {
drupal_set_message(t('Unable to install content models %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Content models installed!'));
}
else {
drupal_set_message(t('Content models already exist!'), 'warning');
}
$collection_query = $restConnection->api->a->findObjects('query', 'pid=islandora:root');
if (empty($collection_query['results'])) {
try {
$xml = file_get_contents(drupal_get_path('module', 'islandora_basic_collection') . '/xml/islandora_root_collection.xml');
$restConnection->api->m->ingest(array('string' => $xml));
$fedora_object = new FedoraObject('islandora:root', $restConnection->repository);
$datastream = new NewFedoraDatastream('TN', 'M', $fedora_object, $restConnection->repository);
$file_path = $base_root . '/' . drupal_get_path('module', 'islandora_basic_collection') . '/Crystal_Clear_filesystem_folder_grey.png';
$datastream->label = 'Thumbnail';
$datastream->mimetype = 'image/png';
$datastream->setContentFromUrl($file_path);
$fedora_object->ingestDatastream($datastream);
} catch (Exception $e) {
drupal_set_message(t('Unable to install collections %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Collections installed!'));
}
else {
drupal_set_message(t('Collections already exist!'), 'warning');
}
}
function islandora_basic_collection_uninstall() {
module_load_include('inc', 'islandora', 'RestConnection');
global $user;
try {
$restConnection = new RestConnection($user);
} catch (Exception $e) {
drupal_set_message(t('Unable to connect to the repository %e', array('%e' => $e)), 'error');
return;
}
$content_model_query = $restConnection->api->a->findObjects('query', 'pid=islandora:collectionCModel');
if (!empty($content_model_query['results'])) {
try {
$restConnection->repository->purgeObject('islandora:collectionCModel');
} catch (Exception $e) {
drupal_set_message(t('Unable to purge content models %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Content models purged!'));
}
else {
drupal_set_message(t('Content models don\'t exist!'), 'warning');
}
$collection_query = $restConnection->api->a->findObjects('query', 'pid=islandora:root');
if (!empty($collection_query['results'])) {
try {
$restConnection->repository->purgeObject('islandora:root');
} catch (Exception $e) {
drupal_set_message(t('Unable to purge collections %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Collections purged!'));
}
else {
drupal_set_message(t('Collections don\'t exist!'), 'warning');
}
}

58
islandora_basic_collection/xml/islandora_collection_CModel.xml

@ -0,0 +1,58 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject VERSION="1.1" PID="islandora:collectionCModel"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Islandora Collection Content Model"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2012-05-14T13:13:59.507Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2012-05-14T13:13:59.964Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2012-05-14T13:13:59.507Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="413">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Islandora Collection Content Model</dc:title>
<dc:identifier>islandora:collectionCModel</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DS-COMPOSITE-MODEL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="DS-COMPOSITE-MODEL1.0" LABEL="Datastream Composite Model" CREATED="2012-04-26T13:37:58.308Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#"> <!-- using this as a guide -->
<dsTypeModel ID="DC" >
<form FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" MIME="text/xml"></form>
</dsTypeModel>
<dsTypeModel ID="RELS-EXT" optional="true">
<form FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" MIME="application/rdf+xml"></form>
</dsTypeModel>
<dsTypeModel ID="RELS-INT" optional="true">
<form FORMAT_URI="info:fedora/fedora-system:FedoraRELSInt-1.0" MIME="application/rdf+xml"></form>
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="Fedora object-to-object relationship metadata" CREATED="2012-05-14T13:13:59.665Z" MIMETYPE="application/rdf+xml" SIZE="167">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:collectionCModel"></rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.1" LABEL="Fedora Object-to-Object Relationship Metadata" CREATED="2012-05-14T13:13:59.879Z" MIMETYPE="application/rdf+xml" SIZE="299">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:collectionCModel">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ContentModel-3.0"></hasModel>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

68
islandora_basic_collection/xml/islandora_root_collection.xml

@ -0,0 +1,68 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject VERSION="1.1" PID="islandora:root"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Islandora Top-level Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2012-05-14T13:14:01.118Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2012-05-14T13:14:01.769Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2012-05-14T13:14:01.118Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="397">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Islandora Top-level Collection</dc:title>
<dc:identifier>islandora:root</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="Fedora object-to-object relationship metadata" CREATED="2012-05-14T13:14:01.258Z" MIMETYPE="application/rdf+xml" SIZE="155">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:root"></rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
<foxml:datastreamVersion ID="RELS-EXT.1" LABEL="Fedora Object-to-Object Relationship Metadata" CREATED="2012-05-14T13:14:01.471Z" MIMETYPE="application/rdf+xml" SIZE="283">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:root">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:collectionCModel"></hasModel>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="COLLECTION_POLICY" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="COLLECTION_POLICY.0" LABEL="COLLECTION_POLICY" CREATED="2012-05-14T13:14:01.607Z" MIMETYPE="text/xml" SIZE="1211">
<foxml:xmlContent>
<collection_policy name="" xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="Collection" namespace="islandora:collection" pid="islandora:collectionCModel"/>
</content_models>
<search_terms>
<term field="dc.title">dc.title</term>
<term field="dc.creator">dc.creator</term>
<term default="true" field="dc.description">dc.description</term>
<term field="dc.date">dc.date</term>
<term field="dc.identifier">dc.identifier</term>
<term field="dc.language">dc.language</term>
<term field="dc.publisher">dc.publisher</term>
<term field="dc.rights">dc.rights</term>
<term field="dc.subject">dc.subject</term>
<term field="dc.relation">dc.relation</term>
<term field="dcterms.temporal">dcterms.temporal</term>
<term field="dcterms.spatial">dcterms.spatial</term>
<term field="fgs.DS.first.text">Full Text</term>
</search_terms>
<relationship>isMemberOfCollection</relationship>
</collection_policy>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

BIN
islandora_basic_image/Crystal_Clear_filesystem_folder_grey.png

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.0 KiB

98
islandora_basic_image/islandora_basic_image.install

@ -0,0 +1,98 @@
<?php
/**
* @file islandora-basic-image.install
*/
/**
* Implements hook_install
*/
function islandora_basic_image_install() {
module_load_include('inc', 'islandora', 'RestConnection');
global $user;
global $base_root;
try {
$restConnection = new RestConnection($user);
} catch (Exception $e) {
drupal_set_message(t('Unable to connect to the repository %e', array('%e' => $e)), 'error');
return;
}
$content_model_query = $restConnection->api->a->findObjects('query', 'pid=islandora:sp_basic_image');
if (empty($content_model_query['results'])) {
try {
$xml = file_get_contents(drupal_get_path('module', 'islandora_basic_image') . '/xml/simple_islandora_basic_imageCM.xml');
$restConnection->api->m->ingest(array('string' => $xml));
} catch (Exception $e) {
drupal_set_message(t('Unable to install content models %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Content models installed!'));
}
else {
drupal_set_message(t('Content models already exist!'), 'warning');
}
$collection_query = $restConnection->api->a->findObjects('query', 'pid=islandora:sp_basic_image_collection');
if (empty($collection_query['results'])) {
try {
$xml = file_get_contents(drupal_get_path('module', 'islandora_basic_image') . '/xml/islandora_basic_image_collection.xml');
$restConnection->api->m->ingest(array('string' => $xml));
$fedora_object = new FedoraObject('islandora:sp_basic_image_collection', $restConnection->repository);
$datastream = new NewFedoraDatastream('TN', 'M', $fedora_object, $restConnection->repository);
$file_path = $base_root . '/' . drupal_get_path('module', 'islandora_basic_image') . '/Crystal_Clear_filesystem_folder_grey.png';
$datastream->label = 'Thumbnail';
$datastream->mimetype = 'image/png';
$datastream->setContentFromUrl($file_path);
$fedora_object->ingestDatastream($datastream);
} catch (Exception $e) {
drupal_set_message(t('Unable to install collections %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Collections installed!'));
}
else {
drupal_set_message(t('Collections already exist!'), 'warning');
}
}
function islandora_basic_image_uninstall() {
module_load_include('inc', 'islandora', 'RestConnection');
global $user;
try {
$restConnection = new RestConnection($user);
} catch (Exception $e) {
drupal_set_message(t('Unable to connect to the repository %e', array('%e' => $e)), 'error');
return;
}
$content_model_query = $restConnection->api->a->findObjects('query', 'pid=islandora:sp_basic_image');
if (!empty($content_model_query['results'])) {
try {
$restConnection->repository->purgeObject('islandora:sp_basic_image');
} catch (Exception $e) {
drupal_set_message(t('Unable to purge content models %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Content models purged!'));
}
else {
drupal_set_message(t('Content models don\'t exist!'), 'warning');
}
$collection_query = $restConnection->api->a->findObjects('query', 'pid=islandora:sp_basic_image_collection');
if (!empty($collection_query['results'])) {
try {
$restConnection->repository->purgeObject('islandora:sp_basic_image_collection');
} catch (Exception $e) {
drupal_set_message(t('Unable to purge collections %e', array('%e' => $e)), 'error');
return;
}
drupal_set_message(t('Collections purged!'));
}
else {
drupal_set_message(t('Collections don\'t exist!'), 'warning');
}
}

35
islandora_basic_image/islandora_basic_image.module

@ -102,23 +102,24 @@ function islandora_basic_image_preprocess_islandora_basic_image(&$variables) {
//create a nicer array for themers
//TODO: give this a better home
$dc_array = array();
foreach ($dc_object as $element) {
if (!empty($element)) {
foreach ($element as $field => $value) {
// split value if the result value is an array
if (is_array($value)) {
$value = implode(", ", $value);
}
$dc_label = explode(':', $field);
$element_label = ucfirst($dc_label[1]);
$dc_array[$field]['label'] = $element_label;
$dc_array[$field]['value'] = strip_tags($value);
$dc_array[$field]['class'] = strtolower( preg_replace('/[^A-Za-z0-9]/', '-', $field));
}
}
}
$variables['dc_array'] = $dc_array;
//$dc_array = array();
//foreach ($dc_object as $element) {
// if (!empty($element)) {
// foreach ($element as $field => $value) {
// // split value if the result value is an array
// if (is_array($value)) {
// $value = implode(", ", $value);
// }
// $dc_label = explode(':', $field);
// $element_label = ucfirst($dc_label[1]);
// $dc_array[$field]['label'] = $element_label;
// $dc_array[$field]['value'] = strip_tags($value);
// $dc_array[$field]['class'] = strtolower( preg_replace('/[^A-Za-z0-9]/', '-', $field));
// }
// }
//}
$variables['dc_array'] = $dc_object->as_formatted_array();
$variables['islandora_object_label'] = $islandora_object->label;
$variables['theme_hook_suggestions'][] = 'islandora_basic_image__' . str_replace(':', '_', $islandora_object->id);
global $base_url;

818
islandora_basic_image/xml/islandora_basic_imageCM.xml

@ -0,0 +1,818 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject 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"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
VERSION="1.1"
PID="islandora:sp_basic_image">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Islandora basic image content model"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2012-04-26T13:37:58.308Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2012-04-26T13:37:58.433Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DS-COMPOSITE-MODEL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="DS-COMPOSITE-MODEL1.0" LABEL="Datastream Composite Model" CREATED="2012-04-26T13:37:58.308Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#"> <!-- using this as a guide -->
<dsTypeModel ID="DC" >
<form FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" MIME="text/xml"></form>
<extension name="SCHEMA">
<reference type="datastream" value="OAI_DC-SCHEMA"></reference> <!-- I'm thinking that by embedding the required or dependent schema in our cmodels ... when sites like loc.gov go down, the repository will not be effected. -->
</extension>
</dsTypeModel>
<dsTypeModel ID="RELS-EXT" optional="true">
<form FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" MIME="application/rdf+xml"></form>
</dsTypeModel>
<dsTypeModel ID="RELS-INT" optional="true">
<form FORMAT_URI="info:fedora/fedora-system:FedoraRELSInt-1.0" MIME="application/rdf+xml"></form>
</dsTypeModel>
<dsTypeModel ID="OBJ">
<form MIME="image/jpeg"></form>
<form MIME="image/jpg"></form>
<form MIME="image/png"></form>
<form MIME="image/gif"></form>
</dsTypeModel>
<dsTypeModel ID="MEDIUM_SIZE">
<form MIME="image/jpeg"></form>
</dsTypeModel>
<dsTypeModel ID="TN">
<form MIME="image/jpeg"></form>
</dsTypeModel>
<dsTypeModel ID="MODS"> <!-- this could have a schema too... -->
<form MIME="text/xml"></form>
</dsTypeModel>
<dsTypeModel ID="RULES"> <!-- this is simply an idea about leveraging some of the functionality that may have been in the original ISLANDORACM ds. The ISLANDORACM is still a DS in this cmodel, but that could change ... it references the same schema as the ISLANDORACM so may be totally redundent -->
<form MIME="text/xml" />
<extension name="SCHEMA">
<reference type="datastream" value="RULES"></reference>
</extension>
</dsTypeModel>
<dsTypeModel ID="ISLANDORACM">
<form MIME="text/xml" /> <!-- this could get the schema treatment instead of the RULES ds -->
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2012-04-26T13:37:58.308Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="412">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Islandora basic image content model</dc:title>
<dc:identifier>islandora:sp_basic_image</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="Fedora Object-to-Object Relationship Metadata" CREATED="2012-04-26T13:37:58.396Z" MIMETYPE="text/xml" SIZE="297">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:sp_basic_image">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ContentModel-3.0"></hasModel>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="ISLANDORACM" STATE="A" CONTROL_GROUP="M" VERSIONABLE="true"> <!-- should the ISLANDORACM be a managed DS ? -->
<foxml:datastreamVersion ID="ISLANDORACM.0" LABEL="ISLANDORACM" CREATED="2012-04-26T13:37:58.433Z" MIMETYPE="text/xml" SIZE="5745">
<foxml:contentLocation TYPE="INTERNAL_ID" REF="islandora:sp_basic_image+ISLANDORACM+ISLANDORACM.0"/>
</foxml:datastreamVersion>
</foxml:datastream>
<!--The DC_SCHEMA datastream, referred from the DS_COMPOSITE datastream -->
<foxml:datastream
CONTROL_GROUP="X"
ID="DC_SCHEMA"
STATE="A"
VERSIONABLE="false">
<foxml:datastreamVersion
ID="SCHEMA.0"
LABEL="Schema"
MIMETYPE="text/xml">
<foxml:xmlContent>
<!--This is just the direct input of the
oai_dc schema-->
<schema targetNamespace="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/"
xmlns:dc="http://purl.org/dc/elements/1.1/"
xmlns="http://www.w3.org/2001/XMLSchema"
elementFormDefault="qualified" attributeFormDefault="unqualified">
<annotation>
<documentation>
XML Schema 2002-03-18 by Pete Johnston.
Adjusted for usage in the OAI-PMH.
Schema imports the Dublin Core elements from the DCMI schema for unqualified Dublin Core.
2002-12-19 updated to use simpledc20021212.xsd (instead of simpledc20020312.xsd)
</documentation>
</annotation>
<!-- The issue with embedded schemas may be a breaker - dm -->
<!--Xml schema does not allow for embedding schemas inside
other schemas, as everything in a schema share the same
targetNamespace, you have to use import to refer to schemas
for other namespaces. But there is no functional shorthand
in fedora to refer to "this object", so you have to use
the full repository url. This is nasty, and we are working
on a workaround -->
<import namespace="http://purl.org/dc/elements/1.1/"
schemaLocation="http://localhost:8080/fedora/get/doms:ContentModel_Sample/DC_ELEMENTS"/>
<element name="dc" type="oai_dc:oai_dcType"/>
<complexType name="oai_dcType">
<sequence>
<element minOccurs="1" ref="dc:title"/>
<element maxOccurs="unbounded" minOccurs="0" ref="dc:identifier"/>
<element minOccurs="0" ref="dc:creator"/>
<element minOccurs="0" ref="dc:subject"/>
<element minOccurs="0" ref="dc:description"/>
<element minOccurs="0" ref="dc:publisher"/>
<element minOccurs="0" ref="dc:contributor"/>
<element minOccurs="0" ref="dc:date"/>
<element minOccurs="0" ref="dc:type"/>
<element minOccurs="0" ref="dc:format"/>
<element minOccurs="0" ref="dc:source"/>
<element minOccurs="0" ref="dc:language"/>
<element minOccurs="0" ref="dc:relation"/>
<element minOccurs="0" ref="dc:coverage"/>
<element minOccurs="0" ref="dc:rights"/>
</sequence>
</complexType>
</schema>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<!--Referred from the DC_SCHEMA datastream.-->
<foxml:datastream
CONTROL_GROUP="X"
ID="DC_ELEMENTS"
STATE="A"
VERSIONABLE="false">
<foxml:datastreamVersion
ID="DC_ELEMENTS.0"
LABEL="Schema"
MIMETYPE="text/xml">
<foxml:xmlContent>
<!--Just a direct paste of the DC_ELEMENTS schema-->
<xs:schema xmlns:xs="http://www.w3.org/2001/XMLSchema"
xmlns="http://purl.org/dc/elements/1.1/"
targetNamespace="http://purl.org/dc/elements/1.1/"
elementFormDefault="qualified"
attributeFormDefault="unqualified">
<xs:annotation>
<xs:documentation xml:lang="en">
Simple DC XML Schema, 2002-10-09
by Pete Johnston (p.johnston@ukoln.ac.uk),
Carl Lagoze (lagoze@cs.cornell.edu), Andy Powell (a.powell@ukoln.ac.uk),
Herbert Van de Sompel (hvdsomp@yahoo.com).
This schema defines terms for Simple Dublin Core, i.e. the 15
elements from the http://purl.org/dc/elements/1.1/ namespace, with
no use of encoding schemes or element refinements.
Default content type for all elements is xs:string with xml:lang
attribute available.
Supercedes version of 2002-03-12.
Amended to remove namespace declaration for http://www.w3.org/XML/1998/namespace namespace,
and to reference lang attribute via built-in xml: namespace prefix.
xs:appinfo also removed.
</xs:documentation>
</xs:annotation>
<!--Xml schema does not allow for embedding schemas inside
other schemas, as everything in a schema share the same
targetNamespace, you have to use import to refer to schemas
for other namespaces. But there is no functional shorthand
in fedora to refer to "this object", so you have to use
the full repository url. This is nasty, and we are working
on a workaround-->
<xs:import namespace="http://www.w3.org/XML/1998/namespace"
schemaLocation="http://localhost:8080/fedora/get/doms:ContentModel_Sample/NAMESPACE">
</xs:import>
<xs:complexType name="SimpleLiteral">
<xs:annotation>
<xs:documentation xml:lang="en">
This is the default type for all of the DC elements.
It permits text content only with optional
xml:lang attribute.
Text is allowed because mixed="true", but sub-elements
are disallowed because minOccurs="0" and maxOccurs="0"
are on the xs:any tag.
This complexType allows for restriction or extension permitting
child elements.
</xs:documentation>
</xs:annotation>
<xs:complexContent mixed="true">
<xs:restriction base="xs:anyType">
<xs:sequence>
<xs:any processContents="lax" minOccurs="0" maxOccurs="0"/>
</xs:sequence>
<xs:attribute ref="xml:lang" use="optional"/>
</xs:restriction>
</xs:complexContent>
</xs:complexType>
<xs:element name="any" type="SimpleLiteral" abstract="true"/>
<xs:element name="title" substitutionGroup="any"/>
<xs:element name="creator" substitutionGroup="any"/>
<xs:element name="subject" substitutionGroup="any"/>
<xs:element name="description" substitutionGroup="any"/>
<xs:element name="publisher" substitutionGroup="any"/>
<xs:element name="contributor" substitutionGroup="any"/>
<xs:element name="date" substitutionGroup="any"/>
<xs:element name="type" substitutionGroup="any"/>
<xs:element name="format" substitutionGroup="any"/>
<xs:element name="identifier" substitutionGroup="any">
<xs:annotation>
<xs:appinfo source="http://doms.statsbiblioteket.dk/gui">invisible</xs:appinfo>
</xs:annotation>
</xs:element>
<xs:element name="source" substitutionGroup="any"/>
<xs:element name="language" substitutionGroup="any"/>
<xs:element name="relation" substitutionGroup="any"/>
<xs:element name="coverage" substitutionGroup="any"/>
<xs:element name="rights" substitutionGroup="any"/>
<xs:group name="elementsGroup">
<xs:sequence>
<xs:choice minOccurs="0" maxOccurs="unbounded">
<xs:element ref="title"/>
<xs:element ref="creator"/>
<xs:element ref="subject"/>
<xs:element ref="description"/>
<xs:element ref="publisher"/>
<xs:element ref="contributor"/>
<xs:element ref="date"/>
<xs:element ref="type"/>
<xs:element ref="format"/>
<xs:element ref="identifier"/>
<xs:element ref="source"/>
<xs:element ref="language"/>
<xs:element ref="relation"/>
<xs:element ref="coverage"/>
<xs:element ref="rights"/>
</xs:choice>
</xs:sequence>
</xs:group>
<xs:simpleType name="dcmiType">
<xs:restriction base="xs:string">
<xs:enumeration value='Collection'/>
<xs:enumeration value='Dataset'/>
<xs:enumeration value='Event'/>
<xs:enumeration value='Image'/>
<xs:enumeration value='InteractiveResource'/>
<xs:enumeration value='MovingImage'/>
<xs:enumeration value='PhysicalObject'/>
<xs:enumeration value='Service'/>
<xs:enumeration value='Software'/>
<xs:enumeration value='Sound'/>
<xs:enumeration value='StillImage'/>
<xs:enumeration value='Text'/>
</xs:restriction>
</xs:simpleType>
</xs:schema>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<!--Schema datastream referred from the DC_ELEMENTS datastream -->
<foxml:datastream
CONTROL_GROUP="X"
ID="NAMESPACE"
STATE="A"
VERSIONABLE="false">
<foxml:datastreamVersion
ID="NAMESPACE.0"
LABEL="Schema"
MIMETYPE="text/xml">
<foxml:xmlContent>
<!--Just a direct paste of the Namespace schema-->
<xs:schema
targetNamespace="http://www.w3.org/XML/1998/namespace"
xmlns:xs="http://www.w3.org/2001/XMLSchema"
xml:lang="en">
<xs:annotation>
<xs:documentation>
See http://www.w3.org/XML/1998/namespace.html and
http://www.w3.org/TR/REC-xml for information about this namespace.
This schema document describes the XML namespace, in a form
suitable for import by other schema documents.
Note that local names in this namespace are intended to be defined
only by the World Wide Web Consortium or its subgroups. The
following names are currently defined in this namespace and should
not be used with conflicting semantics by any Working Group,
specification, or document instance:
base (as an attribute name): denotes an attribute whose value
provides a URI to be used as the base for interpreting any
relative URIs in the scope of the element on which it
appears; its value is inherited. This name is reserved
by virtue of its definition in the XML Base specification.
lang (as an attribute name): denotes an attribute whose value
is a language code for the natural language of the content of
any element; its value is inherited. This name is reserved
by virtue of its definition in the XML specification.
space (as an attribute name): denotes an attribute whose
value is a keyword indicating what whitespace processing
discipline is intended for the content of the element; its
value is inherited. This name is reserved by virtue of its
definition in the XML specification.
Father (in any context at all): denotes Jon Bosak, the chair of
the original XML Working Group. This name is reserved by
the following decision of the W3C XML Plenary and
XML Coordination groups:
In appreciation for his vision, leadership and dedication
the W3C XML Plenary on this 10th day of February, 2000
reserves for Jon Bosak in perpetuity the XML name
xml:Father
</xs:documentation>
</xs:annotation>
<xs:annotation>
<xs:documentation>In keeping with the XML Schema WG's standard versioning
policy, this schema document will persist at
http://www.w3.org/2001/03/xml.xsd.
At the date of issue it can also be found at
http://www.w3.org/2001/xml.xsd.
The schema document at that URI may however change in the future,
in order to remain compatible with the latest version of XML Schema
itself. In other words, if the XML Schema namespace changes, the version
of this document at
http://www.w3.org/2001/xml.xsd will change
accordingly; the version at
http://www.w3.org/2001/03/xml.xsd will not change.
</xs:documentation>
</xs:annotation>
<xs:attribute name="lang" type="xs:language">
<xs:annotation>
<xs:documentation>In due course, we should install the relevant ISO 2- and 3-letter
codes as the enumerated possible values . . .</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attribute name="space" default="preserve">
<xs:simpleType>
<xs:restriction base="xs:NCName">
<xs:enumeration value="default"/>
<xs:enumeration value="preserve"/>
</xs:restriction>
</xs:simpleType>
</xs:attribute>
<xs:attribute name="base" type="xs:anyURI">
<xs:annotation>
<xs:documentation>See http://www.w3.org/TR/xmlbase/ for
information about this attribute.</xs:documentation>
</xs:annotation>
</xs:attribute>
<xs:attributeGroup name="specialAttrs">
<xs:attribute ref="xml:base"/>
<xs:attribute ref="xml:lang"/>
<xs:attribute ref="xml:space"/>
</xs:attributeGroup>
</xs:schema>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<!-- The RULES ds referred to by the DS-COMPOSITE-MODEL -->
<foxml:datastream
CONTROL_GROUP="X"
ID="RULES"
STATE="A"
VERSIONABLE="false">
<foxml:datastreamVersion
ID="RULES.0"
LABEL="Schema"
MIMETYPE="text/xml">
<foxml:xmlContent>
<!--This is pulled from https://raw.github.com/Islandora/islandora/6.x/islandoracm.xsd -->
<schema xmlns="http://www.islandora.ca" xmlns:xsd="http://www.w3.org/2001/XMLSchema"
targetNamespace="http://www.islandora.ca" elementFormDefault="qualified">
<annotation>
<documentation xml:lang="en">
Islandora Content Model Schema
Islandora, Robertson Library, University of Prince Edward Island, 550 University Ave., Charlottetown, Prince Edward Island
</documentation>
</annotation>
<element name="content_model" type="content_modelType"/>
<complexType name="content_modelType">
<all>
<element name="mimetypes" type="mimetypesType"/>
<element name="ingest_form" type="ingest_formType"/>
<element name="datastreams" type="datastreamsType" minOccurs="0"/>
<element name="ingest_rules" type="ingest_rulesType"/>
<element name="edit_metadata_method" type="edit_metadata_methodType" minOccurs="0"/>
<element name="forms">
<complexType>
<sequence>
<element maxOccurs="unbounded" minOccurs="1" name="form" type="formType"
/>
</sequence>
</complexType>
</element>
</all>
<attribute name="name" type="normalizedString" use="required"/>
</complexType>
<complexType name="mimetypesType">
<sequence>
<element name="type" type="string" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="ingest_formType">
<all>
<element name="form_builder_method" type="form_builder_methodType"/>
<element name="form_elements" type="form_elementsType"/>
</all>
<attribute name="dsid" type="normalizedString" use="required"/>
<attribute name="page" type="positiveInteger" use="required"/>
<attribute name="hide_file_chooser" type="boolean" default="false"/>
<attribute name="redirect" type="boolean" default="true"/>
</complexType>
<complexType name="form_builder_methodType">
<attribute name="file" type="normalizedString" use="required"/>
<attribute name="module" type="normalizedString" default="fedora_repository"/>
<attribute name="class" type="normalizedString" use="required"/>
<attribute name="method" type="normalizedString" use="required"/>
<attribute name="handler" type="normalizedString" use="required"/>
</complexType>
<complexType name="edit_metadata_methodType">
<attribute name="file" type="normalizedString" use="required"/>
<attribute name="module" type="normalizedString" default="fedora_repository"/>
<attribute name="class" type="normalizedString" use="required"/>
<attribute name="method" type="normalizedString" use="required"/>
<attribute name="handler" type="normalizedString" use="required"/>
<attribute name="dsid" type="normalizedString" use="required"/>
</complexType>
<complexType name="form_elementsType">
<sequence>
<element name="element" type="elementType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="elementType">
<all>
<element name="description" type="string" minOccurs="0"/>
<element name="authoritative_list" type="authoritative_listType" minOccurs="0"/>
<element name="parameters" type="parametersType" minOccurs="0"/>
</all>
<attribute name="label" type="normalizedString"/>
<attribute name="name" type="normalizedString" use="required"/>
<attribute name="type" type="normalizedString" use="required"/>
<attribute name="required" type="boolean" default="false"/>
</complexType>
<complexType name="authoritative_listType">
<sequence>
<element name="item" type="itemType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="itemType">
<simpleContent>
<extension base="string">
<attribute name="field" type="string" use="optional"/>
</extension>
</simpleContent>
</complexType>
<complexType name="ingest_rulesType">
<sequence>
<element name="rule" type="ruleType" minOccurs="0" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="ruleType">
<sequence>
<element name="applies_to" type="normalizedString" minOccurs="1"
maxOccurs="unbounded"/>
<element name="ingest_methods" type="ingest_methodsType" minOccurs="0"/>
</sequence>
</complexType>
<complexType name="ingest_methodsType">
<sequence>
<element name="ingest_method" type="ingest_methodType" minOccurs="1"
maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="ingest_methodType">
<all>
<element name="parameters" type="parametersType" minOccurs="0"/>
</all>
<attribute name="file" type="normalizedString" use="required"/>
<attribute name="module" type="normalizedString" default="fedora_repository"/>
<attribute name="class" type="normalizedString" use="required"/>
<attribute name="method" type="normalizedString" use="required"/>
<attribute name="dsid" type="normalizedString" use="required"/>
<attribute name="modified_files_ext" type="normalizedString" use="required"/>
</complexType>
<complexType name="datastreamsType">
<sequence>
<element name="datastream" type="datastreamType" minOccurs="1" maxOccurs="unbounded"
/>
</sequence>
</complexType>
<complexType name="datastreamType">
<sequence>
<element name="display_method" type="display_methodType" minOccurs="0"
maxOccurs="unbounded"/>
<element name="add_datastream_method" type="add_datastream_methodType" minOccurs="0"
maxOccurs="1"/>
</sequence>
<attribute name="dsid" type="normalizedString" use="required"/>
<attribute name="display_in_fieldset" type="boolean" default="true"/>
</complexType>
<complexType name="add_datastream_methodType">
<all>
<element name="parameters" type="parametersType" minOccurs="0"/>
</all>
<attribute name="file" type="normalizedString" use="required"/>
<attribute name="module" type="normalizedString" default="fedora_repository"/>
<attribute name="class" type="normalizedString" use="required"/>
<attribute name="method" type="normalizedString" use="required"/>
<attribute name="dsid" type="normalizedString" use="required"/>
<attribute name="modified_files_ext" type="normalizedString" use="required"/>
</complexType>
<complexType name="parametersType">
<sequence>
<element name="parameter" type="parameterType" minOccurs="1" maxOccurs="unbounded"/>
</sequence>
</complexType>
<complexType name="parameterType">
<simpleContent>
<extension base="string">
<attribute name="name" type="normalizedString" use="required"/>
</extension>
</simpleContent>
</complexType>
<complexType name="display_methodType">
<complexContent>
<restriction base="anyType">
<attribute name="file" type="normalizedString" use="required"/>
<attribute name="module" type="normalizedString" default="fedora_repository"/>
<attribute name="class" type="normalizedString" use="required"/>
<attribute name="method" type="normalizedString" use="required"/>
<attribute name="default" type="boolean" default="false"/>
</restriction>
</complexContent>
</complexType>
<complexType name="formType">
<complexContent>
<extension base="formElementType">
<attribute name="name" type="normalizedString" use="required"/>
<attribute name="dsid" type="normalizedString" use="required"/>
<attribute name="ingest_module" type="normalizedString"/>
<attribute name="ingest_file" type="normalizedString"/>
<attribute name="ingest_class" type="normalizedString"/>
<attribute name="edit_module" type="normalizedString" use="optional"/>
<attribute name="edit_file" type="normalizedString" use="optional"/>
<attribute name="edit_class" type="normalizedString" use="optional"/>
<attribute name="document_module" type="normalizedString" use="required"/>
<attribute name="document_file" type="normalizedString" use="required"/>
<attribute name="document_class" type="normalizedString" use="required"/>
</extension>
</complexContent>
</complexType>
<complexType name="formElementType">
<choice maxOccurs="unbounded" minOccurs="0">
<element maxOccurs="1" minOccurs="1" name="fieldset">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element default="true" minOccurs="0" name="collapsible"
type="boolean"/>
<element default="false" minOccurs="0" name="collapsed"
type="boolean"/>
<element name="content" type="formElementType"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element name="textfield">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element minOccurs="0" name="required" type="boolean"/>
<element minOccurs="0" name="default_value" type="normalizedString"/>
<element minOccurs="0" name="autocomplete_path"
type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element minOccurs="1" name="textarea">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element minOccurs="0" name="required" type="boolean"/>
<element minOccurs="0" name="default_value" type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element maxOccurs="1" minOccurs="1" name="select">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element name="options" type="formControlOptionsType"/>
<element minOccurs="0" name="required" type="boolean"/>
<element minOccurs="0" name="default_value" type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element minOccurs="1" name="set">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element minOccurs="0" name="required" type="boolean"/>
<element minOccurs="0" name="default_value" type="normalizedString"/>
<element minOccurs="0" name="autocomplete_path"
type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element minOccurs="1" name="filechooser">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element minOccurs="0" name="required" type="boolean"/>
<element minOccurs="0" name="default_value" type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element minOccurs="1" name="datepicker">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element minOccurs="0" name="required" type="boolean"/>
<element minOccurs="0" name="default_value" type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element maxOccurs="1" minOccurs="1" name="tabpanel">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element default="true" minOccurs="0" name="collapsible"
type="boolean"/>
<element default="false" minOccurs="0" name="collapsed"
type="boolean"/>
<element name="content" type="formElementType"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element name="checkbox">
<complexType>
<all maxOccurs="1" minOccurs="1">
<element name="title" type="normalizedString"/>
<element minOccurs="0" name="description" type="normalizedString"/>
<element name="return_value" type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"
/>
</all>
</complexType>
</element>
<element minOccurs="1" name="hidden">
<complexType>
<all>
<element minOccurs="1" name="value" type="normalizedString"/>
<element minOccurs="0" name="form_builder" type="formBuilderControlType"/>
<element minOccurs="0" name="content" type="formElementType"/>
</all>
</complexType>
</element>
</choice>
</complexType>
<complexType name="formControlXPathType">
<simpleContent>
<extension base="normalizedString">
<attribute name="full_path" type="boolean"/>
</extension>
</simpleContent>
</complexType>
<complexType name="formControlElementValidateType">
<complexContent>
<extension base="array"/>
</complexContent>
</complexType>
<complexType name="array">
<sequence>
<element maxOccurs="unbounded" name="item" type="normalizedString"/>
</sequence>
</complexType>
<complexType name="formControlOptionsType">
<sequence>
<element maxOccurs="unbounded" name="option" type="normalizedString"/>
</sequence>
<attribute name="ignoreFirstOption" type="boolean" use="required"/>
</complexType>
<complexType name="formBuilderControlType">
<sequence>
<element name="xpath">
<complexType>
<sequence>
<element name="path">
<complexType>
<simpleContent>
<extension base="normalizedString">
<attribute name="full" type="boolean" use="required"
/>
</extension>
</simpleContent>
</complexType>
</element>
<element name="parent_path" minOccurs="0">
<complexType>
<simpleContent>
<extension base="normalizedString"> </extension>
</simpleContent>
</complexType>
</element>
<choice>
<element name="xml" type="normalizedString"/>
<element name="element" type="normalizedString"/>
<element name="attribute" type="normalizedString"/>
</choice>
</sequence>
</complexType>
</element>
<element name="require_value" type="boolean"/>
</sequence>
</complexType>
</schema>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

48
islandora_basic_image/xml/islandora_basic_image_collection.xml

@ -0,0 +1,48 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject VERSION="1.1" PID="islandora:sp_basic_image_collection"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xsi:schemaLocation="info:fedora/fedora-system:def/foxml# http://www.fedora.info/definitions/1/0/foxml1-1.xsd">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Islandora Basic Image Collection"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2011-09-16T16:49:44.530Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2011-09-16T16:49:45.066Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2011-09-16T16:49:44.530Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="420">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Islandora Basic Image Collection</dc:title>
<dc:identifier>islandora:sp_basic_image_collection</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="Fedora Object-to-Object Relationship Metadata" CREATED="2011-09-16T16:49:44.895Z" MIMETYPE="text/xml" SIZE="453">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:sp_basic_image_collection">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/islandora:collectionCModel"></hasModel>
<isMemberOfCollection xmlns="info:fedora/fedora-system:def/relations-external#" rdf:resource="info:fedora/islandora:root"></isMemberOfCollection>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="COLLECTION_POLICY" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="COLLECTION_POLICY.0" LABEL="Collection policy" CREATED="2012-05-24T14:31:59.202Z" MIMETYPE="text/xml" SIZE="507">
<foxml:xmlContent>
<collection_policy xmlns="http://www.islandora.ca" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Islandora Image Collection" xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="New Image" namespace="islandora:1" pid="islandora:sp_basic_image"></content_model>
</content_models>
<search_terms></search_terms>
<relationship>isMemberOfCollection</relationship>
</collection_policy>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>

11
islandora_basic_image/xml/islandora_basic_image_collection_policy.xml

@ -0,0 +1,11 @@
<?xml version="1.0" encoding="utf-8"?>
<collection_policy xmlns="http://www.islandora.ca"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" name="Islandora Image Collection"
xsi:schemaLocation="http://www.islandora.ca http://syn.lib.umanitoba.ca/collection_policy.xsd">
<content_models>
<content_model dsid="ISLANDORACM" name="New Image" namespace="islandora:1"
pid="islandora:sp_basic_image"/>
</content_models>
<search_terms/>
<relationship>isMemberOfCollection</relationship>
</collection_policy>

75
islandora_basic_image/xml/simple_islandora_basic_imageCM.xml

@ -0,0 +1,75 @@
<?xml version="1.0" encoding="UTF-8"?>
<foxml:digitalObject 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"
xmlns:foxml="info:fedora/fedora-system:def/foxml#"
VERSION="1.1"
PID="islandora:sp_basic_image">
<foxml:objectProperties>
<foxml:property NAME="info:fedora/fedora-system:def/model#state" VALUE="Active"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#label" VALUE="Islandora basic image content model"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#ownerId" VALUE="fedoraAdmin"/>
<foxml:property NAME="info:fedora/fedora-system:def/model#createdDate" VALUE="2012-04-26T13:37:58.308Z"/>
<foxml:property NAME="info:fedora/fedora-system:def/view#lastModifiedDate" VALUE="2012-04-26T13:37:58.433Z"/>
</foxml:objectProperties>
<foxml:datastream ID="DS-COMPOSITE-MODEL" STATE="A" CONTROL_GROUP="X" VERSIONABLE="false">
<foxml:datastreamVersion ID="DS-COMPOSITE-MODEL1.0" LABEL="Datastream Composite Model" CREATED="2012-04-26T13:37:58.308Z" MIMETYPE="text/xml" FORMAT_URI="info:fedora/fedora-system:FedoraDSCompositeModel-1.0">
<foxml:xmlContent>
<dsCompositeModel xmlns="info:fedora/fedora-system:def/dsCompositeModel#"> <!-- using this as a guide -->
<dsTypeModel ID="DC" >
<form FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" MIME="text/xml"></form>
</dsTypeModel>
<dsTypeModel ID="RELS-EXT" optional="true">
<form FORMAT_URI="info:fedora/fedora-system:FedoraRELSExt-1.0" MIME="application/rdf+xml"></form>
</dsTypeModel>
<dsTypeModel ID="RELS-INT" optional="true">
<form FORMAT_URI="info:fedora/fedora-system:FedoraRELSInt-1.0" MIME="application/rdf+xml"></form>
</dsTypeModel>
<dsTypeModel ID="OBJ">
<form MIME="image/jpeg"></form>
<form MIME="image/jpg"></form>
<form MIME="image/png"></form>
<form MIME="image/gif"></form>
</dsTypeModel>
<dsTypeModel ID="MEDIUM_SIZE">
<form MIME="image/jpeg"></form>
</dsTypeModel>
<dsTypeModel ID="TN">
<form MIME="image/jpeg"></form>
</dsTypeModel>
<dsTypeModel ID="MODS">
<form MIME="text/xml"></form>
</dsTypeModel>
<dsTypeModel ID="ISLANDORACM">
<form MIME="text/xml" />
</dsTypeModel>
</dsCompositeModel>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="DC" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="DC1.0" LABEL="Dublin Core Record for this object" CREATED="2012-04-26T13:37:58.308Z" MIMETYPE="text/xml" FORMAT_URI="http://www.openarchives.org/OAI/2.0/oai_dc/" SIZE="412">
<foxml:xmlContent>
<oai_dc:dc xmlns:oai_dc="http://www.openarchives.org/OAI/2.0/oai_dc/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://www.openarchives.org/OAI/2.0/oai_dc/ http://www.openarchives.org/OAI/2.0/oai_dc.xsd">
<dc:title>Islandora basic image content model</dc:title>
<dc:identifier>islandora:sp_basic_image</dc:identifier>
</oai_dc:dc>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="RELS-EXT" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true">
<foxml:datastreamVersion ID="RELS-EXT.0" LABEL="Fedora Object-to-Object Relationship Metadata" CREATED="2012-04-26T13:37:58.396Z" MIMETYPE="text/xml" SIZE="297">
<foxml:xmlContent>
<rdf:RDF xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#">
<rdf:Description rdf:about="info:fedora/islandora:sp_basic_image">
<hasModel xmlns="info:fedora/fedora-system:def/model#" rdf:resource="info:fedora/fedora-system:ContentModel-3.0"></hasModel>
</rdf:Description>
</rdf:RDF>
</foxml:xmlContent>
</foxml:datastreamVersion>
</foxml:datastream>
<foxml:datastream ID="ISLANDORACM" STATE="A" CONTROL_GROUP="X" VERSIONABLE="true"> <!-- should the ISLANDORACM be a managed DS ? No -->
<foxml:datastreamVersion ID="ISLANDORACM.0" LABEL="ISLANDORACM" CREATED="2012-04-26T13:37:58.433Z" MIMETYPE="text/xml" SIZE="5745">
<foxml:contentLocation TYPE="INTERNAL_ID" REF="islandora:sp_basic_image+ISLANDORACM+ISLANDORACM.0"/>
</foxml:datastreamVersion>
</foxml:datastream>
</foxml:digitalObject>
Loading…
Cancel
Save