Warning:
This wiki has been archived and is now read-only.

TextCommentOnWebPage

From Open Annotation Community Group
Jump to: navigation, search

Scenario: A textual comment on a selection of text within a web page, where the text is embedded within the Annotation.

This was example requested in an email (http://lists.w3.org/Archives/Public/public-openannotation/2012May/0010.html) from the public Open Annotation list


Explanation:

Bob created an Annotation, and likely also the Body resource (but this was not specified in the example description). The Annotation links his comment to the first occurrence of "Semantic Web" in the text of the web page. In order to select this bit of text we need to use a Selector, and in this case the easiest is a Text Quote Selector which records the selected text, plus that immediately before and after, ignoring markup. The Body is embedded within the Annotation as a ContentAsText resource, which records the mime type and the comment's text. As the resources are all embedded in the graph, they have UUID URNs rather than HTTP URIs.


Model:

Example0-semanticweb.jpg


Turtle:

  <x:MyAnno> a oax:Comment ;
    oa:hasTarget <urn:uuid:0BE74782-503C-4D2D-B51E-A91C6C268847> ;
    oa:hasBody <urn:uuid:CEB9FD94-6779-4257-B992-C853617CB791> ;
    oa:annotatedBy <mailto:Bob> .
    
  <urn:uuid:0BE74782-503C-4D2D-B51E-A91C6C268847> a oa:SpecificResource ;
    oa:hasSource <http://www.w3.org/DesignIssues/LinkedData.html> ;
    oa:hasSelector <urn:uuid:6F998D6C-84C0-4ACE-903D-D2C3BD058C0C> .
  
  <urn:uuid:6F998D6C-84C0-4ACE-903D-D2C3BD058C0C> a oax:TextQuoteSelector ;
    oax:exact "Semantic Web" ;
    oax:prefix "Linked Data The" ;
    oax:suffix "isn't just about putting data on the web." .

  <urn:uuid:CEB9FD94-6779-4257-B992-C853617CB791> a cnt:ContentAsText ;
    dc:format "text/plain" ;
    cnt:chars "Hey Tim, good idea that Semantic Web!" .