Ignore:
Timestamp:
2020-07-11T23:32:49+12:00 (4 years ago)
Author:
ak19
Message:

Option in GLI file menu to Export collection meta to CSV (new CSV file or add to existing). Uses apache commons CSV, so had to include the csv subfolder of commons into apache.jar, where all other apache jars used by GLI are bundled into. Updated the gli/lib/README about this.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java

    r34247 r34263  
    6767import org.greenstone.gatherer.util.Utility;
    6868
     69import org.greenstone.gatherer.metadata.MetadataToCSV;
    6970     
    7071/** The GUIManager is in charge of creating the Gatherer window frame then filling it with the goodness of the view panes. GUIManager not only creates these panes, but allows some messaging between them. Furthermore GUIManager includes functionality from menu driven choices, simply as it was easier to put it here once and have it accessible from all pane children. */
     
    197198        eap.destroy();
    198199        eap = null;
     200    }
     201    else if (esrc == menu_bar.file_exportmeta) {
     202        String currCollName = Gatherer.c_man.getCollection().getName();
     203        String collection_directory_path = CollectionManager.getCollectionDirectoryPath(currCollName);
     204       
     205        String importDir = collection_directory_path + File.separator + "import";
     206        File selectedFile = MetadataToCSV.chooseMetaCSVFile(importDir, this);
     207        if(selectedFile != null) {
     208        MetadataToCSV toCSV = new MetadataToCSV(collection_directory_path, selectedFile);
     209        //toCSV.printOrderedCollectionMeta();       
     210        toCSV.exportGLIMetaToCSV(new File(importDir, "metadata.csv"));
     211        }
    199212    }
    200213    else if (esrc == menu_bar.file_exit) {
Note: See TracChangeset for help on using the changeset viewer.