This version:
http://www.openannotation.org/spec/beta/examples/hubble.html
Latest version:
http://www.openannotation.org/spec/examples/hubble.html
Editors
Robert Sanderson, Los Alamos National Laboratory
Herbert Van de Sompel, Los Alamos National Laboratory

Abstract

A series of examples using the Hubble Deep Field Image as the target of Annotations described using the OAC Data Model.


Table of Contents

1. Introduction
     1.2 Namespaces Used
2. Data Model Examples
     2.1 Baseline Model
     2.2 Serialization of Model
     2.3 Additional Properties and Relationships
     2.4 Additional Types of Annotation
     2.5 Inline Information
     2.6 Multiple Targets
     2.7 Segments of a Resource and Constrained Resources
         2.7.1 Fragment Identifiers
         2.7.2 Media Fragment Identifiers
         2.7.3 Constraints
         2.7.4 Inline Constraint Data
         2.7.5 RDF Constraint Data
         2.7.6 Constrained Body
     2.8 Time Dependent Annotations

Appendices

A. Acknowledgements
B. Change Log


1. Introduction

This example focuses on an image as the Target of the Annotations, the Hubble Deep Field Image as taken by the Hubble space telescope. Many of the Body resources are tweets using the Twitter service to assign a URI to a short piece of text.

1.1 Namespaces Used

This example uses the following namespaces and prefixes to indicate those namespaces:

Prefix Namespace URI Description
cnt http://www.w3.org/2008/content# Content in RDF [Content]
dc http://purl.org/dc/elements/1.1/ Dublin Core elements [DC Elements]
dcterms http://purl.org/dc/terms/ Dublin Core terms [DC Terms]
foaf http://xmlns.com/foaf/0.1/ Friend of a Friend vocabulary terms [FOAF]
oac http://www.openannotation.org/ns/ OAC vocabulary terms [OAC]
ore http://www.openarchives.org/ore/terms/ ORE vocabulary terms
rdf http://www.w3.org/1999/02/22-rdf-syntax-ns# RDF vocabulary terms [RDF Vocabulary]
rdfs http://www.w3.org/2001/01/rdf-schema# RDF Schema vocabulary [RDF Vocabulary]

2. Data Model Examples

2.1 Baseline Model

A user creates a video that discusses the Hubble Deep Field Image. The video is therefore the Body of the Annotation, and the image is the Target, as the video is about the image.

Example 1: Baseline Model
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
oac:Target http://www.openannotation.org/ns/Target
oac:Body http://www.openannotation.org/ns/Body
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
ex:HDFV http://www.youtube.com/watch?v=fgg2tpUVbXQ
RDF
ex:Anno   a oac:Annotation ,
          oac:hasTarget ex:HDFI-1 ,
          oac:hasBody ex:HDFV .

ex:HDFI-1 a oac:Target .
ex:HDFV   a oac:Body .         

2.2 Serialization of the Model

The model is serialized as per these examples.

2.3 Additional Properties and Relationships

We can add extra properties and relationships to the resources involved in the Annotation.

Example 3: Additional Properties and Relationships
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:Target http://www.openannotation.org/ns/Target
oac:Body http://www.openannotation.org/ns/Body
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
ex:HDFV http://www.youtube.com/watch?v=fgg2tpUVbXQ
ex:User http://www.example.org/user/jbloggs
dc:title http://www.purl.org/dc/elements/1.1/title
dcterms:creator http://www.purl.org/dc/terms/creator
dcterms:created http://www.purl.org/dc/terms/created
foaf:name http://xmlns.com/foaf/0.1/name
foaf:mbox http://xmlns.com/foaf/0.1/mbox
RDF
ex:Anno   a oac:Annotation ,
          oac:hasTarget ex:HDFI-1 ,
          oac:hasBody ex:HDFV ,
          dc:title "Annotation of Hubble Deep Field Image" ,
          dcterms:creator ex:User ,
          dcterms:created "2010-02-01 12:34:56" .

ex:User   a foaf:Agent ,
          foaf:name "J. Bloggs" ,
          foaf:mbox "jbloggs@example.org" .

ex:HDFI-1 a oac:Target .
ex:HDFV   a oac:Body .         

2.4 Additional Types of Annotation

There can be different types of Annotation, as subClasses of oac:Annotation.

Example 4: Additional Types of Annotation
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:Reply http://www.openannotation.org/ns/Reply
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
oac:Target http://www.openannotation.org/ns/Target
oac:Body http://www.openannotation.org/ns/Body
ex:Anno http://www.example.org/annotation/1/
ex:Ann2 http://www.example.org/annotation/2/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
tw:12665505503 http://twitter.com/---/status/12665505503
tw:12665463062 http://twitter.com/---/status/12665463062
RDF
ex:Ann2 a oac:Reply ,
        oac:hasBody ex:12665505503 ,
        oac:hasTarget ex:Anno .

ex:Anno a oac:Annotation ,
        oac:hasBody ex:12665463062 ,
        oac:hasTarget ex:HDFI-1 .

ex:HDFI-1 a oac:Target .
tw:12665505503 a oac:Body .
tw:12665463062 a oac:Body .	

2.5 Inline Information

The Body can be included in the Annotation Document.

Example 5.1: Inline Body
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:Target http://www.openannotation.org/ns/Target
oac:Body http://www.openannotation.org/ns/Body
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
cnt:ContentAsText http://www.w3.org/2008/content#ContentAsText
cnt:chars http://www.w3.org/2008/content#chars
cnt:characterEncoding http://www.w3.org/2008/content#characterEncoding
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
ex:uuid urn:uuid:074360F6-19F9-49A0-83BF-A07FEEF09D5D
RDF
ex:Anno   a oac:Annotation ,
          oac:hasTarget ex:HDFI-1 ,
          oac:hasBody ex:uuid .

ex:uuid   a oac:Body ,
          a cnt:ContentAsText ,
          cnt:chars "This image is very impressive!" ,
          cnt:characterEncoding "utf-8" .

ex:HDFI-1 a oac:Target .         

2.6 Multiple Targets

There can be multiple targets for a single Annotation.

Example 6: Multiple Targets
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
oac:Target http://www.openannotation.org/ns/Target
oac:Body http://www.openannotation.org/ns/Body
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
ex:HDFI-2 http://imgsrc.hubblesite.org/hu/db/images/hs-1996-01-a-full_tif.tif
tw:10994605527 http://twitter.com/---/status/10994605527
RDF
ex:Anno a oac:Annotation ,
        oac:hasTarget ex:HDFI-1 ,
        oac:hasTarget ex:HDFI-2 ,
        oac:hasBody tw:10994605527 .

ex:HDFI-1 a oac:Target .
ex:HDFI-2 a oac:Target .
tw:10994605527 a oac:Body .

2.7 Segments of a Resource and Constrained Resources

2.7.1 Fragment Identifiers

As this example's target is an image, please see the Media Fragment URI example.

2.7.2 Media Fragment URIs

An Annotation concerning a rectangular section of the image.

Example 7.2: Media Fragments
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
dcterms:isPartOf http://purl.org/dc/terms/isPartOf
oac:Target http://www.openannotation.org/ns/Target
oac:Body http://www.openannotation.org/ns/Body
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1#xywh=50,100,640,480 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg#xywh=50,100,640,480
tw:6312261983 http://twitter.com/---/status/6312261983
RDF
ex:Anno a oac:Annotation ,
        oac:hasBody tw:6312261983 ,
        oac:hasTarget ex:HDFI-1#xywh=50,100,640,480 .

tw:6312261983 a oac:Body .

ex:HDFI-1#xywh=50,100,640,480 a oac:Target ,
          dcterms:isPartOf ex:HDFI-1 .

2.7.3 Constraints

The target of the Annotation is a ConstrainedTarget, which is a non-rectangular section of the image.

Example 7.2: Constraintsth>
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
oac:ConstrainedTarget http://www.openannotation.org/ns/ConstrainedTarget
oac:Body http://www.openannotation.org/ns/Body
oac:SvgConstraint http://www.openannotation.org/ns/SvgConstraint
oac:constrains http://www.openannotation.org/ns/constrains
oac:constrainedBy http://www.openannotation.org/ns/constrainedBy
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
tw:6312261983 http://twitter.com/---/status/6312261983
uu1 urn:uuid:3DC92A55-6315-49D5-98BD-D9DFB7ADA59E
ex:svgc http://www.example.org/segdesc/1/example.svg
dc:format http://www.purl.org/dc/elements/1.1/format
RDF
ex:Anno a oac:Annotation ,
        oac:hasBody tw:6312261983 ,
        oac:hasTarget uu1 .

uu1 a   oac:ConstrainedTarget ,
        oac:constrains ex:HDFI-1 , 
        oac:constrainedBy ex:svgc .
             
ex:svgc a oac:SvgConstraint ,
         dc:format "image/svg+xml" .

tw:6312261983 a oac:Body .

2.7.4 Inline Constraint Data

It is possible to include the Constraint data within the Annotation document.

Example 7.4: Inline Constraint Data
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
oac:ConstrainedTarget http://www.openannotation.org/ns/ConstrainedTarget
oac:Body http://www.openannotation.org/ns/Body
oac:SvgConstraint http://www.openannotation.org/ns/SvgConstraint
oac:constrains http://www.openannotation.org/ns/constrains
oac:constrainedBy http://www.openannotation.org/ns/constrainedBy
dc:format http://www.purl.org/dc/elements/1.1/format
cnt:ContentAsText http://www.w3.org/2008/content#ContentAsText
cnt:chars http://www.w3.org/2008/content#chars
cnt:characterEncoding http://www.w3.org/2008/content#characterEncoding
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
tw:6312261983 http://twitter.com/---/status/6312261983
uu1 urn:uuid:3DC92A55-6315-49D5-98BD-D9DFB7ADA59E
uu2 urn:uuid:074360F6-19F9-49A0-83BF-A07FEEF09D5D
RDF
ex:Anno   a oac:Annotation ,
          oac:hasTarget uu1 ,
          oac:hasBody tw:6312261983 .

uu1       a oac:ConstrainedTarget ,
          oac:constrains ex:HDFI-1 ,
          oac:constrainedBy uu2 .

uu2       a oac:SvgConstraint ,
          a cnt:ContentAsText ,
          dc:format "image/svg+xml" ,
          cnt:chars "" ,
          cnt:characterEncoding "utf-8" .

tw:6312261983 a oac:Body .

2.7.5 RDF Constraint Data

Although there are better ways to do this with either a Media Fragment URI, or an SVG Constraint, for the purposes of this example only, it is possible to model the image segment using information within the RDF graph. Here we use a hypothetical BoxConstraint to encode the same information as would be found in a Media Fragment URI.

Example 7.5: RDF Constraint Data
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
oac:ConstrainedTarget http://www.openannotation.org/ns/ConstrainedTarget
oac:Body http://www.openannotation.org/ns/Body
oac:BoxConstraint http://www.openannotation.org/ns/BoxConstraint
oac:constrains http://www.openannotation.org/ns/constrains
oac:constrainedBy http://www.openannotation.org/ns/constrainedBy
img:x http://www.example.net/image/x
img:y http://www.example.net/image/y
img:w http://www.example.net/image/w
img:h http://www.example.net/image/h
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
tw:6312261983 http://twitter.com/---/status/6312261983
uu1 urn:uuid:3DC92A55-6315-49D5-98BD-D9DFB7ADA59E
uu2 urn:uuid:074360F6-19F9-49A0-83BF-A07FEEF09D5D
RDF
ex:Anno   a oac:Annotation ,
          oac:hasTarget uu1 ,
          oac:hasBody tw:6312261983 .

uu1       a oac:ConstrainedTarget ,
          oac:constrains ex:HDFI-1 ,
          oac:constrainedBy uu2 .

uu2       a oac:SvgConstraint ,
          img:x 100 ,
          img:y 500 ,
          img:w 250 ,
          img:h 150 .

tw:6312261983 a oac:Body .

2.7.6 Constrained Body

One part of the Video is about a particular segment of the image. As with the previous example, this model is for educational purposes only, and Media Fragments should be used.

Example 7.6: Constrained Body
Model Instance
URI Table
oac:Annotation http://www.openannotation.org/ns/Annotation
oac:hasTarget http://www.openannotation.org/ns/hasTarget
oac:hasBody http://www.openannotation.org/ns/hasBody
oac:ConstrainedTarget http://www.openannotation.org/ns/ConstrainedTarget
oac:ConstrainedBody http://www.openannotation.org/ns/ConstrainedBody
oac:SvgConstraint http://www.openannotation.org/ns/SvgConstraint
oac:NptConstraint http://www.openannotation.org/ns/NptConstraint
oac:constrains http://www.openannotation.org/ns/constrains
oac:constrainedBy http://www.openannotation.org/ns/constrainedBy
ex:Anno http://www.example.org/annotation/1/
ex:HDFI-1 http://commons.wikimedia.org/wiki/File:Hubble_ultra_deep_field.jpg
ex:HDFV http://www.youtube.com/watch?v=fgg2tpUVbXQ
uu1 urn:uuid:3DC92A55-6315-49D5-98BD-D9DFB7ADA59E
uu2 urn:uuid:074360F6-19F9-49A0-83BF-A07FEEF09D5D
ex:svgc http://www.example.org/segdesc/1/example.svg
ex:nptc http://www.example.org/segdesc/1/example.npt
RDF
ex:Anno   a oac:Annotation ,
          oac:hasBody uu1 ,
          oac:hasTarget uu2 .


uu1       a oac:ConstrainedBody ,
          oac:constrains ex:HDFV ,
          oac:constrainedBy ex:nptc .

uu2       a oac:ConstrainedTarget ,
          oac:constrains ex:HDFI-1 ,
          oac:constrainedBy ex:svgc .

ex:svgc   a oac:SvgConstraint .

ex:nptc   a oac:NptConstraint .

2.8 Time

As the Hubble image has not changed over time, this document does not contain examples of this part of the data model.

B. Change Log

Date Editor Description
2010-10-01 rsanderson External alpha3 release
2011-08-10 rsanderson Beta re-release
 
Creative Commons LicenseThis work by the Open Annotation Collaboration is licensed under a Creative Commons Attribution-NonCommercial-ShareAlike 3.0 Unported License.