Browse Source

added datastream view implementation

pull/108/head
Paul Pound 13 years ago
parent
commit
28fed7c946
  1. 16
      islandora.module

16
islandora.module

@ -313,6 +313,22 @@ function islandora_theme() {
); );
} }
function islandora_datastream_as_attachment($object_id, $dsid){
module_load_include('inc', 'islandora', 'RestConnection');
$user = new stdClass();
$user->name = 'fedoraAdmin';
$user->password = 'islandora';
try {
$restConnection = new RestConnection($user);
$fedora_object = new FedoraObject($object_id, $restConnection->repository);
} catch (Exception $e) {
drupal_set_message(t('Error getting Islanndora datastream $d for object %s', array('%s' => $object_id, '%d' => $dsid)), 'error');
return"";
}
print($fedora_object[$dsid]->content);
exit();
}
/** /**
* drupal hook_permissions function * drupal hook_permissions function
* @return array * @return array

Loading…
Cancel
Save