Annotation Data Model - bounswe/bounswe2018group7 GitHub Wiki
This page contains the customization of The W3C Web Annotation Data Model for HiStory.
{
"@context": "http://www.w3.org/ns/anno.jsonld",
"type": "Annotation",
"id": ...
"creator": ...
"generated": ...
"body": {
"type": ...
"id" (or "value"): ...
}
"target": {
"source": ...
"selector": ...
}
}
The identity of the Annotation, e.g."https://history-backend.com/api/v1/annotations/2"
A String of URL that identifies the creator of the annotation, e.g. "http://example.org/user1"
A String of time at which the annotation was generated.
On HiStory, each Annotation can have exactly one body. body can be text
, image
, video
or sound
.
{
"type": "TextualBody",
"value": <A String, e.g. "This this my first Annotation!">
}
{
"type": "Image",
"id": <A String of URL, e.g. "http://somesite.com/someimage.png">
}
{
"type": "Video",
"id": <A String of URL, e.g. "http://somesite.com/somevideo.mp4">
}
{
"type": "Sound",
"id": <A String of URL, e.g. "http://somesite.com/somesound.mp3">
}
On HiStory, each Annotation can have exactly one target. Targets are of type Specific Resource. Selectors are supported.
{
"source": <A String of URL, e.g. "http://history-backend.herokuapp.com/api/v1/memory_posts/5">,
"selector": <one of the Target Selectors stated below, not required>
}
On HiStory, only Text Quote Selector and Fragment Selector are supported for target
s.
{
"type": "TextQuoteSelector",
"exact": <A String of selected text, e.g. "Üsküdar">,
"prefix": <A String of text that comes immediately before the words contained in 'exact', e.g. "I went to ">,
"suffix": <A String of text that comes immediately after the words contained in 'exact', e.g. " with my friend">
}
Only fragments for Images are supported as stated on http://www.w3.org/TR/media-frags/.
{
"type": "FragmentSelector",
"conformsTo": "http://www.w3.org/TR/media-frags/",
"value": "xywh=<number>,<number>,<number>,<number>"
}