webanno
webanno copied to clipboard
Revise default states and state changes in remote API
The default state when data is uploaded through the remote API presently does not make sense in all cases. Also, the annotation state and source document state are connected with each other and when changing the state of annotations, adding new annotations, or deleting annotations, then the source document state needs to be updated as well.
| Annotation State | Curation State | Document State |
|---|---|---|
| all NEW | NEW | NEW |
| any IN-PROGRESS | NEW | ANNOTATION-IN-PROGRESS |
| all COMPLETE | NEW | ANNOTATION-COMPLETE |
| any | IN-PROGRESS | CURATION-IN-PROGRESS |
| any | COMPLETE | CURATION-COMPLETE |
The document state must be updated whenever an action happens that could potentially affect it:
- change of annotation state through the UI or remote API
- upload of annotation through remote API
- deletion of annotation through remote API
- change of curation state through the UI or remote API
- upload of curation through remote API
- deletion of curation through remote API