Uploaded image for project: 'IGB'
  1. IGB
  2. IGBF-2822

Edit don't over-write contents.txt in Quickload Saver

    Details

    • Type: Improvement
    • Status: To-Do (View Workflow)
    • Priority: Major
    • Resolution: Unresolved
    • Affects Version/s: None
    • Fix Version/s: None
    • Labels:
      None

      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

            Activity

            Hide
            ann.loraine Ann Loraine added a comment -

            The data should be added but not necessarily appended. We should not have the same line repeated multiple times.

            Show
            ann.loraine Ann Loraine added a comment - The data should be added but not necessarily appended. We should not have the same line repeated multiple times.
            Hide
            inaylor Irvin Naylor (Inactive) added a comment -

            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.

            Show
            inaylor Irvin Naylor (Inactive) added a comment - 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.

              People

              • Assignee:
                Unassigned
                Reporter:
                nfreese Nowlan Freese
              • Votes:
                0 Vote for this issue
                Watchers:
                3 Start watching this issue

                Dates

                • Created:
                  Updated: