Browse Source

Fixed pathing

pull/50/head
Ben Woodhead 13 years ago
parent
commit
63d5bb277d
  1. 0
      api/MimeClass.inc
  2. 12
      api/ObjectHelper.inc
  3. 2
      api/fedora_item.inc
  4. 8
      core/BatchIngest.inc
  5. 4
      core/CollectionClass.inc
  6. 2
      core/CollectionManagement.inc
  7. 4
      core/CollectionPolicy.inc
  8. 6
      core/formClass.inc
  9. 20
      fedora_repository.module
  10. 2
      plugins/CollectionFormBuilder.inc
  11. 2
      plugins/DemoFormBuilder.inc
  12. 2
      plugins/DocumentConverter.inc
  13. 2
      plugins/Flv.inc
  14. 2
      plugins/FlvFormBuilder.inc
  15. 4
      plugins/FormBuilder.inc
  16. 4
      plugins/ModsFormBuilder.inc
  17. 4
      plugins/Refworks.inc
  18. 4
      plugins/herbarium.inc

0
core/MimeClass.inc → api/MimeClass.inc

12
api/ObjectHelper.inc

@ -56,7 +56,7 @@ class ObjectHelper {
*/ */
function makeObject($pid, $dsID, $asAttachment = FALSE, $label = NULL, $filePath=FALSE, $version=NULL, $forceSoap = TRUE) { function makeObject($pid, $dsID, $asAttachment = FALSE, $label = NULL, $filePath=FALSE, $version=NULL, $forceSoap = TRUE) {
global $user; global $user;
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
if ($pid == NULL || $dsID == NULL) { if ($pid == NULL || $dsID == NULL) {
drupal_set_message(t("no pid or dsid given to create an object with"), 'error'); drupal_set_message(t("no pid or dsid given to create an object with"), 'error');
return ' '; return ' ';
@ -176,7 +176,7 @@ class ObjectHelper {
* for the mimetype in question. * for the mimetype in question.
*/ */
if ($pos === FALSE) { if ($pos === FALSE) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
$mimeclass = new MimeClass(); $mimeclass = new MimeClass();
$ext = $mimeclass->get_extension($mimeType); $ext = $mimeclass->get_extension($mimeType);
$suggestedFileName = "$label.$ext"; $suggestedFileName = "$label.$ext";
@ -443,7 +443,7 @@ class ObjectHelper {
module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'api/ConnectionHelper');
module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
$path = drupal_get_path('module', 'fedora_repository'); $path = drupal_get_path('module', 'fedora_repository');
$dataStreamBody = ''; $dataStreamBody = '';
@ -665,7 +665,7 @@ class ObjectHelper {
//show the collections datastreams //show the collections datastreams
if ($results->length > 0 || $isCollection == TRUE) { if ($results->length > 0 || $isCollection == TRUE) {
// if(strlen($objectList)>22||$contentModel=='Collection'||$contentModel=='Community')//length of empty dom still equals 22 because of <table/> etc // if(strlen($objectList)>22||$contentModel=='Collection'||$contentModel=='Community')//length of empty dom still equals 22 because of <table/> etc
module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
$collectionPolicyExists = $objectHelper->getMimeType($pid, CollectionPolicy::getDefaultDSID()); $collectionPolicyExists = $objectHelper->getMimeType($pid, CollectionPolicy::getDefaultDSID());
if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) { if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) {
if (!empty($collectionPolicyExists)) { if (!empty($collectionPolicyExists)) {
@ -790,7 +790,7 @@ class ObjectHelper {
return NULL; return NULL;
} }
$output = ''; $output = '';
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
if (($cm = ContentModel :: loadFromModel($contentModel)) !== FALSE && $cm->validate()) { if (($cm = ContentModel :: loadFromModel($contentModel)) !== FALSE && $cm->validate()) {
$output .= $cm->displayExtraFieldset($pid, $page_number); $output .= $cm->displayExtraFieldset($pid, $page_number);
} }
@ -810,7 +810,7 @@ class ObjectHelper {
return FALSE; return FALSE;
} }
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
if ($dsid != NULL && $pid != NULL && ($cm = ContentModel::loadFromObject($pid)) !== FALSE) { if ($dsid != NULL && $pid != NULL && ($cm = ContentModel::loadFromObject($pid)) !== FALSE) {
$cm->execAddDatastreamMethods($dsid, $file); $cm->execAddDatastreamMethods($dsid, $file);
} }

2
api/fedora_item.inc

@ -75,7 +75,7 @@ class Fedora_Item {
* @return type * @return type
*/ */
function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) { function add_datastream_from_file($datastream_file, $datastream_id, $datastream_label = NULL, $datastream_mimetype = '', $controlGroup = 'M', $logMessage = NULL) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
if (!is_file($datastream_file)) { if (!is_file($datastream_file)) {
drupal_set_message("$datastream_file not found<br />", 'warning'); drupal_set_message("$datastream_file not found<br />", 'warning');
return; return;

8
core/BatchIngest.inc

@ -9,7 +9,7 @@
*/ */
function batch_creation_form(&$form_state, $collection_pid, $content_models) { function batch_creation_form(&$form_state, $collection_pid, $content_models) {
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
$cm_options = array(); $cm_options = array();
$name_mappings = array(); $name_mappings = array();
foreach ($content_models as $content_model) { foreach ($content_models as $content_model) {
@ -86,7 +86,7 @@ function batch_creation_form_validate($form, &$form_state) {
} }
function batch_creation_form_submit($form, &$form_state) { function batch_creation_form_submit($form, &$form_state) {
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
global $user; global $user;
$namespace_mappings = array(); $namespace_mappings = array();
@ -163,8 +163,8 @@ function batch_creation_form_submit($form, &$form_state) {
* @param <string> $metadata * @param <string> $metadata
*/ */
function create_batch_objects($label, $content_model, $object_files, $collection_pid, $namespace, $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', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
module_load_include('inc', 'fedora_reppository', 'api/fedora_item'); module_load_include('inc', 'fedora_reppository', 'api/fedora_item');
$cm = ContentModel::loadFromModel($content_model, 'ISLANDORACM'); $cm = ContentModel::loadFromModel($content_model, 'ISLANDORACM');

4
core/CollectionClass.inc

@ -193,7 +193,7 @@ class CollectionClass {
* @return ContentModel * @return ContentModel
*/ */
function getContentModels($collection_pid, $showError = TRUE) { function getContentModels($collection_pid, $showError = TRUE) {
module_load_include('inc', 'Fedora_Repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
$collection_stream = $this->getCollectionPolicyStream($collection_pid); $collection_stream = $this->getCollectionPolicyStream($collection_pid);
try { try {
$xml = new SimpleXMLElement($collection_stream); $xml = new SimpleXMLElement($collection_stream);
@ -577,7 +577,7 @@ class CollectionClass {
function getIngestInterface() { function getIngestInterface() {
global $base_url; global $base_url;
$objectHelper = new ObjectHelper(); $objectHelper = new ObjectHelper();
module_load_include('inc', 'Fedora_Repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
$collectionPolicyExists = $objectHelper->getMimeType($this->pid, CollectionPolicy::getDefaultDSID()); $collectionPolicyExists = $objectHelper->getMimeType($this->pid, CollectionPolicy::getDefaultDSID());
if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) { if (user_access(ObjectHelper :: $INGEST_FEDORA_OBJECTS) && $collectionPolicyExists) {
if (!empty($collectionPolicyExists)) { if (!empty($collectionPolicyExists)) {

2
core/CollectionManagement.inc

@ -21,7 +21,7 @@ function collection_management_form(&$form_state, $this_collection_pid, $content
} }
} }
module_load_include('inc', 'fedora_repository', 'api/fedora_utils'); module_load_include('inc', 'fedora_repository', 'api/fedora_utils');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
$item = new Fedora_Item($this_collection_pid); $item = new Fedora_Item($this_collection_pid);
$collection_name = $item->objectProfile->objLabel; $collection_name = $item->objectProfile->objLabel;
$new_content_models = get_content_models_as_option_array(); $new_content_models = get_content_models_as_option_array();

4
core/CollectionPolicy.inc

@ -137,7 +137,7 @@ class CollectionPolicy extends XMLDatastream {
public static function ingestBlankPolicy($pid, $name, $policyDsid, $model_pid, $model_namespace, $relationship, $searchField, $searchValue) { public static function ingestBlankPolicy($pid, $name, $policyDsid, $model_pid, $model_namespace, $relationship, $searchField, $searchValue) {
$ret = FALSE; $ret = FALSE;
if (($cp = self::loadFromCollection($pid)) === FALSE) { //removed second, non-existant variable if (($cp = self::loadFromCollection($pid)) === FALSE) { //removed second, non-existant variable
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
if (($cm = ContentModel::loadFromModel($model_pid)) !== FALSE && $cm->validate()) { if (($cm = ContentModel::loadFromModel($model_pid)) !== FALSE && $cm->validate()) {
$newDom = new DOMDocument('1.0', 'utf-8'); $newDom = new DOMDocument('1.0', 'utf-8');
$newDom->formatOutput = TRUE; $newDom->formatOutput = TRUE;
@ -387,7 +387,7 @@ class CollectionPolicy extends XMLDatastream {
function getContentModels() { function getContentModels() {
$ret = FALSE; $ret = FALSE;
if ($this->validate()) { if ($this->validate()) {
module_load_include('inc', 'Fedora_Repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
$ret = array(); $ret = array();
$content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model'); $content_models = $this->xml->getElementsByTagName('content_models')->item(0)->getElementsByTagName('content_model');
for ($i = 0; $i < $content_models->length; $i++) { for ($i = 0; $i < $content_models->length; $i++) {

6
core/formClass.inc

@ -523,7 +523,7 @@ class formClass {
* @return array * @return array
*/ */
function createQDCIngestFormPageTwo($collection_pid, $collection_label, array &$form_state) { function createQDCIngestFormPageTwo($collection_pid, $collection_label, array &$form_state) {
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
$form = array(); $form = array();
$content_model_pid = ContentModel::getPidFromIdentifier($form_state['values']['models']); $content_model_pid = ContentModel::getPidFromIdentifier($form_state['values']['models']);
$content_model_dsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']); $content_model_dsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']);
@ -558,7 +558,7 @@ class formClass {
* @return array * @return array
*/ */
function createQDCIngestForm($collection_pid, $collection_label, array &$form_state) { function createQDCIngestForm($collection_pid, $collection_label, array &$form_state) {
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
$form_state['storage']['step'] = empty($form_state['storage']['step']) ? 1 : $form_state['storage']['step']; $form_state['storage']['step'] = empty($form_state['storage']['step']) ? 1 : $form_state['storage']['step'];
if ($form_state['storage']['step'] == 1) { if ($form_state['storage']['step'] == 1) {
return $this->createQDCIngestFormPageOne($collection_pid, $collection_label, $form_state); return $this->createQDCIngestFormPageOne($collection_pid, $collection_label, $form_state);
@ -604,7 +604,7 @@ class formClass {
// Populate the list of datastream IDs. // Populate the list of datastream IDs.
module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/ObjectHelper');
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$obj_helper = new ObjectHelper(); $obj_helper = new ObjectHelper();

20
fedora_repository.module

@ -152,8 +152,8 @@ function fedora_repository_ingest_form_submit(array $form, array &$form_state) {
elseif ($form_state['clicked_button']['#id'] == 'edit-submit') { elseif ($form_state['clicked_button']['#id'] == 'edit-submit') {
global $base_url; global $base_url;
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
$contentModelPid = ContentModel::getPidFromIdentifier($form_state['values']['models']); $contentModelPid = ContentModel::getPidFromIdentifier($form_state['values']['models']);
$contentModelDsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']); $contentModelDsid = ContentModel::getDSIDFromIdentifier($form_state['values']['models']);
@ -222,8 +222,8 @@ function fedora_repository_ingest_form_validate($form, &$form_state) {
} }
if (isset($form_state['values']['ingest-file-location']) && file_exists($form_state['values']['ingest-file-location'])) { if (isset($form_state['values']['ingest-file-location']) && file_exists($form_state['values']['ingest-file-location'])) {
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
$file = $form_state['values']['ingest-file-location']; $file = $form_state['values']['ingest-file-location'];
@ -367,7 +367,7 @@ function add_stream_form_submit($form, &$form_state) {
$form_state['rebuild'] = TRUE; $form_state['rebuild'] = TRUE;
return; return;
} }
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/ObjectHelper');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$pathToModule = drupal_get_path('module', 'fedora_repository'); $pathToModule = drupal_get_path('module', 'fedora_repository');
@ -635,7 +635,7 @@ function fedora_repository_replace_stream_form_validate($form, &$form_state) {
} }
$doc = new DOMDocument(); $doc = new DOMDocument();
module_load_include('inc', 'Fedora_Repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
$mime = new MimeClass(); $mime = new MimeClass();
if ($mime->getType($file->filepath) == 'text/xml' && !$doc->load($file->filepath)) { if ($mime->getType($file->filepath) == 'text/xml' && !$doc->load($file->filepath)) {
form_set_error('file', 'Invalid XML format.'); form_set_error('file', 'Invalid XML format.');
@ -665,7 +665,7 @@ function fedora_repository_replace_stream_form_submit($form, &$form_state) {
$dsLabel = substr($dsLabel, 0, $indexOfDot); $dsLabel = substr($dsLabel, 0, $indexOfDot);
$dsLabel .= substr($file->filename, strrpos($file->filename, '.')); // Add the file extention to the end of the label.; $dsLabel .= substr($file->filename, strrpos($file->filename, '.')); // Add the file extention to the end of the label.;
} }
module_load_include('inc', 'Fedora_Repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$file_basename = basename($file->filepath); $file_basename = basename($file->filepath);
@ -717,7 +717,7 @@ function fedora_repository_edit_qdc_page($pid = NULL, $dsId = NULL) {
* @return type * @return type
*/ */
function fedora_repository_edit_qdc_form(&$form_state, $pid, $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', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'api/ObjectHelper'); module_load_include('inc', 'fedora_repository', 'api/ObjectHelper');
if ($pid == NULL) { if ($pid == NULL) {
drupal_set_message(t('You must specify an object pid!'), 'error'); drupal_set_message(t('You must specify an object pid!'), 'error');
@ -797,7 +797,7 @@ function fedora_repository_edit_qdc_form_submit($form, &$form_state) {
// Check the content model for a custom edit metadata form submit function. // Check the content model for a custom edit metadata form submit function.
if (isset($form_state['values']['pid'])) { if (isset($form_state['values']['pid'])) {
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
if (($cm = ContentModel::loadFromObject($form_state['values']['pid'])) !== FALSE) { if (($cm = ContentModel::loadFromObject($form_state['values']['pid'])) !== FALSE) {
return $cm->handleEditMetadataForm($form_state['values']['form_id'], $form_state, $client); return $cm->handleEditMetadataForm($form_state['values']['form_id'], $form_state, $client);
} }
@ -960,7 +960,7 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');
$collectionClass = new CollectionClass(); $collectionClass = new CollectionClass();
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'plugins/FedoraObjectDetailedContent'); module_load_include('inc', 'fedora_repository', 'plugins/FedoraObjectDetailedContent');
$breadcrumbs = array(); $breadcrumbs = array();
$objectHelper->getBreadcrumbs($pid, $breadcrumbs); $objectHelper->getBreadcrumbs($pid, $breadcrumbs);

2
plugins/CollectionFormBuilder.inc

@ -30,7 +30,7 @@ class CollectionFormBuilder extends FormBuilder {
* @param type $rootElement * @param type $rootElement
*/ */
function createFedoraDataStreams($form_values, &$dom, &$rootElement) { function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
global $base_url; global $base_url;
$mimetype = new MimeClass(); $mimetype = new MimeClass();

2
plugins/DemoFormBuilder.inc

@ -29,7 +29,7 @@ class DemoFormBuilder extends FormBuilder {
* @param type $rootElement * @param type $rootElement
*/ */
function createFedoraDataStreams($form_values, &$dom, &$rootElement) { function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
global $base_url; global $base_url;
$mimetype = new MimeClass(); $mimetype = new MimeClass();
$server = NULL; $server = NULL;

2
plugins/DocumentConverter.inc

@ -32,7 +32,7 @@ class DocumentConverter {
* @return string * @return string
*/ */
function convert($parameterArray = NULL, $dsid, $file, $output_ext) { function convert($parameterArray = NULL, $dsid, $file, $output_ext) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
#debug: #debug:
#drupal_set_message("Sending $file to ". $this->converter_service_url ." for convertsion to $output_ext", 'status'); #drupal_set_message("Sending $file to ". $this->converter_service_url ." for convertsion to $output_ext", 'status');

2
plugins/Flv.inc

@ -137,7 +137,7 @@ class FormBuilder {
* @param type $rootElement * @param type $rootElement
*/ */
function createFedoraDataStreams($form_values, &$dom, &$rootElement) { function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
$mimetype = new MimeClass(); $mimetype = new MimeClass();
$server = NULL; $server = NULL;
$file = $form_values['ingest-file-location']; $file = $form_values['ingest-file-location'];

2
plugins/FlvFormBuilder.inc

@ -30,7 +30,7 @@ class FlvFormBuilder extends FormBuilder {
*/ */
function createFedoraDataStreams($form_values, &$dom, &$rootElement) { function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
global $base_url; global $base_url;
$mimetype = new MimeClass(); $mimetype = new MimeClass();
$server = NULL; $server = NULL;

4
plugins/FormBuilder.inc

@ -135,7 +135,7 @@ class FormBuilder {
*/ */
function handleQDCForm($form_values) { function handleQDCForm($form_values) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
$dom = new DomDocument("1.0", "UTF-8"); $dom = new DomDocument("1.0", "UTF-8");
$dom->formatOutput = TRUE; $dom->formatOutput = TRUE;
@ -195,7 +195,7 @@ class FormBuilder {
* @param type $rootElement * @param type $rootElement
*/ */
function createFedoraDataStreams($form_values, &$dom, &$rootElement) { function createFedoraDataStreams($form_values, &$dom, &$rootElement) {
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
global $base_url; global $base_url;
$mimetype = new MimeClass(); $mimetype = new MimeClass();
$server = NULL; $server = NULL;

4
plugins/ModsFormBuilder.inc

@ -24,7 +24,7 @@ class ModsFormBuilder extends FormBuilder {
function __construct($pid=NULL) { function __construct($pid=NULL) {
parent::__construct(); parent::__construct();
if ($pid !== NULL) { if ($pid !== NULL) {
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$this->pid = $pid; $this->pid = $pid;
@ -256,7 +256,7 @@ class ModsFormBuilder extends FormBuilder {
*/ */
function handleModsForm(&$form_values, &$form_state) { function handleModsForm(&$form_values, &$form_state) {
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'CollectionPolicy'); module_load_include('inc', 'fedora_repository', 'core/CollectionPolicy');
$form_state['storage']['people'] = NULL; //clears out old entities for the next run of the formbuilder. $form_state['storage']['people'] = NULL; //clears out old entities for the next run of the formbuilder.

4
plugins/Refworks.inc

@ -224,7 +224,7 @@ class Refworks {
function handleForm(&$form_values) { function handleForm(&$form_values) {
$errorMessage = NULL; $errorMessage = NULL;
module_load_include('inc', 'fedora_repository', 'CollectionClass'); module_load_include('inc', 'fedora_repository', 'CollectionClass');
module_load_include('inc', 'fedora_repository', 'ContentModel'); module_load_include('inc', 'fedora_repository', 'core/ContentModel');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
$contentModelPid = ContentModel::getPidFromIdentifier($form_values['models']); $contentModelPid = ContentModel::getPidFromIdentifier($form_values['models']);
$contentModelDsid = ContentModel::getDSIDFromIdentifier($form_values['models']); $contentModelDsid = ContentModel::getDSIDFromIdentifier($form_values['models']);
@ -389,7 +389,7 @@ class Refworks {
*/ */
function createFedoraDataStreams($form_values, &$dom, &$rootElement, $reference) { function createFedoraDataStreams($form_values, &$dom, &$rootElement, $reference) {
global $base_url; global $base_url;
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
$mimetype = new MimeClass(); $mimetype = new MimeClass();
$server = NULL; $server = NULL;
$this->createRomeoDataStream($dom, $rootElement); $this->createRomeoDataStream($dom, $rootElement);

4
plugins/herbarium.inc

@ -75,7 +75,7 @@ class Herbarium {
*/ */
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore');
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
global $user; global $user;
$mimetype = new MimeClass(); $mimetype = new MimeClass();
$dwc = new DarwinCore($this->item); $dwc = new DarwinCore($this->item);
@ -97,7 +97,7 @@ class Herbarium {
* Create fedora object * Create fedora object
* Add the datastreams * Add the datastreams
*/ */
module_load_include('inc', 'fedora_repository', 'MimeClass'); module_load_include('inc', 'fedora_repository', 'api/MimeClass');
module_load_include('inc', 'fedora_repository', 'api/fedora_item'); module_load_include('inc', 'fedora_repository', 'api/fedora_item');
module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore'); module_load_include('inc', 'fedora_repository', 'plugins/DarwinCore');
global $user; global $user;

Loading…
Cancel
Save