Changeset 12157
- Timestamp:
- 2006-07-11T16:58:06+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/CollectionManager.java
r12150 r12157 54 54 import org.greenstone.gatherer.cdm.CollectionMetaManager; 55 55 import org.greenstone.gatherer.cdm.CommandTokenizer; 56 import org.greenstone.gatherer.gui.ExternalCollectionPrompt;57 56 import org.greenstone.gatherer.gui.LockFileDialog; 58 57 import org.greenstone.gatherer.gui.ModalProgressPopup; … … 849 848 if (!collection_metadata_directory.exists()) { 850 849 DebugStream.println("Loading non-gatherer collection..."); 850 // Show a warning message in case user wants to quit now 851 851 non_gli_collection = true; 852 WarningDialog legacy_dialog = new WarningDialog("warning.LegacyCollection", Dictionary.get("LegacyCollection.Title"), Dictionary.get("LegacyCollection.Message"), null, true); 853 if (legacy_dialog.display()==JOptionPane.CANCEL_OPTION) { 854 legacy_dialog.dispose(); 855 collection_directory = null; 856 collection_config_file = null; 857 return; 858 } 859 legacy_dialog.dispose(); 860 852 861 } 853 862 … … 903 912 ProfileXMLFileManager.loadProfileXMLFile(collection_metadata_directory); 904 913 905 // If this is a non-GLI (legacy) collection, ask the user to choose some metadata sets 914 // If this is a non-GLI (legacy) collection, load the 915 // default metadata 906 916 if (non_gli_collection) { 907 if (!addSomeMetadataSets(collection_directory)) { 908 lock_file = null; 909 collection_directory = null; 910 closeCollection(); 911 return; 912 } 913 917 addDefaultMetadataSets(collection_directory); 918 914 919 // Recurse the import folder tree, backing up the metadata.xml files before they are edited 915 920 LegacyCollectionImporter.backupMetadataXMLFiles(collection_directory); … … 1199 1204 1200 1205 /** I started giving the user the choice of using an existing meta set or creating a new one. The second option being so that they didn't have to add/merge/ignore each element, they could all be added automatically. However, I am not sure where the merge prompt gets called from, and it is not essential, so I am leaving it for now - it should be added back in and finished. [kjdon] */ 1201 private boolean addSomeMetadataSets(File collection_dir) { 1202 1203 1204 ExternalCollectionPrompt external_prompt = new ExternalCollectionPrompt(); 1205 int meta_choice = external_prompt.getMetadataChoice(); 1206 boolean cancelled = external_prompt.isCancelled(); 1207 if (cancelled) { 1208 return false; 1209 } 1210 1211 // now we add dublin core which is the default metadata set. The user 1206 private boolean addDefaultMetadataSets(File collection_dir) { 1207 1208 1209 // Add dublin core which is the default metadata set. The user 1212 1210 // can change this later 1213 1211 File dc_file = new File(Gatherer.getGLIMetadataDirectoryPath()+"dublin.mds");
Note:
See TracChangeset
for help on using the changeset viewer.