Abstract

The Web Annotation Vocabulary specifies the set of RDF classes, predicates and named entities that are used by the Web Annotation Data Model [annotation-model]. It also lists recommended terms from other ontologies that are used in the model, and provides the JSON-LD Context and profile definitions needed to use the Web Annotation JSON serialization in a Linked Data context.

Status of This Document

This section describes the status of this document at the time of its publication. Other documents may supersede this document. A list of current W3C publications and the latest revision of this technical report can be found in the W3C technical reports index at https://www.w3.org/TR/.

Issue 1

The use of the ActivityStreams terms are considered to be at-risk, pending [activitystreams-vocabulary] reaching Candidate Recommendation and, eventually, Recommendation. If this fails, the (few) terms used in the current document will be replaced by terms with a similar names and similar semantics, but in the namespace defined by this document.

The Candidate Recommendation exit criteria are listed are listed in the appendix.

This document was published by the Web Annotation Working Group as a Candidate Recommendation. This document is intended to become a W3C Recommendation. If you wish to make comments regarding this document, please send them to public-annotation@w3.org (subscribe, archives). W3C publishes a Candidate Recommendation to indicate that the document is believed to be stable and to encourage implementation by the developer community. This Candidate Recommendation is expected to advance to Proposed Recommendation no earlier than 20 December 2016. All comments are welcome.

Please see the Working Group's implementation report.

Publication as a Candidate Recommendation does not imply endorsement by the W3C Membership. This is a draft document and may be updated, replaced or obsoleted by other documents at any time. It is inappropriate to cite this document as other than work in progress.

This document was produced by a group operating under the 5 February 2004 W3C Patent Policy. W3C maintains a public list of any patent disclosures made in connection with the deliverables of the group; that page also includes instructions for disclosing a patent. An individual who has actual knowledge of a patent which the individual believes contains Essential Claim(s) must disclose the information in accordance with section 6 of the W3C Patent Policy.

This document is governed by the 1 September 2015 W3C Process Document.

1. Introduction

This section is non-normative.

The specification is divided into two major sections: the terms defined in the Web Annotation ontology, and terms from other ontologies used in the model.

Each class lists the recommendations from the model for the REQUIRED, RECOMMENDED and OPTIONAL object and data properties for instances of the class. Instances may, of course, be the subject of any other triples that implementers find useful, however there is no expectation of interoperability in these cases.

1.1 Namespaces

Prefix Namespace Description
oa http://www.w3.org/ns/oa# The Web Annotation Data Model
as http://www.w3.org/ns/activitystreams# [activitystreams-vocabulary]
dc http://purl.org/dc/elements/1.1/ [DC11]
dcterms http://purl.org/dc/terms/ [DC-TERMS]
dctypes http://purl.org/dc/dcmitype/ [DC-TERMS]
foaf http://xmlns.com/foaf/0.1/ [FOAF]
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns# [rdf-schema]
rdfs http://www.w3.org/2000/01/rdf-schema# [rdf-schema]
schema http://schema.org/ schema.org
skos http://www.w3.org/2004/02/skos/core# [skos-reference]
xsd http://www.w3.org/2001/XMLSchema# [xmlschema-2]

1.2 Diagrams and Examples

The examples throughout the document are serialized as [Turtle] with the prefixes taken from the namespace declarations given in Appendix A. The examples are informative only.

The diagrams use the following style

1.3 Conformance

As well as sections marked as non-normative, all authoring guidelines, diagrams, examples, and notes in this specification are non-normative. Everything else in this specification is normative.

The key words MAY, MUST, MUST NOT, OPTIONAL, RECOMMENDED, REQUIRED, and SHOULD are to be interpreted as described in [RFC2119].

1.4 Terminology

IRI
An IRI, or Internationalized Resource Identifier, is an extension to the URI specification to allow characters from Unicode, whereas URIs must be made up of a subset of ASCII characters. There is a mapping algorithm for translating between IRIs and the equivalent encoded URI form. IRIs are defined by [rfc3987].
Resource
An item of interest that MAY be identified by an IRI.
Note
RDF [rdf-concepts] is fully internationalized and permits the use of IRIs for identifying resources. This specification uses the term IRI to make it clear that this is the case.

2. Web Annotation Ontology

The namespace used for the Web Annotation Ontology is: http://www.w3.org/ns/oa#

2.1 Classes

2.1.1 Annotation

The class for Web Annotations.

oa:Annotation with properties
Example 1: oa:Annotation
<http://example.org/anno1> a oa:Annotation ;
    oa:hasBody <http://example.org/post1> ;
    oa:hasTarget <http://example.com/page1> ;
    oa:motivatedBy oa:commenting ;
    dcterms:creator <http://example.org/person1> ;
    dcterms:created "2015-11-18T12:00:00Z" .

2.1.2 Choice

A subClass of as:OrderedCollection that conveys to a consuming application that it should select one of the resources in the as:items list to use, rather than all of them. This is typically used to provide a choice of resources to render to the user, based on further supplied properties. If the consuming application cannot determine the user's preference, then it should use the first in the list.

oa:Choice with list of items
Example 2: oa:Choice
<http://example.org/anno2> a oa:Annotation ;
    oa:hasTarget <http://example.org/site1> ;
    oa:hasBody [
        a oa:Choice ;
        as:items (<http://example.org/note1> <http://example.org/note2>) ] .

<http://example.org/note1> dc:language "en" .
<http://example.org/note2> dc:language "fr" .

2.1.3 CssSelector

A CssSelector describes a Segment of interest in a representation that conforms to the Document Object Model through the use of the CSS selector specification.

oa:CssSelector
Example 3: oa:CssSelector
<http://example.org/anno3> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
            a oa:CssSelector ;
            rdf:value "#elemid > .elemclass + p" ] ] .

2.1.4 CssStyle

A resource which describes styles for resources participating in the Annotation using CSS.

  • IRI: http://www.w3.org/ns/oa#CssStyle
  • Sub Class Of: oa:Style
oa:CssStyle
Example 4
<http://example.org/anno4> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:styledBy <http://example.org/style1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/document1> ;
        oa:styleClass "red" ] .

<http://example.org/style1> a oa:CssStyle .

2.1.5 DataPositionSelector

DataPositionSelector describes a range of data by recording the start and end positions of the selection in the stream. Position 0 would be immediately before the first byte, position 1 would be immediately before the second byte, and so on. The start byte is thus included in the list, but the end byte is not.

oa:DataPositionSelector
Example 5: oa:DataPositionSelector
<http://example.org/anno5> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/diskimg1> ;
        oa:hasSelector [
            a oa:DataPositionSelector ;
            oa:start 4096 ;
            oa:end 4104 ] ] .

2.1.6 Direction

A class to encapsulate the different text directions that a textual resource might take. It is not used directly in the Annotation Model, only its three instances.

  • IRI: http://www.w3.org/ns/oa#Direction
oa:Direction
Example 6: oa:Direction
<http://example.org/anno6> a oa:Annotation ;
    oa:hasBody [
        rdf:value "This is a comment" ;
        dc:language "en" ;
        dc:format "text/plain" ;
        oa:textDirection oa:ltr ] ;
    oa:hasTarget <http://example.org/page1> .

2.1.7 FragmentSelector

The FragmentSelector class is used to record the segment of a representation using the IRI fragment specification defined by the representation's media type.

oa:FragmentSelector
Example 7: oa:FragmentSelector
<http://example.org/anno7> a oa:Annotation ;
    oa:hasBody <http://example.org/image1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/video1> ;
        oa:hasSelector [
            a oa:FragmentSelector ;
            dcterms:conformsTo <http://www.w3.org/TR/media-frags/> ;
            rdf:value "t=30,60" ] ] .

2.1.8 HttpRequestState

The HttpRequestState class is used to record the HTTP request headers that a client SHOULD use to request the correct representation from the resource.

oa:HttpRequestState
Example 8: oa:HttpRequestState
<http://example.org/anno8> a oa:Annotation ;
    oa:hasBody <http://example.org/description1> ;
    oa:hasTarget  [
        oa:hasSource <http://example.org/target1> ;
        oa:hasState [
            a oa:HttpRequestState ;
            rdf:value "Accept: application/pdf" ] ] .

2.1.9 Motivation

The Motivation class is used to record the user's intent or motivation for the creation of the Annotation, or the inclusion of the body or target, that it is associated with.

oa:Motivation
Example 9: oa:Motivation
<http://example.org/anno9> a oa:Annotation ;
    oa:hasBody <http://example.org/description1> ;
    oa:hasTarget <http://example.com/resource1> ;
    oa:motivatedBy oa:describing .

2.1.10 RangeSelector

A Range Selector can be used to identify the beginning and the end of the selection by using other Selectors. The selection consists of everything from the beginning of the starting selector through to the beginning of the ending selector, but not including it.

oa:RangeSelector
Example 10: oa:RangeSelector
<http://example.org/anno10> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
          a oa:RangeSelector ;
          oa:hasStartSelector [
            a oa:XPathSelector ;
            rdf:value "//table[1]/tr[1]/td[2]" ] ;
          oa:hasEndSelector [
            a oa:XPathSelector ;
            rdf:value "//table[1]/tr[1]/td[4]" ] ] ] .

2.1.11 ResourceSelection

Instances of the ResourceSelection class identify part (described by an oa:Selector) of another resource (referenced with oa:hasSource), possibly from a particular representation of a resource (described by an oa:State). Please note that ResourceSelection is not used directly in the Web Annotation model, but is provided as a separate class for further application profiles to use, separate from oa:SpecificResource which has many Annotation specific features.

Note: oa:Selector
No example is given. The class should not be used in the Web Annotation model directly.

2.1.12 Selector

A resource which describes the segment of interest in a representation of a Source resource, indicated with oa:hasSelector from the Specific Resource. This class is not used directly in the Annotation model, only its subclasses.

Note: oa:Selector
No example is given. The class should only be used to derive subClasses.

2.1.13 SpecificResource

Instances of the SpecificResource class identify part of another resource (referenced with oa:hasSource), a particular representation of a resource, a resource with styling hints for renders, or any combination of these, as used within an Annotation.

oa:SpecificResource
Example 11: oa:SpecificResource
<http://example.org/anno11> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget <http://example.org/region1> .

<http://example.org/region1> a oa:SpecificResource ;
    oa:hasSource <http://example.org/image1> .

2.1.14 State

A State describes the intended state of a resource as applied to the particular Annotation, and thus provides the information needed to retrieve the correct representation of that resource.

Note: oa:State
No example is given. The class should only be used in further ontologies to derive subclasses.

2.1.15 Style

A Style describes the intended styling of a resource as applied to the particular Annotation, and thus provides the information to ensure that rendering is consistent across implementations.

Note: oa:Style
No example is given. The class should only be used in further ontologies to derive subclasses.

2.1.16 SvgSelector

An SvgSelector defines an area through the use of the Scalable Vector Graphics [SVG] standard. This allows the user to select a non-rectangular area of the content, such as a circle or polygon by describing the region using SVG. The SVG may be either embedded within the Annotation or referenced as an External Resource.

oa:SvgSelector
Example 12: oa:SvgSelector
<http://example.org/anno12> a oa:Annotation ;
    oa:hasBody <http://example.org/road1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/map1> ;
        oa:hasSelector [
            a oa:SvgSelector ;
            rdf:value "<svg:svg> ... </svg:svg>" ] ] .

2.1.17 TextPositionSelector

The TextPositionSelector describes a range of text by recording the start and end positions of the selection in the stream. Position 0 would be immediately before the first character, position 1 would be immediately before the second character, and so on.

oa:TextPositionSelector
Example 13: oa:TextPositionSelector
<http://example.org/anno13> a oa:Annotation ;
    oa:hasBody <http://example.org/review1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/ebook1> ;
        oa:hasSelector [
            a oa:TextPositionSelector ;
            oa:start 412 ;
            oa:end 795 ] ] .

2.1.18 TextQuoteSelector

The TextQuoteSelector describes a range of text by copying it, and including some of the text immediately before (a prefix) and after (a suffix) it to distinguish between multiple copies of the same sequence of characters.

oa:TextQuoteSelector
Example 14: oa:TextQuoteSelector
<http://example.org/anno14> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
            a oa:TextQuoteSelector ;
            oa:exact "anotation" ;
            oa:prefix "this is an " ;
            oa:suffix " that has some" ] ] .

2.1.19 TextualBody

oa:TextualBody
Example 15: oa:TextualBody
<http://example.org/anno15> a oa:Annotation ;
    oa:hasTarget <http://example.org/photo1> ;
    oa:hasBody [
        a oa:TextualBody;
        rdf:value "<p>Comment text</p>" ;
        dc:language "en" ;
        dc:format "text/html" ] .

2.1.20 TimeState

A TimeState records the time at which the resource's state is appropriate for the Annotation, typically the time that the Annotation was created and/or a link to a persistent copy of the current version.

oa:TimeState
Example 16: oa:TimeState
<http://example.org/anno16> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasState [
            a oa:TimeState ;
            oa:cachedSource <http://example.org/copy1> ;
            oa:sourceDate "2015-07-20T13:30:00Z" ] ] .

2.1.21 XPathSelector

An XPathSelector is used to select elements and content within a resource that supports the Document Object Model via a specified XPath value.

oa:XPathSelector
Example 17: oa:XPathSelector
<http://example.org/anno17> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
          a oa:XPathSelector ;
          rdf:value "/html/body/p[2]/table/tr[2]/td[3]/span" ] ] .

2.2 Properties

2.2.1 annotationService

The object of the relationship is the end point of a service that conforms to the [annotation-protocol], and it may be associated with any resource. The expectation of asserting the relationship is that the object is the preferred service for maintaining annotations about the subject resource, according to the publisher of the relationship.

This relationship is intended to be used both within Linked Data descriptions and as the rel type of a Link, via HTTP Link Headers [rfc5988] for binary resources and in HTML <link> elements. For more information about these, please see the Annotation Protocol specification [annotation-protocol].

  • IRI: http://www.w3.org/ns/oa#annotationService
Example 18: oa:annotationService
<http://example.org/diagram.jpg> a dctypes:Image ;
    oa:annotationService <http://example.org/services/annotations/> .

2.2.2 bodyValue

The object of the predicate is a plain text string to be used as the content of the body of the Annotation. The value MUST be an xsd:string and that data type MUST NOT be expressed in the serialization. Note that language MUST NOT be associated with the value either as a language tag, as that is only available for rdf:langString.

  • IRI: http://www.w3.org/ns/oa#bodyValue
  • Domain: oa:Annotation
  • Range: xsd:string
oa:bodyValue
Example 19: oa:bodyValue
<http://example.org/anno18> a oa:Annotation ;
    oa:bodyValue "Comment text" ;
    oa:hasTarget <http://example.org/target1> .

2.2.3 cachedSource

A object of the relationship is a copy of the Source resource's representation, appropriate for the Annotation.

  • IRI: http://www.w3.org/ns/oa#cachedSource
  • Domain: oa:TimeState
oa:cachedSource
Example 20
<http://example.org/anno19> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasState [
            a oa:TimeState ;
            oa:cachedSource <http://example.org/copy1> ;
            oa:sourceDate "2015-07-20T13:30:00Z" ] ] .

2.2.4 canonical

A object of the relationship is the canonical IRI that can always be used to deduplicate the Annotation, regardless of the current IRI used to access the representation.

  • IRI: http://www.w3.org/ns/oa#canonical
oa:canonical
Example 21
<http://example.org/anno20> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget <http://example.org/page1> ;
    oa:canonical <urn:uuid:dbfb1861-0ecf-41ad-be94-a584e5c4f1df> .

2.2.5 end

The end property is used to convey the 0-based index of the end position of a range of content.

  • IRI: http://www.w3.org/ns/oa#end
  • Range: xsd:nonNegativeInteger
oa:end
Example 22: oa:end
<http://example.org/anno21> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/diskimg1> ;
        oa:hasSelector [
            a oa:DataPositionSelector ;
            oa:start 4096 ;
            oa:end 4104 ] ] .

2.2.6 exact

The object of the predicate is a copy of the text which is being selected, after normalization.

  • IRI: http://www.w3.org/ns/oa#exact
  • Range: xsd:string
oa:exact
Example 23: oa:exact
<http://example.org/anno22> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
            a oa:TextQuoteSelector ;
            oa:exact "anotation" ;
            oa:prefix "this is an " ;
            oa:suffix " that has some" ] ] .

2.2.7 hasBody

The object of the relationship is a resource that is a body of the Annotation.

oa:hasBody
Example 24: oa:hasBody
<http://example.org/anno23> a oa:Annotation ;
    oa:hasBody <http://example.org/post1> ;
    oa:hasTarget <http://example.com/page1> .

2.2.8 hasEndSelector

The relationship between a RangeSelector and the Selector that describes the end position of the range.

oa:hasEndSelector
Example 25: oa:hasEndSelector
<http://example.org/anno24> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
          a oa:RangeSelector ;
          oa:hasStartSelector [
            a oa:XPathSelector ;
            rdf:value "//table[1]/tr[1]/td[2]" ] ;
          oa:hasEndSelector [
            a oa:XPathSelector ;
            rdf:value "//table[1]/tr[1]/td[4]" ] ] ] .

2.2.9 hasPurpose

The purpose served by the resource in the Annotation.

oa:hasPurpose
Example 26: oa:hasPurpose
<http://example.org/anno25> a oa:Annotation ;
    oa:motivatedBy oa:bookmarking ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "readme" ;
        oa:hasPurpose oa:tagging ] ;
    oa:hasTarget <http://example.org/page1> .

2.2.10 hasScope

The scope or context in which the resource is used within the Annotation.

oa:hasScope
Example 27: oa:hasScope
<http://example.org/anno26> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/logo1.jpg> ;
        oa:hasScope <http://example.org/index.html> ] .

2.2.11 hasSelector

The object of the relationship is a Selector that describes the segment or region of interest within the source resource. Please note that the domain (oa:ResourceSelection) is not used directly in the Web Annotation model.

oa:hasSelector
Example 28: oa:hasSelector
<http://example.org/anno27> a oa:Annotation ;
    oa:hasBody [
      oa:hasSource <http://example.org/page1> ;
      oa:hasSelector <http://example.org/paraselector1> ] ;
    oa:hasTarget [
      oa:hasSource <http://example.com/dataset1> ;
      oa:hasSelector <http://example.org/dataselector1> ] .

2.2.12 hasSource

The resource that the ResourceSelection, or its subclass SpecificResource, is refined from, or more specific than. Please note that the domain (oa:ResourceSelection) is not used directly in the Web Annotation model.

oa:hasSource
Example 29: oa:hasSource
<http://example.org/anno28> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget <http://example.org/region1> .

<http://example.org/region1> a oa:SpecificResource ;
    oa:hasSource <http://example.org/image1> .

2.2.13 hasStartSelector

The relationship between a RangeSelector and the Selector that describes the start position of the range.

oa:hasStartSelector
Example 30: oa:hasStartSelector
<http://example.org/anno29> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
          a oa:RangeSelector ;
          oa:hasStartSelector [
            a oa:XPathSelector ;
            rdf:value "//table[1]/tr[1]/td[2]" ] ;
          oa:hasEndSelector [
            a oa:XPathSelector ;
            rdf:value "//table[1]/tr[1]/td[4]" ] ] ] .

2.2.14 hasState

The relationship between the ResourceSelection, or its subclass SpecificResource, and a State resource. Please note that the domain (oa:ResourceSelection) is not used directly in the Web Annotation model.

oa:hasState
Example 31: oa:hasState
<http://example.org/anno30> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasState <http://example.org/state1> ;
        oa:hasSource <http://example.org/page1> ] .

2.2.15 hasTarget

The relationship between an Annotation and its Target.

oa:hasTarget
Example 32: oa:hasTarget
<http://example.org/anno31> a oa:Annotation ;
    oa:hasBody <http://example.org/post1> ;
    oa:hasTarget <http://example.com/page1> .

2.2.16 motivatedBy

The relationship between an Annotation and a Motivation that describes the reason for the Annotation's creation.

oa:motivatedBy
Example 33: oa:motivatedBy
<http://example.org/anno32> a oa:Annotation ;
    oa:hasBody <http://example.org/description1> ;
    oa:hasTarget <http://example.com/resource1> ;
    oa:motivatedBy oa:describing .

2.2.17 prefix

The object of the property is a snippet of content that occurs immediately before the content which is being selected by the Selector.

  • IRI: http://www.w3.org/ns/oa#prefix
  • Range: xsd:string
oa:prefix
Example 34: oa:prefix
<http://example.org/anno33> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
            a oa:TextQuoteSelector ;
            oa:exact "anotation" ;
            oa:prefix "this is an " ;
            oa:suffix " that has some" ] ] .

2.2.18 processingLanguage

The object of the property is the language that should be used for textual processing algorithms when dealing with the content of the resource, including hyphenation, line breaking, which font to use for rendering and so forth. The value must follow the recommendations of [BCP47].

  • IRI: http://www.w3.org/ns/oa#processingLanguage
  • Sub Property Of: dc:language
  • Range: xsd:string
oa:processingLanguage
Example 35: oa:processingLanguage
<http://example.org/anno34> a oa:Annotation ;
    oa:hasBody [
      a oa:TextualBody ;
      rdf:value "<p>פעילות הבינאום, W3C</p>" ;
      dc:format "text/html" ;
      dc:language "en", "he" ;
      oa:processingLanguage "he" ] ;
    oa:hasTarget <http://example.org/page1> .

2.2.19 refinedBy

The relationship between a Selector and another Selector or a State and a Selector or State that should be applied to the results of the first to refine the processing of the source resource.

  • IRI: http://www.w3.org/ns/oa#refinedBy
oa:refinedBy
Example 36: oa:refinedBy
<http://example.org/anno35> a oa:Annotation ;
      oa:hasBody <http://example.org/comment1> ;
      oa:hasTarget [
          a oa:SpecificResource ;
          oa:hasSource <http://example.org/page1> ;
          oa:hasSelector [
            a oa:FragmentSelector ;
            rdf:value "para5" ;
            oa:refinedBy [
              a oa:TextQuoteSelector ;
              oa:exact "selected text" ;
              oa:prefix "text before the " ;
              oa:suffix "and text after it" ] ] ] .

2.2.20 renderedVia

A system that was used by the application that created the Annotation to render the resource.

oa:renderedVia
Example 37: oa:prefix
<http://example.org/anno36> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget [
      a oa:SpecificResource ;
      oa:hasSource <http://example.org/page1> ;
      oa:renderedVia [
        a as:Application ;
        schema:softwareVersion "2.5" ] ] .

2.2.21 sourceDate

The timestamp at which the Source resource should be interpreted as being applicable to the Annotation.

  • IRI: http://www.w3.org/ns/oa#sourceDate
  • Domain: oa:TimeState
  • Range: xsd:dateTime
oa:sourceDate
Example 38: oa:sourceDate
<http://example.org/anno37> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasState [
            a oa:TimeState ;
            oa:sourceDate "2015-07-20T13:30:00Z" ] ] .

2.2.22 sourceDateEnd

The end timestamp of the interval over which the Source resource should be interpreted as being applicable to the Annotation.

  • IRI: http://www.w3.org/ns/oa#sourceDate
  • Domain: oa:TimeState
  • Range: xsd:dateTime
oa:sourceDateEnd
Example 39: oa:sourceDateEnd
<http://example.org/anno38> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasState [
            a oa:TimeState ;
            oa:sourceDateStart "2015-07-20T13:30:00Z" ;
            oa:sourceDateEnd   "2015-07-21T19:45:00Z" ] ] .

2.2.23 sourceDateStart

The start timestamp of the interval over which the Source resource should be interpreted as being applicable to the Annotation.

  • IRI: http://www.w3.org/ns/oa#sourceDate
  • Domain: oa:TimeState
  • Range: xsd:dateTime
oa:sourceDateStart
Example 40: oa:sourceDateStart
<http://example.org/anno39> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasState [
            a oa:TimeState ;
            oa:sourceDateStart "2015-07-20T13:30:00Z" ;
            oa:sourceDateEnd   "2015-07-21T19:45:00Z" ] ] .

2.2.24 start

The start position in a 0-based index at which a range of content is selected from the data in the source resource.

  • IRI: http://www.w3.org/ns/oa#start
  • Range: xsd:nonNegativeInteger
oa:start
Example 41: oa:start
<http://example.org/anno40> a oa:Annotation ;
    oa:hasBody <http://example.org/review1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/ebook1> ;
        oa:hasSelector [
            a oa:TextPositionSelector ;
            oa:start 412 ;
            oa:end 795 ] ] .

2.2.25 styleClass

The name of the class used in the CSS description referenced from the Annotation that should be applied to the Specific Resource.

oa:styleClass
Example 42: oa:styleClass
<http://example.org/anno41> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:styledBy <http://example.org/style1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/document1> ;
        oa:styleClass "red" ] .

<http://example.org/style1> a oa:CssStyle .

2.2.26 styledBy

A reference to a Stylesheet that should be used to apply styles to the Annotation rendering.

oa:styledBy
Example 43: oa:styledBy
<http://example.org/anno42> a oa:Annotation ;
    oa:hasBody <http://example.org/body1> ;
    oa:styledBy [
        a oa:CssStyle ;
        rdf:value ".red { color: red }" ] ;
    oa:hasTarget [
        oa:hasSource <http://example.org/target1> ;
        oa:styleClass "red" ] .

2.2.27 suffix

The snippet of text that occurs immediately after the text which is being selected.

  • IRI: http://www.w3.org/ns/oa#suffix
  • Range: xsd:string
oa:suffix
Example 44: oa:suffix
<http://example.org/anno43> a oa:Annotation ;
    oa:hasBody <http://example.org/comment1> ;
    oa:hasTarget [
        oa:hasSource <http://example.org/page1> ;
        oa:hasSelector [
            a oa:TextQuoteSelector ;
            oa:exact "anotation" ;
            oa:prefix "this is an " ;
            oa:suffix " that has some" ] ] .

2.2.28 textDirection

The direction of the text of the subject resource. There MUST only be one text direction associated with any given resource.

  • IRI: http://www.w3.org/ns/oa#textDirection
  • Range: oa:Direction
oa:textDirection
Example 45: oa:textDirection
<http://example.org/anno44> a oa:Annotation ;
    oa:hasBody [
        rdf:value "This is a comment" ;
        dc:language "en" ;
        dc:format "text/plain" ;
        oa:textDirection oa:ltr ] ;
    oa:hasTarget <http://example.org/page1> .

2.2.29 via

A object of the relationship is a resource from which the source resource was retrieved by the providing system.

  • IRI: http://www.w3.org/ns/oa#via
oa:via
Example 46: oa:via
<http://example.org/anno45> a oa:Annotation ;
    oa:hasBody <http://example.org/note1> ;
    oa:hasTarget <http://example.org/page1> ;
    oa:via <http://other.example.com/anno1b> .

2.3 Named Individuals

2.3.1 assessing

The motivation for when the user intends to provide an assessment about the Target resource.

  • IRI: http://www.w3.org/ns/oa#assessing
  • Instance Of: oa:Motivation
oa:assessing
Example 47: oa:assessing
<http://example.org/anno46> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "Very high quality" ] ;
    oa:hasTarget <http://example.com/resource1> ;
    oa:motivatedBy oa:assessing .

2.3.2 bookmarking

The motivation for when the user intends to create a bookmark to the Target or part thereof.

  • IRI: http://www.w3.org/ns/oa#bookmarking
  • Instance Of: oa:Motivation
oa:bookmarking
Example 48: oa:bookmarking
<http://example.org/anno47> a oa:Annotation ;
    oa:hasTarget <http://example.com/page1> ;
    oa:motivatedBy oa:bookmarking .

2.3.3 classifying

The motivation for when the user intends to that classify the Target as something.

  • IRI: http://www.w3.org/ns/oa#classifying
  • Instance Of: oa:Motivation
oa:classifying
Example 49: oa:classifying
<http://example.org/anno48> a oa:Annotation ;
    oa:hasBody <http://example.org/type1> ;
    oa:hasTarget <http://example.com/resource1> ;
    oa:motivatedBy oa:classifying .

2.3.4 commenting

The motivation for when the user intends to comment about the Target.

  • IRI: http://www.w3.org/ns/oa#commenting
  • Instance Of: oa:Motivation
oa:commenting
Example 50: oa:commenting
<http://example.org/anno49> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "A comment about the page" ] ;
    oa:hasTarget <http://example.com/page1> ;
    oa:motivatedBy oa:commenting .

2.3.5 describing

The motivation for when the user intends to describe the Target, as opposed to a comment about them.

  • IRI: http://www.w3.org/ns/oa#describing
  • Instance Of: oa:Motivation
oa:describing
Example 51: oa:describing
<http://example.org/anno50> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "A description of the image" ] ;
    oa:hasTarget <http://example.com/image1> ;
    oa:motivatedBy oa:describing .

2.3.6 editing

The motivation for when the user intends to request a change or edit to the Target resource.

  • IRI: http://www.w3.org/ns/oa#editing
  • Instance Of: oa:Motivation
oa:editing
Example 52: oa:editing
<http://example.org/anno51> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "Editorial suggestion" ] ;
    oa:hasTarget <http://example.com/text1> ;
    oa:motivatedBy oa:editing .

2.3.7 highlighting

The motivation for when the user intends to highlight the Target resource or segment of it.

  • IRI: http://www.w3.org/ns/oa#highlighting
  • Instance Of: oa:Motivation
oa:highlighting
Example 53: oa:highlighting
<http://example.org/anno52> a oa:Annotation ;
    oa:hasTarget <http://example.com/region1> ;
    oa:motivatedBy oa:highlighting .

2.3.8 identifying

The motivation for when the user intends to assign an identity to the Target or identify what is being depicted or described in the Target.

  • IRI: http://www.w3.org/ns/oa#identifying
  • Instance Of: oa:Motivation
oa:identifying
Example 54: oa:identifying
<http://example.org/anno53> a oa:Annotation ;
    oa:hasBody <http://example.com/identities/object1> ;
    oa:hasTarget <http://example.com/image-of-object1> ;
    oa:motivatedBy oa:identifying .

2.3.9 linking

The motivation for when the user intends to link to a resource related to the Target.

  • IRI: http://www.w3.org/ns/oa#linking
  • Instance Of: oa:Motivation
oa:linking
Example 55: oa:linking
<http://example.org/anno54> a oa:Annotation ;
    oa:hasBody <http://example.org/from1> ;
    oa:hasTarget <http://example.com/to1> ;
    oa:motivatedBy oa:linking .

2.3.10 moderating

The motivation for when the user intends to assign some value or quality to the Target.

  • IRI: http://www.w3.org/ns/oa#moderating
  • Instance Of: oa:Motivation
oa:moderating
Example 56: oa:moderating
<http://example.org/anno55> a oa:Annotation ;
    oa:hasBody <http://example.org/tags/approved1> ;
    oa:hasTarget <http://example.com/anno1> ;
    oa:motivatedBy oa:moderating .

2.3.11 questioning

The motivation for when the user intends to ask a question about the Target.

  • IRI: http://www.w3.org/ns/oa#questioning
  • Instance Of: oa:Motivation
oa:questioning
Example 57: oa:questioning
<http://example.org/anno56> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "A question about the resource" ] ;
    oa:hasTarget <http://example.com/resource1> ;
    oa:motivatedBy oa:questioning .

2.3.12 replying

The motivation for when the user intends to reply to a previous statement, either an Annotation or another resource.

  • IRI: http://www.w3.org/ns/oa#replying
  • Instance Of: oa:Motivation
oa:replying
Example 58: oa:replying
<http://example.org/anno57> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "A reply to a question" ] ;
    oa:hasTarget <http://example.com/anno1> ;
    oa:motivatedBy oa:replying .

2.3.13 tagging

The motivation for when the user intends to associate a tag with the Target.

  • IRI: http://www.w3.org/ns/oa#tagging
  • Instance Of: oa:Motivation
oa:tagging
Example 59: oa:tagging
<http://example.org/anno58> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "tag" ] ;
    oa:hasTarget <http://example.com/thing1> ;
    oa:motivatedBy oa:tagging .

2.3.14 autoDirection

The direction of text that should be automatically determined from the content.

  • IRI: http://www.w3.org/ns/oa#autoDirection
  • Instance Of: oa:Direction
oa:autoDirection
Example 60: oa:autoDirection
<http://example.org/anno59> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "Some text" ;
        oa:textDirection oa:autoDirection ] ;
    oa:hasTarget <http://example.com/thing1>  .

2.3.15 ltrDirection

The direction of text that is read from left to right.

  • IRI: http://www.w3.org/ns/oa#ltrDirection
  • Instance Of: oa:Direction
oa:ltrDirection
Example 61: oa:ltrDirection
<http://example.org/anno60> a oa:Annotation ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "Left to Right text" ;
        oa:textDirection oa:ltrDirection ] ;
    oa:hasTarget <http://example.com/thing1>  .

2.3.16 rtlDirection

The direction of text that is read from right to left.

  • IRI: http://www.w3.org/ns/oa#rtlDirection
  • Instance Of: oa:Direction
oa:rtlDirection
Example 62: oa:rtlDirection
<http://example.org/anno61> a oa:Annotation ;
    oa:hasBody <http://example.org/ar/comment1> ;
    oa:hasTarget <http://example.com/thing1>  .

<http://example.org/ar/comment1> a dctypes:Text ;
    oa:textDirection oa:rtlDirection .

2.3.17 PreferContainedDescriptions

An IRI to signal the client prefers to receive full descriptions of the Annotations from a container, not just their IRIs.

  • IRI: http://www.w3.org/ns/oa#PreferContainedDescriptions
  • Instance Of: rdfs:Resource
Example 63: oa:PreferContainedDescriptions
GET /annotations/ HTTP/1.1
Host: example.org
Accept: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld"
Prefer: return=representation;include="http://www.w3.org/ns/ldp#PreferContainedDescriptions"

2.3.18 PreferContainedIRIs

An IRI to signal that the client prefers to receive only the IRIs of the Annotations from a container, not their full descriptions.

  • IRI: http://www.w3.org/ns/oa#PreferContainedIRIs
  • Instance Of: rdfs:Resource
Example 64: oa:PreferContainedIRIs
GET /annotations/ HTTP/1.1
Host: example.org
Accept: application/ld+json; profile="http://www.w3.org/ns/anno.jsonld"
Prefer: return=representation;include="http://www.w3.org/ns/ldp#PreferContainedIRIs"

4. Extensions

This vocabulary may be extended in the regular way, by creating new or importing existing predicates and classes from other RDF based ontologies. Extensions may be made to any resource, including adding new objects as well as properties. If there is a property in one of the ontologies that are already included in the context, then it is RECOMMENDED to use a CURIE, the namespace and property name separated by a : character, as the JSON-LD key rather than creating a new context.

For example, it is easier to add skos:prefLabel to the Annotation rather than requiring clients to download a new context document to discover the mapping.

Example 103: Extension Example 1
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno89",
  "type": "Annotation",
  "skos:prefLabel": "Picture Annotation",
  "body": {
    "type": "TextualBody",
    "value": "I love this picture!"
  },
  "target": {
    "id": "http://example.com/images/picture1",
    "type": "Image"
  }
}

In order to ensure a lack of collision between key names, a JSON-LD context document SHOULD be made available when the term is not from an ontology that is already in the Web Annotation context. Extension contexts MUST NOT redefine existing JSON-LD keys from the Web Annotation context. Implementations MUST ignore unfamiliar properties when processing the data, but servers SHOULD preserve them if they are part of a valid and included context.

The context SHOULD be associated with the resource that most closely encapsulates the extension properties. This is to try to ensure that extensions which define the same key do not collide unexpectedly. If there is more than one context document for a particular resource, then they must be included in an array.

For example, adding height and width for the target image using the EXIF vocabulary [exif] could be done by defining a JSON-LD context, including the height and width properties, and linking to the newly defined context in the target resource.

Example 104: Extension Example 2
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno90",
  "type": "Annotation",
  "skos:prefLabel": "Picture Annotation",
  "body": {
    "type": "TextualBody",
    "value": "I love this picture!"
  },
  "target": {
    "@context": "http://example.org/images/ns/extension.jsonld",
    "id": "http://example.com/images/picture1",
    "type": "Image",
    "height": 768,
    "width": 1024
  }
}

Note that the current JSON-LD [JSON-LD] specification does not allow arrays to contain other arrays directly. As JSON-LD is the RECOMMENDED serialization format, extensions SHOULD avoid the use of this pattern.

Finally, new classes can be defined to further extend the model for specific communities and use cases. New Selectors and States are particularly valuable for extension for new ways of defining representations, and for selecting segments of those representations.

For example, an annotation on a three dimensional model would require the addition of depth and the starting position on the z axis, along with x, y, width, and height. These might be kept together in a new ThreeDSelector resource.

Example 105: Extension Example 3
{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "id": "http://example.org/anno91",
  "type": "Annotation",
  "skos:prefLabel": "3d Annotation",
  "body": {
    "type": "TextualBody",
    "value": "I love this part of the model!"
  },
  "target": {
    "source": "http://example.org/models/robot.3d",
    "selector": {
      "@context": "http://example.org/3d/ns/extension.jsonld",
      "type": "ThreeDSelector",
      "x": 1035,
      "y": 245,
      "z": 782,
      "w": 120,
      "h": 180,
      "d": 90
    }
  }
}

A. JSON-LD Context

This section is non-normative.

The RECOMMENDED serialization format is [JSON-LD]. The JSON-LD context presented below is RECOMMENDED to ensure consistency between implementations, and SHOULD be referenced as http://www.w3.org/ns/anno.jsonld. The same IRI SHOULD be used as the profile IRI for representations that conform to the model and context.

{
 "@context": {
    "oa":      "http://www.w3.org/ns/oa#",
    "dc":      "http://purl.org/dc/elements/1.1/",
    "dcterms": "http://purl.org/dc/terms/",
    "dctypes": "http://purl.org/dc/dcmitype/",
    "foaf":    "http://xmlns.com/foaf/0.1/",
    "rdf":     "http://www.w3.org/1999/02/22-rdf-syntax-ns#",
    "rdfs":    "http://www.w3.org/2000/01/rdf-schema#",
    "skos":    "http://www.w3.org/2004/02/skos/core#",
    "xsd":     "http://www.w3.org/2001/XMLSchema#",
    "iana":    "http://www.iana.org/assignments/relation/",
    "owl":     "http://www.w3.org/2002/07/owl#",
    "as":      "http://www.w3.org/ns/activitystreams#",
    "schema":  "http://schema.org/",

    "id":      {"@type": "@id", "@id": "@id"},
    "type":    {"@type": "@id", "@id": "@type"},

    "Annotation":           "oa:Annotation",
    "Dataset":              "dctypes:Dataset",
    "Image":                "dctypes:StillImage",
    "Video":                "dctypes:MovingImage",
    "Audio":                "dctypes:Sound",
    "Text":                 "dctypes:Text",
    "TextualBody":          "oa:TextualBody",
    "ResourceSelection":    "oa:ResourceSelection",
    "SpecificResource":     "oa:SpecificResource",
    "FragmentSelector":     "oa:FragmentSelector",
    "CssSelector":          "oa:CssSelector",
    "XPathSelector":        "oa:XPathSelector",
    "TextQuoteSelector":    "oa:TextQuoteSelector",
    "TextPositionSelector": "oa:TextPositionSelector",
    "DataPositionSelector": "oa:DataPositionSelector",
    "SvgSelector":          "oa:SvgSelector",
    "RangeSelector":        "oa:RangeSelector",
    "TimeState":            "oa:TimeState",
    "HttpRequestState":     "oa:HttpRequestState",
    "CssStylesheet":        "oa:CssStyle",
    "Choice":               "oa:Choice",
    "Person":               "foaf:Person",
    "Software":             "as:Application",
    "Organization":         "foaf:Organization",
    "AnnotationCollection": "as:OrderedCollection",
    "AnnotationPage":       "as:OrderedCollectionPage",
    "Audience":             "schema:Audience", 

    "Motivation":    "oa:Motivation",
    "bookmarking":   "oa:bookmarking",
    "classifying":   "oa:classifying",
    "commenting":    "oa:commenting",
    "describing":    "oa:describing",
    "editing":       "oa:editing",
    "highlighting":  "oa:highlighting",
    "identifying":   "oa:identifying",
    "linking":       "oa:linking",
    "moderating":    "oa:moderating",
    "questioning":   "oa:questioning",
    "replying":      "oa:replying",
    "reviewing":     "oa:reviewing",
    "tagging":       "oa:tagging",

    "auto":          "oa:autoDirection",
    "ltr":           "oa:ltrDirection",
    "rtl":           "oa:rtlDirection",

    "body":          {"@type": "@id", "@id": "oa:hasBody"},
    "target":        {"@type": "@id", "@id": "oa:hasTarget"},
    "source":        {"@type": "@id", "@id": "oa:hasSource"},
    "selector":      {"@type": "@id", "@id": "oa:hasSelector"},
    "state":         {"@type": "@id", "@id": "oa:hasState"},
    "scope":         {"@type": "@id", "@id": "oa:hasScope"},
    "refinedBy":     {"@type": "@id", "@id": "oa:refinedBy"},
    "startSelector": {"@type": "@id", "@id": "oa:hasStartSelector"},
    "endSelector":   {"@type": "@id", "@id": "oa:hasEndSelector"},
    "renderedVia":   {"@type": "@id", "@id": "oa:renderedVia"},
    "creator":       {"@type": "@id", "@id": "dcterms:creator"},
    "generator":     {"@type": "@id", "@id": "as:generator"},
    "rights":        {"@type": "@id", "@id": "dcterms:rights"},
    "homepage":      {"@type": "@id", "@id": "foaf:homepage"},
    "via":           {"@type": "@id", "@id": "oa:via"},
    "canonical":     {"@type": "@id", "@id": "oa:canonical"},
    "stylesheet":    {"@type": "@id", "@id": "oa:styledBy"},
    "cached":        {"@type": "@id", "@id": "oa:cachedSource"},
    "conformsTo":    {"@type": "@id", "@id": "dcterms:conformsTo"},
    "items":         {"@type": "@id", "@id": "as:items", "@container": "@list"},
    "partOf":        {"@type": "@id", "@id": "as:partOf"},
    "first":         {"@type": "@id", "@id": "as:first"},
    "last":          {"@type": "@id", "@id": "as:last"},
    "next":          {"@type": "@id", "@id": "as:next"},
    "prev":          {"@type": "@id", "@id": "as:prev"},
    "audience":      {"@type": "@id", "@id": "schema:audience"},
    "motivation":    {"@type": "@vocab", "@id": "oa:motivatedBy"},
    "purpose":       {"@type": "@vocab", "@id": "oa:hasPurpose"},
    "textDirection": {"@type": "@vocab", "@id": "oa:textDirection"},

    "accessibility": "schema:accessibilityFeature",
    "bodyValue":     "oa:bodyValue",
    "format":        "dc:format",
    "language":      "dc:language",
    "processingLanguage": "oa:processingLanguage",
    "value":         "rdf:value",
    "exact":         "oa:exact",
    "prefix":        "oa:prefix",
    "suffix":        "oa:suffix",
    "styleClass":    "oa:styleClass",
    "name":          "foaf:name",
    "email":         "foaf:mbox",
    "email_sha1":    "foaf:mbox_sha1sum",
    "nickname":      "foaf:nick",
    "label":         "rdfs:label",

    "created":       {"@id": "dcterms:created", "@type": "xsd:dateTime"},
    "modified":      {"@id": "dcterms:modified", "@type": "xsd:dateTime"},
    "generated":     {"@id": "dcterms:issued", "@type": "xsd:dateTime"},
    "sourceDate":    {"@id": "oa:sourceDate", "@type": "xsd:dateTime"},
    "sourceDateStart": {"@id": "oa:sourceDateStart", "@type": "xsd:dateTime"},
    "sourceDateEnd": {"@id": "oa:sourceDateEnd", "@type": "xsd:dateTime"},

    "start":         {"@id": "oa:start", "@type": "xsd:nonNegativeInteger"},
    "end":           {"@id": "oa:end", "@type": "xsd:nonNegativeInteger"},
    "total":         {"@id": "as:totalItems", "@type": "xsd:nonNegativeInteger"},
    "startIndex":    {"@id": "as:startIndex", "@type": "xsd:nonNegativeInteger"}
  }
}

B. JSON-LD Frames

This section is non-normative.

There is an unofficial, yet well implemented, JSON-LD specification [json-ld-framing] that describes a deterministic layout for serializing an RDF graph into a particular JSON-LD document layout. Applying the following frames to the graph of information will generate JSON as close as possible to the serialization recommended by the Web Annotation Data Model.

B.1 Annotation Frame

A Frame for serializing a single Annotation.

{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "@omitDefault": true,
  "type": "Annotation",
  "via": {"@embed": false},
  "canonical": {"@embed": false},
  "rights": {"@embed": false},
  "motivation": {"@embed": false},
  "body": {"@embed": true},
  "target": {"@embed": true},
  "creator": {"@embed": true},
  "generator": {"@embed": true},
  "audience": {"@embed": true}
}

B.2 Annotation Collection Frame

A Frame for serializing a Collection of Annotations.

{
    "@context" : [
    	"http://www.w3.org/ns/anno.jsonld",
    	"http://www.w3.org/ns/ldp.jsonld"
  	],
    "type": "Collection",
    "first": [{"@embed": "False"}],
    "last": [{"@embed": "False"}]
}

Note
If it is instead desirable to embed the first page of the Collection, change the false for first to true.

B.3 Annotation Page Frame

A Frame for serializing a Page from a Collection of Annotations.

{
  "@context": "http://www.w3.org/ns/anno.jsonld",
  "@omitDefault": true,
  "type": "AnnotationPage",
  "next": {"@embed": false},
  "prev": {"@embed": false},
  "partOf": {"@embed": false},
  "items": {"@embed": true}
}

C. Extending Motivations

This section is non-normative.

Although the list of Motivations in the specification is derived from an extensive survey of the annotation landscape, there are many situations where more precise definitions are required or desirable. In these cases it is RECOMMENDED to create a new Motivation resource and relate it to one or more that already exist.

New Motivations MUST be instances of oa:Motivation, which is a subClass of skos:Concept. The skos:broader relationship SHOULD be asserted between the new Motivation and at least one existing Motivation, if there are any that are broader in scope. Other relationships, such as skos:relatedMatch, skos:exactMatch and skos:closeMatch, SHOULD also be asserted to concepts created by other communities.

Model

Use of SKOS to extend motivations
Fig. 1 Extending Motivations

D. Proposed Definitions

This section is non-normative.

The following classes were proposed for the ontology, but did not have the necessary implementations and were consequently removed.

D.1 Composite

A subClass of as:OrderedCollection that conveys to a consuming application that it should use all of the resources in the as:items list, but that order is not important.

oa:Composite with list of items
Example 106: oa:Composite
<http://example.org/anno92> a oa:Annotation ;
    oa:motivatedBy oa:commenting ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "These pages together provide evidence of the conspiracy" ] ;
    oa:hasTarget [
        a oa:Composite ;
        as:items ( <http://example.org/page1> <http://example.org/page6> <http://example.org/page4> ) ] .

D.2 Independents

A subClass of as:OrderedCollection that conveys to a consuming application that each of the resources in the as:items list are independently associated with all of the other bodies or targets.

oa:Independents with list of items
Example 107: oa:Independents
<http://example.org/anno93> a oa:Annotation ;
    oa:motivatedBy oa:classifying ;
    oa:hasBody <http://example.org/vocab/art/portrait> ;
    oa:hasTarget [
        a oa:Independents ;
        as:items (
          <http://example.com/image1>
          <http://example.net/image2>
          <http://example.com/image4>
          <http://example.org/image9>
        ) ] .

D.3 List

A subClass of as:OrderedCollection that conveys to a consuming application that it should use each of the resources in the as:items list, and that their order is important.

oa:List with list of items
Example 108: oa:List
<http://example.org/anno94> a oa:Annotation ;
    oa:motivatedBy oa:tagging ;
    oa:hasBody [
        a oa:TextualBody ;
        rdf:value "important" ] ;
    oa:hasTarget [
        a oa:List ;
        as:items (
          <http://example.com/book/page1>
          <http://example.net/book/page2>
          <http://example.com/book/page3>
          <http://example.org/book/page4>
        ) ] .

E. Candidate Recommendation Exit Criteria

This section is non-normative.

For this specification to be advanced to Proposed Recommendation, there must be at least two independent implementations that demonstrate the validity of the vocabulary. The vocabulary will be considered valid when the following conditions have been demonstrated:

Note

The recommended pattern for extensions in JSON-LD of including the extension context document in the serialization of the resource that uses the extension predicates and/or classes is not able to be round-tripped, as JSON-LD does not maintain the alignment between context and resource once transformed into a graph. The order and exact naming of the JSON keys in the JSON-LD serialization resulting from a graph is not considered a feature of the Vocabulary, and thus not required for demonstrating its validity. The naming of the keys is instead a feature of the Annotation Model and verified by its exit criteria.

F. Changed from Previous Drafts

This section is non-normative.

F.1 Changes from the Candidate Recommendation of 2016-09-06

F.2 Changes from the Candidate Recommendation of 2016-07-05

F.3 Changes from the Working Draft of 2016-03-31

Significant technical changes in this specification from the Working Draft Published of 2016-03-31 are:

G. Acknowledgments

This section is non-normative.

The Web Annotation Working Group gratefully acknowledges the contributions of the Open Annotation Community Group. The output of the Community Group was fundamental to the current data model.

The following people have been instrumental in providing thoughts, feedback, reviews, content, criticism and input in the creation of this specification:

Vladimir Alexiev, Art Barstow, Tim Berners-Lee, Chris Birk, Dan Brickley, Sarven Capadisli, Paolo Ciccarese, Tim Cole, Ray Denenberg, TB Dinesh, Sergiu Gordea, Benjamin Goering, Amy Guy, Ivan Herman, Frederick Hirsch, Antoine Isaac, Jacob Jett, Takeshi Kanai, Gregg Kellogg, Andreas Kuckartz, Randall Leeds, Hugo Manguinhas, Shane McCarron, Ben De Meester, Luc Moreau, Addison Phillips, Davis Salisbury, Robert Sanderson, Felix Sasaki, Doug Schepers, Tzviya Siegman, Stian Soiland-Reyes, Manu Sporny, Nick Stenning, Jon Stroop, Lutz Suhrbier, Kyrce Swenson, Raphaël Troncy, Simeon Warner, Erik Wilde, Dan Whaley, Benjamin Young

H. References

H.1 Normative references

[BCP47]
A. Phillips; M. Davis. IETF. Tags for Identifying Languages. September 2009. IETF Best Current Practice. URL: https://tools.ietf.org/html/bcp47
[DC-TERMS]
Dublin Core Metadata Initiative Terms, version 1.1. 11 October 2010. DCMI Recommendation. URL: http://dublincore.org/documents/2010/10/11/dcmi-terms/
[DC11]
Dublin Core metadata initiative. Dublin Core Metadata Element Set, Version 1.1. 14 June 2012. DCMI recommendation. URL: http://dublincore.org/documents/2012/06/14/dces/
[FOAF]
Dan Brickley; Libby Miller. FOAF project. FOAF Vocabulary Specification 0.99 (Paddington Edition). 14 January 2014. URL: http://xmlns.com/foaf/spec
[JSON-LD]
Manu Sporny; Gregg Kellogg; Markus Lanthaler. W3C. JSON-LD 1.0. 16 January 2014. W3C Recommendation. URL: https://www.w3.org/TR/json-ld/
[RFC2119]
S. Bradner. IETF. Key words for use in RFCs to Indicate Requirement Levels. March 1997. Best Current Practice. URL: https://tools.ietf.org/html/rfc2119
[Turtle]
Eric Prud'hommeaux; Gavin Carothers. W3C. RDF 1.1 Turtle. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/turtle/
[activitystreams-vocabulary]
James Snell; Evan Prodromou. W3C. Activity Vocabulary. 6 September 2016. W3C Candidate Recommendation. URL: https://www.w3.org/TR/activitystreams-vocabulary/
[annotation-model]
Robert Sanderson; Paolo Ciccarese; Benjamin Young. W3C. Web Annotation Data Model. W3C Candidate Recommendation. URL: http://www.w3.org/TR/2016/CR-annotation-model-20160906/
[annotation-protocol]
Robert Sanderson. W3C. Web Annotation Protocol. W3C Candidate Recommendation. URL: http://www.w3.org/TR/2016/CR-annotation-protocol-20160906/
[rdf-schema]
Dan Brickley; Ramanathan Guha. W3C. RDF Schema 1.1. 25 February 2014. W3C Recommendation. URL: https://www.w3.org/TR/rdf-schema/
[rfc3987]
M. Duerst; M. Suignard. IETF. Internationalized Resource Identifiers (IRIs). January 2005. Proposed Standard. URL: https://tools.ietf.org/html/rfc3987
[rfc5988]
M. Nottingham. IETF. Web Linking. October 2010. Proposed Standard. URL: https://tools.ietf.org/html/rfc5988
[skos-reference]
Alistair Miles; Sean Bechhofer. W3C. SKOS Simple Knowledge Organization System Reference. 18 August 2009. W3C Recommendation. URL: https://www.w3.org/TR/skos-reference
[xmlschema-2]
Paul V. Biron; Ashok Malhotra. W3C. XML Schema Part 2: Datatypes Second Edition. 28 October 2004. W3C Recommendation. URL: https://www.w3.org/TR/xmlschema-2/

H.2 Informative references

[exif]
W3C. Exif Vocabulary Workspace - RDF Schema. URL: https://www.w3.org/2003/12/exif/
[json-ld-framing]
W3C JSON-LD Community Group. JSON-LD Framing 1.0. URL: http://json-ld.org/spec/latest/json-ld-framing/
[rdf-concepts]
Graham Klyne; Jeremy Carroll. W3C. Resource Description Framework (RDF): Concepts and Abstract Syntax. 10 February 2004. W3C Recommendation. URL: https://www.w3.org/TR/rdf-concepts/