Skip to content

Instantly share code, notes, and snippets.

@saracarl
Last active July 3, 2019 20:32
Show Gist options
  • Save saracarl/af269b6b8731735e232df46826592b9e to your computer and use it in GitHub Desktop.
Save saracarl/af269b6b8731735e232df46826592b9e to your computer and use it in GitHub Desktop.
{
"@type": "oa:Annotation",
"@context": "http://iiif.io/api/presentation/2/context.json",
"@id": "8bfa51d3-65de-458e-8370-f69d4f8348e3", //this should be a URI to the annotation
// for the next section
// "on" should become on array (it is in Mirador)
// each element of that array (you currently have only one) will need a "purpose"
// purpose for annotation on text is "commenting"
// purpose for annotation on the image is "painting" (we don't have that one yet, it's OK)
"on": { //I think instead of "on" it should be "target" but Ben disagrees. "on" matches Mirador.
// see example 18 here: https://www.w3.org/TR/annotation-model/#specific-resources
"purpose": "commenting" //add this line, see example 18 here: https://www.w3.org/TR/annotation-model/#specific-resources
"within": {
"@id": "https://readux.ecdsdev.org/iiif/v2/32862204.5243.emory.edu/manifest",
"@type": "sc:Manifest"
}, //legit
"selector": {
"value": "xywh=2971,453,28,39",
"@type": "oa:FragmentSelector",
"item": {
"type": "RangeSelector",
"startSelector": {
"@type": "XPathSelector",
"value": "//*[@id='13d3b867-d668-4294-b56a-df3e8860016c']" //looks good
},
"endSelector": {
"@type": "XPathSelector",
"value": "//*[@id='8bfa51d3-65de-458e-8370-f69d4f8348e3']" //how are you deciding what this is? the "next" span element? How do you get that?
//this endSelector is *exclusive* so it excludes the current span
},
"refinedBy": { //change this to 2 "refinedBys", each of which is a child of it's respective selector
// the "start" portion applies to the "startSelector"
// the "end" portion applies to the "endSelector"
"@type": "TextPositionSelector",
"start": 2,
"end": 18
}
}
},
"@type": "oa:SpecificResource", //SpecificResources can be either a body or a target, so we have to specify.
//Ben thinks "on" is fine for target, so this may be fine.
// can we move type up by purpose -- just a style change, but I think it's clearer.
"full": "https://readux.ecdsdev.org/iiif/v2/32862204.5243.emory.edu/canvas/32862204.5243.emory.edu$1" // we don't see "full" in the OA spec, but it is in Mirador. Sigh. Keep it.
// is there a blank line here?
},
"motivation": "sc:commenting",
"resource": { // again, this is what Mirador does, but I think it should be body.
//See example 18 here: https://www.w3.org/TR/annotation-model/#specific-resources
"chars": "My super smart annotation.",
"format": "text/html",
"@type": "dctypes:Text",
"language": "en"
},
"annotatedBy": {
"name": "Ford Prefect"
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment