1
== High-level components and data flow of the swtr application ==
2
3
>  The document is written in an informal way.
4
5
Table of contents
6
1. Introduction
7
2. Design
8
3. Configuration
9
4. Deployment
10
11
1. Introduction
12
13
swtr is the cannonical swt maker + swt swagger application.
14
That means, the swtr application can be used to -
15
a) interact with resources on an existing web page(like
16
text, images, video etc), annotate them, and make swts out of the annotations
17
and post the swts to a swt store.
18
b) fetch existing swts about an existing web page and display/render them based
19
on a combination of - the type of swt (the context), and configuration
20
parameters set by the user.
21
22
2. Design
23
24
swtr is designed entirely to be a client-side javascript app.
25
the components of the swtr app can be divided like-
26
i) text annotation module - an interface to the user to select and annotate
27
text.
28
  1. creates an interface for the user to select any text on the webpage.
29
  2. when user has selected text - gives two options - edit/renarrate or comment/annotate.
30
  3.1 if user selects comment, the module provides a text box to enter user's
31
      comment, keeping the selected text by the user in context.
32
  3.2 if the user selects edit, the module provides an editor keeping the
33
      selected text by the user in context.
34
  4. In both the above case, the editor window has options to save the changes
35
     or cancel them.
36
  5.1 If the user cancels, all the changes made by the user is discarded and
37
      previous version of the page is kept.
38
  5.2 If the user saves her changes, the new edit or comment is updated in the
39
      DOM of the browser to visually reflect the changes, and also the changes
40
      are cached in a local data store.
41
42
ii) image annotation module - an interface to the user to select arbitrary
43
parts of an image in rectange shape and add textual comments to them. Later
44
this can be extended to add support for audio, video comments.
45
  1. provides an interface to click on any image on the webpage and bring it to
46
     center focus to make it annotatable. We use the annotorious project to do
47
     the image annotation.
48
  2. Once an annotation to the image has been made, the module can provide the
49
     user with options to cancel or save the changes.
50
  3.1 If the user cancels, all the changes made by the user is discarded (i.e
51
      annotations removed).
52
  3.2 If the user saves her changes, this module retrieves the annotations via
53
      the annotorious' API and stores them in the local data store.
54
55
iii) map annotation module
56
iv) controller
57
v) swt maker
58
vi) swt swagger