Changeset 14094


Ignore:
Timestamp:
05/25/07 09:03:06 (14 years ago)
Author:
xiao
Message:

detect whether it's gs2 or gs3 before saving the configuration file as .cfg or .xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r14038 r14094  
    192192    public void save()
    193193    {
     194    if (Gatherer.GS3 == false) {
     195        collect_config.saveIfNecessary();
     196        return;
     197    }
    194198//      String msg = XMLParser.parseDOM(CollectionManager.getLoadedCollectionCfgFilePath());
    195199        Element root = this.collect_config.getDocumentElement ();       
    196200        String msg = XMLTools.parseDOM(XMLTools.xmlNodeToString(root));
    197             if(msg.startsWith(XMLTools.NOTWELLFORMED)) {
     201        if(msg.startsWith(XMLTools.NOTWELLFORMED)) {
    198202                String str = new String("The collection configuration file is not wellformed, and cannot be saved to disk.");
    199203                JOptionPane.showMessageDialog(null, str, XMLTools.NOTWELLFORMED, JOptionPane.ERROR_MESSAGE);
    200             } else {
     204        } else {
    201205
    202206    collect_config.saveIfNecessary();
Note: See TracChangeset for help on using the changeset viewer.