W3C home > Mailing lists > Public > public-annotation@w3.org > November 2015

Re: [web-annotation] Simplifying hasBody

From: BigBlueHat via GitHub <sysbot+gh@w3.org>
Date: Tue, 03 Nov 2015 20:03:39 +0000
To: public-annotation@w3.org
Message-ID: <issue_comment.created-153471521-1446581018-sysbot+gh@w3.org>
So...if we make this change a singular, textual body annotation could 
take either of these forms:

  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.com/anno1",
  "text": "W3C site",
  "target": "http://w3.org/"

or...more extendable-y:
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.com/anno1",
  "body": [{
    "content": "W3C site"
  "target": "http://w3.org/"
(if providing "space" for expansion to multiple bodies...otherwise, 
turn that into just a single object...not an array)

These are *not* identical, but they encode the same data, and to the 
user (one would think) they would be presented identically.

Given that, a developer will need to:
 - check for `text` on `body`
 - check if `body` is an array
 - if `body` is an object, extract `content`
 - if `body` is an array, loop through multiple bodies...do the right 
thing with each

>From a graph developers perspective, there my now be a 
`oa:hasBodyText` string or `oa:hasBody` resource.

Or at least that's my understanding of it. :smile:

GitHub Notif of comment by BigBlueHat
Received on Tuesday, 3 November 2015 20:03:42 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 18:54:42 UTC