Skip to content

Shared State

Shaun Ellis edited this page Jan 12, 2018 · 1 revision

Thoughts from Tom Crane about using W3C Web Annotation as a "standard" for sharing state:

I was keeping viewer state (trying to reconstruct a particular user experience) out of it and looking only at what of the object needs to be shown to the user from a search result. What part of what canvas in what manifest? That's about the content only, and can be described as an annotation target. It can include textual information, such as a TextQuoteSelector. Viewer state beyond what is being viewed seems to me to be a separate, more complex problem. However, you can have a single chunk of JSON-LD that is a pure 100% W3C Web Annotation that captures both the content being viewed (the target) and the state of the particular viewer (encoded in the generator), for UX-specific state. If passed to a viewer that either doesn't understand or couldn't possibly reproduce that state, the generator information can be ignored, but the target information can be acted on to bring the right content into view, no matter what approach that viewer takes to UI.

Example:

{
  "type": "Annotation",
  "motivation": "highlighting",
  "target": {
     "id": "https://manifests.sub.uni-goettingen.de/iiif/presentation/PPN857449303/canvas/gdz:PPN857449303:00000008#1000,2000,1000,2000",
     "type": "Canvas",
     "within": {
        "id": "https://gdzstaging.sub.uni-goettingen.de/iiif/presentation/PPN857449303/manifest",
        "type": "Manifest"
     }
   },
   "generator": {
      "id": "http://universalviewer.io/uv.html?manifest=https://gdzstaging.sub.uni-goettingen.de/iiif/presentation/PPN857449303/manifest#?c=0&m=0&s=0&cv=7&xywh=2087%2C-332%2C1251%2C2707",
      "type": "Software",
      "name": "Universal Viewer 3.0",
      "homepage": "http://universalviewer.io"
   }
}

And the same anno, but made by a different client, would have a different generator:

"generator": {
      "id": "http://tify.sub.uni-goettingen.de/demo.html?manifestUrl=https://gdzstaging.sub.uni-goettingen.de/iiif/presentation/PPN857449303/manifest&tify={%22pages%22:[8,9],%22panX%22:1.459,%22panY%22:0.596,%22view%22:%22thumbnails%22,%22zoom%22:1.425}",
      "type": "Software",
      "name": "TIFY",
      "homepage": "http://tify.sub.uni-goettingen.de/"
   }