Version 4 (modified by mitex, 16 years ago) (diff) |
---|
Analysis
Overview
The goal of this task is to provide persistence of stickies.
Task requirements
- The user should be able to persist annotation sets.
- Annotation sets are resources which can contain stickies, highlights and audio annotations. Currently only stickies are implemented.
- Annotation sets should be persisted in zip files, just like Sophie books are saved (which are resources too).
- "All annotations" palette should contain the following buttons:
- Import Annotations...
- When clicked, a file dialog for zip files is opened.
- If the file is not a valid annotation set, an error message is displayed ("Invalid file.").
- If the annotation set does not refer to current book, an error message is displayed ("These annotations does not refer current book").
- The annotation set is loaded in current book's window (not added in the book).
- The annotation set is set as current for current book.
- Export Annotations...
- When clicked, a file dialog for zip files is opened.
- If a file name is selected, current annotation set for current book is stored in the selected file.
- If an error occurs, for example user wants to save on read-only media, an error message is displayed.
- Import Annotations...
Task result
- Source code.
Implementation idea
- Create a FileDialogInput for zip files and use the DialogManager to display the dialog.
- Create a persister between AnnotationSet and Storage.
- Use ZipPackagePersister to persist between Storage and zip files.
Related
How to demo
- Open Sophie.
- Create two stickies.
- Save the annotation set to a file.
- Close the annotation set (using the Close Extra button). The stickies should disappear.
- Open the annotation set from a file and check if the stickies are displayed again.
Design
(Describe your design here.)
Implementation
(Describe and link the implementation results here (from the wiki or the repository).)
Testing
(Place the testing results here.)
Comments
(Write comments for this or later revisions here.)