Not written yet. This chapter is the help of the person who annotates: what the page shows, how an annotation is chosen and set, what is done to the files, and what is read of what came of it.
Not written yet. This chapter is for whoever reads or changes the code: how it is organized, what the page is made of, the events it answers, and the stylesheets.
SPPAS annotates: it takes the files of a person and writes, beside them, what it found in them — the words, the sounds, the syllables, what was said at the same time as something else. What it can find is not one thing but a score of them, each with its own languages, its own configuration and its own needs.
The application "Annotate" is what stands between a person and those annotations. It shows the annotations which can be performed, lets them be selected and configured, performs the selected ones on the files, says what came of each, and keeps what it said so that it can be read again. It annotates nothing itself.
The annotations are not independent of one another. The phonetization needs the text normalization, the alignment needs the phonetization. Every annotation declares what it requires; what is missing is a place where a person can see it. A score of annotations offered as a flat list is a list one gets lost in.
"Annotate" is the page "Annotate" of the desktop interface of SPPAS, brought to the web. A person who knows the one must find her way in the other: the same steps, the same lists, the same report. What differs is how the files are given and how what was produced is reached, because a web page does not read the disk of the person who looks at it.
"Annotate" belongs to the SPPAS ecosystem and relies on its automatic annotations, which it never exposes. It is available both as a page of the SPPAS Dashboard and as an online application, addressing the same need in two contexts of use: within a working session on a local corpus, or as an occasional service.
Accessibility is treated here as a functional requirement rather than an added quality: what "Annotate" exposes — what an annotation does, whether it can be selected, how far the annotations have gone, how each of them went — is of no use if it is not perceivable.
Performing automatic annotations raises a difficulty which is not technical: the user has to decide, before anything happens, which annotations to perform, in which language, with which configuration and into which file formats — among a score of annotations whose names say little to whoever did not write them. The decision is taken on a list, and the consequences are read afterward, file by file, in a report.
The central problem addressed by "Annotate" is thus:
how to let a user perform, on a set of files, the automatic annotations she selected, in the language and with the configuration she fixed, and read what came of each of them, without requiring any knowledge of how an annotation works.
This problem is sharpened by the conditions of use. Annotating is a batch operation: several annotations are performed, one after another, on a set of files whose contents are not examined when the user decides. It is also a long operation, and nothing can be undone: what an annotation wrote is written. "Annotate" must therefore let decisions be taken once and applied to every file, show how far the annotations have gone while they are performed, and remain accountable for each annotation and each file.
The objectives follow:
"Annotate" does not aim to say what an annotation does or how: that is established in the API of SPPAS, whose classes are read here and not modeled. It does not aim to select the files, which are given by the provision of files, nor to show and check the options of an annotation, which is the service of the options'. What is left is the annotations as a set: which can be performed, which are selected, what they are performed with, and what came of it.
An annotation does not write one kind of file: what is produced is annotations, and it may be a sound, an image or a video as well. The user chooses one extension for every kind of file which can be produced, among those SPPAS is able to write for that kind; a default one is already selected, so that nothing has to be chosen by whoever has no preference.
Most annotations need language resources, and a corpus is usually in one language. The user fixes it once, and every annotation which has resources for that language takes it. An annotation which has none is left without a language, and the user gives it another one on its own line. When the selected annotations do not all have the same language, the page says so rather than showing one of them.
The annotations are shown in three lists, one per type: those which take one file on its own, those which take two files of one speaker, and those which take two files of two speakers. From the main page, the user sees at once which lists hold a selected annotation.
In a list, each annotation says what it does, and gives the way to the published work it rests on — or, where there is none yet, how far its development has gone. It says what it requires, and the list is arranged so that an annotation comes after the ones it requires. Every annotation is shown, including the ones which cannot be selected on that machine: they are disabled and not hidden, so that two users have the same page, and what differs between them is what is installed.
Selecting an annotation selects no other. The user configures an annotation before it is performed, and what she fixed is kept as long as she stays on the page.
The files to be annotated come from the working context, not from the tool: in a working session, they are the files currently selected in the workspace; in an occasional use, they are the files the user brings to the tool. The requirement is the same in both cases — the user delimits a set, "Annotate" operates on that set, and none of its files is altered. The two contexts differ only in their material constraints, an occasional use being bounded by what a service can reasonably receive.
One gesture performs every selected annotation on the delimited files. The user may ask, before it, for one file gathering everything which was annotated for each file, to open it in an annotation editor. While the annotations are performed, the page says which one is being performed and how far it has gone, and nothing else can be started: there is one performance at a time.
The annotations are a series of operations sharing the same decisions. Some succeed, some do not, for reasons belonging to one annotation or to one file. The report is written while the annotations are performed, line by line, each line carrying how what it is about went. It is therefore readable whatever happened, including when the performance stopped before its end. The user reads it when the annotations have been performed, and reads again the reports of the previous ones; she deletes the ones which are of no use any more.
Annotations which produce files the user cannot find have annotated nothing. In a working session, the produced files join the workspace and remain available to the following operations. In an occasional use, they are handed back to the user. The requirement is that the outcome be reachable without the user having to know where the tool put it.
Everything above rests on information being exposed: descriptions, languages, states, progress, reports. Contrast, legibility, text alternatives to any graphical encoding — an annotation which is selected, a line of a report which is an error —, keyboard operation and consistent terminology between the interface and the concepts are conditions of the tool working at all. On a web page, what is being decided and the list of the reports do not always fit side by side: the user says whether she sees the one, the other, or both.
The previous sections state what users need and why; this section states what the system does to answer it, and what it manipulates in order to do so.
Two markers are used throughout. [API-OK] denotes what is achievable with the current SPPAS API. [API-EXT] denotes what requires an extension of that API. A requirement marked [API-EXT] is part of the model; it remains inactive until the API supports it.
The data dictionary of this application. Thirteen concepts, and the model below names no other.
There are two places where a language is fixed, and the second one exists because of the first.
The language of the page is chosen in one list, which holds every
language at least one annotation has resources for, and the entry
---, which is no language. It is --- when the page
is asked for. Fixing it gives it to every annotation which has resources for
it; an annotation which has resources, but none for that language, is left
without a language. An annotation which has no language resource is not
concerned. Fixing --- leaves every annotation which has
resources without a language.
The language of one annotation is chosen on the line of that
annotation, among its own languages and ---. It is where the
user gives a language to an annotation the language of the page left without
one, and it changes no other annotation.
The list of the page then shows what the selected annotations hold: their
language when they all have the same, --- when none has one, and
the entry MIX when they do not all have the same. That entry is
in the list only as long as it is true.
Every annotation declares the ones it requires. The page shows it on the line of each annotation, and each list is arranged so that an annotation comes after the ones it requires [API-EXT]: what requires what is written in the declarations, and the annex states what reading it asks of the API.
What is shown is not what is done. Selecting an annotation selects no other: one annotation is performed, what it wrote is corrected by hand, and the next one is performed on the corrected version. Selecting what an annotation requires in its place would perform the whole chain on what was not corrected.
The order in which the selected annotations are performed is the API's, and this application neither chooses it nor changes it.
Each performance writes one report, under a name no report bore before. The reports which are kept are listed beside the six steps, and one of them at most is checked: checking one unchecks the other. The report of the performance which has just ended is added at the top of the list, and checked.
Three things are done with that list: the checked report is shown; the checked report is deleted; every report which is not checked is deleted. Showing is offered only when a report is checked and its file is still there.
A report which is shown begins with the name of its file. Its lines are shown as they were written, and the state each of them carries is shown as what it is.
Online, there is no list of reports. The report of a performance is written where the files the user sent stand, with everything which was produced: it is one of the produced files. It is shown when the annotations have been performed, as it is locally; it is downloaded on its own, and it is in the archive which brings every produced file back at once. No report of a previous performance is kept for a given user, so there is nothing to list, to check or to delete: online, the panel of the reports is collapsed.
Annotate holds no data of its own but the reports. Everything else it manipulates belongs to one performance being decided, and is derived from a small number of user decisions. This section states who it exchanges with, which data exist, what produces them, and on which event each treatment runs.
Four actors border Annotate, and only one of them is a person. Three are neighbouring systems.
files_for_app(); and that the person said it is ready, is_ready() [401].lock() and release(); what was produced, in the workspace it was handed, produced(); and that it has finished [801], [802].F15 carries the whole of what was decided, and not one annotation. The API performs what was selected, in its own order: this application chooses no order and imposes none [502]. What it reads of the requirements, it reads to show [307].
F15 carries a workspace, and not what an annotation reads. Which files an annotation takes among those of the batch is settled between the workspace and what that annotation declares. This application chooses no file, pairs no file and looks for none.
Nothing is written into what an annotation declares. A language fixed on an annotation, an annotation selected, an option configured: all of it is held for the performance being decided, and the declaration is what it was.
What goes to A2 is said of the workspace made for Annotate, and never of the one of the person, which never leaves that domain [402].
Eight classes. Three are read from a neighbor and appear here with their identifier and nothing else; four belong to one performance being decided; one is what stays.
| Class | Properties | What it is |
|---|---|---|
| ANNOTATION | # annotation | One annotation SPPAS is able to perform (D1). What it declares is read from the API |
| KIND | # kind | One kind of output file (D5). The extensions it can be written with are read from the API |
| FILE | # file | One file of the batch (D10). It is exposed by A2, and this domain holds its identity and nothing else |
| PERFORMANCE | # performance, merge | What is decided, then performed at one go (D11), and the merge option (D9) |
| SELECTION | # performance, # annotation, language | One annotation which is to be performed (D3), and the language it is to be performed in (D4) |
| EXTENSION | # performance, # kind, extension | The extension the files of one kind are written with (D6) |
| VALUE | # performance, # annotation, # option, value | The value fixed for one option of one annotation (D7) |
| REPORT | # report | What a performance wrote of itself, kept so that it can be read again (D13) |
| No. | Verb | Leg 1 | Leg 2 |
|---|---|---|---|
| R1 | is decided in | SELECTION (1,1) | PERFORMANCE (0,n) |
| R2 | selects | SELECTION (1,1) | ANNOTATION (0,n) |
| R3 | is chosen in | EXTENSION (1,1) | PERFORMANCE (1,n) |
| R4 | is the extension of | EXTENSION (1,1) | KIND (0,n) |
| R5 | is fixed in | VALUE (1,1) | PERFORMANCE (0,n) |
| R6 | configures | VALUE (1,1) | ANNOTATION (0,n) |
| R7 | is annotated by | FILE (0,n) | PERFORMANCE (0,n) |
| R8 | was written by | REPORT (0,1) | PERFORMANCE (0,1) |
| R9 | requires | ANNOTATION (0,n) | ANNOTATION (0,n) |
R1, R3 and R5 are aggregations: a selection, an extension and a value exist only inside the performance they were decided for. R1 and R2 together identify a selection: an annotation is selected once and not twice.
The language is on the selection and not on the annotation. The language of the page is not a property of anything: it is a gesture which writes the language of every annotation concerned [202], and what the page shows afterward is read on the selected annotations [204].
A value is tied to an annotation and not to a selection. An annotation is configured whether it is selected or not, and what was fixed stays when the selection is taken back.
R8 reads (0,1) on both sides. A performance which was not asked for yet wrote no report; a report is read long after the performance which wrote it, which is gone. A report is identified by itself.
R9 is read and never written. It is what the annotations declare, and it is used to show [307]. It orders no performance.
A performance holds no file. R7 is a relation and not a holding: the batch is exposed by A2, and what this domain knows of a file is its identity [402].
extensions — one extension per kind of output file.selected — the annotations which are to be performed.lang — the language of each annotation, or none.options — the values fixed for the options of each annotation.merge — boolean.batch — a set of files, possibly empty.report — the name of the report this performance writes.progress — which annotation is being performed, and how far it has gone.Their dependencies, which the treatments below turn into events:
language of the page → lang(selected ∧ lang) → what the page shows of the languages(batch ∧ selected ∧ lang ∧ options ∧ extensions ∧ merge) → report, produced filesThirteen treatments. Six are the decisions, one is the batch, two are the performance and what it produced, two are the reports, and the last two start again. Each one says on which event it runs, what it does, and under which condition each of its results is emitted.
| No. | Event | Kind | Comes from |
|---|---|---|---|
| E1 | The page is asked for | external | [011] |
| E2 | The user chooses the extension of one kind of output file | external | F3 |
| E3 | The user fixes the language of the page | external | F4 |
| E4 | The user selects an annotation, or takes a selection back | external | F5 |
| E5 | The user fixes the language of one annotation | external | F6 |
| E6 | The user asks to configure an annotation | external | F8 |
| E7 | The batch is exposed | external | F10 |
| E8 | The user asks for the annotations to be performed | external | F13 |
| E9 | The annotations have been performed | internal | T08 |
| E10 | The user asks to show the checked report | external | F22 |
| E11 | The user asks to delete reports | external | F23 |
| E12 | The user asks to annotate another batch | external | F24 |
| E13 | A decision has changed | internal | T02 to T07, T12, T13 |
| E14 | The user resets the page | external | F26 |
E13 is the event the page turns on. Every treatment which takes a decision emits it, and what the page shows of the decisions is said again: which types hold a selected annotation, the language the selected annotations hold, and whether the annotations can be performed [022]. No treatment is written for that announcement: it is a result of each of them.
Nothing here waits for two events. T08 is the only treatment with a condition on its synchronization, and that condition is read on the data it already holds.
extensions.extensions are available
to T08.extensions, always; E13,
always.lang, for every annotation which
has language resources.lang is available to
T08.lang, always; E13, always.selected.selected is available to
T08.selected, always; E13, always;
F7, always.lang, for that annotation.lang is available to
T08.lang, always; E13, always; F7,
when that annotation is selected.options, for that
annotation.options are available to
T08.options, when the user
confirms; E13, when the user confirms.is_ready()).files_for_app().batch.batch is available to
T08.batch, always; E13, always; F11
saying the set is empty, when it is [403].batch, selected,
lang, options, extensions,
merge.report, progress,
produced files.batch not empty; no performance going.files_for_app() hands at
this request; its files are locked while the annotations are performed,
lock(), and released when they have been,
release();report; the workspace which was
handed, holding what was produced.address_of_all(), the report included [803];produced(), and
says it has finished;batch, undefined;
extensions, selected, lang,
options and merge, as they were.start_over();extensions,
selected, lang, options and
merge, as they were on arrival at the page [012];
batch, undefined.start_over(): a person who resets the page does not keep
the files she had given it;One procedure per treatment, numbered as it is. There are two contexts of execution and one organization: what differs between the local server and the wsgi service is who exposes the batch and where the reports stand, and nothing of what is done. Annotate is served by the two, which is why there is one table and not two.
| PF | What it does | Triggered by | In charge | Where | When | Nature |
|---|---|---|---|---|---|---|
| PF1 (T01) | Presents the annotations | E1 | the server | the server | when the page is asked for | automated |
| PF2 (T02) | Chooses an output extension | E2 | the user | the browser | whenever she chooses one; it is sent with the performance | conversational |
| PF3 (T03) | Fixes the language of the page | E3 | the user, among the languages the server wrote in the page | the browser | whenever she fixes it; it is sent with the performance | conversational |
| PF4 (T04) | Selects an annotation | E4 | the user | the browser | whenever she selects one or takes it back; it is sent with the performance | conversational |
| PF5 (T05) | Fixes the language of one annotation | E5 | the user | the browser | whenever she fixes it; it is sent with the performance | conversational |
| PF6 (T06) | Configures an annotation | E6 | the service of the options | as that service says | before a performance, as often as she wants | conversational |
| PF7 (T07) | Delimits the batch | E7 | the provider of files, and never Annotate | outside this application | before Annotate is reached locally; when the files are given, online | automated |
| PF8 (T08) | Performs the annotations | E8 | the server, then the API | the server | when she asks, and only then | automated |
| PF9 (T09) | Shows the report, and makes the produced files reachable | E9 | the server, then the provider of files | the server, then her machine | as soon as the annotations have been performed, then when she follows | automated, then conversational |
| PF10 (T10) | Shows a report | E10 | the server | the server | when she asks, locally | conversational |
| PF11 (T11) | Deletes reports | E11 | the server | the server | when she asks, locally | conversational |
| PF12 (T12) | Annotates another batch | E12 | the server | the server | when she asks | automated |
| PF13 (T13) | Resets the page | E14 | the server | the server | when she asks | automated |
Four procedures end in the browser, and they are four gestures. The
extension picked, the language of the page fixed, the annotation selected, the
language of one annotation fixed: each of them keeps or shows what the server
already wrote in the page, and sends nothing. The languages of every annotation
were written by the server in the choice of that annotation; fixing the
language of the page sets each of those choices to that language where it holds
it, and to --- where it does not. Which types hold a selected
annotation, and which language the selected annotations hold, are read on those
same fields. Nothing of what she is reading is replaced while she decides
[1005]. What she decided is sent once, with the performance. RO1, RO8
PF7 is in nobody's charge here. The batch is exposed by a neighbor in both contexts, and this application reads it. It appears in this table so that the one procedure Annotate does not perform is written down. RO4
PF8 is the only long procedure, and it is followed. The request which asks for it starts the annotations on the server, in a thread, and answers at once; the page is not reloaded. It is what the Setup does with the installation of the features. The API is given something to say where it is — a progress, as every long operation of SPPAS is given one — and it sets on it which annotation it is performing and how far that one has gone. The page then asks, at regular intervals, where the performance stands, and is answered what that progress holds: a percent, a header and a text. A progress bar says it. When the hundred is reached, the page asks for the results, and what the server wrote replaces what was shown: the report, and the container of the provision of files. RO5
PF10 and PF11 exist locally only. Locally, the reports stand in the folder of the logs of SPPAS, where every performance of that machine wrote its own, and the list is theirs. Online, the report of a performance is written in the place the provision of files made for what the person sent, and it is one of the produced files: it is shown by PF9, downloaded with them, and it lasts as long as they do. RO7
Annotate is a single page. The page of the desktop interface shows one panel at a time: the six steps with the reports beside them, one list of annotations per type, and the procedure outcome report. This one holds the same panels as sections of one page, shown and hidden where they stand: nothing is asked of the server to go from one to another.
From the six steps:
The six steps and the reports stand side by side. A group of three radio buttons — the six steps alone, both, the reports alone — says how much of each is shown, as on the page of the Journal: two panels side by side are unreadable on a narrow window. Both is what the page opens on locally; online, the reports are collapsed.
RO6 is what the desktop interface does without saying it: its progress is a modal dialog, and nothing can be clicked under it. A web page has no modal progress, so the rule is written.
Gathered from the rules of the treatments and from the requirements they answer, and written here once so that each of them has one place and one only. Nothing is added: what follows was already said, and what this chapter buys is that a constraint can be pointed at.
| No. | Constraint | Imposed by |
|---|---|---|
| C1 | Each kind of output file has one extension, and always one: its default one, until another is chosen. | [012], [101], [104], T02 |
| C2 | An extension is one the API is able to write for that kind; a kind which has none is not shown. | [102], [103], T01 |
| C3 | The language of an annotation is one it has resources for, or none. | [202], [203], T03, T05 |
| C4 | Fixing the language of the page concerns every annotation which has language resources, selected or not, and never one which has none. | [202], T03 |
| C5 | An annotation left without a language stays selected, and is not disabled. | T03, T04 |
| C6 | Selecting an annotation selects no other, and no other is refused. | [306], T04 |
| C7 | Every annotation is shown; one which cannot be performed on that machine is disabled, and cannot be selected. | [308], T01, T04 |
| C8 | What is shown of an annotation is what it declares, and nothing this application wrote. | T01 |
| C9 | An annotation is shown after the ones it requires, and the arrangement changes no performance. | [307], [502], RO10 |
| C10 | A decision makes no request, replaces nothing on the page and never moves the focus. | [1005], RO8 |
| C11 | The batch is read and no file of it is altered; no file is selected here. | [401], [402], T07, RO4 |
| C12 | The annotations are performed only with at least one annotation selected and a batch which is not empty. | [031], T08 |
| C13 | One performance at a time: nothing is started, reset or started over while one goes. | [032], RO6 |
| C14 | What a performance was started with does not change while it goes. | T08, RO8 |
| C15 | The order of a performance is the API's. | [502], RO10 |
| C16 | The failure of one annotation never interrupts the others. | [503], T08 |
| C17 | Each performance writes one report, under a name no report bore before. | [504], T08 |
| C18 | Where a performance stands is what the API said on the progress it was given: nothing is counted here. | [505], RO5 |
| C19 | A report is shown as it was written, each line with the state it carries; nothing is counted from it and nothing is decided from it. | [603], T10 |
| C20 | Locally, one report at most is checked, and the report of the performance which has just ended is. | [702], T09 |
| C21 | Deleting a report deletes nothing of what was produced. | [706], T11 |
| C22 | Online, no report is listed: the report is one of the produced files, and it is reached as they are. | [707], [803], RO7 |
| C23 | Where a produced file is reached is given by the provision of files, and shown by this application. | [802], T09 |
| C24 | Nothing of what was decided is held on the server between two requests. What is held is the performance which is going, and the manager of the provision of files. | RO9 |
| C25 | Which section of the page is shown is carried by nobody: the page shows and hides them where they stand. | [1006], the navigation |
C5 and C6 are the same decision seen twice. Nothing is decided for the person: an annotation is selected without what it requires, and it stays selected without a language. What is done with it is the API's to say, in the report.
C9 does not contradict C6. It bears on what is shown and on nothing else: the alignment is shown after the phonetization it requires, and selecting the one never selects the other.
C24 is where Annotate departs from Convert. A performance is held by the server while it goes, because it is followed as the Setup follows an installation: a thread advances it, and the progress it was given is read. What the person decided is held by nothing but her page.
Each class of entities becomes a table, and its identifier becomes its key. Nine tables: three are what the API declares and are permanent, five belong to one performance, and one is what stays.
| Table | Columns | Comes from |
|---|---|---|
| ANNOTATION | annotation | The class ANNOTATION |
| REQUIRES | annotation, required | R9, which is many to many |
| KIND | kind | The class KIND |
| PERFORMANCE | performance, merge, report | The class PERFORMANCE, and R8 |
| SELECTION | performance, annotation, language | The class SELECTION, and R1 with R2 |
| EXTENSION | performance, kind, extension | The class EXTENSION, and R3 with R4 |
| VALUE | performance, annotation, option, value | The class VALUE, and R5 with R6 |
| BATCH | performance, file | R7, which is many to many |
| REPORT | report | The class REPORT |
R1 and R2 both have their low cardinality on the side of SELECTION, which is (1,1): the table takes the two keys, and the two together identify it. One performance holds one annotation at most once. The same holds of EXTENSION with R3 and R4, which is C1 written as a key: one kind has one extension in one performance.
The language of an annotation which is not selected has no table. In the model, it is on the selection; on the page, every annotation has its choice of language, selected or not, and fixing the language of the page sets them all. What the performance is handed is the language of the selected ones, and the others are fields of the page.
The report is not keyed by its performance. A report is read long after the performance which wrote it, and a performance does not last. R8 reads (0,1) on both sides: the table PERFORMANCE takes the key of the report it writes, and REPORT stands by itself.
Four tables are read and never written. ANNOTATION, REQUIRES and KIND are what the API answers. BATCH is what the provider of files exposes, read at every request and altered by nothing here [402].
Not in the tables, and computed every time they are wanted: the annotations of one type, whether a type holds a selected annotation, the languages of the page, the language the selected annotations hold, the arrangement of a list, whether an annotation can be performed on that machine, what is still missing before the annotations can be performed, and the progress.
Here the machines are named, and not before. There is no database: three tables stand in the API of SPPAS, four in what the page transmits, one in a neighbor and one on a disk.
| Table | Where it stands | Between two requests | What the user sees |
|---|---|---|---|
| ANNOTATION | The API of SPPAS: the steps of a sppasParam, read at every request | Its own | The annotations, in one list per type |
| REQUIRES | The API of SPPAS [API-EXT] | Its own | What an annotation requires, and the arrangement of its list |
| KIND | The API of SPPAS: sppasFiles.OUT_FORMATS, read at every request | Its own | One choice of extension per kind |
| PERFORMANCE | What the page transmits | Nothing: it is rebuilt at every request | Her decisions, as she took them |
| SELECTION | What the page transmits | Nothing | The annotations she selected, and the language of each |
| EXTENSION | What the page transmits | Nothing | The extension standing for each kind |
| VALUE | What the page transmits, as the service of the options gives it | Nothing | The options of an annotation, when she configures it |
| BATCH | What the provider of files exposes | That domain's | The files she is annotating |
| REPORT | A file. Locally, in the folder of the logs of SPPAS; online, in the place the provision of files made for what she sent | The file | Locally, the list of the reports; in both contexts, the lines of the one which is shown |
The decisions change place when the performance starts. While the
person decides, nothing is held on the server: the page carries what was
decided and transmits it with the performance. The request which starts the
performance writes all of it in a sppasParam — the
annotations activated, the language and the options of each, the extensions,
the workspace and the name of the report — and hands it to the thread. It
is the object the API is performed with, and it is held for as long as the
performance goes and no longer. C14, C24
The progress stands with the performance. It is a
swappProgressBar, which is a sppasBaseProgress: the
API sets on it a percent, a header and a text, and the requests which follow
read them. It is made when the performance starts and dropped when it has
ended. C18
The report is the one thing which stays. Locally, its name is given
by sppasLogFile with the pattern report, as the
desktop interface names it: the two interfaces list the same reports. Online,
it is written with the produced files, and which operation of the provision of
files gives that place is to be named in its dossier. C17, C22
The organizational level said by what and when; this says in what tasks, and what among them cannot be half done.
One request is one unit. Every request begins by rebuilding what was decided from what the page transmitted, runs the one treatment it was asked for, and sends back what is to be shown. Nothing is begun in one request and finished in another, except T08: it is started by one request, the requests which follow ask where it stands, and the last one gives its report.
| PF | The tasks, in order | What cannot be half done |
|---|---|---|
| PF1 | When the page is asked for: read the annotations from the API and, for each of them, what it declares; read the kinds of output file, their extensions and their default one; arrange each list; locally, list the reports; write all of it in the page | Nothing: nothing is written |
| PF2, PF4, PF5 | In the page: keep the extension, the selection or the language; it is sent with the performance | Nothing: nothing is sent |
| PF3 | In the page: set the choice of language of every annotation to the language fixed where it holds it, and to --- where it does not; show the language the selected annotations hold | Nothing: nothing is sent |
| PF6 | Hand the options of the annotation to the service of the options; take back the values, or nothing when she gives up | Nothing of this application's |
| PF8 | Rebuild; ask the provision of files for the batch, and verify one annotation selected, a batch which is not empty and no performance going; name the report; write what was decided in a sppasParam; make the progress; lock the batch; start the thread and answer. In the thread: have the API perform the annotations; release the batch, give back what was produced, and say it has finished | The start: a performance is going, or none is. Not the performance itself |
| PF9 | Read the report; locally, add it to the list and check it; online, ask the provision of files for its address and for the address of the archive; write the section of the report and the container of the provision of files | Nothing |
| PF10 | Read the checked report, and write the section of the report | Nothing: nothing is written on a disk |
| PF11 | Delete the checked report, or each report which is not checked, one after another | The deletion of one report |
| PF12 | Rebuild; ask the provision of files to start over; answer the page with the decisions as they were | Nothing |
| PF13 | Rebuild nothing; ask the provision of files to start over; answer the page as PF1 does | Nothing |
What an annotation writes, it writes as it goes, beside the files. There is no moment at which a performance is half made and has to be undone: an annotation which failed stops nothing, and the ones performed before it wrote what they wrote [503].
A performance which stops is not repaired. Nothing more is written and nothing more is said. The report was written line by line: it holds what was done until then, and it is read as any other [603].
The selected annotations are performed in the order of the API. An annotation which requires one which was not selected is performed all the same. What is read of the requirements is read for the person: to show them, and to arrange each list. C9, C15
The thread which performs the annotations is what says a performance is going. While it is alive, a request which would start another one, reset the page or start over is refused, and the page, which shows the progress in place of the six steps, offers none of them. C13
In sppas/ui/swapp/app_annotate/. One module per kind of
knowledge, and every procedure has one module and one only.
| Module | What it does | Procedure |
|---|---|---|
| annotations | Knows which annotations there are and what each declares, which kinds of output file there are and their extensions; says which annotation is of which type, which languages the page offers, and arranges a list by what its annotations require. Reads no file of the user | PF1 |
| performance | Names the report, writes what was decided in what the API is performed with, makes the progress, starts the thread, and says whether a performance is going and where it stands | PF8 |
| reports | Lists the reports, reads one with the state of each of its lines, and deletes those which are named | PF9, PF10, PF11 |
| provision | Reads the batch the provision of files hands, says what it locks and releases, gives back what was produced, asks for the addresses, and says when it has finished. Alters nothing of the batch | PF7, PF8, PF9 |
| decisions | Rebuilds what was decided from what the page transmitted, and says what is still missing | PF12, PF13, and the beginning of every other |
| presentation | Renders the state, collects the decisions, triggers the events | The view of every procedure; PF2 to PF5, which happen in the page |
What each one promises, which is the reason for the cutting:
Annotate does not select files. It receives a batch from its execution context and alters none of its files. In a local session, that context is the SPPAS workspace, or the files the person designates with the file chooser of the machine. In an online use, the batch results from files brought by the user to the service.
Annotate therefore depends on the provision of files, a service of swapp which has its own dossier, exactly as Convert does: a workspace holding the files to be treated and them only is handed, what is produced is added to it, and it is given back. The page of the desktop interface is given the workspace by its parent and sends it back when the annotations have been performed; this one asks the service, and gives back to the service.
Which files an annotation takes among those of the batch is not decided here: an annotation which takes two files finds them from the workspace and from what it declares.
What receives a request is not the controller. The WhakerPy response handles the URL, receives the GET or POST and the events it carries, calls the controller once for that request, and bakes the returned tree — either a full page or an update payload.
The façade AnnotateModel exposes the single interface the
application expects and delegates to four specialized sub-models.
ModelAnnotations holds the knowledge of the annotations. It
makes a sppasParam and reads its steps: for each annotation, its
key, its name, its description, its types, its languages, its references, how
far its development has gone and its options. It reads the kinds of output
file, their extensions and their default one from sppasFiles. It
gives the languages of the page, which are the languages of every annotation
put together, and it arranges a list by what its annotations require.
ModelPerformance performs T08. It names the report, fills a
sppasParam with what was decided, makes the progress, and starts
a thread in which sppasAnnotationsManager performs the
annotations, the merge option being given to it first. It holds the thread and
the progress, and nothing else: it says whether a performance is going, and
where it stands.
ModelReports lists the reports of the folder of the logs
— the text files whose name holds report —, reads one,
and deletes those it is named. Reading gives the lines as they were written,
each with the state it carries: a line which starts a result bears one of OK,
ERROR, WARNING, INFO and IGNORED, in the language of the interface, and that
word is what the state is read from.
ModelProvision is the only class which calls the provision of
files on files, as in Convert: files_for_app(),
lock(), release(), produced(),
address_of(), address_of_all(), and
finished.
The controller is called once per request. It rebuilds the current state
exclusively from the data transmitted to it. What carries that state is one
object, AnnotateRecord: the view serializes it and the controller
parses it back, and neither of them holds it between two requests.
Tasks:
Nine tasks for thirteen treatments. T02 to T05 happen in the page and make
no request RO8: what they decide is transmitted with perform.
T06 is handed to the service of the options, and T07 is the provision of
files'. update and complete are sent as the
Setup sends them: event_name carries the first, and
event_bake the second. The answer to update has
a status of 202 until the hundred is reached.
| Decision | Default | Reason |
|---|---|---|
| extension of a kind | the default extension of that kind | what the API says |
| language of the page | --- | no initiative |
| language of an annotation | the one its declaration holds, --- when it holds none | what the API says |
| annotation | not selected | no initiative |
| merge option | off | no initiative |
| panels shown | both locally; the six steps alone online | RO7 |
The WhakerPy response builds the whole HTML tree, and the structural elements
common to the application — head, header, nav, footer — are factored
there. The Annotate views build only the content of
body > main.
Annotate has one applicative view, AnnotateView, built from the
panels of the page of the desktop interface, which bear its names. They are
sections of one page.
ActionAnnotatePanel presents the six steps, each with its
title as the desktop interface writes it. Step 1: one choice of extension per
kind of output file. Step 2: the choice of the language of the page. Step 3: one
button per type, which shows the list of that type and says whether it holds a
selected annotation — an icon whose state has a text alternative. Step 4:
the container of the provision of files. Step 5: the merge option, and the
button which performs the annotations; that button is disabled as long as no
annotation is selected. Step 6: the button which shows
the checked report, disabled as long as no report is checked. It holds the
Reset button as well.
ReportsPanel presents, beside the six steps, the reports which
are kept: one radio button per report, named after its file, the last one
written at the top; and two buttons, one which deletes the checked report and
one which deletes all the others. Online, it is collapsed.
A group of three radio buttons stands above the two panels and says which of them are shown. It is the segmented control of Whakerexa the Journal uses, a native radio group: reaching it with the keyboard and hearing which one holds come from the buttons themselves and not from a script.
AnnotationsPanel presents the annotations of one type: a button
which comes back to the six steps, a title naming the type, then one
EnableAnnotation per annotation of that type, arranged by what
they require. There are three of them, one per type.
EnableAnnotation presents one annotation: what selects it, with
its name; what configures it; its references, one link each, telling a document
from a web page — or, when it has none and its development is known, a
gauge with its percent; the choice of its language, when it has language
resources; its description; and what it requires. An annotation which cannot be
performed on that machine is there, disabled.
LogAnnotatePanel presents the progress while the annotations
are performed, then the procedure outcome report: a button which comes back to
the six steps, the title, the name of the file of the report, then its lines,
each result bearing the class of its state. The state is in the text of the
line as well, so the color is never the only thing which says it. Online, a
link downloads the report, and another one the archive of every produced
file. Under the report, the Start over button annotates another batch with
the decisions already taken.
The container of the provision of files stands in the page as well. It is not a panel of Annotate: the response places it under the node it chose.
JavaScript is interface support. It shows and hides the sections. When the
language of the page is fixed, it sets the choice of each annotation. When an
annotation is selected or its language fixed, it says again which types hold a
selected annotation and which language the selected annotations hold, the
entry MIX included, and enables or disables the button which
performs. When she asks for the annotations to be performed, it sends the
fields of the form without reloading the page, shows the progress and asks at
regular intervals where the performance stands; when the hundred is reached, it
asks for the results and puts in the page what the server wrote. It creates no
HTML and holds no knowledge of the annotations.
/ marks what is derived and held by nobody. What the operations
promise is the chapter on the contracts.
| Class | From | Attributes | Operations |
|---|---|---|---|
AnnotateModel | the façade | — | annotations(), kinds(), languages(), batch(), start(batch, performance), is_performing(), progress(), reports(), read_report(name), delete_reports(names), address_of(filename), address_of_all(filenames) |
ModelAnnotations | module annotations | — | annotations(), kinds(), languages(), arranged(annotations) |
ModelPerformance | module performance | thread, progress | start(batch, performance), is_performing(), progress() |
ModelReports | module reports | — | reports(), read(name), delete(names) |
ModelProvision | module provision | — | batch(), lock(names), release(names), produced(workspace), address_of(filename), address_of_all(filenames), finished() |
Annotation | ANNOTATION, REQUIRES | key, name, description, types, languages, language, references, devel, requires, /can be performed | — |
Kind | KIND | kind, extensions, default | — |
Performance | PERFORMANCE, SELECTION, EXTENSION, VALUE | extensions, selected, lang, options, merge, report, /what is missing | what_is_missing(batch) |
ReportLine | REPORT | text, state | — |
| none | BATCH | The files are exposed by the provision of files, which names them already | |
What the core of SPPAS already holds is not held again here. Which
annotations there are and what each declares is sppasParam;
performing them is sppasAnnotationsManager; the kinds of output
file and their extensions are sppasFiles; the types are
annots.types; naming a report is sppasLogFile.
Annotation and Kind are what is read of them to be
shown, made at each request and kept by nobody.
What tells that an annotation cannot be performed on a machine is to be
named. The API raises an exception for it; which one, and where, is not
written here yet. Annotation carries the answer, and
ModelAnnotations is the only class to read again the day it is
named.
Performance.what_is_missing() is given the batch and does not
hold it: what may be missing is an annotation selected and a batch which is not
empty [031].
| Tie | Legs | What it is |
|---|---|---|
| holds | AnnotateModel 1 — 1 each of the four sub-models | A composition: the façade makes them, and nothing else reaches them |
| uses | ModelAnnotations → Annotation, Kind | A dependency: it makes them from the API, and keeps none |
| uses | ModelAnnotations → sppasParam, sppasFiles | A dependency: what is read of the API to be shown |
| uses | ModelPerformance → sppasParam, sppasAnnotationsManager, sppasLogFile | A dependency, and the only tie of this application to what performs annotations |
| holds | ModelPerformance 1 — 0..1 swappProgressBar | A composition: made when a performance starts, dropped when it has ended |
| uses | ModelPerformance → ModelProvision | A dependency: it locks, releases and gives back, in the thread |
| uses | ModelReports → ReportLine | A dependency: it makes them from a file, and keeps none |
| uses | ModelProvision → the provision of files | A dependency, and the only tie of this application to that domain |
To be read at yuml.me, class diagram.
[AnnotateModel|annotations();kinds();languages();batch();start();is_performing();progress();reports();read_report();delete_reports();address_of();address_of_all()]++1-1>[ModelAnnotations|annotations();kinds();languages();arranged()]
[AnnotateModel]++1-1>[ModelPerformance|thread;progress|start();is_performing();progress()]
[AnnotateModel]++1-1>[ModelReports|reports();read();delete()]
[AnnotateModel]++1-1>[ModelProvision|batch();lock();release();produced();address_of();address_of_all();finished()]
[ModelAnnotations]-.->[Annotation|key;name;description;types;languages;language;references;devel;requires;/can be performed]
[ModelAnnotations]-.->[Kind|kind;extensions;default]
[ModelAnnotations]-.->[sppasParam]
[ModelAnnotations]-.->[sppasFiles]
[ModelPerformance]++1-0..1>[swappProgressBar]
[ModelPerformance]-.->[sppasParam]
[ModelPerformance]-.->[sppasAnnotationsManager]
[ModelPerformance]-.->[sppasLogFile]
[ModelPerformance]-.->[ModelProvision]
[ModelReports]-.->[ReportLine|text;state]
| Class | Operations | What it shows |
|---|---|---|
AnnotateView | populate_tree_content(record), section, info | The page, and the panels it holds. It is the module presentation: what is shown, and nothing of what it means |
ActionAnnotatePanel | — | The six steps: the extensions, the language of the page, one button per type, the merge option and what performs, what shows the checked report; and the Reset button |
ReportsPanel | — | Locally, the reports which are kept, one of them checked at most, and the two buttons which delete. Collapsed online |
AnnotationsPanel | — | The annotations of one type, arranged by what they require |
EnableAnnotation | — | One annotation: what selects it, what configures it, its references or how far its development has gone, its language, its description, what it requires. Disabled when it cannot be performed on that machine |
LogAnnotatePanel | — | The progress, then the procedure outcome report: the name of its file and its lines, each with its state. Online, a link to the report and one to the archive. Under the report, the Start over button |
| Tie | Legs | What it is |
|---|---|---|
| holds | AnnotateView 1 — 1 ActionAnnotatePanel, 1 ReportsPanel, 1 LogAnnotatePanel | A composition: a panel builds one part of one page and exists for it |
| holds | AnnotateView 1 — 3 AnnotationsPanel | A composition: one per type |
| holds | AnnotationsPanel 1 — 0..n EnableAnnotation | A composition: one per annotation of that type |
| uses | AnnotateView → AnnotateRecord | A dependency: it is given it and builds from it |
[AnnotateView|section;info|populate_tree_content()]++1-1>[ActionAnnotatePanel]
[AnnotateView]++1-1>[ReportsPanel]
[AnnotateView]++1-3>[AnnotationsPanel]
[AnnotateView]++1-1>[LogAnnotatePanel]
[AnnotationsPanel]++1-0..*>[EnableAnnotation]
[AnnotateView]-.->[AnnotateRecord]
| Class | Attributes | Operations |
|---|---|---|
AnnotateController | record | is_a_task(events), handle(request_data), progress(), say_what_is_missing(), populate_view() |
AnnotateRecord | task, performance, checked report, to_be_shown | serialize(), parse(data), show(key, value) |
AnnotateResponseRecipe | — | bake(), _process_events() |
AnnotateController is the module decisions: what a
request transmits, and which task it carries.
The response of WhakerPy is named here
AnnotateResponseRecipe. It holds the model, which holds the
performance which is going, and the manager of the provision of files, which
that service requires an app to hold between two requests. It answers the
progress alone; it answers the tasks of this application first, and offers what
it does not recognize to the manager, consumes(); it places its
container in the page, populate_view() then
container(); it asks it whether the person said the workspace is
ready, is_ready(); and it asks it to start over when she resets or
asks for another batch, start_over().
| Tie | Legs | What it is |
|---|---|---|
| holds | AnnotateResponseRecipe 1 — 1 AnnotateView, 1 AnnotateController | A composition: it builds them, and they go when it goes |
| holds | AnnotateResponseRecipe 1 — 1 the manager of the provision of files | Held between two requests, as that service requires |
| holds | AnnotateController 1 — 1 AnnotateRecord | A composition: one record per request, made by the controller and kept by nobody |
| holds | AnnotateRecord 1 — 1 Performance | A composition: what was decided lives inside what one request carries |
| uses | AnnotateController → AnnotateModel | A dependency: it calls the façade, once per request |
| uses | AnnotateController → AnnotateView | A dependency: it hands it what to build from |
[AnnotateResponseRecipe|bake();_process_events()]++1-1>[AnnotateController|record|is_a_task();handle();progress();say_what_is_missing();populate_view()]
[AnnotateResponseRecipe]++1-1>[AnnotateView]
[AnnotateController]++1-1>[AnnotateRecord|task;performance;checked report;to_be_shown|serialize();parse();show()]
[AnnotateRecord]++1-1>[Performance|extensions;selected;lang;options;merge;report;/missing|what_is_missing()]
[AnnotateController]-.->[AnnotateModel]
[AnnotateController]-.->[AnnotateView]
| State | When | What is shown |
|---|---|---|
| disabled | It cannot be performed on that machine | Its line, disabled; nothing of it can be set |
| not selected | Nothing was said of it | Its line, and what selects it |
| selected | It is to be performed | Its line, that it is selected, and its language; the button of each of its types says a selected annotation is there |
Three states and no more. An annotation which is selected without a language, or without what it requires, is selected: neither is a state, and neither is a mistake. C5, C6
| State | When |
|---|---|
| none | No thread is alive: the page shows the six steps |
| going | The thread is alive: the page shows the progress, and nothing which starts anything |
| ended | The thread is no longer alive: the page shows the report |
A line of a report which states a result has one of five states: OK, ERROR, WARNING, INFO or IGNORED. They are the API's, and the line is what carries them. A line which states no result has no state.
Steps 3 to 5 happen in any order, and any of them may happen twice. The only thing which requires them is step 6.
| Level | What happens | What is done |
|---|---|---|
| 1 | What was asked cannot be done now: no annotation selected, an empty batch, a performance already going | No treatment runs, and what is missing or what stands in the way is said [022]. It is not an error and nothing is raised |
| 2 | One annotation is concerned: it failed | Nothing of this application's: the API writes it in the report, with the state of the line which says it, and goes on to the next |
| 3 | A report cannot be read, or cannot be deleted | It is said, with the reason; a report which cannot be deleted stays in the list, and the others are deleted all the same |
| 4 | Whoever runs the machine has to know: the annotations cannot be read, a performance cannot be started | Said where he reads it, and the person is told that the annotations could not be performed |
What is raised is caught by the response which answers the request, and by nothing below it. What an annotation writes about its own difficulties is not an error of this application: it is what that annotation said, and it is shown as such.
pre is what has to be true on the way in, and what the operation does not check; post is what the caller can count on without looking. The treatments state their preconditions for one treatment; these state them for one operation, and the two say the same thing at two levels.
ModelPerformance has the API perform annotations, and
only ModelAnnotations reads what an annotation declares.ModelReports touches a report, and it writes none.ModelProvision calls the provision of files on
files.| Operation | Contract |
|---|---|
| Give the annotations | pre: none. post: every annotation the API declares, each with what it declares and whether it can be performed on that machine; none is left out. C7, C8 |
| Give the kinds of output file | pre: none. post: every kind which has at least one extension, with its extensions and its default one. C1, C2 |
| Give the languages of the page | pre: none. post: every language at least one annotation has resources for, each of them once |
| Give the batch | pre: none. post: the workspace the provision of files hands, possibly empty. C11 |
| Start a performance | pre: a batch which is not empty, at least one annotation selected. post: a performance is going, and it is answered without waiting for it; when one was going already, nothing is started and it is said. C12, C13 |
| Say whether a performance is going | pre: none. post: true while the thread which performs is alive, false otherwise |
| Give the progress | pre: none. post: the percent, the header and the text the API set; the hundred, and nothing else, when no performance is going. C18 |
| Give the reports | pre: none. post: the names of the reports which are kept, the last one written first; empty when there are none, and empty online. C22 |
| Read a report | pre: the name of a report. post: its lines as they were written, each with its state or with none. C19 |
| Delete reports | pre: names of reports. post: those which could be deleted are gone, the names of the others are given back, and nothing else was touched. C21 |
| Give the address of a produced file, or of all of them | pre: names of produced files. post: what the provision of files answers; empty where the person reaches them where they stand. C23 |
| Operation | Contract |
|---|---|
| Give the annotations | pre: none. post: one Annotation per step of a sppasParam, in the order of the API, holding what that step answers and nothing this application wrote. The references are given with their address; how far the development has gone is given between 0 and 100. C8 |
| Give the kinds | pre: none. post: what sppasFiles answers, relayed; a kind which has no extension is not given. C2 |
| Give the languages | pre: none. post: the languages of every annotation put together, each of them once |
| Arrange a list | pre: annotations, each with what it requires. post: those annotations and no others, each standing after every one of the list it requires; an annotation whose requirement is not in the list keeps its place. It reads nothing and changes no performance. C9 |
Arranging is the one operation of this application which rests on nothing installed: what it is given comes back, in another order, nothing added and nothing removed.
| Operation | Contract |
|---|---|
| Start | pre: the preconditions of the performance are verified. post: the report is named, under a name no report bore before, and the name of the next one is prepared; a sppasParam holds what was decided and that only — the selected annotations activated and no other, the language and the options of each, the extensions, the workspace, the name of the report; the progress is made; the batch is locked; a thread is started, and the name of the report is given back. Raises when a performance is going. C13, C14, C17 |
| What the thread does | pre: started. post: the merge option was given to the API, then the annotations were performed in the order of the API; whatever each of them did, the batch is released, what was produced is given back, and that it has finished is said. C15, C16 |
| Say whether a performance is going | pre: none. post: true while the thread is alive |
| Give the progress | pre: none. post: what the API set on the progress it was given; nothing is counted here. C18 |
| Operation | Contract |
|---|---|
| Give the reports | pre: none. post: the names of the text files of the folder of the logs whose name holds report, and no other file of that folder |
| Read a report | pre: the name of a report, without its path. post: one ReportLine per line, in the order of the file; a line which states a result bears its state, any other bears none; nothing is counted and nothing is decided from it. Raises when the file cannot be read. C19 |
| Delete reports | pre: names of reports, without their path. post: each of them is deleted on its own, and one which cannot be does not keep the others from being; the names of those which are left are given back. No file which is not a report is deleted. C21 |
| Operation | Contract |
|---|---|
| Give the batch | pre: none. post: the workspace the provision of files hands, holding the files to be treated and them only, possibly empty; the workspace of the person never reached. C11 |
| Lock and release | pre: files of the batch. post: they are locked while the annotations are performed, and released when they have been; none is still locked afterward |
| Give back what was produced | pre: the annotations have been performed. post: what was written is in the workspace which was handed, that workspace is given back, and that the batch has been treated is said. C23 |
| Give an address | pre: the name of a produced file, or of several. post: what the provision of files answers, relayed. C23 |
| Operation | Contract |
|---|---|
| Say what is missing | pre: a batch is given to it. post: an annotation when none is selected, the batch when it is empty, nothing when the annotations may be performed. It holds no batch. C12 |
| Serialize a record | pre: none. post: everything a next request needs in order to rebuild what was decided, and nothing of the machine |
| Parse a record | pre: what a page transmitted. post: what was decided as it was, or the defaults when nothing was transmitted. An annotation is selected only if it was transmitted as such: selecting one selects no other. Parsed twice, it gives the same. C1, C6, C24 |
| Put what is to be shown | pre: none. post: it is in what is to be shown, and it is never serialized |
| Operation | Contract |
|---|---|
| Handle a request | pre: called once for that request. post: the record is rebuilt from what was transmitted; the language transmitted for an annotation is kept only if that annotation has it, and a disabled annotation is never selected; the task is identified, its preconditions are read; the treatment ran, or none ran and what is missing or stands in the way is stated. C3, C5, C7 |
| Say whether events carry a task | pre: none. post: true when the events carry a task of this application |
| Give the progress | pre: none. post: the percent, the header and the text, as the model gives them |
| Have what is missing said again | pre: the request was handled, and the provision of files says the workspace is ready. post: what is still missing is put in the dialog of information when the view is populated |
| Populate the view | pre: the request was handled. post: the view has the record; locally it holds the reports, online it holds none. C22 |
| Operation | Contract |
|---|---|
| Populate the tree | pre: a record. post: a tree holding what that record says and nothing more. Every field of a decision belongs to the form of the performance, wherever it stands in the page. C10 |
| Give the section and what was said | pre: the tree was populated. post: the section of this application as it was built, and the text put in the dialog of information, empty if nothing was |
ActionAnnotatePanel | post: the six steps, in their order and with their titles; one choice per kind of output file, the extension which holds selected; the choice of the language of the page; one button per type, saying whether it holds a selected annotation; the merge option; the button which performs, disabled when no annotation is selected; the button which shows the checked report, disabled when none is; the Reset button |
ReportsPanel | post: locally, one radio button per report, at most one checked, and the two buttons which delete; online, collapsed and empty. C20, C22 |
AnnotationsPanel | post: the button which comes back, the title naming the type, and one EnableAnnotation per annotation of that type, in the order it was given them |
EnableAnnotation | post: the annotation it stands for, as it declares itself: what selects it, what configures it, one link per reference or the gauge of its development or neither, the choice of its language when it has language resources and no choice otherwise, its description, what it requires. Disabled when the annotation cannot be performed on that machine. C7, C8 |
LogAnnotatePanel | post: the progress while a performance goes; then the name of the file of the report and its lines, each result bearing its state; that the report is not available, with the reason, when it could not be read; online, the link to the report and the link to the archive; under the report, the Start over button. C19, C23 |
| Operation | Contract |
|---|---|
| Answer the events | pre: the events of a request. post: the progress is answered alone, with a status of 202 until the hundred is reached; the tasks of this application are answered first; the rest is offered to the provision of files, and when it says the workspace is ready, what is still missing is said again; the provision of files is asked to start over on a reset and on another batch |
| Bake | pre: a request, carrying a task or carrying none. post: the tree of the page, or the payload of an update, holding the container of the provision of files |
One place each. A constraint held in two would be a constraint held in neither.
| No. | Held by |
|---|---|
| C1 | AnnotateRecord, which gives a kind its default extension when none was transmitted |
| C2 | ModelAnnotations, giving the kinds |
| C3 | AnnotateController, which keeps a language only if the annotation has it |
| C4 | The page: the script sets the choices EnableAnnotation wrote, and an annotation which has no language resource has no choice to set |
| C5 | AnnotateController, which takes no selection back and disables nothing for a language |
| C6 | AnnotateRecord, parsing: what is selected is what was transmitted as such |
| C7 | ModelAnnotations, which says it of each annotation; EnableAnnotation shows it |
| C8 | EnableAnnotation, which writes nothing of its own |
| C9 | ModelAnnotations, arranging a list |
| C10 | AnnotateView, which ties every field of a decision to the form of the performance; the script sends that form and nothing before |
| C11 | ModelProvision, which is what reads the batch |
| C12 | Performance, saying what is missing, read by AnnotateController before it starts anything |
| C13 | ModelPerformance, which starts nothing while its thread is alive; AnnotateController reads it before a reset or another batch |
| C14 | ModelPerformance, which fills its own sppasParam when it starts and is given nothing afterward |
| C15 | ModelPerformance, which hands the whole to the API and orders nothing |
| C16 | The API; ModelPerformance stops nothing |
| C17 | ModelPerformance, naming the report |
| C18 | ModelPerformance, giving the progress |
| C19 | ModelReports, reading a report; LogAnnotatePanel shows it as it was given |
| C20 | ReportsPanel, whose reports are one group of radio buttons |
| C21 | ModelReports, deleting reports |
| C22 | AnnotateController, which gives the view no report when the server is not the local one |
| C23 | ModelProvision |
| C24 | AnnotateRecord, and AnnotateController, which keeps nothing after the request |
| C25 | The page: no field carries which section is shown |
C4, C10 and C25 are held by the page. They are what [1005] costs: a decision which makes no request is a decision the server does not see until the performance is asked for, and what it then reads is checked again — C3, C6 and C7 are that check.
Thirty-eight tests: thirty-three for the sub-models and what was decided, and five for the view. The controller is not covered here and is owed.
| No. | What is checked | What it holds |
|---|---|---|
| TE1 | What comes back is what was given: not one annotation added, not one removed | The contract of arranging |
| TE2 | An annotation stands after every annotation of the list it requires | C9 |
| TE3 | An annotation whose requirement is not in the list is in the list all the same | C9 |
| TE4 | A chain of three is arranged the same way whatever order it was given in, the reverse included | C9 |
| TE5 | A requirement which names no annotation changes nothing of the arrangement | C9 |
| TE6 | The same list given twice is arranged the same way | The contract of arranging |
| No. | What is checked | What it holds |
|---|---|---|
| TE7 | Every annotation the API declares is given, and no other | [308], C7 |
| TE8 | What is given of an annotation is what it declares: its name, its description, its types, its languages, its references, how far its development has gone | C8 |
| TE9 | An annotation which has two types is given for each of them | [301] |
| TE10 | A kind of output file which has no extension is not given; the default extension of a kind is one of its extensions | C1, C2 |
| TE11 | The languages of the page are those of every annotation put together, each of them once | [201] |
| TE12 | What an annotation requires is read from its declaration, and one which declares none requires nothing | [307] |
| TE13 | An annotation which cannot be performed on that machine is given all the same, and said so | C7 |
TE12 fails until the field is read. It is written that way on purpose: this test is what says whether the extension of the annex was made.
| No. | What is checked | What it holds |
|---|---|---|
| TE14 | What is missing is an annotation when none is selected, the batch when it is empty, and nothing when the annotations may be performed | C12 |
| TE15 | A record parsed twice gives the same decisions; nothing transmitted gives the defaults | C1, C24 |
| TE16 | An annotation transmitted as selected, with no language, is selected | C5 |
| TE17 | Selecting an annotation which requires another selects that one only | C6 |
These need annotations to perform, and the ones they perform are written for the tests: one which writes a file, one which fails, one which takes its time. What is tested is this application, never an annotation of SPPAS.
| No. | What is checked | What it holds |
|---|---|---|
| TE18 | Starting answers before the performance has ended, and the performance goes on after the answer | RO5 |
| TE19 | A second start while one is going is refused | C13 |
| TE20 | What is handed to the API holds every selected annotation activated, and no other | C6, C14 |
| TE21 | What is decided after the start does not change what that performance is performed with | C14 |
| TE22 | An annotation which fails stops nothing: the performance reaches its end, and the report holds both | C16 |
| TE23 | While a performance goes, the progress is what the API set; when none goes, it is the hundred | C18 |
| TE24 | Two performances write two reports, and the second one replaces nothing of the first | C17 |
| No. | What is checked | What it holds |
|---|---|---|
| TE25 | The reports given are the text files whose name holds report, and no other file of the folder | [701] |
| TE26 | A line which states a result bears its state, for each of the five; a line which states none bears no state | C19 |
| TE27 | A report which is not there is said so, and nothing is given in its place | [604] |
| TE28 | Deleting reports deletes those which were named, and no other file | C21 |
| TE29 | A report which cannot be deleted does not keep the others from being, and its name is given back | T11 |
| No. | What is checked | What it holds |
|---|---|---|
| TE30 | The batch is the workspace the provision of files hands, empty when nothing is checked, and the workspace of the person has not moved | C11 |
| TE31 | The files of the batch are locked while the annotations are performed, and none is still locked afterward | T08 |
| TE32 | What was produced is given back once, when the annotations have been performed, and not at each of them | T09 |
| TE33 | Online, the report is among what the archive holds | [803], C22 |
| No. | What is checked | What it holds |
|---|---|---|
| TE34 | Every field of a decision belongs to the form of the performance: the extensions, the languages, the selections, the merge option | C10 |
| TE35 | The page holds one list per type, and an annotation which has two types is in both | [301] |
| TE36 | An annotation which cannot be performed on that machine is in the page, disabled | C7 |
| TE37 | Online, the panel of the reports is collapsed and holds no report | C22 |
| TE38 | The page of a first request has no annotation selected, the button which performs disabled, and the default extension of each kind selected | [012] |
MIX appears and goes, and that
the sections are shown and hidden, is checked in a browser and not here.Six of the thirty-eight need nothing at all, eleven need nothing but the API, seven need annotations written for the tests, five need a disk, four need the neighbouring domain, and five the view.
They stand where the project puts its own: in tests/swapp/,
which follows the shape of the sources.
One extension is required by this document, and it is required by [307] alone.
| What | The identifier of the annotation which has to have been performed before, carried by the declaration of an annotation and read with the rest of it. |
|---|---|
| Why | The field is already written in the declarations — the phonetization says it requires the text normalization, the alignment says it requires the phonetization, the time group analysis says it requires the syllabification — and what reads a declaration does not read it. It reads the identifier, the name, the description, the type, the interface to run, the references, the degree of development, the options and the resources, and it passes over that one field. [307] asks for a value which is written and never loaded. |
| Bound to | What an annotation requires — Requirements. Requirement [307]. |
| What it costs | One field read where the others are read. Nothing of what exists changes, and an annotation which declares nothing there requires nothing, which is what most of them say already. |
| What it is not | It says what has to have been performed before, and never what will be made of an annotation afterward: what follows one is read on the others. |
| Note | What is written there is not all sound. One declaration names a requirement which no annotation bears, and one writes a requirement with a mark in front of it which no other has. Both are read the day the field is read, and neither is settled here. |
For contrast, and to bound the extension above, the following are available and require nothing [API-OK]:
sppasParam;sppasAnnotationsManager;sppasFiles;annots.types;sppasLogFile.This annex is the page itself: the HTML the application writes, styled by Whakerexa. What is unreadable here will be unreadable there.
It shows the page the person arrives on: the six steps on the left, the reports on the right, and above them what says which of the two panels is shown — the same three radio buttons as the page of the Journal, written the same way. The fourth step is the files, the container of the provision of files: they are given after the decisions, and before what uses them. What that container holds is written by its service, and is not drawn here.
It shows one state: SPPAS on the machine of the person, two kinds of file which can be written, no annotation selected, and two reports kept. The names of the reports and the languages are examples.
Step 1: choose the output file format(s) |
|
Step 2: fix the language(s) |
|
Step 3: select and configure annotations |
|
Step 4: add files |
|
Step 5: perform the annotations |
No annotation is selected. |
Step 6: read the procedure outcome report |
No report is checked. |