Updated version 0.1 of Nikita - interface update

Thomas Sødring thomas.sodring at hioa.no
Thu Feb 2 15:54:28 CET 2017


Hi,

Good catch! The list of objects was not getting its _links added. This
applied to all Noark entities so I'm not sure why the problem didn't
appear before.

I just pushed an update fixing this issue. I guess at a minimum the
_links should contain a self reference. But that hopefully will be done
in the 0.2 release.

The links are maintained in a HashSet, so the insert ordering is not
guaranteed to be maintained.  If this is an issue, then we can put them
into a SortedSet instead.

 - Tom

On 02/02/2017 02:27 PM, Petter Reinholdtsen wrote:
> [Thomas Sødring]
>> I run the run_curl and test, but it seems ok. Could you the curl with -v
>> and post here to see if there is any more information available?
> Sure.
>
> $ curl -v --header Accept:application/vnd.noar5-v4+json -X GET -b   ~/tmp/cookie.txt   http://localhost:8092/noark5v4/hateoas-api/arkivstruktur/dokumentobjekt/
> * Hostname was NOT found in DNS cache
> *   Trying ::1...
> * connect to ::1 port 8092 failed: Connection refused
> *   Trying 127.0.0.1...
> * Connected to localhost (127.0.0.1) port 8092 (#0)
>> GET /noark5v4/hateoas-api/arkivstruktur/dokumentobjekt/ HTTP/1.1
>> User-Agent: curl/7.38.0
>> Host: localhost:8092
>> Cookie: JSESSIONID=D026A8CDEC3CDEF6FEBAF682B9B7A298
>> Accept:application/vnd.noark5-v4+json
>>
> < HTTP/1.1 200 OK
> * Server Apache-Coyote/1.1 is not blacklisted
> < Server: Apache-Coyote/1.1
> < X-Content-Type-Options: nosniff
> < X-XSS-Protection: 1; mode=block
> < Cache-Control: no-cache, no-store, max-age=0, must-revalidate
> < Pragma: no-cache
> < Expires: 0
> < X-Frame-Options: DENY
> < X-Application-Context: HiOA Noark 5 Core (Demo mode):demo:8092
> < Content-Type: application/vnd.noark5-v4+json;charset=UTF-8
> < Transfer-Encoding: chunked
> < Date: Thu, 02 Feb 2017 13:23:51 GMT
> < 
> {
>   "dokumentobjekt" : [ {
>     "systemID" : "c189fb64-8c70-467f-8013-acd6bb6e5229",
>     "versjonsnummer" : "1",
>     "variantformat" : "Arkivformat",
>     "format" : "PDF",
>     "formatDetaljer" : "PDF/A PDFv1.4",
>     "_links" : [ ]
>   } ]
> }
> * Connection #0 to host localhost left intact
>
> I suspect the probelm is that the script is looking for _links at the
> same level as dokuemt objekt, and not inside
> { "dokumentobjekt" : [ { ... } ] }.
>
> Btw, is the order of the URLs returned in _links deterministic (aka
> sorted)?  I do not get the failure in the same URL every time and
> suspect the ordering changes.
>



More information about the nikita-noark mailing list