Changeset 14038
- Timestamp:
- 2007-05-03T08:50:18+12:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r13582 r14038 32 32 import org.greenstone.gatherer.DebugStream; 33 33 import org.greenstone.gatherer.Gatherer; 34 34 import org.greenstone.gatherer.collection.CollectionManager; 35 import org.w3c.dom.*; 36 37 //save() 38 import org.greenstone.gatherer.util.XMLTools; 39 import javax.swing.*; 35 40 36 41 /** This manager provides access to submanagers, which in turn provide tools for the designing of Greenstone collections via the information stored in etc/collect.cfg. This class acts as a hub for the managers that handle specific parts of the configuration such as classifiers, format strings and language settings. … … 51 56 static public CollectionMetaManager collectionmeta_manager; 52 57 /** A list of formating strings to use at build time. */ 53 static public FormatManager format_manager;58 static public SharedByTwoFormatManager format_manager; 54 59 /** A manager of general options */ 55 60 static public GeneralManager general_manager; … … 124 129 searchmetadata_manager = new SearchMetadataManager(); 125 130 translation_manager = new TranslationView(); 126 format_manager = new FormatManager(); // Parse formats at the very end, given that they depend upon several other managers to appear properly. 131 if (Gatherer.GS3) { 132 format_manager = new Format4gs3Manager(); 133 } else { 134 format_manager = new FormatManager(); // Parse formats at the very end, given that they depend upon several other managers to appear properly. 135 } 127 136 } 128 137 … … 137 146 format_manager.destroy(); 138 147 format_manager = null; 148 // format_4gs3_manager.destroy(); 149 // format_4gs3_manager = null; 139 150 general_manager.destroy(); 140 151 general_manager = null; … … 161 172 subcollection_manager.modeChanged(mode); 162 173 supercollection_manager.modeChanged(mode); 163 format_manager.modeChanged(mode);174 //format_manager.modeChanged(mode); 164 175 index_manager.modeChanged(mode); 165 176 translation_manager.modeChanged(mode); … … 181 192 public void save() 182 193 { 183 collect_config.saveIfNecessary(); 194 // String msg = XMLParser.parseDOM(CollectionManager.getLoadedCollectionCfgFilePath()); 195 Element root = this.collect_config.getDocumentElement (); 196 String msg = XMLTools.parseDOM(XMLTools.xmlNodeToString(root)); 197 if(msg.startsWith(XMLTools.NOTWELLFORMED)) { 198 String str = new String("The collection configuration file is not wellformed, and cannot be saved to disk."); 199 JOptionPane.showMessageDialog(null, str, XMLTools.NOTWELLFORMED, JOptionPane.ERROR_MESSAGE); 200 } else { 201 202 collect_config.saveIfNecessary(); 203 } 184 204 } 185 205
Note:
See TracChangeset
for help on using the changeset viewer.