diff --git a/core/ObjectHelper.inc b/api/ObjectHelper.inc similarity index 99% rename from core/ObjectHelper.inc rename to api/ObjectHelper.inc index f5e4808d..29c63131 100644 --- a/core/ObjectHelper.inc +++ b/api/ObjectHelper.inc @@ -441,7 +441,7 @@ class ObjectHelper { function get_formatted_datastream_list($object_pid, $contentModels, &$fedoraItem) { global $fedoraUser, $fedoraPass, $base_url, $user; module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'ContentModel'); diff --git a/api/fedora_collection.inc b/api/fedora_collection.inc index a82bf39b..772455b7 100644 --- a/api/fedora_collection.inc +++ b/api/fedora_collection.inc @@ -68,7 +68,7 @@ function export_collection($collection_pid, $relationship = 'isMemberOfCollectio * @param $query_format R */ function get_related_items_as_xml($collection_pid, $relationship = array('isMemberOfCollection'), $limit = 10000, $offset = 0, $active_objects_only = TRUE, $cmodel = NULL, $orderby = '$title') { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); global $user; if (!fedora_repository_access(OBJECTHELPER :: $OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { diff --git a/api/fedora_export.inc b/api/fedora_export.inc index f3c82160..f5a6a7b4 100644 --- a/api/fedora_export.inc +++ b/api/fedora_export.inc @@ -85,7 +85,7 @@ function export_objects_for_pid($pid, $dir, &$log) { * @return type */ function export_foxml_for_pid($pid, $dir, $paths, &$log, $format = FOXML_11, $remove_islandora = FALSE) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $ob_helper = new ObjectHelper(); if (!$object_xml = $ob_helper->getObject($pid, 'migrate', $format)) { $log[] = log_line(t("Failed to get foxml for %pid", array('%pid' => $pid)), 'error'); diff --git a/api/fedora_imageapi.module b/api/fedora_imageapi.module index 99c2cfd2..0d92c6f2 100644 --- a/api/fedora_imageapi.module +++ b/api/fedora_imageapi.module @@ -24,7 +24,7 @@ function fedora_imageapi_menu() { * @param string $params */ function fedora_repository_image_manip($pid = '', $dsid = '', $op = '', $params = '') { - module_load_include('inc', 'Fedora_Repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('module', 'imageapi'); $obj = new ObjectHelper(); $mimetype = $obj->getMimeType($pid, $dsid); diff --git a/core/BatchIngest.inc b/core/BatchIngest.inc index c78be313..d0d22080 100644 --- a/core/BatchIngest.inc +++ b/core/BatchIngest.inc @@ -219,7 +219,7 @@ function create_batch_objects($label, $content_model, $object_files, $collection */ function batch_create_dc_from_mods($mods_xml) { $path = drupal_get_path('module', 'fedora_repository'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'CollectionClass'); if ($xmlstr == NULL || strlen($xmlstr) < 5) { diff --git a/core/CollectionClass.inc b/core/CollectionClass.inc index 0d36be3e..395481e2 100644 --- a/core/CollectionClass.inc +++ b/core/CollectionClass.inc @@ -29,7 +29,7 @@ class CollectionClass { */ function __construct($pid = NULL) { if (!empty($pid)) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $this->collectionObject = new ObjectHelper($pid); $this->pid = $pid; } @@ -45,7 +45,7 @@ class CollectionClass { * @return type */ function getRelatedObjects($pid, $limit, $offset, $itqlquery=NULL) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $objectHelper = new ObjectHelper(); if (!isset($itqlquery)) { // $query_string = $objectHelper->getStream($pid, 'QUERY', 0); @@ -65,7 +65,7 @@ class CollectionClass { * @return type */ function getRelatedItems($pid, $itqlquery = NULL, $limit = NULL, $offset = NULL) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (!isset($limit)) { $limit = 1000; diff --git a/core/ContentModel.inc b/core/ContentModel.inc index cbacd422..1a3287bc 100644 --- a/core/ContentModel.inc +++ b/core/ContentModel.inc @@ -41,7 +41,7 @@ class ContentModel extends XMLDatastream { public static function loadFromObject($pid) { $ret = FALSE; if (self::valid_pid($pid)) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $objectHelper = new ObjectHelper(); $content_models = $objectHelper->get_content_models_list($pid); diff --git a/core/SearchClass.inc b/core/SearchClass.inc index 751dbbfa..fd15de40 100644 --- a/core/SearchClass.inc +++ b/core/SearchClass.inc @@ -185,7 +185,7 @@ class SearchClass { * @return type */ function quickSearch($type, $query, $showForm = 1, $orderBy = 0, & $userArray) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (user_access('view fedora collection')) { $numberOfHistPerPage = '5000'; //hack for IR they do not want next button @@ -237,7 +237,7 @@ class SearchClass { * @return type */ function getTerms($fieldName, $startTerm, $displayName = NULL) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); $indexName = variable_get('fedora_index_name', 'DemoOnLucene'); $searchUrl = variable_get('fedora_fgsearch_url', 'http://localhost:8080/fedoragsearch/rest'); @@ -269,7 +269,7 @@ class SearchClass { * @return type */ function custom_search($query, $startPage=1, $xslt= '/xsl/advanced_search_results.xsl', $numberOfHistPerPage = 50) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); if (user_access('view fedora collection')) { diff --git a/core/SecurityClass.inc b/core/SecurityClass.inc index 1e2b1835..e02ef6c8 100644 --- a/core/SecurityClass.inc +++ b/core/SecurityClass.inc @@ -30,7 +30,7 @@ class SecurityClass { */ function canIngestHere($collection_pid) { global $user; - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $objectHelper = new ObjectHelper(); // get the childsecurity policy from the collection. $policyStream = $objectHelper->getStream($collection_pid, SECURITYCLASS :: $SECURITY_CLASS_SECURITY_STREAM, FALSE); diff --git a/core/formClass.inc b/core/formClass.inc index be5ef9d2..7b26dde0 100644 --- a/core/formClass.inc +++ b/core/formClass.inc @@ -206,7 +206,7 @@ class formClass { return; } module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $form = array(); $form['fedora_repository_name'] = array( '#type' => 'textfield', @@ -603,7 +603,7 @@ class formClass { //dump_vars($form_state); // Populate the list of datastream IDs. - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); diff --git a/fedora_repository.module b/fedora_repository.module index b7087c85..b0fcb962 100644 --- a/fedora_repository.module +++ b/fedora_repository.module @@ -72,7 +72,7 @@ function fedora_repository_purge_object($pid = NULL, $name = NULL) { * @return type */ function fedora_repository_collection_view($pid = NULL, $collection = NULL, $pageNumber = NULL) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); 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'); @@ -103,7 +103,7 @@ function fedora_repository_collection_view($pid = NULL, $collection = NULL, $pag */ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label = NULL, $content_model = NULL) { module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); if (!user_access('ingest new fedora objects')) { drupal_set_message(t('You do not have permission to ingest.'), 'error'); return ''; @@ -368,7 +368,7 @@ function add_stream_form_submit($form, &$form_state) { return; } module_load_include('inc', 'fedora_repository', 'MimeClass'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $pathToModule = drupal_get_path('module', 'fedora_repository'); @@ -470,7 +470,7 @@ function add_stream_form_validate($form, &$form_state) { * @return type */ function fedora_repository_purge_stream($pid = NULL, $dsId = NULL, $name = NULL) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); global $user; if ($pid == NULL || $dsId == NULL) { drupal_set_message(t('You must specify an object pid and DataStream ID to purge a datastream'), 'error'); @@ -693,7 +693,7 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) { * @return type */ function fedora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); global $user; if ($pid == NULL || $dsId == NULL) { drupal_set_message(t('You must specify an object pid and a Dublin Core DataStream ID to edit metadata'), 'error'); @@ -718,7 +718,7 @@ function fedora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) { */ function fedora_repository_edit_qdc_form(&$form_state, $pid, $dsId = NULL) { module_load_include('inc', 'fedora_repository', 'ContentModel'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); if ($pid == NULL) { drupal_set_message(t('You must specify an object pid!'), 'error'); } @@ -819,7 +819,7 @@ function fedora_repository_edit_qdc_form_submit($form, &$form_state) { * creates a new permission than can be assigned to roles */ function fedora_repository_perm() { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); return array( OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, OBJECTHELPER::$EDIT_FEDORA_METADATA, @@ -844,7 +844,7 @@ function fedora_repository_perm() { * @return type */ function fedora_repository_access($op, $node, $account) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $objectHelper = new ObjectHelper(); return $objectHelper->fedora_repository_access($op, $node, $account); } @@ -879,7 +879,7 @@ function makeObject($pid, $dsID) { return ' '; } - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $objectHelper = new ObjectHelper(); $objectHelper->makeObject($pid, $dsID); } @@ -898,7 +898,7 @@ function makeObject($pid, $dsID) { * @return type */ 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/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); global $user; @@ -1023,7 +1023,7 @@ function fedora_repository_urlencode_string($str) { */ function fedora_object_as_attachment($pid, $dsId, $label=NULL, $version=NULL) { global $user; - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); if ($pid == NULL || $dsId == NULL) { drupal_set_message(t("no pid or dsid given to create an object with!")); @@ -1058,7 +1058,7 @@ function repository_page($pid = NULL, $dsId = NULL, $collection = NULL, $pageNum */ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NULL) { module_load_include('inc', 'fedora_repository', 'api/fedora_item'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); global $user; if (!fedora_repository_access(OBJECTHELPER::$OBJECT_HELPER_VIEW_FEDORA, $pid, $user)) { @@ -1103,7 +1103,7 @@ function repository_service($pid = NULL, $servicePid = NULL, $serviceMethod = NU * @return array */ function fedora_repository_search($op = 'search', $keys = NULL) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); switch ($op) { @@ -1444,7 +1444,7 @@ function fedora_repository_install_demos_page() { * @return string */ function fedora_repository_demo_objects_form() { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/fedora_item'); $form = array(); $existing_demos = array(); @@ -1786,7 +1786,7 @@ function theme_fedora_repository_time($element) { */ function fedora_repository_remove_item_from_basket($pid) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $pids = empty($_SESSION['basket']['processed']) ? array() : $_SESSION['basket']['processed']; $objectHelper = new ObjectHelper(); @@ -1996,7 +1996,7 @@ function _fedora_repository_get_basket_pids() { $pids = empty($_SESSION['basket']['processed']) ? array() : $_SESSION['basket']['processed']; - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $ob = new ObjectHelper(); foreach ($_SESSION['basket']['unprocessed'] as $pid) { // Check if the pid already exists in the tree diff --git a/plugins/DarwinCore.inc b/plugins/DarwinCore.inc index dc698521..97fea8a2 100644 --- a/plugins/DarwinCore.inc +++ b/plugins/DarwinCore.inc @@ -243,7 +243,7 @@ class DarwinCore { */ public function asHTML() { $path = drupal_get_path('module', 'Fedora_Repository'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'CollectionClass'); $xmlstr = $this->darwinCoreXML; diff --git a/plugins/FormBuilder.inc b/plugins/FormBuilder.inc index 02ca6ace..88469ac3 100644 --- a/plugins/FormBuilder.inc +++ b/plugins/FormBuilder.inc @@ -83,7 +83,7 @@ class FormBuilder { * @return type */ function createPolicy($collectionPid, &$dom, &$rootElement) { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $objectHelper = new ObjectHelper(); $dsid = 'CHILD_SECURITY'; diff --git a/plugins/ImageManipulation.inc b/plugins/ImageManipulation.inc index bbbe84fd..a67ad220 100644 --- a/plugins/ImageManipulation.inc +++ b/plugins/ImageManipulation.inc @@ -15,7 +15,7 @@ class ImageManipulation { * Constructor */ function ImageManipulation() { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); } /** diff --git a/plugins/ShowStreamsInFieldSets.inc b/plugins/ShowStreamsInFieldSets.inc index 3fc116d2..74b2bac9 100644 --- a/plugins/ShowStreamsInFieldSets.inc +++ b/plugins/ShowStreamsInFieldSets.inc @@ -143,7 +143,7 @@ class ShowStreamsInFieldSets { * @return type */ function showQdc() { - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $objectHelper = new ObjectHelper(); $content = $objectHelper->getQDC($this->pid); $collection_fieldset = array( @@ -174,7 +174,7 @@ class ShowStreamsInFieldSets { */ function showRefworks() { $path = drupal_get_path('module', 'fedora_repository'); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $collectionHelper = new CollectionClass(); $xmlstr = $collectionHelper->getStream($this->pid, "refworks"); html_entity_decode($xmlstr); diff --git a/plugins/herbarium.inc b/plugins/herbarium.inc index fa2ac4a7..5bbcd9c7 100644 --- a/plugins/herbarium.inc +++ b/plugins/herbarium.inc @@ -184,7 +184,7 @@ class Herbarium { '#title' => t('Darwin Core'), '#content' => $dwc->asHTML(), ); - module_load_include('inc', 'fedora_repository', 'ObjectHelper'); + module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); $obj = new ObjectHelper(); if (fedora_repository_access(OBJECTHELPER :: $EDIT_FEDORA_METADATA, $this->pid, $user)) { $editform = drupal_get_form('fedora_repository_edit_qdc_form', $this->pid, 'DARWIN_CORE');