function get_dissemination($service_definition_pid, $method_name, $parameters = array(), $as_of_date_time = null) {
$params = array(
'pid' => $this->pid,
@ -365,36 +366,36 @@ class Fedora_Item {
//}
return $this->datastreams_list;
}
/**
* * DatastreamControlGroup controlGroup - String restricted to the values of "X", "M", "R", or "E" (InlineXML,Managed Content,Redirect, or External Referenced).
* String ID - The datastream ID (64 characters max).
* String versionID - The ID of the most recent datastream version
* String[] altIDs - Alternative IDs for the datastream, if any.
* String label - The Label of the datastream.
* boolean versionable - Whether the datastream is versionable.
* String MIMEType - The mime-type for the datastream, if set.
* String formatURI - The format uri for the datastream, if set.
* String createDate - The date the first version of the datastream was created.
* long size - The size of the datastream in Fedora. Only valid for inline XML metadata and managed content datastreams.
* String state - The state of the datastream. Will be "A" (active), "I" (inactive) or "D" (deleted).
* String location - If the datastream is an external reference or redirect, the url to the contents. TODO: Managed?
* String checksumType - The algorithm used to compute the checksum. One of "DEFAULT", "DISABLED", "MD5", "SHA-1", "SHA-256", "SHA-385", "SHA-512".
* String checksum - The value of the checksum represented as a hexadecimal string.
* String ID - The datastream ID (64 characters max).
* String versionID - The ID of the most recent datastream version
* String[] altIDs - Alternative IDs for the datastream, if any.
* String label - The Label of the datastream.
* boolean versionable - Whether the datastream is versionable.
* String MIMEType - The mime-type for the datastream, if set.
* String formatURI - The format uri for the datastream, if set.
* String createDate - The date the first version of the datastream was created.
* long size - The size of the datastream in Fedora. Only valid for inline XML metadata and managed content datastreams.
* String state - The state of the datastream. Will be "A" (active), "I" (inactive) or "D" (deleted).
* String location - If the datastream is an external reference or redirect, the url to the contents. TODO: Managed?
* String checksumType - The algorithm used to compute the checksum. One of "DEFAULT", "DISABLED", "MD5", "SHA-1", "SHA-256", "SHA-385", "SHA-512".
* String checksum - The value of the checksum represented as a hexadecimal string.
*
* @param string $dsid
* @return datastream object
* get the mimetype size etc. in one shot. instead of iterating throught the datastream list for what we need
*/
function get_datastream_info($dsid,$as_of_date_time = ""){
$params = array(
function get_datastream_info($dsid,$as_of_date_time = ""){
@ -101,7 +101,8 @@ function fedora_repository_ingest_object($collection_pid=NULL, $collection_label
if (!validPid($collection_pid)) {
if (validPid(urldecode($collection_pid))) {
$collection_pid = urldecode($collection_pid);
} else {
}
else {
drupal_set_message(t("This collection PID $collection_pid is not valid"), 'error');
return ' ';
}
@ -202,10 +203,11 @@ function fedora_repository_ingest_form_validate($form, &$form_state) {
if (!empty($file)) {
if (!in_array($dformat, $allowedMimeTypes)) {
form_set_error('ingest-file-location', t('The uploaded file\'s mimetype (' . $dformat . ') is not associated with this Content Model. The allowed types are ' .
@ -262,7 +264,8 @@ function fedora_repository_purge_object_form(&$form_state, $pid, $referrer) {
//$form['#redirect'] = $referrer;
return $form;
} else {
}
else {
// ALSO do $form definition here. Your final submit handler (after user clicks Yes, I Confirm) will only see $form_state info defined here. Form you create here passed as param1 to confirm_form
return confirm_form($form, 'Confirm Purge Object', $referrer, 'Are you sure you want to delete this object? This action cannot be undone.', 'Delete', 'Cancel'); //Had better luck leaving off last param 'name'
@ -366,9 +369,9 @@ function add_stream_form_validate($form, &$form_state) {
@ -764,12 +770,12 @@ function fedora_repository_get_items($pid = NULL, $dsId = NULL, $collection = NU
}
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');
if (user_access('access administration pages')) {
drupal_set_message(t("PIDs may be added to allowed namespaces, or all namespace restrictions removed !here", array('!here' => l('here', 'admin/settings/fedora_repository'))), 'warning');
'#value' => '<p>If you install the ' . l('fedora demo objects', 'https://wiki.duraspace.org/display/FCR30/Demonstration+Objects') . ' Islandora can display them as a collection.</p>'
'#value' => '<p>If you install the ' . l('fedora demo objects', 'https://wiki.duraspace.org/display/FCR30/Demonstration+Objects') . ' Islandora can display them as a collection.</p>'
@ -1746,9 +1763,9 @@ function theme_add_to_basket_link($pid, $type = 'object') {
*/
if (!_is_added_to_basket($pid)) {
return l(
theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))),
"fedora/repository/addToBasket/" . $path,
array('html' => TRUE)
theme('image', drupal_get_path('module', 'Fedora_Repository') . '/images/' . $save, t("Add to basket"), t("Add this @object to my basket", array('@object' => $object))),
"fedora/repository/addToBasket/" . $path,
array('html' => TRUE)
);
}
@ -1764,7 +1781,8 @@ function fedora_repository_display_schema($file) {
'#description' => t('The URL to use for REST-type connections'),
'#required' => TRUE,
'#weight' => 0,
);
$form['fedora_soap_manage_url'] = array(
'#type' => 'textfield',
'#title' => t('Fedora SOAP management URL'),
'#default_value' => variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'), '#description' => t('The URL to use for SOAP API-M connections'),
'#required' => TRUE,
'#weight' => 0
'#type' => 'textfield',
'#title' => t('Fedora SOAP management URL'),
'#default_value' => variable_get('fedora_soap_manage_url', 'http://localhost:8080/fedora/services/management?wsdl'), '#description' => t('The URL to use for SOAP API-M connections'),
'#required' => TRUE,
'#weight' => 0
);
$form['fedora_solr_search_url'] = array(
'#type' => 'textfield',
'#title' => t('Fedora Solr search URL'),
'#default_value' => variable_get('fedora_solr_search_url', 'http://localhost:8080/solr'), '#description' => t('The URL to use for Solr searching'),
'#required' => TRUE,
'#weight' => 0
'#type' => 'textfield',
'#title' => t('Fedora Solr search URL'),
'#default_value' => variable_get('fedora_solr_search_url', 'http://localhost:8080/solr'), '#description' => t('The URL to use for Solr searching'),
'#required' => TRUE,
'#weight' => 0
);
$form['fedora_namespace'] = array(
// will allow admin user to remove namepsace restrictions if not explicitly disallowed in settings.php
'#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. <br/> This could be more than a simple namespace ie demo:mydemos.'),
'#weight' => 0
);
/*
$form['fedora_admin_user'] = array(
'#type' => 'textfield',
'#title' => t('A user with the Drupal role administrator'),
'#description' => t('A user with the administrator role. This is the user the Islandora module will use when admin access is needed for a task, such as creating a collection object for a new user.'),
'#required' => TRUE, '#weight' => 0
);
$form['fedora_searchterms_location'] = array(
'#type' => 'file',
'#title' => 'SearchTerms.xml file location',
}
else {
$form['fedora_pids_allowed'] = array(
'#type' => 'textfield',
'#title' => t('PID namespaces allowed in this Drupal install'),
'#description' => t('A space separated list PID namespaces that users are permitted to access from this Drupal installation. <br/> This could be more than a simple namespace ie demo:mydemos.'),
'#description' => t('The title displayed when viewing collections and objects in /fedora/repository. Leave blank to display no title. Note that the menus must be rebuilt after changing this variable.'),
'#description' => t('The title displayed when viewing collections and objects in /fedora/repository. Leave blank to display no title. Note that the menus must be rebuilt after changing this variable.'),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#description' => t('Determines when to display the object (or collection) title when viewing an object/collection page.'),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#description' => t('Determines when to display the default object (or collection) description fieldset when viewing an object/collection page.'),
'#description' => t('When enabled, restricts access to fedora object datastreams that are not listed in the Islandora Content Model for the object (unless the user is an administrator).'),
);
);
$form['fedora_collection_display_list'] = array(
'#type' => 'select',
'#title' => t('Display Collection List Behaviour'),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#options' => array(ObjectHelper::$DISPLAY_ALWAYS=>t('Always'),ObjectHelper::$DISPLAY_NEVER=>t('Never'),ObjectHelper::$DISPLAY_NO_MODEL_OUTPUT=>t('Only if no Content Model display output.')),
'#description' => t('Determines when to display the list of objects when viewing a collection page.'),
'#title' => t('Ingest digital object into collection_pid !collection_label Step #1', array('collection_pid' => $collection_pid, '!collection_label' => $collection_label))
'#type' => 'fieldset',
'#title' => t('Ingest digital object into collection_pid !collection_label Step #1', array('collection_pid' => $collection_pid, '!collection_label' => $collection_label))
);
$form['indicator']['models'] = array(// content models available
'#type' => 'select',
'#title' => t('Content models available'),
'#options' => $modelsForForm,
//'#description' => t('Content models available in this collection. A content model defines what is allowed in a collection and what to do with a file when it is uploaded (An example may creating a thumbnail from an image.).')
'#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.<br/> Additional information may be found <ahref="https://wiki.duraspace.org/display/FEDORACREATE/Content+Models+Overview">here.</a> ')
'#type' => 'select',
'#title' => t('Content models available'),
'#options' => $modelsForForm,
//'#description' => t('Content models available in this collection. A content model defines what is allowed in a collection and what to do with a file when it is uploaded (An example may creating a thumbnail from an image.).')
'#description' => t('Content models define datastream composition, relationships between this and other content models, and the mandatory behaviors associated with each digital object.<br/> Additional information may be found <ahref="https://wiki.duraspace.org/display/FEDORACREATE/Content+Models+Overview">here.</a> ')
);
break;
@ -577,22 +536,22 @@ class formClass {
}
$form['collection_pid'] = array(
'#type' => 'hidden',
'#value' => $collection_pid
'#type' => 'hidden',
'#value' => $collection_pid
);
if ($form_state['storage']['step'] <2){
$button_name = t('Next');
}
}
else {
$prefix = t('Please be patient. Once you click next there may be a number of files created. Depending on your content model this could take a few minutes to process.<br/>');
'#description' => t('Datastream IDs defined by the content model.'),
);
$form['stream_id']['#options'] = $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,
'#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.'),