Islandora / documentation

Contains islandora's documentation and main issue queue.
MIT License
104 stars 71 forks source link

Implement Resource PHP Service #129

Closed ruebot closed 8 years ago

ruebot commented 8 years ago

This is a stub ticket for implementing the Resource PHP Service. We'll flesh it out more.

DiegoPino commented 8 years ago

Update

https://github.com/DiegoPino/islandora/tree/example-service Get resource is working fine.

Depends on some minor fixes on Chullo at https://github.com/DiegoPino/chullo/tree/api

Basic (Manual testing)

  1. Download/clone
  2. Modify composer.json to match your local location of the previously referred Chullo
  3. Modify src/index.php to match your triplestore and fedora4 URLs starting at line 32
$app['fedora'] =  $app->share(function() {
    return Chullo::create('http://localhost:8080/rest');
});

$app['triplestore'] = $app->share(function() {
  return TriplestoreClient::create('http://localhost:9999/bigdata/sparql');
});
  1. run $ composer update
  2. run $ php -S localhost:8282 -t src src/index.php this will use the php embed web server to test
  3. Assuming you already have some containers in fedora (with uuid) you can test the working route with a call like this
  4. $ curl http://localhost:8282/islandora/resource/7ef68f6f-72ab-4708-b0f4-8ec1f07cd580 -v in case you have a child resource (lets say an image binary at /OBJ) you can issue this call
  5. $ curl http://localhost:8282/islandora/resource/7ef68f6f-72ab-4708-b0f4-8ec1f07cd580/OBJ -v

Also accepts this query arguments: tx=transactionid and metadata=true Will fail if tx given and not a valid transactionid (404) Will get fcr:metadata for any resource (e.g binary) if metadata=true

Note: if you don't have a CLAW vagrant environment working you can use(only testing)

@TODO

ruebot commented 8 years ago

tagging @daniel-dgi

ruebot commented 8 years ago

Resolved with 17421493871ace765afbc14e843d2ccd18b800eb