Uploaded image for project: 'DSpace'
  1. DSpace
  2. DS-2204

Consolidate/Clean Batch Import UI code

    XMLWordPrintable

    Details

    • Type: Improvement
    • Status: Closed (View Workflow)
    • Priority: Minor
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 5.0
    • Component/s: None
    • Labels:
      None
    • Attachments:
      0
    • Comments:
      2
    • Documentation Status:
      Needed

      Description

      Hi Kostas,

      We / I have merged your JSPUI based Batch Import PR, and I modified my XMLUI based Batch Import PR to work properly, then merged that in. So, we have code for each UI (XMLUI, JSPUI), and then in ItemImport.java, I think we're each taking slightly different approaches. I'm wondering if there is room to consolidate/clean up this code a bit. This wouldn't be as a "New Feature", but rather improvement, so we're not too bound by the feature freeze to clean this code.

      I've started at a branch I've just put up at: https://github.com/peterdietz/DSpace/commits/itemimport-cleanup

      I have an unzip(File) method, that I've changed your code to re-use. And then I've renamed your methods to indicate which one for SAF and which one for BTE. I would say the blocker I have from doing much of anything more, is that my approach doesn't assume that the user gives a URL to the saf.zip file, so I'll need to refactor processSAFUIImport(...), so that it's not expecting a URL. I don't want to duplicate the code in that method. Maybe have a different method
      processSAFUIImport(URI uri, ...) {
      File file = fetchURI(uri);
      return processSAFUIImport(file, ...);
      }

      So then you have processSAF(URI) and processSAF(File) without duplicating code.

        Attachments

          Issue Links

            Activity

              People

              Assignee:
              peterdietz Peter Dietz
              Reporter:
              peterdietz Peter Dietz
              Votes:
              0 Vote for this issue
              Watchers:
              3 Start watching this issue

                Dates

                Created:
                Updated:
                Resolved: