Changeset 34235 for main/trunk
- Timestamp:
- 2020-07-01T11:27:47+12:00 (4 years ago)
- Location:
- main/trunk/gli/src/org/greenstone/gatherer
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r34205 r34235 1294 1294 } 1295 1295 } 1296 1296 1297 /** 1298 * In the case of a remote GS, this method takes care of reuploading a modified mds file after its 1299 * Metadata Set has been edited. 1300 * This method is mostly a copy of importMetadataSet() above, except no need to handle the hidden.mds 1301 * file as that should not even have been made available for editing in GLI. 1302 * Nor any need for MetadataSetManager.loadMetadataSet(File) as that was already done by the caller, 1303 * MetadataSetDialog.EditButtonListener.actionPerformed(). 1304 */ 1305 public void updateMetadataSet(MetadataSet external_metadata_set) { 1306 try { 1307 File external_metadata_set_file = external_metadata_set.getMetadataSetFile(); 1308 File metadata_set_file = new File(getLoadedCollectionMetadataDirectoryPath(), external_metadata_set_file.getName()); 1309 // If we're using a remote Greenstone server, upload the metadata file 1310 if (Gatherer.isGsdlRemote) { 1311 Gatherer.remoteGreenstoneServer.uploadCollectionFile(collection.getGroupQualifiedName(false), metadata_set_file); 1312 } 1313 } 1314 catch (Exception exception) { 1315 DebugStream.printStackTrace(exception); 1316 } 1317 } 1318 1297 1319 1298 1320 /** Determine if we are currently in the middle of importing (and thus, in this case, we can't allow the log writer to exit). Boy was this a mission to track down. The cascade of crap rolls out something like this: Joe Schmo clicks 'Build Collection', which calls the importCollection() method above, which in turn saves the collection with a saveTask, which fires a collectionChanged message once its finished, which drives the list of logs shown on the create pane to update, which fires a itemChanged() event to the OptionsPane who dutifully tells the current log writer thread to finish up writing (all zero lines its been asked to write) and then die. Wereapon Joe Schmo gets a pretty log to look at, but it isn't actually being written to file so the next time he tries to view it faeces hits the air motion cooling device. Joy. -
main/trunk/gli/src/org/greenstone/gatherer/gui/MetadataSetDialog.java
r34233 r34235 152 152 MetadataSet edited_metadata_set = (MetadataSet) current_set_list.getSelectedValue(); 153 153 MetadataSetManager.unloadMetadataSet(edited_metadata_set); 154 // If we can make that assumption for a local GLI, then we can make it for a client-GLI too: 155 // assume mds file was edited and reupload to the remote server 156 Gatherer.c_man.updateMetadataSet(edited_metadata_set); // takes care of remote case 154 157 MetadataSetManager.loadMetadataSet(edited_metadata_set.getMetadataSetFile()); 155 158 sets_changed = true;
Note:
See TracChangeset
for help on using the changeset viewer.