Now that we will have a way (oa:hasRole) to express roles for instances of oa:SpecificResource (at least), a proposal has been made that our data model should require the use of oa:SpecificResource for Bodies and Targets -- i.e., proposing that oa:SpecificResource and Simple Textual Bodies (literals) should be the entire range of oa:hasBody and oa:SpecificResource should be the entire range of oa:hasTarget. For additional background and context regarding this proposal see [annotation-roles], in particular Section 3.2.1 Require the use of SpecficResources for Bodies and Section 3.2.2 Require the use of SpecificResource for Targets.
An alternate, competing proposal also has been made to allow oa:hasRole on instances of a new oa:EmbeddedContent subclass (oa:EmbeddedTextualBody), which would be allowed as a Body, and potentially on instances of multiplicity classes (oa:Choice, oa:Composite, oa:List or corresponding new subclasses), all of which would continue to be allowed as Bodies and Targets. For more details on the first part of this alternative proposal, see Section 3.2.3 Allow hasRole on new EmbeddedTextualBody class.
This document, created to facilitate discussion within the Working Group, presents illustrations of how annotation descriptions would change if one or the other of these proposal were adopted. Note, though stimulated and to a large degree motivated by the discussion leading to the creation of the oa:hasRole property, the first of these proposals espcially has implications for annotations where oa:hasRole is not used. The serialization illustrations below parallel the illustrations in the annotation-roles document, and examples 3.1.1, 3.1.2 and 3.1.11 include illustrations of how annotation descriptions not involving oa:hasRole might change if the proposal to require SpecificResources for Bodies and Targets were to be adopted.
Implementing either proposal - i.e., requiring SpecificResources for Bodies and Targets or instead allowing hasRole on EmbeddedTextualBody and potentially on Multiplicity classes/subclasses - has implications for the Web Annotation Data Model [annotation-model] over and above those described in Section 2 of the annotation-roles document. (Note, all references in this document to the Web Annotation Data Model are to the First Public Working Draft version, 11 Dec 2014, of the model.)
Still unclear (and not addressed in this document) is the question of whether the range of oa:item and oa:member (appearing in multiplicity patterns) would also be limited oa:SpecificResource.
Note, still unclear (and only briefly and incompletely addressed in this document) is how hasRole should be used with Multiplicity. Should a multiplicity construct (e.g., Composite) have a role, or should only the items or members of the Multiplicity have roles, or should both be allowed to have an explicit role?
The enumeration from the [annotation-roles] discussion document is adopted here to facilitate an orderly follow-on discussion.
When associating the commenting role with a body that has a URI (i.e., an external to the annotation Web Resource) the body MUST be a SpecificResource, so neither proposal has impact. However in the absence of a role the proposed requirement to always use SpecificResource for the Body / Target would complicate the serialization slightly.
No Role needed (current, i.e., FPWD, model).
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": {"@id": "http://example.org/body1" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody <http://example.org/body1> .
No Role needed, but Body and Target must be SpecificResources (proposal 1).
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source": "http://example.org/target1"}, "body": { "source": "http://example.org/body1" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [ oa:hasSource <http://example.org/target1> ] ; oa:hasBody [ oa:hasSource <http://example.org/body1> ] .
Role needed for Body, SpecificResource Required for Body and Target (proposal 1).
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source": "http://example.org/target1"}, "body": { "role": "commenting", "source": "http://example.org/body1" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [ oa:hasSource <http://example.org/target1> ] ; oa:hasBody [ oa:hasRole oa:commenting ; oa:hasSource <http://example.org/body1> ] .
Role needed for Body, allow other than SpecificResource as Target (proposal 2).
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1" , "body": { "role": "commenting", "source": "http://example.org/body1" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody [ oa:hasRole oa:commenting ; oa:hasSource <http://example.org/body1> ] .
Illustrating Textual Body Annotations.
No Role needed, Simple Textual Body (current model):
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": "I love this thing" }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody "I love this thing" .
No Role needed, Embedded Content (current model with oa:text replacing rdf:value):
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": {"text": "I love this thing"} }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody [ oa:text "I love this thing" ] .
No Role needed, Body and Target must be SpecificResource (proposal 1):
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": { "source": "http://example.org/target1" }, "body": { "source": { "text": "I love this thing" } } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [ oa:hasSource <http://example.org/target1> ] ; oa:hasBody [ oa:hasSource [ oa:text "I love this thing" ] ] .
Role needed for Body, Body and Target must be SpecificResource (proposal 1):
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": { "source": "http://example.org/target1" }, "body": { "role": "commenting", "source": { "text": "I love this thing", }} } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [ oa:hasSource <http://example.org/target1> ]; oa:hasBody [ oa:hasRole oa:commenting ; oa:hasSource [ oa:text "I love this thing" ] ].
Role needed for Body, Body may be EmbeddedTextualBody (proposal 2):
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": { "role": "commenting", "text": "I love this thing" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody [ oa:hasRole oa:commenting ; oa:text "I love this thing" ] .
Associating the tagging role with textual content carried in the annotation.
Proposal 1 (SpecificResources Required):{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source": "http://example.org/target1" } , "body": { "role": "tagging", "source": {"text": "the text of the tag"} } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [oa:hasSource <http://example.org/target1> ] ; oa:hasBody [ oa:hasRole oa:tagging ; oa:hasSource [ oa:text "the text of the tag" ] ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": { "role": "tagging", "text": "the text of the tag" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody [ oa:hasRole oa:tagging ; oa:text "the text of the tag" ]
Associating the tagging role with each of multiple tags in the same annotation.
Proposal 1 (SpecificResources Required):{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source": "http://example.org/target1"} , "body": [ { "role": "tagging", "source": {"text": "tag"} }, { "role": "tagging", "source": {"text": "another"} } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [oa:hasSource <http://example.org/target1> ] ; oa:hasBody [ oa:hasRole oa:tagging ; oa:hasSource [ oa:text "tag" ] ], [ oa:hasRole oa:tagging ; oa:hasSource [ oa:text "another" ] ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": [ { "role": "tagging", "text": "tag" }, { "role": "tagging", "text": "another" } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody [ oa:hasRole oa:tagging ; oa:text "tag" ], [ oa:hasRole oa:tagging ; oa:text "another" ]
Associating the tagging role with a URI, often called a semantic tag as it avoids the ambiguity of plain text strings.
For the Body there is no choice here, as the resource MUST be a SpecificResource; it makes a difference, however, for how the Target is described. Proposal 1 (Require oa:SpecificResource for Target):{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source" : "http://example.org/target1" }, "body": { "role": "tagging", "source": "http://example.org/tag1" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [oa:hasSource <http://example.org/target1> ] ; oa:hasBody [ oa:hasRole oa:tagging ; oa:hasSource <http://example.org/tag1> ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": { "role": "tagging", "source": "http://example.org/tag1" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody [ oa:hasRole oa:tagging ; oa:hasSource <http://example.org/tag1> ]
An annotation with multiple bodies with different roles. It associates a URI as a tag, and some textual content as a comment, with the same target resource.
Proposal 1 (SpecificResources Required):{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source": "http://example.org/target1" }, "body": [{ "role": "tagging", "source": "http://example.org/tag1" }, { "role": "commenting", "source": { "text": "I <b>love</b> this thing ", "format": "text/html", "language": "en" } } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [oa:hasSource <http://example.org/target1> ] ; oa:hasBody [ oa:hasRole oa:tagging ; oa:hasSource <http://example.org/tag1> ], [ oa:hasRole oa:commenting ; oa:hasSource [ oa:text "I <b>love</b> this thing" ; dc:format "text/html" ; dc:language "en" ] ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.org/target1", "body": [{ "role": "tagging", "source": "http://example.org/tag1" }, { "role": "commenting", "text": "I <b>love</b> this thing", "format": "text/html", "language": "en" } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.org/target1> ; oa:hasBody [ oa:hasRole oa:tagging ; oa:hasSource <http://example.org/tag1> ], [ oa:hasRole oa:commenting ; oa:text "I <b>love</b> this thing" ; dc:format "text/html" ; dc:language "en" ]
An annotation with multiple bodies with different roles. It associates a comment and an edit with a specific segment of a resource.
Proposal 1 (SpecificResources Required):{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": { "selector": { "@type": "TextQuoteSelector", "prefix": "This is before a ", "exact": "misteak", "suffix": " and this is after it." }, "source": "http://example.com/target.html" }, "body": [ { "role": "commenting", "source": { "text": "There is a <b>typo</b> here, it should be 'mistake'.", "format": "text/html", "language": "en" } }, { "role": "editing", "source": { "text": "mistake", "format": "text/plain", "language": "en" } } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [ oa:hasSelector [ a oa:TextQuoteSelector ; oa:prefix "This is before a " ; oa:exact "misteak" ; oa:suffix " and this is after it." ]; oa:hasSource <http://example.com/target.html> ]; oa:hasBody [ oa:hasRole oa:commenting ; oa:hasSource [ oa:text "There is a <b>typo</b> here, it should be 'mistake'." ; dc:format "text/html" ; dc:language "en" ] ], [ oa:hasRole oa:editing ; oa:hasSource [ oa:text "mistake" ; dc:format "text/plain" ; dc:language "en" ] ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": { "selector": { "@type": "TextQuoteSelector", "prefix": "This is before a ", "exact": "misteak", "suffix": " and this is after it." }, "source": "http://example.com/target.html" }, "body": [ { "role": "commenting", "text": "There is a <b>typo</b> here, it should be 'mistake'.", "format": "text/html", "language": "en" }, { "role": "editing", "text": "mistake", "format": "text/plain", "language": "en" } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [ oa:hasSelector [ a oa:TextQuoteSelector ; oa:prefix "This is before a " ; oa:exact "misteak" ; oa:suffix " and this is after it." ]; oa:hasSource <http://example.com/target.html> ]; oa:hasBody [ oa:hasRole oa:commenting ; oa:text "There is a <b>typo</b> here, it should be 'mistake'." ; dc:format "text/html" ; dc:language "en" ], [ oa:hasRole oa:editing ; oa:text "mistake" ; dc:format "text/plain" ; dc:language "en" ]
A simple highlight is the role of the target in the annotation. The annotation is highlighting the target. There may be no body at all in this case.
Proposal 1 (SpecificResources Required) and Proposal 2 (EmbeddedTextualBody) yield the same serialization:{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": { "role": "highlighting", "source": "http://example.org/book1#para1" } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [ oa:hasRole oa:highlighting ; oa:hasSource <http://example.org/book1#para1> ]
A hypothetical example of the use of roles with targets, rather than bodies. This annotation has a single comment about two distinct paragraphs in a text, and the role of each in the annotation is different: one is being compared to the other and it matters which is which. A hypothetical literature set of roles is used to demonstrate the extensibility of the framework. Because the Targets are both fragments of an existing Resource (requiring the use of SpecificResource class), the serialiation of Targets is the same for both proposals, but serialization of the Body is more verbose following Proposal 1.
Proposal 1 (Specific Resources Required).{ "@context": ["http://www.w3.org/ns/anno.jsonld", "http://example.org/lit/context.json"], "@id": "http://example.org/anno1", "@type": "Annotation", "body": { "role": "lit:comparing", "source": { "text": "The first passage is a clear derivative of the second" } }, "target": [{ "role": "lit:antecedent", "source": "http://example.org/book1#para1" }, { "role": "lit:subsequent", "source": "http://example.org/book1#para6" } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasBody [ oa:hasRole lit:comparing ; oa:hasSource [ oa:text "The first passage is a clear derivative of the second" ] ; oa:hasTarget [ oa:hasRole lit:antecedent ; oa:hasSelector [ a oa:FragmentSelector ; rdf:value "para1" ] ; oa:hasSource <http://example.org/book1> ], [ oa:hasRole lit:subsequent ; oa:hasSelector [ a oa:FragmentSelector ; rdf:value "para6" ] ; oa:hasSource <http://example.org/book1> ]
{ "@context": ["http://www.w3.org/ns/anno.jsonld", "http://example.org/lit/context.json"], "@id": "http://example.org/anno1", "@type": "Annotation", "body": { "role": "lit:comparing", "text": "The first passage is a clear derivative of the second" }, "target": [{ "role": "lit:antecedent", "source": "http://example.org/book1#para1" }, { "role": "lit:subsequent", "source": "http://example.org/book1#para6" } ] }
<http://example.org/anno1> a oa:Annotation ; oa:hasBody [ oa:hasRole lit:comparing ; oa:text "The first passage is a clear derivative of the second" ; oa:hasTarget [ oa:hasRole lit:antecedent ; oa:hasSelector [ a oa:FragmentSelector ; rdf:value "para1" ] ; oa:hasSource <http://example.org/book1> ], [ oa:hasRole lit:subsequent ; oa:hasSelector [ a oa:FragmentSelector ; rdf:value "para6" ] ; oa:hasSource <http://example.org/book1> ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.com/target1", "body": "I like this" }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.com/target1> ; oa:hasBody "I like this" .
If Proposal 1 is adopted, Multiplicity classes could be appear as the Source (aka Content) of a SpecificResource (with optional oa:hasRole property) but not directly as a Body or Target.
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.com/target1", "body": { "source": { "@type": "Choice", "members": [ "http://example.org/comment-en", "http://example.org/comment-fr" ] } } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.com/target1> ; oa:hasBody [ oa:hasSource [ a oa:Choice ; oa:members ( <http://example.org/comment-en> <http://example.org/comment-fr> ) ] ]
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.com/target1", "body": { "role": "commenting", "source": { "@type": "Choice", "members": [ "http://example.org/comment-en", "http://example.org/comment-fr" ] } } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.com/target1> ; oa:hasBody [ oa:hasRole oa:commenting ; oa:hasSource [ a oa:Choice ; oa:members ( <http://example.org/comment-en> <http://example.org/comment-fr> ) ] ]
If proposal 2 is adopted, the range of oa:hasBody and oa:hasTarget would still include Multiplicity classes.
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.com/target1", "body": { "@type": "Choice", "members": [ "http://example.org/comment-en", "http://example.org/comment-fr" ] } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.com/target1> ; oa:hasBody [ a oa:Choice ; oa:members ( <http://example.org/comment-en> <http://example.org/comment-fr> ) ] ]
If proposal 2 is adopted, new subclasses of oa:Choice, oa:Composite, and oa:List could be defined each with optional oa:hasRole property. Assuming this approach the domain of oa:hasRole would be oa:SpecificResource, oa:EmbeddedTextualBody, oa:ChoiceWithRole, oa:CompositeWithRole, oa:ListWithRole. Or for consistency, we could define Multiplicity subclasses that are always used with Bodies and Targets (with optional oa:hasRole property), e.g., oa:ChoiceBody / oa:ChoiceTarget, etc.
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.com/target1", "body": { "role": "commenting", "@type": "ChoiceWithRole", "members": [ "http://example.org/comment-en", "http://example.org/comment-fr" ] } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.com/target1> ; oa:hasBody [ a oa:Choice ; oa:members ( <http://example.org/comment-en> <http://example.org/comment-fr> ) ] ]
Alternatively, if proposal 2 is adopted, we could decide that oa:hasRole is not a property to associate with a Multiplicity class as a whole, but rather only with the the individual items or members of a Multiplicity class. If this approach is taken, the domain of oa:hasRole would be oa:SpecificResource and oa:EmbeddedTextualBody. There is increased redundancy with this approach, but also increased flexibility to express nuances (which could also mean increased risk of semantic ambiguity).
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": "http://example.com/target1", "body": { "@type": "Choice", "members": [ { "source": "http://example.org/comment-en", "role": "commenting" }, { "source": "http://example.org/comment-fr", "role": "commenting" } ] } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget <http://example.com/target1> ; oa:hasBody [ a oa:Choice ; oa:members ( <http://example.org/comment-en> <http://example.org/comment-fr> ) ] ]
The composite multiplicity construct suggests the potential of allowing roles on both Multiplicy classes and on individual items and members within the Multiplicity constructs.
Assuming Proposal 1 (SpecificResource required as Body):
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source": "http://example.com/target1"}, "body": { "role": "review" "source": { "@type": "Composite", "item": [ {"role": "remarks", "source": "http://example.org/body1"}, {"role": "structured data", "source": "http://example.org/body2"} ] } } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [oa:hasSource <http://example.com/target1>] ; oa:hasBody [ oa:hasRole oa:review ; oa:hasSource [ a oa:Composite ; oa:item ([ oa:hasRole oa:remarks ; oa:hasSource <http://example.org/body1>] ; [oa:hasRole oa:structured_data ; oa:hasSource <http://example.org/body2>] ) ] ] .
Assuming Proposal 2
{ "@context": "http://www.w3.org/ns/anno.jsonld", "@id": "http://example.org/anno1", "@type": "Annotation", "target": {"source": "http://example.com/target1"}, "body": { "role": "review" "@type": "CompositeWithRole", "item": [ {"role": "remarks", "source": "http://example.org/body1"}, {"role": "structured data", "source": "http://example.org/body2"} ] } }
<http://example.org/anno1> a oa:Annotation ; oa:hasTarget [oa:hasSource <http://example.com/target1>] ; oa:hasBody [ oa:hasRole oa:review ; a oa:CompositeWithRole ; oa:item ([ oa:hasRole oa:remarks ; oa:hasSource <http://example.org/body1>] ; [oa:hasRole oa:structured_data ; oa:hasSource <http://example.org/body2>] ) ] .