Hypothes.is as a annotation solution utilization through the Heredot - AyranIsTheNewRaki/Herodot GitHub Wiki

3.3. Research on Annotations

In order to fulfill the requirements, another research on annotations was necessary to conduct. While working on the research, we have witnessed history happening as we were browsing the web and documentations, especially under W3C web site. 3 recommendations were published on W3C’s web site which set the standards of annotations and opened new horizons for the web. (W3C.org annotations announcement, n.d.):

Web Annotation Data Model:the standard offers a structured model and format, in JSON, for annotations to be interoperable across platforms. Data Model consists of 3 main parts: Body and Target being related and Annotation pointing to both on a top layer. In the below JSON, the basic terms can easily be observed: (Annotation Data Model, n.d.)

{ "@context": "http://www.w3.org/ns/anno.jsonld", "id": "http://example.org/anno38", "type": "Annotation", "motivation": "commenting", "creator": { "id": "http://example.org/user1", "type": "Person", "name": "A. Person", "nickname": "user1" }, "created": "2015-10-13T13:00:00Z", "generator": { "id": "http://example.org/client1", "type": "Software", "name": "Code v2.1", "homepage": "http://example.org/homepage1" }, "generated": "2015-10-14T15:13:28Z", "stylesheet": { "id": "http://example.org/stylesheet1", "type": "CssStylesheet" }, "body": [ { "type": "TextualBody", "purpose": "tagging", "value": "love" }, { "type": "Choice", "items": [ { "type": "TextualBody", "purpose": "describing", "value": "I really love this particular bit of text in this XML. No really.", "format": "text/plain", "language": "en", "creator": "http://example.org/user1" }, { "type": "SpecificResource", "purpose": "describing", "source": { "id": "http://example.org/comment1", "type": "Audio", "format": "audio/mpeg", "language": "de", "creator": { "id": "http://example.org/user2", "type": "Person" } } } ] } ], "target": { "type": "SpecificResource", "styleClass": "mystyle", "source": "http://example.com/document1", "state": [ { "type": "HttpRequestState", "value": "Accept: application/xml", "refinedBy": { "type": "TimeState", "sourceDate": "2015-09-25T12:00:00Z" } } ], "selector": { "type": "FragmentSelector", "value": "xpointer(/doc/body/section[2]/para[1])", "refinedBy": { "type": "TextPositionSelector", "start": 6, "end": 27 } } } }

Web Annotation Vocabulary: provides the definitions to all entities to be used in Web Annotation Data Model. The standard specifies the RDF classes and provides the JSON-LD Context and profile definitions needed to use the Web Annotation JSON serialization in a Linked Data context. JSON-LD context and the full list can be referenced from https://www.w3.org/ns/anno.jsonld.

Web Annotation Protocol: describes the transport mechanisms for creating and managing annotations which is same as the methods used in Web Architecture and REST. There standards added to these methods are:

  • The media type to use for Annotations is: application/ld+json;profile="http://www.w3.org/ns/anno.jsonld
  • Annotation Containers are constrained by the set of constraints described in this specification, and thus the ldp:constrainedBy URL is http://www.w3.org/TR/annotation-protocol/`
  • The link header can refer from any resource to an Annotation Container using a rel type of: http://www.w3.org/ns/oa#annotationService`
  • The response from a Container after creating an Annotation should include a representation of the Annotation, after any changes have been made to it, in the JSON-LD serialization.`
  • Annotation Containers should only contain Annotations, and not other resources. (W3.org Annotation Protocol, n.d.)

As recommended by the W3C, the workflow of the annotations can be followed easily through the diagram they have published as part of the announcement. (w3.org annotations working group, n.d.) Below you could find the visual guideline

anno1anno2 anno3anno4anno5 anno6anno7 anno8

The W3C standards enable users to comment on any web site or content they want without the need of controlling authority. It just adds another layer or a veil as to speak, to the WWW as we know it. This feature most probably be available as a native feature in the browsers since it has become a standard.

The W3C architecture provides a model where annotations are stored separately on another layer on `web sites and reappears in real-time whenever the relevant web page is viewed. The control shifted from the publisher to the user. Web annotations will enable users and communities to use annotations across any internet-connected document, whether in HTML, PDF, EPUB, or other formats. Although there are many details to figure out, standards are a good start. (Hypothes.is Blog, n.d.)

The W3C standards enable users to comment on any web site or content they want without the need of controlling authority. It just adds another layer or a veil as to speak, to the WWW as we know it. This feature most probably be available as a native feature in the browsers since it has become a standard.

The W3C architecture provides a model where annotations are stored separately on another layer on web sites and reappears in real-time whenever the relevant web page is viewed. The control shifted from the publisher to the user. Web annotations will enable users and communities to use annotations across any internet-connected document, whether in HTML, PDF, EPUB, or other formats. Although there are many details to figure out, standards are a good start. (Hypothes.is Blog, n.d.)

HYPOTHES.IS UTILIZED AS ANNOTATION BENCHMARK

The Hypothesis is a single-page web application, which can be called embedded as an internal solution to the Content Management System. Hypothesis is totally in line with the latest W3C standards accepted on annotations. It has ist standards and principles set up just like the recommended standards. Hypothesis is:

  1. Free, open source software using open standards
  2. Works across platforms and formats
  3. Non-profit
  4. Neutral
  5. 100% community moderated
  6. Merit based
  7. Pseudonymous
  8. International
  9. Transparent, auditable approach in systems and in governance.
  10. Many formats, many contexts
  11. HTML, PDF, video, books. News, blogs, scientific articles, legislation, regulations, Terms of Service, etc.

As the latest web annotation standards suggest, it adds an annotation layer to any content an annotation service runs on a remote server.

Data can flow in both directions: from the annotated content to the client and vice versa, just like the annotation data model suggest the relationship between source, target and the annotation. Communication with the annotation service is also bidirectional, making use of an HTTP API and a WebSocket connection.hypoarch

There are two crucial parts to the system:

  1. Between the client code, executing in a browser, and the service, executing on a remote server.
  2. Between the annotated content (which may be an HTML page or a PDF rendered as an HTML page) and the client application. This boundary is marked with asterisks (*) in the ASCII art above.

Hypothesis utilizing the web annotation data model, web annotation vocabulary and web annotation protocol. Especially the latter one is highly important focusing on the transport mechanisms for creating and managing annotations which is same as the methods used in Web Architecture and REST. Moreover, it focuses on trust and security during the transport of data by providing:

  • • user credentials
  • • annotation data or metadata which is displayed by the client
  • • user profile information
  • • group membership records
  • • user search history

Same-origin policy (SOP)

It is the base for many client-side security mechanism, which means content residing on one place has limited control over content on another place.

the Hypothesis client application executes within an <iframe> inserted into the annotated content just like it is structed in SOP.

This <iframe> which is the annotation in web annotation data model, has an origin distinct from that of the hosting page and SOP rules apply. The components of the client which execute in the annotated page must communicate with the client frame using cross-document messaging. (Hypothes.is document on security, n.d.)

We have also made use of the Hypothesis API in the back end, mobile development. We have simply used the REST structure which crucial part of the web annotation data model and API is in line with the standard. More examples can be found under https://hypothes.is/api/annotations. An example of the post annotation template can be viewed below: (Hypothes.is API creating annotations, n.d.)

{ "group": "string", "permissions": {}, "references": [ "string" ], "tags": [ "string" ], "target": [ { "selector": [ { "type": "string" } ] } ], "text": "string", "uri": "string" }

⚠️ **GitHub.com Fallback** ⚠️