Open azaroth42 opened 10 years ago
:+1:
After reading the pull requests about this, it sounds like the annotator-store will be able to return an OA serialization of the model in JSON-LD (as a read-only "rendering"). That's great, is there any information about how to access that rendering? Say I can access this annotation using the current API: GET http://annotateit.org/api/annotations/cwpnz1tERG6UTCqF-IawFA Would I call a different endpoint, or would I include a header requesting application/ld+json?
The latter. The Accept header in the http request should explicitly mention application/ld+json
, and prefer it above application/json
if both are accepted.
To test it, I use something like:
curl localhost:5000/api/annotations -H Accept:application/ld+json
Note this behaviour is just a choice I made for now. Anything I made up to now regarding OA was really just a first step to get things going (at least from my perspective), everything can be changed if desired.
How does this relate (if at all) to the "lorestore" service and/or plugin?
https://github.com/uq-eresearch/lorestore
On Sep 24, 2014, at 2:23 PM, Gerben notifications@github.com wrote:
The latter. The Accept header in the http request should explicitly mention
application/ld+json
, and prefer it aboveapplication/json
if both are accepted.To test it, I use something like:
curl localhost:5000/api/annotations -H Accept:application/ld+json
Note this behaviour is just a choice I made for now. Anything I made up to now regarding OA was really just a first step to get things going (at least from my perspective), everything can be changed if desired. — Reply to this email directly or view it on GitHub.
If I recall correctly that transforms between OA and Annotator's internal format at serialization/deserialization.
It's possibly a good start, and may provide something very useful for migrating, but we may wish to bring format changes inside Annotator. I'm not sure. On Sep 25, 2014 10:56 AM, "leinfelder" notifications@github.com wrote:
How does this relate (if at all) to the "lorestore" service and/or plugin?
https://github.com/uq-eresearch/lorestore
On Sep 24, 2014, at 2:23 PM, Gerben notifications@github.com wrote:
The latter. The Accept header in the http request should explicitly mention
application/ld+json
, and prefer it aboveapplication/json
if both are accepted.To test it, I use something like:
curl localhost:5000/api/annotations -H Accept:application/ld+json
Note this behaviour is just a choice I made for now. Anything I made up to now regarding OA was really just a first step to get things going (at least from my perspective), everything can be changed if desired. — Reply to this email directly or view it on GitHub.
— Reply to this email directly or view it on GitHub https://github.com/openannotation/annotator-store/issues/74#issuecomment-56857643 .
... data model serializations and it should.
See: https://github.com/openannotation/annotator/issues/389