Details
-
Type: Improvement
-
Status: To-Do (View Workflow)
-
Priority: Major
-
Resolution: Unresolved
-
Affects Version/s: None
-
Fix Version/s: None
-
Labels:None
-
Story Points:2
-
Epic Link:
-
Sprint:Spring 1 2021 Mar 22 - Apr 2, Spring 2 2021 Apr 5 - Apr 16
Description
Situation: When using the QuickLoad Saver app, a user saves a quickload folder to their local system. If the user creates one quickload, and then attempts to create another quickload using the same quickload folder, the files are added to the quickload. This is good, as quickloads are meant to contain many genomes/files. However, the contents.txt needs to be appended to as well, but currently it is being overwritten.
Task: Append to the contents.txt file instead of overwriting it when a user uses Quickload Saver to save a quickload on top of a quickload.
Note: To test, follow the instructions here but save the T Rex genome to the Unicorn quickload.
Attachments
Issue Links
- relates to
-
IGBF-510 Create Quickload Saver IGB app
- Closed
Most of my work for this ticket has been in CreateQuickloadAction.java at around lines 118-144
In a nutshell the class takes a string of the genome name and description before putting them both into a hashmap, along with the genome builder. The contents of the hashmap will be what will be written into the file on output.
A folderpath variable containing the user's selected folder path
From there, a for loop the size of the hashmap's size will be created in which it will append the genome's name onto the filepath.
My main solution was to place a if conditional within the for loop that checks if the user is selecting an already existing quickload directory with (presumably) its own contents.txt file. If that case is true, then it will instead have the bufferedwriter append the map.get(quickloadFiles[i]) onto a new line just below the final line of the existing contents.txt's contents. My last roadblock was trying to implement a way for the program to tell where the last line of an exisiting content ends. And there is the question of how to ensure there are no duplicate entries in case someone is slecting the same quickload.
There is documentation for an append method with the bufferedwriter.
Will pause work on this ticket for now.