equal
deleted
inserted
replaced
1 class WebAnnotationSerializer { |
1 class WebAnnotationSerializer { |
2 |
2 |
3 static serialize = (note) => { |
3 static serialize = (note) => { |
4 |
4 |
5 const categories = note.categories; |
5 const categories = note.get('categories'); |
6 |
6 |
7 const baseAnnotation = { |
7 const baseAnnotation = { |
8 '@context': "http://www.w3.org/ns/anno.jsonld", |
8 '@context': "http://www.w3.org/ns/anno.jsonld", |
9 "type": "Annotation", |
9 "type": "Annotation", |
10 } |
10 } |
11 |
11 |
12 const source = "/session/" + note.session + "/notes/" + note._id; |
12 const source = "/session/" + note.get('session') + "/notes/" + note.get('_id'); |
13 |
13 |
14 return categories.map((category, index) => { |
14 return categories.map((category, index) => { |
15 |
15 |
16 let annotation = Object.assign({}, baseAnnotation, { |
16 let annotation = Object.assign({}, baseAnnotation, { |
17 id: index |
17 id: index |