Browse Source

ISLANDORA-171 Got getQED() to use Fedora_Item, stop attempting to get QDC

pull/105/head
Alexander O'Neill 14 years ago
parent
commit
c77a5d0059
  1. 31
      ObjectHelper.inc

31
ObjectHelper.inc

@ -318,36 +318,9 @@ class ObjectHelper {
$path = drupal_get_path('module', 'fedora_repository'); $path = drupal_get_path('module', 'fedora_repository');
module_load_include('inc', 'fedora_repository', 'ConnectionHelper'); module_load_include('inc', 'fedora_repository', 'ConnectionHelper');
$soapHelper = new ConnectionHelper(); $dsid = array_key_exists('QDC', $item->get_datastreams_list_as_array()) ? 'QDC' : 'DC';
$client = $soapHelper->getSoapClient(variable_get('fedora_soap_url', 'http://localhost:8080/fedora/services/access?wsdl')); $xmlstr = $item->get_datastream_dissemination($dsid);
$dsId = 'QDC';
$params = array(
'pid' => "$item->pid",
'dsID' => "$dsId",
'asOfDateTime' => ""
);
try {
$object = $client->__soapCall('getDatastreamDissemination', array(
'parameters' => $params
));
} catch (Exception $e) {
try { //probably no QDC so we will try for the DC stream.
$dsId = 'DC';
$params = array(
'pid' => "$item->pid",
'dsID' => "$dsId",
'asOfDateTime' => ""
);
$object = $client->__soapCAll('getDatastreamDissemination', array(
'parameters' => $params
));
} catch (exception $e2) {
drupal_set_message($e2->getMessage(), 'error');
return;
}
}
$xmlstr = $object->dissemination->stream;
try { try {
$proc = new XsltProcessor(); $proc = new XsltProcessor();
} catch (Exception $e) { } catch (Exception $e) {

Loading…
Cancel
Save