|
|
@ -1409,33 +1409,92 @@ function fedora_repository_required_fedora_objects() { |
|
|
|
'title' => 'Islandora Core', |
|
|
|
'title' => 'Islandora Core', |
|
|
|
'objects' => array ( |
|
|
|
'objects' => array ( |
|
|
|
array ( |
|
|
|
array ( |
|
|
|
'foxml_file' => "$module_path", |
|
|
|
|
|
|
|
'pid' => 'islandora:collectionCModel', |
|
|
|
'pid' => 'islandora:collectionCModel', |
|
|
|
|
|
|
|
'label' => 'Islandora Collection Content Model', |
|
|
|
'dsid' => 'ISLANDORACM', |
|
|
|
'dsid' => 'ISLANDORACM', |
|
|
|
'datastream_file' => "$module_path/content_models/COLLECTIONCM.xml", |
|
|
|
'datastream_file' => "$module_path/content_models/COLLECTIONCM.xml", |
|
|
|
'dsversion' => NULL, |
|
|
|
'dsversion' => NULL, |
|
|
|
'' |
|
|
|
'cmodel' => 'fedora-system:ContentModel-3.0', |
|
|
|
), |
|
|
|
), |
|
|
|
array ( |
|
|
|
array ( |
|
|
|
'foxml_file' => "$module_path/newspapers_pageCModel.xml", |
|
|
|
'pid' => 'islandora:strict_pdf', |
|
|
|
'pid' => 'newspapers:pageCModel', |
|
|
|
'label' => 'Islandora strict PDF content model', |
|
|
|
'dsid' => NULL, |
|
|
|
'dsid' => 'ISLANDORACM', |
|
|
|
'datastream_file' => NULL, |
|
|
|
'datastream_file' => "$module_path/content_models/STRICT_PDFCM.xml", |
|
|
|
'dsversion' => NULL, |
|
|
|
'dsversion' => NULL, |
|
|
|
|
|
|
|
'cmodel' => 'fedora-system:ContentModel-3.0', |
|
|
|
), |
|
|
|
), |
|
|
|
array( |
|
|
|
array( |
|
|
|
'foxml_file' => "$module_path/newspapers_viewerSdep-issueCModel.xml", |
|
|
|
'pid' => 'islandora:top', |
|
|
|
'pid' => 'newspapers:viewerSdep-issueCModel', |
|
|
|
'label' => 'Islandora Top-level Collection', |
|
|
|
'dsid' => NULL, |
|
|
|
'cmodel' => 'islandora:collectionCModel', |
|
|
|
'datastream_file' => NULL, |
|
|
|
'datastreams' => array ( |
|
|
|
'dsversion' => NULL, |
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'COLLECTION_POLICY', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/collection_policies/COLLECTION-COLLECTION POLICY.xml", |
|
|
|
), |
|
|
|
), |
|
|
|
array ( |
|
|
|
array ( |
|
|
|
'foxml_file' => "$module_path/newspapers_viewerSdep-pageCModel.xml", |
|
|
|
'dsid' => 'TN', |
|
|
|
'pid' => 'newspapers:viewerSdep-pageCModel', |
|
|
|
'datastream_file' => "$module_path/images/Gnome-emblem-photos.png", |
|
|
|
'dsid' => NULL, |
|
|
|
'mimetype' => 'image/png', |
|
|
|
'datastream_file' => NULL, |
|
|
|
), |
|
|
|
'dsversion' => NULL, |
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'pid' => 'islandora:ContentModelCollection', |
|
|
|
|
|
|
|
'label' => 'Collection of installed content models', |
|
|
|
|
|
|
|
'cmodel' => 'islandora:collectionCModel', |
|
|
|
|
|
|
|
'parent' => 'islandora:top', |
|
|
|
|
|
|
|
'datastreams' => array ( |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'COLLECTION_VIEW', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/collection_views/simple_list_view.xml", |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'TN', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/images/contentModel.jpg", |
|
|
|
|
|
|
|
'mimetype' => 'image/jpeg', |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'QUERY', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/collection_views/cmodel_collection_query.txt", |
|
|
|
|
|
|
|
'mimetype' => 'text/plain', |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'pid' => 'islandora:demos', |
|
|
|
|
|
|
|
'label' => 'Islandora demos collection', |
|
|
|
|
|
|
|
'cmodel' => 'islandora:collectionCModel', |
|
|
|
|
|
|
|
'parent' => 'islandora:top', |
|
|
|
|
|
|
|
'datastreams' => array ( |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'TN', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/images/Gnome-emblem-photos.png", |
|
|
|
|
|
|
|
'mimetype' => 'image/png', |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'COLLECTION_POLICY', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/collection_policies/COLLECTION-COLLECTION POLICY.xml", |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'pid' => 'islandora:pdf_collection', |
|
|
|
|
|
|
|
'label' => 'Islandora Demo PDF Collection', |
|
|
|
|
|
|
|
'cmodel' => 'islandora:collectionCModel', |
|
|
|
|
|
|
|
'parent' => 'islandora:demos', |
|
|
|
|
|
|
|
'datastreams' => array ( |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'TN', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/images/Crystal_Clear_mimetype_pdf.png", |
|
|
|
|
|
|
|
'mimetype' => 'image/png', |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => 'COLLECTION_POLICY', |
|
|
|
|
|
|
|
'datastream_file' => "$module_path/collection_policies/PDF-COLLECTION POLICY.xml", |
|
|
|
|
|
|
|
), |
|
|
|
|
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
|
), |
|
|
@ -1803,8 +1862,30 @@ function fedora_repository_batch_reingest_object($object, &$context) { |
|
|
|
$context['message'][] = "$new_item->pid installed."; |
|
|
|
$context['message'][] = "$new_item->pid installed."; |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
elseif (!empty($object['dsid'])) { |
|
|
|
elseif (!empty($object['dsid']) && !empty($object['datastream_file'])) { |
|
|
|
|
|
|
|
$datastreams = array ( |
|
|
|
|
|
|
|
array ( |
|
|
|
|
|
|
|
'dsid' => $object['dsid'], |
|
|
|
|
|
|
|
'datastream_file' => $object['datastream_file'], |
|
|
|
|
|
|
|
) |
|
|
|
|
|
|
|
); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
elseif (!empty($object['datastreams'])) { |
|
|
|
|
|
|
|
$datastreams = $object['datastreams']; |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
if (!empty($datastreams) && is_array($datastreams)) { |
|
|
|
|
|
|
|
$label = !empty($object['label']) ? $object['label'] : ''; |
|
|
|
|
|
|
|
$new_item = Fedora_Item::ingest_new_item($object['pid'], 'A', $label); |
|
|
|
|
|
|
|
if (!empty($object['cmodel'])) { |
|
|
|
|
|
|
|
$new_item->add_relationship('hasModel', $object['cmodel'], FEDORA_MODEL_URI); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
if (!empty($object['parent'])) { |
|
|
|
|
|
|
|
$new_item->add_relationship('isMemberOfCollection', $object['parent']); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
foreach($datastreams as $ds) { |
|
|
|
|
|
|
|
$new_item->add_datastream_from_file($ds['datastream_file'], $ds['dsid'], !empty($ds['label']) ? $ds['label'] : '', !empty($ds['mimetype']) ? $ds['mimetype'] : 'text/xml'); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|