- Timestamp:
- 2004-10-13T14:48:20+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/SaveCollectionTask.java
r8243 r8313 43 43 import org.greenstone.gatherer.DebugStream; 44 44 import org.greenstone.gatherer.Gatherer; 45 import org.greenstone.gatherer.metadata.MetadataSetManager; 45 46 import org.greenstone.gatherer.util.Utility; 46 47 … … 66 67 static final private int COPY_COLLECTION = 4; 67 68 static final private int MAKE_COLLECTION = 5; 68 static final private int METADATA_SAVED = 6;69 static final private int METADATA_XML_SAVED = 7;70 69 static final private int OPEN_COLLECTION = 8; 71 70 static final private int RESTORE_COLLECTION = 9; … … 112 111 // spd.setMillisToDecideToPopup(100); 113 112 // spd.setMillisToPopup(100); 114 // 0. Force all remaining metadata.xml files to load. 113 115 114 // 1. Perform a regular collection save on what we will later refer to as the origin collection. 116 115 ///ystem.err.println("1. Save origin."); … … 119 118 args[0] = collection.getName() + ".col"; 120 119 try { 121 // Block until all of the metadata files have been read in.122 collection.gdm.waitUntilComplete();123 // Write out the metadata xml files. The destroy below is meant to do this, but never does.124 collection.gdm.save();125 // spd.setProgress(getValue(METADATA_XML_SAVED));126 127 120 File file = new File(tmp_loc); 128 121 // Create backup … … 131 124 backup.deleteOnExit(); 132 125 if(!file.renameTo(backup)) { 133 DebugStream.println("Error in CollectionManager.load(): FileRenamedException");126 DebugStream.println("Error in SaveCollectionTask.run(): FileRenamedException"); 134 127 } 135 128 } … … 143 136 // spd.setProgress(getValue(COLLECTION_CFG_SAVED)); 144 137 145 // Write out the metadata files. 146 Gatherer.c_man.msm.save(); 147 // spd.setProgress(getValue(METADATA_SAVED)); 138 // Write hfiles for the loaded metadata elements into the collection "etc" directory 139 MetadataSetManager.writeHierarchyFiles(new File(Gatherer.c_man.getCollectionEtc())); 148 140 149 141 collection.setSaved(true); … … 307 299 return (int)((double)70 * multiplier); 308 300 case COLLECTION_CFG_SAVED: 309 case METADATA_SAVED:310 case METADATA_XML_SAVED:311 301 return (int)((double)10 * multiplier); 312 302 // Save As … … 325 315 } 326 316 } 327 328 329 330 331
Note:
See TracChangeset
for help on using the changeset viewer.