- Timestamp:
- 2020-07-23T13:41:08+12:00 (4 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/gui/GUIManager.java
r34264 r34283 199 199 eap = null; 200 200 } 201 else if (esrc == menu_bar.file_exportmeta || esrc == menu_bar.file_ movemeta) {201 else if (esrc == menu_bar.file_exportmeta || esrc == menu_bar.file_convertmeta) { 202 202 String currCollName = Gatherer.c_man.getCollection().getName(); 203 203 String collection_directory_path = CollectionManager.getCollectionDirectoryPath(currCollName); 204 204 205 205 String importDir = collection_directory_path + "import"; 206 File csvFile = MetadataToCSV.chooseMetaCSVFile(importDir, this); 206 207 boolean convertMode = false; 208 String startDir = collection_directory_path; 209 if(esrc == menu_bar.file_convertmeta) { 210 startDir = importDir; 211 convertMode = true; 212 } 213 214 File csvFile = MetadataToCSV.chooseMetaCSVFile(startDir, convertMode, this); 207 215 if(csvFile != null) { 208 216 MetadataToCSV toCSV = new MetadataToCSV(collection_directory_path, csvFile); 209 217 210 218 boolean success = false; 211 if(esrc == menu_bar.file_ movemeta) {212 success = toCSV. moveMetaXMLToCSV(csvFile, this);219 if(esrc == menu_bar.file_convertmeta) { 220 success = toCSV.convertMetaXMLToCSV(csvFile, this); 213 221 } else { 214 222 success = toCSV.exportMetaXMLToCSV(csvFile); … … 216 224 217 225 // refresh coll view if meta.csv was created somewhere inside this coll's import folder 218 // And for remote case, also upload any new file that's inside import dir to server 219 if(success && csvFile.exists() && csvFile.getAbsolutePath().startsWith(importDir)) { 226 // And for remote case, also upload any new file that's inside collection dir 227 // (especially import dir) to server 228 if(success && csvFile.exists() && csvFile.getAbsolutePath().startsWith(collection_directory_path)) { 220 229 if(Gatherer.isGsdlRemote) { 221 230 Gatherer.remoteGreenstoneServer.uploadFilesIntoCollection(currCollName, new File[] {csvFile}, csvFile.getParentFile());
Note:
See TracChangeset
for help on using the changeset viewer.