Skip to content

Commit 089da9d

Browse files
committed
Adding w3c anno example
1 parent 33daf8c commit 089da9d

2 files changed

Lines changed: 91 additions & 1 deletion

File tree

fixtures/3/annotation_full.json

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
{
2+
"@context": "http://iiif.io/api/presentation/3/context.json",
3+
"id": "https://example.org/iiif/book1/annopage/p1",
4+
"type": "AnnotationPage",
5+
"items": [
6+
{
7+
"@context": "http://www.w3.org/ns/anno.jsonld",
8+
"id": "http://example.org/anno38",
9+
"type": "Annotation",
10+
"motivation": "commenting",
11+
"creator": {
12+
"id": "http://example.org/user1",
13+
"type": "Person",
14+
"name": "A. Person",
15+
"nickname": "user1"
16+
},
17+
"created": "2015-10-13T13:00:00Z",
18+
"generator": {
19+
"id": "http://example.org/client1",
20+
"type": "Software",
21+
"name": "Code v2.1",
22+
"homepage": "http://example.org/homepage1"
23+
},
24+
"generated": "2015-10-14T15:13:28Z",
25+
"stylesheet": {
26+
"id": "http://example.org/stylesheet1",
27+
"type": "CssStylesheet"
28+
},
29+
"body": [
30+
{
31+
"type": "TextualBody",
32+
"purpose": "tagging",
33+
"value": "love"
34+
},
35+
{
36+
"type": "Choice",
37+
"items": [
38+
{
39+
"type": "TextualBody",
40+
"purpose": "describing",
41+
"value": "I really love this particular bit of text in this XML. No really.",
42+
"format": "text/plain",
43+
"language": "en",
44+
"creator": "http://example.org/user1"
45+
},
46+
{
47+
"type": "SpecificResource",
48+
"purpose": "describing",
49+
"source": {
50+
"id": "http://example.org/comment1",
51+
"type": "Audio",
52+
"format": "audio/mpeg",
53+
"language": "de",
54+
"creator": {
55+
"id": "http://example.org/user2",
56+
"type": "Person"
57+
}
58+
}
59+
}
60+
]
61+
}
62+
],
63+
"target": {
64+
"type": "SpecificResource",
65+
"styleClass": "mystyle",
66+
"source": "http://example.com/document1",
67+
"state": [
68+
{
69+
"type": "HttpRequestState",
70+
"value": "Accept: application/xml",
71+
"refinedBy": {
72+
"type": "TimeState",
73+
"sourceDate": "2015-09-25T12:00:00Z"
74+
}
75+
}
76+
],
77+
"selector": {
78+
"type": "FragmentSelector",
79+
"value": "xpointer(/doc/body/section[2]/para[1])",
80+
"refinedBy": {
81+
"type": "TextPositionSelector",
82+
"start": 6,
83+
"end": 27
84+
}
85+
}
86+
}
87+
}
88+
]
89+
}

tests/test_validator.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -170,7 +170,8 @@ def test07_check_manifest3(self):
170170
'fixtures/3/range_range.json',
171171
'fixtures/3/accompanyingCanvas.json',
172172
'fixtures/3/placeholderCanvas.json',
173-
'fixtures/3/point_selector.json'
173+
'fixtures/3/point_selector.json',
174+
'fixtures/3/annotation_full.json'
174175
]:
175176
with open(good, 'r') as fh:
176177
print ('Testing: {}'.format(good))

0 commit comments

Comments
 (0)