diff --git a/BatchIngest.inc b/BatchIngest.inc index 2f3f6e57..31daa608 100644 --- a/BatchIngest.inc +++ b/BatchIngest.inc @@ -1,5 +1,13 @@ $label + * @param $content_model + * @param $object_files + * @param $collection_pid + * @param $namespace + * @param $metadata + */ + + function create_batch_objects($label, $content_model, $object_files, $collection_pid, $namespace, $metadata) { module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'MimeClass'); @@ -198,6 +218,14 @@ function create_batch_objects($label, $content_model, $object_files, $collection } } +/** + * transforms mods to dc + * @param $mods_xml + * @return + */ + + + function batch_create_dc_from_mods($mods_xml) { $path = drupal_get_path('module', 'fedora_repository'); module_load_include('inc', 'fedora_repository', 'ObjectHelper'); @@ -225,7 +253,11 @@ function batch_create_dc_from_mods($mods_xml) { return $dc_xml; } - +/** + * + * @param $dir + * @return + */ function recursive_directory_delete($dir) { if (!file_exists($dir)) return true; diff --git a/CollectionManagement.inc b/CollectionManagement.inc index 8b2c04d1..148fab84 100644 --- a/CollectionManagement.inc +++ b/CollectionManagement.inc @@ -29,7 +29,9 @@ function collection_management_form(&$form_state, $this_collection_pid, $content $name_mappings = array(); foreach ($content_models as $content_model) { if ($content_model->pid != "islandora:collectionCModel") { - $cm_options[$content_model->pid] = $content_model->name; + $item = new fedora_item($content_model->pid); + $cm_name = $item->objectProfile->objLabel; + $cm_options[$content_model->pid] = $cm_name; } } @@ -285,7 +287,10 @@ function collection_management_form_submit($form, &$form_state) { batch_process('/fedora/repository'); } } - +/** + * deletes PID if pid is not collection + * @param $pid + */ function delete_objects_as_batch($pid) { module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $name = $user->name; diff --git a/api/fedora_utils.inc b/api/fedora_utils.inc index c430d37d..c8ce7d0e 100644 --- a/api/fedora_utils.inc +++ b/api/fedora_utils.inc @@ -299,7 +299,7 @@ function get_content_models_as_option_array() { $nameparts = explode(':', $parts[0]); if (!$restricted || in_array($nameparts[0], $allowed)) if ($item->get_datastream_dissemination('ISLANDORACM')) { - $options[$parts[0]] = $parts[1]; + $options[$parts[0]] = $parts[1]. ' ~ ' . $parts[0] ; } } }