-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support Web Annotation #3
Comments
@csarven -- sure, technically any type of annotation can be POSTed to the server, so the json is fairly arbitrary (whether it's an OpenAnnotation or W3C Web Annotation). Is the call of action to change the copy? Which in the code-base should change to support your use case? e.g. renaming OpenAnnotation to WebAnnotation in: |
In my implementation, I have a payload like this: {
"url":"http://csarven.ca/",
"annotation":{
"@context":"http://www.w3.org/ns/anno.jsonld",
"@type":"Annotation",
"motivation":"linking",
"target":"http://csarven.ca/",
"rights":"https://creativecommons.org/publicdomain/zero/1.0/",
"creator":{
"@id":"http://csarven.ca/#i",
"http://schema.org/name":"Sarven Capadisli",
"http://schema.org/image":"http://csarven.ca/media/images/sarven-capadisli.jpg",
"http://schema.org/url":"http://csarven.ca/"
}
}
} and that creates an annotation like https://pragma.archivelab.org/annotations/131 which pretty close to it: {
"annotation": {
"@context": "http://www.w3.org/ns/anno.jsonld",
"@type": "Annotation",
"annotatedAt": "Thu Jul 27 10:20:00 2017",
"creator": {
"@id": "http://csarven.ca/#i",
"http://schema.org/image": "http://csarven.ca/media/images/sarven-capadisli.jpg",
"http://schema.org/name": "Sarven Capadisli",
"http://schema.org/url": "http://csarven.ca/"
},
"hasTarget": {
"hasSource": {
"@id": "http://web.archive.org/web/20170727101959/http://csarven.ca/",
"originalUrl": "http://csarven.ca/"
}
},
"motivation": "linking",
"rights": "https://creativecommons.org/publicdomain/zero/1.0/",
"target": "http://csarven.ca/"
},
"canvas_id": null,
"id": 132
} For this to work out of the box for Web Annotation / JSON-LD consumption, the root object should be the contents of
I think it should come out as: {
"@context": "http://www.w3.org/ns/anno.jsonld",
"@id": "https://pragma.archivelab.org/annotations/132",
"@type": "Annotation",
"created": "2017-07-27T10:20:00Z",
"creator": {
"@id": "http://csarven.ca/#i",
"http://schema.org/image": "http://csarven.ca/media/images/sarven-capadisli.jpg",
"http://schema.org/name": "Sarven Capadisli",
"http://schema.org/url": "http://csarven.ca/"
},
"target": "http://csarven.ca/",
"body": "http://web.archive.org/web/20170727101959/http://csarven.ca/",
"motivation": "linking",
"rights": "https://creativecommons.org/publicdomain/zero/1.0/"
} Web Annotation Protocol requires this header: |
Currently OpenAnnotation is supported but we now have W3C Web Annotation recommendations. Can we bumb this a bit?
I've tested with https://dokie.li/ . See dokieli/dokieli@725a548 . Happy to experiment with Web Annotation.
The text was updated successfully, but these errors were encountered: