Ignore:
Timestamp:
2004-10-08T09:46:12+13:00 (20 years ago)
Author:
mdewsnip
Message:

Replaced all Gatherer.print* with DebugStream.print*.

Location:
trunk/gli/src/org/greenstone/gatherer/cdm
Files:
21 edited

Legend:

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

    r8015 r8236  
    3535import java.util.*;
    3636import org.greenstone.gatherer.Configuration;
     37import org.greenstone.gatherer.DebugStream;
    3738import org.greenstone.gatherer.Gatherer;
    3839import org.greenstone.gatherer.cdm.CollectionConfiguration;
     
    476477    }
    477478    else {
    478         Gatherer.println("Argument.setValue(" + value + ") called on a base Argument.");
     479        DebugStream.println("Argument.setValue(" + value + ") called on a base Argument.");
    479480    }
    480481    }
     
    496497    }
    497498    else {
    498         Gatherer.println("Argument.setValues([" + values.size() + " items]) called on a base Argument.");
     499        DebugStream.println("Argument.setValues([" + values.size() + " items]) called on a base Argument.");
    499500    }
    500501    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/ArgumentConfiguration.java

    r8231 r8236  
    3232import javax.swing.*;
    3333import org.greenstone.gatherer.Configuration;
     34import org.greenstone.gatherer.DebugStream;
    3435import org.greenstone.gatherer.Dictionary;
    3536import org.greenstone.gatherer.Gatherer;
     
    375376            }
    376377            catch (Exception error) {
    377             Gatherer.println("ArgumentConfiguration Error: "+error);
     378            DebugStream.println("ArgumentConfiguration Error: "+error);
    378379            }
    379380        } else if (default_value != null && !default_value.equals("")) {
     
    383384            }
    384385            catch (Exception error) {
    385             Gatherer.println("ArgumentConfiguration Error: "+error);
     386            DebugStream.println("ArgumentConfiguration Error: "+error);
    386387            }
    387388        }
  • trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java

    r8231 r8236  
    3737import org.apache.xerces.parsers.*;
    3838import org.greenstone.gatherer.Configuration;
     39import org.greenstone.gatherer.DebugStream;
    3940import org.greenstone.gatherer.Dictionary;
    4041import org.greenstone.gatherer.Gatherer;
     
    7677    super(CollectionDesignManager.collect_config.getDocumentElement(), CollectionConfiguration.CLASSIFY_ELEMENT, new Classifier());
    7778    this.model = this;
    78     Gatherer.println("ClassifierManager: " + getSize() + " classifiers parsed.");
     79    DebugStream.println("ClassifierManager: " + getSize() + " classifiers parsed.");
    7980    // Reload/Create the library
    8081    loadClassifiers();
     
    108109    public static boolean clearClassifierCache() {
    109110
    110     Gatherer.println("deleting classifiers.dat");
     111    DebugStream.println("deleting classifiers.dat");
    111112    File class_file = new File(Utility.BASE_DIR + "classifiers.dat");
    112113    if (class_file.exists()) {
     
    197198    private void moveClassifier(Classifier classifier, boolean direction, boolean all) {
    198199    if(getSize() < 2) {
    199         Gatherer.println("Not enough classifiers to allow moving.");
     200        DebugStream.println("Not enough classifiers to allow moving.");
    200201        return;
    201202    }
     
    379380    }
    380381    catch (Exception error) {
    381         Gatherer.println("Unable to open "+ Utility.BASE_DIR + "classifier.dat");
     382        DebugStream.println("Unable to open "+ Utility.BASE_DIR + "classifier.dat");
    382383    }
    383384
     
    813814            Classifier new_classifier = null;
    814815            if(base_classifier != null) {
    815             Gatherer.println("Creating Classifier based on existing Classifer.");
     816            DebugStream.println("Creating Classifier based on existing Classifer.");
    816817            element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, base_classifier.getName());
    817818            new_classifier = new Classifier(element, base_classifier);
    818819            }
    819820            else {
    820             Gatherer.println("Creating new custom Classifier.");
     821            DebugStream.println("Creating new custom Classifier.");
    821822            element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, selected_object.toString());
    822823            new_classifier = new Classifier(element, null);
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java

    r8231 r8236  
    3333import javax.swing.*;
    3434import org.greenstone.gatherer.Configuration;
     35import org.greenstone.gatherer.DebugStream;
    3536import org.greenstone.gatherer.Gatherer;
    3637import org.greenstone.gatherer.cdm.CommandTokenizer;
     
    463464        }
    464465        if(!original_file.renameTo(backup_file)) {
    465         Gatherer.println("Can't rename collect.cfg");
     466        DebugStream.println("Can't rename collect.cfg");
    466467        }
    467468    }
     
    514515        }
    515516        catch (Exception exception) {
    516         Gatherer.println("Error in CollectionConfiguration.save(boolean): " + exception);
    517         Gatherer.printStackTrace(exception);
     517        DebugStream.println("Error in CollectionConfiguration.save(boolean): " + exception);
     518        DebugStream.printStackTrace(exception);
    518519        }
    519520    }
     
    903904            // Why can't you switch on strings eh? We pass it to the various subparsers who each have a bash at parsing the command. If none can parse the command, an unknown element is created
    904905            if(command_element == null && command_type.equals(BUILDTYPE_STR)) {
    905             Gatherer.println("G2.39 Buildtype command detected. Ignoring.");
     906            DebugStream.println("G2.39 Buildtype command detected. Ignoring.");
    906907            command_element = document.createElement(UNKNOWN_ELEMENT);
    907908            append_element = false;
     
    916917            // If this was a G2.39 config file then we manipulate the command string a bit before we submit it to the parser. We start by adding allfields as the first index. We then space separate the remaining indexes, and remove duplicates when encountered. Of course before we do any of that we record the various space separated indexes so that we can remove the collection meta assigned to them.
    917918            if(is_twopointthreenine) {
    918                 Gatherer.println("G2.39 Index command detected. Modifying.");
    919                 Gatherer.println("Before: " + command_str);
     919                DebugStream.println("G2.39 Index command detected. Modifying.");
     920                DebugStream.println("Before: " + command_str);
    920921                StringBuffer new_command_str = new StringBuffer(command_type);
    921922                new_command_str.append(SPACE_CHARACTER);
     
    958959                command_str = new_command_str.toString();
    959960                new_command_str = null;
    960                 Gatherer.println("After: " + command_str);
     961                DebugStream.println("After: " + command_str);
    961962            }
    962963            command_element = parseIndex(command_str);
     
    967968            // If this was a G2.39 config file then we squelch the default index (no such thing in G2.4)
    968969            if(is_twopointthreenine) {
    969                 Gatherer.println("G2.39 Default Index command detected. Ignoring.");
     970                DebugStream.println("G2.39 Default Index command detected. Ignoring.");
    970971                append_element = false;
    971972            }
     
    980981            // Again if this is G2.39 we have to do a tiny bit of magic to the levels command. We need to add document level, and change the remainder to lower case.
    981982            if(is_twopointthreenine) {
    982                 Gatherer.println("G2.39 Levels command detected. Modifying.");
    983                 Gatherer.println("Before: " + command_str);
     983                DebugStream.println("G2.39 Levels command detected. Modifying.");
     984                DebugStream.println("Before: " + command_str);
    984985                StringBuffer new_command_str = new StringBuffer(command_type);
    985986                new_command_str.append(SPACE_CHARACTER);
     
    10001001                command_str = new_command_str.toString();
    10011002                new_command_str = null;
    1002                 Gatherer.println("After: " + command_str);
     1003                DebugStream.println("After: " + command_str);
    10031004            }
    10041005            command_element = parseLevels(command_str);
     
    10661067        Element document_element = document.getDocumentElement();
    10671068        NodeList collectionmeta_elements = document_element.getElementsByTagName(COLLECTIONMETADATA_ELEMENT);
    1068         Gatherer.println("There are " + obsolete_collectionmeta_names.size() + " collectionmeta to remove.");
    1069         Gatherer.println("There are " + changed_collectionmeta_names.size() + " collectionmeta to change.");
     1069        DebugStream.println("There are " + obsolete_collectionmeta_names.size() + " collectionmeta to remove.");
     1070        DebugStream.println("There are " + changed_collectionmeta_names.size() + " collectionmeta to change.");
    10701071        for(int z = collectionmeta_elements.getLength(); z > 0; z--) {
    10711072            Element collectionmeta_element = (Element) collectionmeta_elements.item(z - 1);
    10721073            String name = collectionmeta_element.getAttribute(NAME_ATTRIBUTE);
    1073             Gatherer.println("Checking " + name);
     1074            DebugStream.println("Checking " + name);
    10741075            // Remove any obsolete metadata
    10751076            if(obsolete_collectionmeta_names.contains(name)) {
    1076             Gatherer.println("G2.39 CollectMeta detected. Removing: " + name);
     1077            DebugStream.println("G2.39 CollectMeta detected. Removing: " + name);
    10771078            document_element.removeChild(collectionmeta_element);
    10781079            }
     
    10801081            else if(changed_collectionmeta_names.containsKey(name)) {
    10811082            String new_name = (String) changed_collectionmeta_names.get(name);
    1082             Gatherer.println("G2.39 CollectMeta detected. Changing: " + name + " -> " + new_name);
     1083            DebugStream.println("G2.39 CollectMeta detected. Changing: " + name + " -> " + new_name);
    10831084            collectionmeta_element.setAttribute(NAME_ATTRIBUTE, new_name);
    10841085            new_name = null;
     
    10881089
    10891090        // Finally add any newly acquired collectionmeta. This general defaults to the collectionmeta name less the full stop
    1090         Gatherer.println("There are " + acquired_collectionmeta_names.size() + " collectionmeta to add.");
     1091        DebugStream.println("There are " + acquired_collectionmeta_names.size() + " collectionmeta to add.");
    10911092        for(int y = 0; y < acquired_collectionmeta_names.size(); y++) {
    10921093            String name = (String) acquired_collectionmeta_names.get(y);
    10931094            String value = name.substring(1);
    1094             Gatherer.println("G2.39 CollectMeta missing. Adding: " + name + " [l=" + Configuration.getLanguage() + "] \"" + value + "\"");
     1095            DebugStream.println("G2.39 CollectMeta missing. Adding: " + name + " [l=" + Configuration.getLanguage() + "] \"" + value + "\"");
    10951096            Element element = document.createElement(COLLECTIONMETADATA_ELEMENT);
    10961097            element.setAttribute(NAME_ATTRIBUTE, name);
     
    11081109    }
    11091110    catch(Exception exception) {
    1110         Gatherer.println("Error in CollectionConfiguration.parse(java.io.File): " + exception);
    1111         Gatherer.printStackTrace(exception);
     1111        DebugStream.println("Error in CollectionConfiguration.parse(java.io.File): " + exception);
     1112        DebugStream.printStackTrace(exception);
    11121113    }
    11131114    }
     
    12011202    }
    12021203    catch (Exception exception) {
    1203         Gatherer.printStackTrace(exception);
     1204        DebugStream.printStackTrace(exception);
    12041205        command_element = null;
    12051206    }
     
    13941395    }
    13951396    catch (Exception exception) {
    1396         Gatherer.printStackTrace(exception);
     1397        DebugStream.printStackTrace(exception);
    13971398        command_element = null;
    13981399    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java

    r8231 r8236  
    3333import javax.swing.event.*;
    3434import org.greenstone.gatherer.Configuration;
     35import org.greenstone.gatherer.DebugStream;
    3536import org.greenstone.gatherer.Gatherer;
    3637import org.greenstone.gatherer.cdm.ClassifierManager;
     
    8687     */
    8788    public CollectionDesignManager(File collect_config_file) {
    88     Gatherer.println("Initializaing CollectionDesignModule.");
     89    DebugStream.println("Initializaing CollectionDesignModule.");
    8990    change_listener = new CDMChangeListener();
    9091    // Parse the collection configuration
    9192    collect_config = new CollectionConfiguration(collect_config_file);
    92     if(Gatherer.debug != null) {
     93    if (DebugStream.isDebuggingEnabled()) {
    9394        collect_config.display();
    9495    }
    9596    loadDesignDetails();
    96     Gatherer.println("CollectionDesignModule loaded.");
     97    DebugStream.println("CollectionDesignModule loaded.");
    9798    }
    9899
  • trunk/gli/src/org/greenstone/gatherer/cdm/CollectionMetaManager.java

    r8231 r8236  
    3333import javax.swing.event.*;
    3434import org.greenstone.gatherer.Configuration;
     35import org.greenstone.gatherer.DebugStream;
    3536import org.greenstone.gatherer.Gatherer;
    3637import org.greenstone.gatherer.cdm.CollectionDesignManager;
     
    5253    public CollectionMetaManager() {
    5354    super(CollectionDesignManager.collect_config.getDocumentElement(), StaticStrings.COLLECTIONMETADATA_ELEMENT, new CollectionMeta(""));
    54     Gatherer.println("CollectionMetaManager: " + getSize() + " metadata parsed.");
     55    DebugStream.println("CollectionMetaManager: " + getSize() + " metadata parsed.");
    5556    }
    5657    /** Method to add a new piece of metadata.
     
    121122
    122123    public CollectionMeta getMetadatum(String name, boolean add_if_not_found) {
    123     //Gatherer.println("Get the metadata for " + name + " in the default language.");
     124    //DebugStream.println("Get the metadata for " + name + " in the default language.");
    124125    int size = getSize();
    125126    for(int i = 0; i < size; i++) {
    126127        CollectionMeta metadatum = (CollectionMeta) getElementAt(i);
    127128        if(metadatum.getName().equals(name) && metadatum.getLanguage().equals(Configuration.getLanguage())) {
    128         Gatherer.println("Found '" + metadatum + "'");
     129        DebugStream.println("Found '" + metadatum + "'");
    129130        return metadatum;
    130131        }
    131132        else {
    132         //Gatherer.println("No match with: " + metadatum.getName() + " [l=" + metadatum.getLanguage() + "] \"" + metadatum.getValue() + "\"");
     133        //DebugStream.println("No match with: " + metadatum.getName() + " [l=" + metadatum.getLanguage() + "] \"" + metadatum.getValue() + "\"");
    133134        }
    134135        metadatum = null;
     
    137138        CollectionMeta result = new CollectionMeta(name);
    138139        addMetadatum(result);
    139         Gatherer.println("Added new metadata: " + name);
     140        DebugStream.println("Added new metadata: " + name);
    140141        return result;
    141142    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/CommandTokenizer.java

    r7206 r8236  
    4646import java.io.BufferedReader;
    4747import java.util.StringTokenizer;
     48import org.greenstone.gatherer.DebugStream;
    4849import org.greenstone.gatherer.Gatherer;
    4950import org.greenstone.gatherer.util.StaticStrings;
     
    205206        // Exception thrown when we attempted reading from the input stream, so throw the dummy, or at least return whatever we managed to parse sans its opening character
    206207        catch(Exception exception) {
    207         Gatherer.printStackTrace(exception);
     208        DebugStream.printStackTrace(exception);
    208209        if(strip_characters) {
    209210            return buffer.substring(1);
  • trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java

    r8231 r8236  
    3838import javax.swing.event.*;
    3939import org.greenstone.gatherer.Configuration;
     40import org.greenstone.gatherer.DebugStream;
    4041import org.greenstone.gatherer.Dictionary;
    4142import org.greenstone.gatherer.Gatherer;
     
    8586    super(CollectionDesignManager.collect_config.getDocumentElement(), CollectionConfiguration.FORMAT_ELEMENT, new Format());
    8687    this.model = this;
    87     Gatherer.println("FormatManager: parsed " + getSize() + " format statements.");
     88    DebugStream.println("FormatManager: parsed " + getSize() + " format statements.");
    8889    // Establish all of the format objects, so that classifier indexes are initially correct (subsequent refreshes of the model will be sufficient to keep these up to date, as long as we start with a live reference to a classifier.
    8990    int size = getSize();
     
    181182
    182183    private HashMap buildDefaultMappings(ArrayList features_model, ArrayList parts_model) {
    183     Gatherer.println("buildDefaultMappings(): replace me with something that reads in a data xml file.");
     184    DebugStream.println("buildDefaultMappings(): replace me with something that reads in a data xml file.");
    184185    return new HashMap();
    185186    }
     
    201202
    202203    private ArrayList buildPartModel() {
    203     Gatherer.println("buildPartModel(): replace me with something that reads in a data xml file.");
     204    DebugStream.println("buildPartModel(): replace me with something that reads in a data xml file.");
    204205    ArrayList part_model = new ArrayList();
    205206    part_model.add(new Part("", ""));
     
    212213
    213214    private ArrayList buildVariableModel() {
    214     Gatherer.println("buildVariableModel(): replace me with something that reads in a data xml file.");
     215    DebugStream.println("buildVariableModel(): replace me with something that reads in a data xml file.");
    215216    ArrayList variable_model = new ArrayList();
    216217    variable_model.add("[Text]");
  • trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java

    r8231 r8236  
    3636import javax.swing.tree.*;
    3737import org.greenstone.gatherer.Configuration;
     38import org.greenstone.gatherer.DebugStream;
    3839import org.greenstone.gatherer.Dictionary;
    3940import org.greenstone.gatherer.Gatherer;
     
    6869    public GeneralManager() {
    6970    super();
    70     Gatherer.println("GeneralManager: Main GUI components created.");
     71    DebugStream.println("GeneralManager: Main GUI components created.");
    7172    // Assignments
    7273    this.controls = new GeneralControl();
     
    498499                }
    499500                catch(Exception exception) {
    500                 Gatherer.printStackTrace(exception);
     501                DebugStream.printStackTrace(exception);
    501502                // Show warning
    502503                JOptionPane.showMessageDialog(Gatherer.g_man, Dictionary.get("CDM.General.Image_Copy_Failed"), Dictionary.get("General.Error"), JOptionPane.ERROR_MESSAGE);
  • trunk/gli/src/org/greenstone/gatherer/cdm/Index.java

    r8015 r8236  
    2828
    2929import java.util.*;
     30import org.greenstone.gatherer.DebugStream;
    3031import org.greenstone.gatherer.Gatherer;
    3132import org.greenstone.gatherer.cdm.CollectionConfiguration;
     
    7778        Object source_object = sources.get(i);
    7879        if(source_object instanceof ElementWrapper) {
    79         ///Gatherer.println("Found ElementWrapper as source: " + ((ElementWrapper)source_object).getName());
     80        ///DebugStream.println("Found ElementWrapper as source: " + ((ElementWrapper)source_object).getName());
    8081        content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, ((ElementWrapper)source_object).getName());
    8182        }
    8283        else {
    83         ///Gatherer.println("Found String as source: " + source_object.toString());
     84        ///DebugStream.println("Found String as source: " + source_object.toString());
    8485        content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, source_object.toString());
    8586        }
     
    254255    }
    255256    else {
    256         Gatherer.println("Error! Called setLevel() of index other than the default.");
     257        DebugStream.println("Error! Called setLevel() of index other than the default.");
    257258    }
    258259    }
     
    271272        Object source_object = sources.get(i);
    272273        if(source_object instanceof ElementWrapper) {
    273             //Gatherer.println("Found ElementWrapper as source: " + ((ElementWrapper)source_object).getName());
     274            //DebugStream.println("Found ElementWrapper as source: " + ((ElementWrapper)source_object).getName());
    274275            String name = ((ElementWrapper)source_object).getName();
    275276            content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, name);
     
    277278        }
    278279        else {
    279             //Gatherer.println("Found String as source: " + source_object.toString());
     280            //DebugStream.println("Found String as source: " + source_object.toString());
    280281            content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, source_object.toString());
    281282        }
     
    288289    }
    289290    else {
    290         Gatherer.println("Error! Called setSource() of index other than the default.");
     291        DebugStream.println("Error! Called setSource() of index other than the default.");
    291292    }
    292293    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java

    r8231 r8236  
    3333import javax.swing.event.*;
    3434import org.greenstone.gatherer.Configuration;
     35import org.greenstone.gatherer.DebugStream;
    3536import org.greenstone.gatherer.Dictionary;
    3637import org.greenstone.gatherer.Gatherer;
     
    7172    public IndexManager(Element indexes) {
    7273    super(indexes, CollectionConfiguration.INDEX_ELEMENT, new Index());
    73     Gatherer.println("IndexManager: " + getSize() + " indexes parsed.");
     74    DebugStream.println("IndexManager: " + getSize() + " indexes parsed.");
    7475    model = this;
    7576    // Parse and retrieve the default index
     
    8182    Element levels_element = CollectionDesignManager.collect_config.getLevels();
    8283    levels_model = new DOMProxyListModel(levels_element, CollectionConfiguration.CONTENT_ELEMENT, new Level());
    83     Gatherer.println(" + " + levels_model.getSize() + " levels parsed.");
     84    DebugStream.println(" + " + levels_model.getSize() + " levels parsed.");
    8485    }
    8586
  • trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java

    r8231 r8236  
    3939import javax.swing.event.*;
    4040import org.greenstone.gatherer.Configuration;
     41import org.greenstone.gatherer.DebugStream;
    4142import org.greenstone.gatherer.Dictionary;
    4243import org.greenstone.gatherer.Gatherer;
     
    7576    super(languages_element, CollectionConfiguration.LANGUAGE_ELEMENT, new Language());
    7677   
    77     Gatherer.println("LanguageManager: " + getSize() + " languages parsed.");
     78    DebugStream.println("LanguageManager: " + getSize() + " languages parsed.");
    7879
    7980    this.model = this;
  • trunk/gli/src/org/greenstone/gatherer/cdm/MetadataSetView.java

    r8231 r8236  
    3333import javax.swing.event.*;
    3434import org.greenstone.gatherer.Configuration;
     35import org.greenstone.gatherer.DebugStream;
    3536import org.greenstone.gatherer.Dictionary;
    3637import org.greenstone.gatherer.Gatherer;
     
    6061     */
    6162    public MetadataSetView() {
    62     Gatherer.println("MetadataSetView: Initialized.");
     63    DebugStream.println("MetadataSetView: Initialized.");
    6364    model = this;
    6465    Gatherer.c_man.getCollection().msm.addMSMListener(this);
  • trunk/gli/src/org/greenstone/gatherer/cdm/PlugIn.java

    r7111 r8236  
    5959    this.element = element;
    6060    this.name = element.getAttribute(StaticStrings.TYPE_ATTRIBUTE);
    61     //Gatherer.println("Establishing Plugin: " + name);
     61    //DebugStream.println("Establishing Plugin: " + name);
    6262    // Parse in any argument options for this plugin, keeping a list of the ones found
    6363    HashMap known_arguments = new HashMap();
     
    6767        Element option_element = (Element) option_elements.item(i);
    6868        Argument argument = new Argument(option_element);
    69         //Gatherer.println("Rebuilding existing argument: " + argument.getName());
     69        //DebugStream.println("Rebuilding existing argument: " + argument.getName());
    7070        known_arguments.put(argument.getName(), argument);
    7171        if (argument.isAssigned() || base_plugin == null) {
     
    7777    // If a base plugin was given
    7878    if(base_plugin != null) {
    79         //Gatherer.println("Based on previous plugin.");
     79        //DebugStream.println("Based on previous plugin.");
    8080        // Copy the details, and add a reference to whatever base_plugins super plugin is. ??
    8181        description = base_plugin.getDescription();
     
    8686        Argument base_argument = (Argument) all_arguments.get(j);
    8787        String base_argument_name = base_argument.getName();
    88         //Gatherer.println("Library indicates this plugin should have an argument: " + base_argument_name);
     88        //DebugStream.println("Library indicates this plugin should have an argument: " + base_argument_name);
    8989        Argument existing_argument = (Argument) known_arguments.get(base_argument_name);
    9090        // Found an existing argument. Complete its details
    9191        if(existing_argument != null) {
    92             //Gatherer.println("Found existing argument. Filling out details.");
     92            //DebugStream.println("Found existing argument. Filling out details.");
    9393            existing_argument.setCustomArgument(false);
    9494            existing_argument.setDefaultValue(base_argument.getDefaultValue());
     
    108108        // No existing argument. Copy base_argument and add it, but do not set its assigned flag. That should be set the first time its changed by the user.
    109109        else {
    110             //Gatherer.println("No such argument. Adding new, unassigned, argument.");
     110            //DebugStream.println("No such argument. Adding new, unassigned, argument.");
    111111            // The trick thing is that we have to create a new element in the DOM as well.
    112112            Argument new_argument = base_argument.copy();
  • trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java

    r8231 r8236  
    3838import org.apache.xerces.parsers.*;
    3939import org.greenstone.gatherer.Configuration;
     40import org.greenstone.gatherer.DebugStream;
    4041import org.greenstone.gatherer.Dictionary;
    4142import org.greenstone.gatherer.Gatherer;
     
    7071    public PlugInManager() {
    7172    super(CollectionDesignManager.collect_config.getDocumentElement(), CollectionConfiguration.PLUGIN_ELEMENT, new PlugIn());
    72     Gatherer.println("PlugInManager: " + super.getSize() + " plugins parsed.");
     73    DebugStream.println("PlugInManager: " + super.getSize() + " plugins parsed.");
    7374    model = this;
    7475    // Reload/Create the library
     
    102103    public static boolean clearPlugInCache() {
    103104
    104     Gatherer.println("deleting plugins.dat");
     105    DebugStream.println("deleting plugins.dat");
    105106    File plugin_file = new File(Utility.BASE_DIR + "plugins.dat");
    106107    if (plugin_file.exists()) {
     
    175176    // Can't ever move RecPlug or ArcPlug
    176177    if(super.getSize() < 4) {
    177         //Gatherer.println("Not enough plugins to allow moving.");
     178        //DebugStream.println("Not enough plugins to allow moving.");
    178179        return;
    179180    }
     
    290291    }
    291292    catch (Exception error) {
    292         Gatherer.printStackTrace(error);
     293        DebugStream.printStackTrace(error);
    293294    }
    294295    }
     
    335336    // Now go through the assigned plugins, and remove any that match.
    336337    available.removeAll(children());
    337     //Gatherer.println("There are a total of " + library.size() + " plugins in the library.");
    338     //Gatherer.println("However " + children().size() + " are in use,");
    339     //Gatherer.println("So only " + available.size() + " remain.");
     338    //DebugStream.println("There are a total of " + library.size() + " plugins in the library.");
     339    //DebugStream.println("However " + children().size() + " are in use,");
     340    //DebugStream.println("So only " + available.size() + " remain.");
    340341    Collections.sort(available);
    341342    return available.toArray();
     
    429430    }
    430431    catch (Exception error) {
    431         Gatherer.println("Unable to open "+ Utility.BASE_DIR + "plugins.dat");
     432        DebugStream.println("Unable to open "+ Utility.BASE_DIR + "plugins.dat");
    432433    }
    433434
     
    910911            PlugIn new_plugin = null;
    911912            if(base_plugin != null) {
    912             //Gatherer.println("New PlugIn based on existing PlugIn");
     913            //DebugStream.println("New PlugIn based on existing PlugIn");
    913914            element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, base_plugin.getName());
    914915            new_plugin = new PlugIn(element, base_plugin);
    915916            }
    916917            else {
    917             //Gatherer.println("New Custom PlugIn");
     918            //DebugStream.println("New Custom PlugIn");
    918919            element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, selected_object.toString());
    919920            new_plugin = new PlugIn(element, null);
  • trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java

    r8231 r8236  
    3737import javax.swing.event.*;
    3838import org.greenstone.gatherer.Configuration;
     39import org.greenstone.gatherer.DebugStream;
    3940import org.greenstone.gatherer.Dictionary;
    4041import org.greenstone.gatherer.Gatherer;
     
    6667    super(searchtypes_element, CollectionConfiguration.CONTENT_ELEMENT, new SearchType());
    6768    this.model = this;
    68     Gatherer.println("SearchTypeManager: parsed " + getSize() + " search types.");
     69    DebugStream.println("SearchTypeManager: parsed " + getSize() + " search types.");
    6970    }
    7071
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndex.java

    r8015 r8236  
    2828
    2929import java.util.*;
     30import org.greenstone.gatherer.DebugStream;
    3031import org.greenstone.gatherer.Gatherer;
    3132import org.greenstone.gatherer.cdm.CollectionConfiguration;
     
    173174    }
    174175    else {
    175         Gatherer.println("Error! Called setSource() of index other than the default.");
     176        DebugStream.println("Error! Called setSource() of index other than the default.");
    176177    }
    177178    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java

    r8231 r8236  
    3333import javax.swing.event.*;
    3434import org.greenstone.gatherer.Configuration;
     35import org.greenstone.gatherer.DebugStream;
    3536import org.greenstone.gatherer.Dictionary;
    3637import org.greenstone.gatherer.Gatherer;
     
    6061    public SubcollectionIndexManager(Element subindexes) {
    6162    super(subindexes, CollectionConfiguration.INDEX_ELEMENT, new SubcollectionIndex());
    62     Gatherer.println("SubcollectionIndexManager: " + getSize() + " subcollection indexes parsed.");
     63    DebugStream.println("SubcollectionIndexManager: " + getSize() + " subcollection indexes parsed.");
    6364    model = this;
    6465    // Parse and retrieve the default index
  • trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java

    r8231 r8236  
    3737import javax.swing.event.*;
    3838import org.greenstone.gatherer.Configuration;
     39import org.greenstone.gatherer.DebugStream;
    3940import org.greenstone.gatherer.Dictionary;
    4041import org.greenstone.gatherer.Gatherer;
     
    7778    public SubcollectionManager() {
    7879    super(CollectionDesignManager.collect_config.getDocumentElement(), StaticStrings.SUBCOLLECTION_ELEMENT, new Subcollection());
    79     Gatherer.println("SubcollectionManager: " + getSize() + " subcollections parsed.");
     80    DebugStream.println("SubcollectionManager: " + getSize() + " subcollections parsed.");
    8081    this.model = this;
    8182    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java

    r8231 r8236  
    3333import javax.swing.event.*;
    3434import org.greenstone.gatherer.Configuration;
     35import org.greenstone.gatherer.DebugStream;
    3536import org.greenstone.gatherer.Dictionary;
    3637import org.greenstone.gatherer.Gatherer;
     
    5758    public SuperCollectionManager(Element supercollections_element) {
    5859    super(supercollections_element, StaticStrings.COLLECTION_ELEMENT, new SuperCollection());
    59     Gatherer.println("SuperCollectionManager: " + getSize() + " supercollection members parsed.");
     60    DebugStream.println("SuperCollectionManager: " + getSize() + " supercollection members parsed.");
    6061    this.model = this;
    6162    }
  • trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java

    r8231 r8236  
    3434import javax.swing.table.*;
    3535import org.greenstone.gatherer.Configuration;
     36import org.greenstone.gatherer.DebugStream;
    3637import org.greenstone.gatherer.Dictionary;
    3738import org.greenstone.gatherer.Gatherer;
     
    6061
    6162    public TranslationView() {
    62     Gatherer.println("TranslationView: Initialized.");
     63    DebugStream.println("TranslationView: Initialized.");
    6364    }
    6465
Note: See TracChangeset for help on using the changeset viewer.