-
Notifications
You must be signed in to change notification settings - Fork 28
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Issue 612 #38
Issue 612 #38
Conversation
Codecov Report
@@ Coverage Diff @@
## master #38 +/- ##
============================================
+ Coverage 92.66% 92.98% +0.32%
- Complexity 63 66 +3
============================================
Files 6 6
Lines 327 342 +15
============================================
+ Hits 303 318 +15
Misses 24 24
Continue to review full report at Codecov.
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Just some typos noted, mostly that API-X
should be capitalized.
Houdini/README.md
Outdated
@@ -30,15 +30,21 @@ Houdini sets up two endpoints: | |||
- /identify/ | |||
- /convert/ | |||
|
|||
Houdini only accepts `GET` requests containing the path an image in Fedora at both of these endpoints. | |||
Houdini is meant for use wtih Api-X, and accepts `GET` and `OPTIONS` requests to those endpoints. The `OPTIONS` requests are for use with the Api-X service loading mechanism, and return RDF describing the |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Usually API-X
(all caps). Also wtih
=> with
Houdini/README.md
Outdated
$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" "localhost:8888/identify" | ||
``` | ||
|
||
But you're probably going to use Houdini through Api-X, which exposes this service as `svc:indentify`. Assuming your Api-X proxy is on port 8081, you can access the service with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
svc:indentify
=>svc:identify
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
That's a service that indents everything, lol
Hypercube/README.md
Outdated
@@ -4,7 +4,7 @@ | |||
|
|||
## Introduction | |||
|
|||
[Tesseract][9] as a microservice. | |||
[Tesseract][9] as a microservice for use with [Api-X][10]. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API-X
all caps
Houdini/README.md
Outdated
@@ -30,15 +30,21 @@ Houdini sets up two endpoints: | |||
- /identify/ | |||
- /convert/ | |||
|
|||
Houdini only accepts `GET` requests containing the path an image in Fedora at both of these endpoints. | |||
Houdini is meant for use wtih Api-X, and accepts `GET` and `OPTIONS` requests to those endpoints. The `OPTIONS` requests are for use with the Api-X service loading mechanism, and return RDF describing the | |||
service for Api-X. The `GET` requests are used to execute the services, and must contain the uri to an image in Fedora in the `ApixLdpResource` header. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
URI
(caps) as used elsewhere in this doc
Hypercube/README.md
Outdated
@@ -45,16 +45,21 @@ In order to work on larger images, be sure `post_max_size` is sufficiently large | |||
|
|||
## Usage | |||
|
|||
Hypercube only accepts one request, a `GET` containing the path a TIFF in Fedora. | |||
Hypercube is meant for use with Api-X. It accepts only accepts one request, a `GET` with the URI of a Fedora resource in the `ApixLdpResource` header.. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API-X
Hypercube/README.md
Outdated
$ curl -H "Authorization: Bearer blabhlahblah" -H "ApixLdpResource: http://localhost:8080/fcrepo/rest/foo/bar" -H "X-Islandora-Args: -psm 9" "http://localhost:8888" | ||
``` | ||
|
||
But you're probably going to use Hypercube through Api-X, which exposes it as `svc:ocr`. Assuming your Api-X proxy is on port 8081, you can access the service with |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
API-X
@dannylamb I'm not seeing where you are making an |
@whikloj API-X does that for you when posting to the loader service. These three cURLs provide the URL to API-X so it can make the
API-X was getting blocked when making |
Houdini/static/convert.ttl
Outdated
apix:bindsTo <#class> . | ||
|
||
<#class> owl:intersectionOf ( | ||
fedora:Binary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Should we change this to http://www.w3.org/ns/ldp#NonRDFSource
to be repository agnostic and not tie to a "Fedora" type?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yes yes yes!
Houdini/static/identify.ttl
Outdated
apix:bindsTo <#class> . | ||
|
||
<#class> owl:intersectionOf ( | ||
fedora:Binary |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Same question about using LDP
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ditto
@dannylamb finally trying this out and my API-X is not happy....actually its not there.
Went into Karaf and I see:
Is that correct or is my API-X not running correctly? |
Also, the API-X pages make reference to various configuration files none of which are installed in our Karaf container. Should they be? |
Hi Jared,
The version number of the API-X bundles does not look correct to me. It
should be 0.3.0.SNAPSHOT. There was at least one issue related to
authentication on OPTIONS requests whilst loading/registering extensions
that is necessary for CLAW; that was merged after 0.2.0.
|
@whikloj I made an issue for that: Islandora/documentation#666. Thanks for reminding me. I've updated the dependencies in this PR. |
islandora-deprecated/claw_vagrant#49 has been merged and this is ready to test with the vagrant install. I'll address your feedback shortly, @whikloj |
@dannylamb I pulled claw_vagrant@master then pulled the Crayfish branch and ran the composer updates. I can execute But....
|
Oh wait, this might be because we still haven't fix ActiveMQ. I better get my OpenSeadragon PR updated. Except now...
and karaf.log says
|
@dannylamb @birkland I tried this again by destroying my vagrant and pulling a fresh copy from master. Before doing anything I went into the vagrant machine and tailed the I'm sorry that I don't understand what API-X does or how it does it, but currently it is a black box to me. I tried to |
@whikloj Sometimes, it can be particularly difficult to understand what's happening in Karaf, and why. So API-X in Docker is easy. All it's doing is feature:install fcrepo-api-x. For CLAW, there's one additional twist: a custom I think the exception is coming from this injected |
@whikloj This one is new to me. I'll wrap up what I've got going right now and |
@whikloj I just checked the results of a fresh |
Yeah, I just went straight into the karaf log after the vagrant came up and saw them there. I wanted to ensure I had the right version of API-X. If you aren't seeing any errors, then I'll give it another go. |
@whikloj Here's hoping it was just a Maven timeout. 🙏 |
@dannylamb I don't know what I'm doing wrong, here is my terminal from the completion of
|
@whikloj From the karaf console, what does |
@dannylamb currently, though I have been using this vagrant to work the JsonLd PR, it says.
|
Just re-ran through this again on a fresh box and there was one hiccup, but everything turned out ok. Pulled down the code. ubuntu@claw:/var/www/html/Crayfish$ git checkout -b dannylamb-issue-612 master
Switched to a new branch 'dannylamb-issue-612'
ubuntu@claw:/var/www/html/Crayfish$ git pull https://github.com/dannylamb/Crayfish.git issue-612
remote: Counting objects: 80, done.
remote: Total 80 (delta 30), reused 30 (delta 30), pack-reused 50
Unpacking objects: 100% (80/80), done.
From https://github.com/dannylamb/Crayfish
* branch issue-612 -> FETCH_HEAD
Updating ad6d957..5e307c7
Fast-forward
Houdini/README.md | 19 +++-
Houdini/composer.lock | 373 +++++++++++++++++++++++++++++++++--------------------------------
Houdini/src/Controller/HoudiniController.php | 25 +++++
Houdini/src/app.php | 18 ++--
Houdini/static/convert.ttl | 18 ++++
Houdini/static/identify.ttl | 18 ++++
Houdini/tests/Islandora/Houdini/Tests/HoudiniControllerTest.php | 74 +++++--------
Hypercube/README.md | 14 ++-
Hypercube/composer.lock | 373 +++++++++++++++++++++++++++++++++--------------------------------
Hypercube/src/Controller/HypercubeController.php | 12 ++-
Hypercube/src/app.php | 2 +
Hypercube/static/hypercube.ttl | 18 ++++
Hypercube/tests/Islandora/Hypercube/Tests/HypercubeControllerTest.php | 19 ++++
13 files changed, 557 insertions(+), 426 deletions(-)
create mode 100644 Houdini/static/convert.ttl
create mode 100644 Houdini/static/identify.ttl
create mode 100644 Hypercube/static/hypercube.ttl Composer updated Hypercube and Houdini ubuntu@claw:/var/www/html/Crayfish$ cd Hypercube
ubuntu@claw:/var/www/html/Crayfish/Hypercube$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 33 updates, 0 removals
- Updating symfony/routing (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/polyfill-mbstring (v1.3.0 => v1.4.0): Downloading (100%)
- Updating symfony/event-dispatcher (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/debug (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/http-kernel (v3.2.7 => v3.2.13): Downloading (100%)
- Installing psr/container (1.0.0): Downloading (100%)
- Updating pimple/pimple (v3.0.2 => v3.2.2): Downloading (100%)
- Updating silex/silex (v2.0.4 => v2.2.0): Downloading (100%)
- Updating symfony/dom-crawler (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/browser-kit (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/css-selector (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/yaml (v3.2.7 => v3.3.6): Downloading (100%)
- Updating sebastian/diff (1.4.1 => 1.4.3): Downloading (100%)
- Updating phpunit/phpunit-mock-objects (3.4.3 => 3.4.4): Downloading (100%)
- Updating phpdocumentor/type-resolver (0.2.1 => 0.4.0): Downloading (100%)
- Updating phpdocumentor/reflection-docblock (3.1.1 => 3.2.0): Downloading (100%)
- Updating phpunit/phpunit (5.7.19 => 5.7.21): Downloading (100%)
- Updating squizlabs/php_codesniffer (2.8.1 => 2.9.1): Loading from cache
- Updating doctrine/inflector (v1.1.0 => v1.2.0): Downloading (100%)
- Updating doctrine/cache (v1.6.1 => v1.6.2): Downloading (100%)
- Updating doctrine/common (v2.7.2 => v2.7.3): Downloading (100%)
- Updating doctrine/dbal (v2.5.12 => v2.5.13): Downloading (100%)
- Updating monolog/monolog (1.22.1 => 1.23.0): Downloading (100%)
- Updating symfony/polyfill-php70 (v1.3.0 => v1.4.0): Downloading (100%)
- Updating symfony/inflector (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/property-access (v3.2.7 => v3.3.6): Downloading (100%)
- Updating symfony/polyfill-util (v1.3.0 => v1.4.0): Downloading (100%)
- Updating symfony/polyfill-php56 (v1.3.0 => v1.4.0): Downloading (100%)
- Updating symfony/security (v3.2.7 => v3.2.13): Downloading (100%)
- Updating symfony/console (v3.2.7 => v3.3.6): Downloading (100%)
- Updating guzzlehttp/guzzle (6.2.3 => 6.3.0): Downloading (100%)
- Updating symfony/finder (v3.2.7 => v3.3.6): Downloading (100%)
- Updating theseer/fdomdocument (1.6.5 => 1.6.6): Downloading (100%)
- Updating islandora/crayfish-commons dev-master (3957f46 => f653297): Checking out f6532974f8
Writing lock file
Generating autoload files
ubuntu@claw:/var/www/html/Crayfish/Hypercube$ cd ../Houdini
ubuntu@claw:/var/www/html/Crayfish/Houdini$ composer update
Loading composer repositories with package information
Updating dependencies (including require-dev)
Package operations: 1 install, 33 updates, 0 removals
- Updating symfony/polyfill-mbstring (v1.3.0 => v1.4.0): Loading from cache
- Updating symfony/dom-crawler (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/browser-kit (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/css-selector (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/yaml (v3.2.7 => v3.3.6): Loading from cache
- Updating sebastian/diff (1.4.1 => 1.4.3): Loading from cache
- Updating phpunit/phpunit-mock-objects (3.4.3 => 3.4.4): Loading from cache
- Updating phpdocumentor/type-resolver (0.2.1 => 0.4.0): Loading from cache
- Updating phpdocumentor/reflection-docblock (3.1.1 => 3.2.0): Loading from cache
- Updating phpunit/phpunit (5.7.19 => 5.7.21): Loading from cache
- Updating squizlabs/php_codesniffer (2.8.1 => 2.9.1): Loading from cache
- Updating doctrine/inflector (v1.1.0 => v1.2.0): Loading from cache
- Updating doctrine/cache (v1.6.1 => v1.6.2): Loading from cache
- Updating doctrine/common (v2.7.2 => v2.7.3): Loading from cache
- Updating doctrine/dbal (v2.5.12 => v2.5.13): Loading from cache
- Updating monolog/monolog (1.22.1 => 1.23.0): Loading from cache
- Updating symfony/routing (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/event-dispatcher (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/debug (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/http-kernel (v3.2.7 => v3.2.13): Loading from cache
- Installing psr/container (1.0.0): Loading from cache
- Updating pimple/pimple (v3.0.2 => v3.2.2): Loading from cache
- Updating silex/silex (v2.0.4 => v2.2.0): Loading from cache
- Updating symfony/polyfill-php70 (v1.3.0 => v1.4.0): Loading from cache
- Updating symfony/inflector (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/property-access (v3.2.7 => v3.3.6): Loading from cache
- Updating symfony/polyfill-util (v1.3.0 => v1.4.0): Loading from cache
- Updating symfony/polyfill-php56 (v1.3.0 => v1.4.0): Loading from cache
- Updating symfony/security (v3.2.7 => v3.2.13): Loading from cache
- Updating symfony/console (v3.2.7 => v3.3.6): Loading from cache
- Updating guzzlehttp/guzzle (6.2.3 => 6.3.0): Loading from cache
- Updating symfony/finder (v3.2.7 => v3.3.6): Loading from cache
- Updating theseer/fdomdocument (1.6.5 => 1.6.6): Loading from cache
- Updating islandora/crayfish-commons dev-master (3957f46 => f653297): Checking out f6532974f8
Writing lock file
Generating autoload files Loaded the services into Api-X ubuntu@claw:/var/www/html/Crayfish/Houdini$ cd ..
ubuntu@claw:/var/www/html/Crayfish$ curl -i -X POST -H "Authorization: Bearer islandora" -H "Content-Type: text/plain" -d "http://localhost:8000/houdini/convert" "http://localhost:8081/services//apix:load"
HTTP/1.1 200 OK
Content-Type: text/turtle;charset=UTF-8
Accept: */*
Accept-Encoding: gzip,deflate
Accept-Ranges: bytes
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Apix-Exposed-Uri: http://localhost:8081/services//apix:load
Apix-Ldp-Root: http://localhost:8080/fcrepo/rest
Apix-Modality: intercept; outgoing
Apix-Root: http://localhost:8081/fcrepo/rest/
Authorization: Bearer islandora
breadcrumbId: ID-claw-39920-1501081774825-4-2
Content-Disposition: attachment; filename="houdini-convert"; creation-date="Tue, 01 Aug 2017 14:48:17 GMT"; modification-date="Tue, 01 Aug 2017 14:48:17 GMT"; size=796
ETag: "ddbca401c847ee9ff89c6006e72e3c5dd3365b01"
ETag: "ddbca401c847ee9ff89c6006e72e3c5dd3365b01"
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Last-Modified: Tue, 01 Aug 2017 14:48:17 GMT
Last-Modified: Tue, 01 Aug 2017 14:48:17 GMT
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://localhost:8081/fcrepo/rest/apix/extensions/houdini-convert/fcr:metadata>; rel="describedby"
Link: <http://localhost:8081/discovery/apix/extensions/houdini-convert>; rel="service"
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
@prefix apix:<http://fedora.info/definitions/v4/api-extension#> .
@prefix owl:<http://www.w3.org/2002/07/owl#> .
@prefix ebucore:<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
@prefix ldp:<http://www.w3.org/ns/ldp#> .
@prefix islandora:<http://islandora.ca/CLAW#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
<> a apix:Extension;
rdfs:label "Image Conversion Service";
rdfs:comment "imagemagick's convert as a microservice";
apix:exposesService islandora:ConvertService;
apix:exposesServiceAt "svc:convert";
apix:bindsTo <#class> .
<#class> owl:intersectionOf (
ldp:NonRDFSource
[ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff", "image/jp2", "image/jpeg", "image/png", "image/gif", "image/bmp" ]
) .
ubuntu@claw:/var/www/html/Crayfish$ curl -i -X POST -H "Authorization: Bearer islandora" -H "Content-Type: text/plain" -d "http://localhost:8000/houdini/identify" "http://localhost:8081/services//apix:load"
HTTP/1.1 200 OK
Content-Type: text/turtle;charset=UTF-8
Accept: */*
Accept-Encoding: gzip,deflate
Accept-Ranges: bytes
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Apix-Exposed-Uri: http://localhost:8081/services//apix:load
Apix-Ldp-Root: http://localhost:8080/fcrepo/rest
Apix-Modality: intercept; outgoing
Apix-Root: http://localhost:8081/fcrepo/rest/
Authorization: Bearer islandora
breadcrumbId: ID-claw-39920-1501081774825-4-8
Content-Disposition: attachment; filename="houdini-identify"; creation-date="Tue, 01 Aug 2017 14:49:03 GMT"; modification-date="Tue, 01 Aug 2017 14:49:03 GMT"; size=803
ETag: "bec1940f3342306a20968ce205a440d4b07b6364"
ETag: "bec1940f3342306a20968ce205a440d4b07b6364"
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Last-Modified: Tue, 01 Aug 2017 14:49:03 GMT
Last-Modified: Tue, 01 Aug 2017 14:49:03 GMT
Link: <http://localhost:8081/fcrepo/rest/apix/extensions/houdini-identify/fcr:metadata>; rel="describedby"
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Link: <http://localhost:8081/discovery/apix/extensions/houdini-identify>; rel="service"
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
@prefix apix:<http://fedora.info/definitions/v4/api-extension#> .
@prefix owl:<http://www.w3.org/2002/07/owl#> .
@prefix ebucore:<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
@prefix ldp:<http://www.w3.org/ns/ldp#> .
@prefix islandora:<http://islandora.ca/CLAW#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
<> a apix:Extension;
rdfs:label "Image Identification Service";
rdfs:comment "imagemagick's identify as a microservice";
apix:exposesService islandora:IdentifyService;
apix:exposesServiceAt "svc:identify";
apix:bindsTo <#class> .
<#class> owl:intersectionOf (
ldp:NonRDFSource
[ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff", "image/jp2", "image/jpeg", "image/png", "image/gif", "image/bmp" ]
) . I missed a trailing slash on the install instructions for the command to load Hypercube into api-x. Here's the corrected command: ubuntu@claw:/var/www/html/Crayfish$ curl -i -X POST -H "Authorization: Bearer islandora" -H "Content-Type: text/plain" -d "http://localhost:8000/hypercube/" "http://localhost:8081/services//apix:load"
HTTP/1.1 200 OK
Content-Type: text/turtle;charset=UTF-8
Accept: */*
Accept-Encoding: gzip,deflate
Accept-Ranges: bytes
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Apix-Exposed-Uri: http://localhost:8081/services//apix:load
Apix-Ldp-Root: http://localhost:8080/fcrepo/rest
Apix-Modality: intercept; outgoing
Apix-Root: http://localhost:8081/fcrepo/rest/
Authorization: Bearer islandora
breadcrumbId: ID-claw-39920-1501081774825-4-17
Content-Disposition: attachment; filename="hypercube"; creation-date="Tue, 01 Aug 2017 14:50:31 GMT"; modification-date="Tue, 01 Aug 2017 14:50:31 GMT"; size=712
ETag: "791e49c21a404ad7a1a2d66b650673e926cc6787"
ETag: "791e49c21a404ad7a1a2d66b650673e926cc6787"
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Last-Modified: Tue, 01 Aug 2017 14:50:31 GMT
Last-Modified: Tue, 01 Aug 2017 14:50:31 GMT
Link: <http://localhost:8081/fcrepo/rest/apix/extensions/hypercube/fcr:metadata>; rel="describedby"
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://localhost:8081/discovery/apix/extensions/hypercube>; rel="service"
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Server: Apache-Coyote/1.1
Transfer-Encoding: chunked
@prefix apix:<http://fedora.info/definitions/v4/api-extension#> .
@prefix owl:<http://www.w3.org/2002/07/owl#> .
@prefix ebucore:<http://www.ebu.ch/metadata/ontologies/ebucore/ebucore#> .
@prefix ldp:<http://www.w3.org/ns/ldp#> .
@prefix islandora:<http://islandora.ca/CLAW#> .
@prefix rdfs:<http://www.w3.org/2000/01/rdf-schema#> .
<> a apix:Extension;
rdfs:label "Tesseract OCR Service";
rdfs:comment "A service that runs OCR on tiffs";
apix:exposesService islandora:OcrService;
apix:exposesServiceAt "svc:ocr";
apix:bindsTo <#class> .
<#class> owl:intersectionOf (
ldp:NonRDFSource
[ a owl:Restriction; owl:onProperty ebucore:hasMimeType; owl:hasValue "image/tiff" ]
) . Then I ingested a tiff and Fedora gave it a location of I grabbed the service document with ubuntu@claw:/var/www/html/Crayfish$ curl -I -H "Authorization: Bearer islandora" "http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902"
HTTP/1.1 200 OK
Content-Type: image/tiff
Accept: */*
Accept-Ranges: bytes
Allow: DELETE,HEAD,GET,PUT,OPTIONS
Apix-Modality: intercept; outgoing
Authorization: Bearer islandora
breadcrumbId: ID-claw-39920-1501081774825-4-23
Content-Disposition: attachment; filename=""; creation-date="Fri, 21 Jul 2017 14:03:44 GMT"; modification-date="Fri, 21 Jul 2017 14:03:44 GMT"; size=10409
ETag: "87e7b7c59955cc47422eccae3b6b0bde336c151f"
Expires: Thu, 01 Jan 1970 00:00:00 UTC
Last-Modified: Fri, 21 Jul 2017 14:03:44 GMT
Link: <http://www.w3.org/ns/ldp#NonRDFSource>;rel="type"
Link: <http://localhost:8081/discovery/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902>; rel="service"
Link: <http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902/fcr:metadata>; rel="describedby"
Link: <http://www.w3.org/ns/ldp#Resource>;rel="type"
Server: Apache-Coyote/1.1
Content-Length: 0
ubuntu@claw:/var/www/html/Crayfish$ curl -H "Authorization: Bearer islandora" http://localhost:8081/discovery/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902
<> a <http://fedora.info/definitions/v4/service#ServiceDocument> ;
<http://fedora.info/definitions/v4/service#isServiceDocumentFor>
<http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902> ;
<http://www.openarchives.org/ore/terms/describes>
<#services> .
<#5221a349-4f55-441f-aa54-8cb32e48ecea>
a <http://fedora.info/definitions/v4/service#ServiceInstance> ;
<http://fedora.info/definitions/v4/service#hasEndpoint>
<http://localhost:8081/services/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902/svc:convert> ;
<http://fedora.info/definitions/v4/service#isFunctionOf>
<http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902> ;
<http://fedora.info/definitions/v4/service#isServiceInstanceOf>
<http://islandora.ca/CLAW#ConvertService> ;
<http://fedora.info/definitions/v4/service#serviceInstanceExposedBy>
<http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902> .
<#services> <http://www.openarchives.org/ore/terms/aggregates>
<#88bb2f51-dc1d-4d7d-82c9-5ab13d4324de> , <#cf60cc7e-90c8-4b2a-bd4a-17eeaff6d19d> , <#5221a349-4f55-441f-aa54-8cb32e48ecea> .
<#cf60cc7e-90c8-4b2a-bd4a-17eeaff6d19d>
a <http://fedora.info/definitions/v4/service#ServiceInstance> ;
<http://fedora.info/definitions/v4/service#hasEndpoint>
<http://localhost:8081/services/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902/svc:identify> ;
<http://fedora.info/definitions/v4/service#isFunctionOf>
<http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902> ;
<http://fedora.info/definitions/v4/service#isServiceInstanceOf>
<http://islandora.ca/CLAW#IdentifyService> ;
<http://fedora.info/definitions/v4/service#serviceInstanceExposedBy>
<http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902> .
<#88bb2f51-dc1d-4d7d-82c9-5ab13d4324de>
a <http://fedora.info/definitions/v4/service#ServiceInstance> ;
<http://fedora.info/definitions/v4/service#hasEndpoint>
<http://localhost:8081/services/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902/svc:ocr> ;
<http://fedora.info/definitions/v4/service#isFunctionOf>
<http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902> ;
<http://fedora.info/definitions/v4/service#isServiceInstanceOf>
<http://islandora.ca/CLAW#OcrService> ;
<http://fedora.info/definitions/v4/service#serviceInstanceExposedBy>
<http://localhost:8081/fcrepo/rest/d1/76/35/80/d1763580-1d5e-441d-838d-cfad0a7e3902> . And then executed hypercube with ubuntu@claw:/var/www/html/Crayfish$ curl -H "Authorization: Bearer islandora" "http://localhost:8081/services/d1/76/35/80/d1763580-1d5e-8d-cfad0a7e3902/svc:ocr"
SAMPLE [MA GE
SAMPLE [MA GE
My tiff has "Sample Image" written on it twice, hence tesseract's output there. |
@ajs6f ^^ |
Tried these latest instructions with success. Simple OCR results, as expected! |
Islandora/documentation#686 aside, this has been reviewed and tested successfully. @Islandora-CLAW/committers Can we get this in? It's sat for long enough. |
@dannylamb should we wait for @whikloj to come back from vacations? He was running into trouble running this. Just to have his blessing 👍 |
If it worked. Just do it.
I'm lying on a beach stupidly reading email.
…On 11 Aug 2017 11:54 a.m., "Diego Pino Navarro" ***@***.***> wrote:
@dannylamb <https://github.com/dannylamb> should we wait for @whikloj
<https://github.com/whikloj> to come back from vacations? He was running
into trouble running this. Just to have his blessing 👍
—
You are receiving this because you were mentioned.
Reply to this email directly, view it on GitHub
<#38 (comment)>,
or mute the thread
<https://github.com/notifications/unsubscribe-auth/ACua4bURcZWmd8_2L9kUM2j7Pp2ABcABks5sXIdbgaJpZM4N3hZV>
.
|
@whikloj 🏖️ 🍻 |
@whikloj Man, do what I did: have your toddler daughter erase your phone on the first day of your trip. Solved all those "just going to check my work email real quick" problems, real quick. First vacation I actually enjoyed in several years. |
OK, merging. I trust the 75% success rate =) |
GitHub Issue: Resolves Islandora/documentation#612
Use injected HttpClient for loader fcrepo4-labs/fcrepo-api-x#122Always grab latest API-X in claw_vagrant documentation#666What does this Pull Request do?
Adds OPTIONS requests to Houdini and Hypercube so they can be added to Api-X
What's new?
OPTIONS requests for each operation, plus tests. The requests just serve static ttl files describing the services.
How should this be tested?
Pull in the code for this PR and run
composer update
on both Houdini and Hypercube.After fcrepo4-labs/fcrepo-api-x#122 lands, you'll need to load the services into Api-X using its loader service.
curl -X POST -H "Authorization: Bearer islandora" -H "Content-Type: text/plain" -d "http://localhost:8000/houdini/convert" "http://localhost:8081/services//apix:load"
curl -X POST -H "Authorization: Bearer islandora" -H "Content-Type: text/plain" -d "http://localhost:8000/houdini/identify" "http://localhost:8081/services//apix:load"
curl -X POST -H "Authorization: Bearer islandora" -H "Content-Type: text/plain" -d "http://localhost:8000/hypercube" "http://localhost:8081/services//apix:load"
http://localhost:8080/fcrepo/rest/test.tiff
HEAD
request against the tiff through the Api-X proxy:curl -I -H "Authorization: Bearer islandora" http://localhost:8081/fcrepo/rest/test.tiff
Link: <http://localhost:8081/discovery/test.tiff>; rel="service"
GET
the discovery document:curl -H "Authorization: Bearer islandora" http://localhost:8081/discovery/test.tiff
http://fedora.info/definitions/v4/service#hasEndpoint
triples to see where you can issue an HTTP request.curl -H "Authorization: Bearer islandora" http://localhost:8081/services/test.tiff/svc:identify
should return the json from the identify command.curl -H "Authorization: Bearer islandora" http://localhost:8081/services/test.tiff/svc:ocr
should return the OCR outputcurl -H "Authorization: Bearer islandora" -H "Accept: image/png" http://localhost:8081/services/test.tiff/svc:convert
should return a png version of the image.Interested parties
@Islandora-CLAW/committers @ajs6f @birkland