Closed ruebot closed 8 years ago
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)
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');
});
$ composer update
$ php -S localhost:8282 -t src src/index.php
this will use the php embed web server to test$ 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 $ 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)
fcrepo-webapp-4.4.0-jetty-console.jar
)@TODO
host
header, which in our case, since we are a middle service, depends on where we are running our silex service. This means that, e.g, our returned location
in case of a POST (creating a resource) will have the host and port of silex in the resource path which is bad. Same for any other operation. We are fetching the resource path from the triple store matching nfo:uuid. That one will always be a static one(inserted on resource creation) so trouble can occur when matching that returned resource path with fedora's rest point for that resource.
tagging @daniel-dgi
Resolved with 17421493871ace765afbc14e843d2ccd18b800eb
This is a stub ticket for implementing the Resource PHP Service. We'll flesh it out more.