Browse Source

updated islandora.api.php

pull/105/merge
Paul Pound 13 years ago
parent
commit
cf851df066
  1. 25
      RestConnection.inc
  2. 9
      islandora.api.php

25
RestConnection.inc

@ -1,6 +1,27 @@
<?php
//do this until we expost these in a module or library
require_once 'sites/all/libraries/tuque/Datastream.php';
require_once 'sites/all/libraries/tuque/FedoraApi.php';
require_once 'sites/all/libraries/tuque/FedoraApiSerializer.php';
require_once 'sites/all/libraries/tuque/Object.php';
require_once 'sites/all/libraries/tuque/RepositoryConnection.php';
require_once 'sites/all/libraries/tuque/Cache.php';
require_once 'sites/all/libraries/tuque/RepositoryException.php';
class RestConnection {
public $connection = NULL;
public $api = NULL;
public $cache = NULL;
public $repository = NULL;
function RestConnection($user){
$url = variable_get('islandora_base_url', 'http://localhost:8080/fedora');
$this->$connection = new RepositoryConnection($url, $user->name, $user->password);
$this->$connection->reuseConnection = TRUE;
$this->api = new FedoraApi($connection);
$this->cache = new SimpleCache();
$this->repository = new FedoraRepository($api,$cache);
}
}
?>

9
islandora.api.php

@ -9,3 +9,12 @@ function hook_islandora_view_object($object_id){}
function hook_islandora_get_types(){}
function hook_islandora_add_datastream($object_id) {}
/**
* creates and populates a php Fedora object.
*/
function hook_islandora_preingest_alter(){}
function hook_islandora_postingest($object){}
function hook_islandora_datastream_edit($object, $dsid){}
Loading…
Cancel
Save