WordPress Websites for Engineers: Elevate Your Brand
Multiplicity and Publishing in Open Annotation (tutorial)
1. Open Annotation Data Model:
Multiplicity and Publishing Modules
Robert Sanderson
azaroth42@gmail.com
Los Alamos National Laboratory
@azaroth42
Paolo Ciccarese
paolo.ciccarese@gmail.com
Harvard Medical School
@paolociccarese
(Community Group Co-Chairs)
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 1
2. Multiplicity
The Data Model allows for multiple bodies and multiple targets
• Easiest: Multiple instances of hasBody, hasTarget
• Issue: What are the semantics?
Multiples of hasBody/hasTarget: Treated individually
Requirements:
• Choice: Only one resource needs to be displayed
• Composite: All resources are required together, as a set
• List: All resources are required together, with order
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 2
3. Multiplicity: Choice
Choice: Rendering agent should choose one resource to display
oa:default: The default resource of the Annotation’s producer
oa:item: Another possible resource
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 3
4. Multiplicity: Choice
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 4
5. Multiplicity: Composite
Composite: A set of resources, all of which are required to understand the
Annotation correctly
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 5
6. Multiplicity: Composite
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 6
7. Multiplicity: List
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 7
8. Multiplicity: List
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 8
9. Publishing Annotations
The Data Model is only a model, not a protocol:
• Does not specify interactions between client/server
• Does not limit additional descriptive features
• Does not specify annotation search, retrieval or management
Some aspects related to publishing are important:
• Serialization of the model
• Embedding resources
• Including other graphs
• Equivalence of resources
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 9
10. Publishing: JSON-LD Serialization
JSON-LD is the latest RDF serialization:
http://json-ld.org/spec/latest/json-ld/
Open Annotation recommends its use over RDF/XML:
• Easier for developers
• More web application friendly
• Looks like JSON (with appropriate context)
• So special parser not required
• Easy to generate without special libraries
RDF/XML and Turtle are also recommended, if content negotiation is
supported.
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 10
11. Publishing: JSON-LD Context
JSON-LD has a Context description which maps JSON object keys to
RDF predicates, and assigns namespace prefixes:
{“@context”:{
“oa”: “http://www.w3.org/ns/oa#”,
“cnt”: “http://www.w3.org/2011/content#”,
“dc”: “http://purl.org/dc/elements/1.1/”,
…
“hasBody”: {“@type”:”@id”, “@id”:”oa:hasBody”},
“hasTarget”: {“@type”:”@id”, “@id”:”oa:hasTarget”},
…
“chars”: “cnt:chars”,
“format”: “dc:format”,
“when”: “oa:when”
…
}
}
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 11
12. Publishing: JSON-LD Example
Reuse of the Context definition makes simple annotations simple:
{
“@context”: “http://www.w3.org/ns/oa-context-20130208.json”,
“@type”: “oa:Annotation”,
“hasBody”: “http://www.youtube.com/watch?v=fgg2tpUVbXQ”,
”hasTarget”: ”http://zebu.uoregon.edu/hudf/hudf_300dpi.jpg”
}
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 12
13. Publishing: JSON-LD Example
And complex annotations still (somewhat) readable:
{
“@context”: “http://www.w3.org/ns/oa-context-20130208.json”,
“@id”: “http://www.example.org/annotations/1.json”,
“@type”: “oa:Annotation”,
“annotatedAt”: “2012-11-10T09:08:07”,
“annotatedBy”: {
“@id” : “http://www.example.com/people/rsanderson”,
“@type”: “foaf:Person”,
“mbox”: “rsanderson@example.com”},
“hasBody”: “http://www.youtube.com/watch?v=fgg2tpUVbXQ”,
…
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 13
14. Publishing: JSON-LD Example (cont)
”hasTarget”: {
”@id”: ”urn:uuid:1d823e02-60a1-47ae-bc872081729c”,
”@type”: ”oa:SpecificResource”,
”hasSelector”: {
”@id”: ”urn:uuid:6e353e12-30c2-98a3-39ff2081729c”,
”@type”: ”oa:FragmentSelector”,
”conformsTo”: ”http://www.w3.org/TR/media-frags”,
”value”: ”xywh=10,10,5,5”
}
”hasSource”: {
”@id”: ”http://zebu.uoregon.edu/hudf/hudf_300dpi.jpg”,
”@type”: ”dcterms:Image”
}
}
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 14
15. Publishing: Embedding Resources
Resources other than the body can benefit from being embedded:
• SVG Selector
• CSS Style
Potentially other resources:
• When the resource is offline, and being sent along with the
annotation to a publishing server
• For preservation
• To include the exact representation, perhaps otherwise un-
obtainable
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 15
16. Publishing: Embedding Resources
The Content in RDF specification is reused:
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 16
17. Publishing: Embedding Resources
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 17
18. Publishing: Embedding RDF Graphs
It is useful to embed RDF graphs within the Annotation.
Prefer to use Content in RDF approach, but if Trig/Trix is requested:
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 18
19. Publishing: Embedding RDF Graphs
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 19
20. Publishing: Equivalent Resources
Useful to know that Annotations (and other resources) have been
duplicated between systems:
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 20
21. Publishing: Equivalent Resources
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 21
22. Extending Motivations
The Data Model defines only a few core Motivations
Intent is for communities to extend as necessary:
1. Create a new ConceptScheme (vocabulary/taxonomy)
2. Create a new instance of oa:Motivation
3. Link new instance to at least one existing Motivation if possible
4. Assign labels and other information to describe its use
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 22
23. Extending Motivations
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 23
24. Extending Motivations
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 24
25. Thank You
Robert Sanderson
azaroth42@gmail.com
Los Alamos National Laboratory
@azaroth42
Paolo Ciccarese
paolo.ciccarese@gmail.com
Harvard Medical School
@paolociccarese
(Community Group Co-Chairs)
http://www.flickr.com/photos/hinkeb/5232293964/
http://www.w3.org/community/openannotation/
http://www.openannotation.org/
Open Annotation Community Group West Coast Open Annotation Rollout
http://www.w3.org/community/openannotation/ April 9th 2013, Stanford, CA, USA 25