Changeset 8236 for trunk/gli/src/org/greenstone/gatherer/cdm
- Timestamp:
- 2004-10-08T09:46:12+13:00 (20 years ago)
- 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 35 35 import java.util.*; 36 36 import org.greenstone.gatherer.Configuration; 37 import org.greenstone.gatherer.DebugStream; 37 38 import org.greenstone.gatherer.Gatherer; 38 39 import org.greenstone.gatherer.cdm.CollectionConfiguration; … … 476 477 } 477 478 else { 478 Gatherer.println("Argument.setValue(" + value + ") called on a base Argument.");479 DebugStream.println("Argument.setValue(" + value + ") called on a base Argument."); 479 480 } 480 481 } … … 496 497 } 497 498 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."); 499 500 } 500 501 } -
trunk/gli/src/org/greenstone/gatherer/cdm/ArgumentConfiguration.java
r8231 r8236 32 32 import javax.swing.*; 33 33 import org.greenstone.gatherer.Configuration; 34 import org.greenstone.gatherer.DebugStream; 34 35 import org.greenstone.gatherer.Dictionary; 35 36 import org.greenstone.gatherer.Gatherer; … … 375 376 } 376 377 catch (Exception error) { 377 Gatherer.println("ArgumentConfiguration Error: "+error);378 DebugStream.println("ArgumentConfiguration Error: "+error); 378 379 } 379 380 } else if (default_value != null && !default_value.equals("")) { … … 383 384 } 384 385 catch (Exception error) { 385 Gatherer.println("ArgumentConfiguration Error: "+error);386 DebugStream.println("ArgumentConfiguration Error: "+error); 386 387 } 387 388 } -
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r8231 r8236 37 37 import org.apache.xerces.parsers.*; 38 38 import org.greenstone.gatherer.Configuration; 39 import org.greenstone.gatherer.DebugStream; 39 40 import org.greenstone.gatherer.Dictionary; 40 41 import org.greenstone.gatherer.Gatherer; … … 76 77 super(CollectionDesignManager.collect_config.getDocumentElement(), CollectionConfiguration.CLASSIFY_ELEMENT, new Classifier()); 77 78 this.model = this; 78 Gatherer.println("ClassifierManager: " + getSize() + " classifiers parsed.");79 DebugStream.println("ClassifierManager: " + getSize() + " classifiers parsed."); 79 80 // Reload/Create the library 80 81 loadClassifiers(); … … 108 109 public static boolean clearClassifierCache() { 109 110 110 Gatherer.println("deleting classifiers.dat");111 DebugStream.println("deleting classifiers.dat"); 111 112 File class_file = new File(Utility.BASE_DIR + "classifiers.dat"); 112 113 if (class_file.exists()) { … … 197 198 private void moveClassifier(Classifier classifier, boolean direction, boolean all) { 198 199 if(getSize() < 2) { 199 Gatherer.println("Not enough classifiers to allow moving.");200 DebugStream.println("Not enough classifiers to allow moving."); 200 201 return; 201 202 } … … 379 380 } 380 381 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"); 382 383 } 383 384 … … 813 814 Classifier new_classifier = null; 814 815 if(base_classifier != null) { 815 Gatherer.println("Creating Classifier based on existing Classifer.");816 DebugStream.println("Creating Classifier based on existing Classifer."); 816 817 element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, base_classifier.getName()); 817 818 new_classifier = new Classifier(element, base_classifier); 818 819 } 819 820 else { 820 Gatherer.println("Creating new custom Classifier.");821 DebugStream.println("Creating new custom Classifier."); 821 822 element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, selected_object.toString()); 822 823 new_classifier = new Classifier(element, null); -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionConfiguration.java
r8231 r8236 33 33 import javax.swing.*; 34 34 import org.greenstone.gatherer.Configuration; 35 import org.greenstone.gatherer.DebugStream; 35 36 import org.greenstone.gatherer.Gatherer; 36 37 import org.greenstone.gatherer.cdm.CommandTokenizer; … … 463 464 } 464 465 if(!original_file.renameTo(backup_file)) { 465 Gatherer.println("Can't rename collect.cfg");466 DebugStream.println("Can't rename collect.cfg"); 466 467 } 467 468 } … … 514 515 } 515 516 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); 518 519 } 519 520 } … … 903 904 // 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 904 905 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."); 906 907 command_element = document.createElement(UNKNOWN_ELEMENT); 907 908 append_element = false; … … 916 917 // 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. 917 918 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); 920 921 StringBuffer new_command_str = new StringBuffer(command_type); 921 922 new_command_str.append(SPACE_CHARACTER); … … 958 959 command_str = new_command_str.toString(); 959 960 new_command_str = null; 960 Gatherer.println("After: " + command_str);961 DebugStream.println("After: " + command_str); 961 962 } 962 963 command_element = parseIndex(command_str); … … 967 968 // If this was a G2.39 config file then we squelch the default index (no such thing in G2.4) 968 969 if(is_twopointthreenine) { 969 Gatherer.println("G2.39 Default Index command detected. Ignoring.");970 DebugStream.println("G2.39 Default Index command detected. Ignoring."); 970 971 append_element = false; 971 972 } … … 980 981 // 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. 981 982 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); 984 985 StringBuffer new_command_str = new StringBuffer(command_type); 985 986 new_command_str.append(SPACE_CHARACTER); … … 1000 1001 command_str = new_command_str.toString(); 1001 1002 new_command_str = null; 1002 Gatherer.println("After: " + command_str);1003 DebugStream.println("After: " + command_str); 1003 1004 } 1004 1005 command_element = parseLevels(command_str); … … 1066 1067 Element document_element = document.getDocumentElement(); 1067 1068 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."); 1070 1071 for(int z = collectionmeta_elements.getLength(); z > 0; z--) { 1071 1072 Element collectionmeta_element = (Element) collectionmeta_elements.item(z - 1); 1072 1073 String name = collectionmeta_element.getAttribute(NAME_ATTRIBUTE); 1073 Gatherer.println("Checking " + name);1074 DebugStream.println("Checking " + name); 1074 1075 // Remove any obsolete metadata 1075 1076 if(obsolete_collectionmeta_names.contains(name)) { 1076 Gatherer.println("G2.39 CollectMeta detected. Removing: " + name);1077 DebugStream.println("G2.39 CollectMeta detected. Removing: " + name); 1077 1078 document_element.removeChild(collectionmeta_element); 1078 1079 } … … 1080 1081 else if(changed_collectionmeta_names.containsKey(name)) { 1081 1082 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); 1083 1084 collectionmeta_element.setAttribute(NAME_ATTRIBUTE, new_name); 1084 1085 new_name = null; … … 1088 1089 1089 1090 // 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."); 1091 1092 for(int y = 0; y < acquired_collectionmeta_names.size(); y++) { 1092 1093 String name = (String) acquired_collectionmeta_names.get(y); 1093 1094 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 + "\""); 1095 1096 Element element = document.createElement(COLLECTIONMETADATA_ELEMENT); 1096 1097 element.setAttribute(NAME_ATTRIBUTE, name); … … 1108 1109 } 1109 1110 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); 1112 1113 } 1113 1114 } … … 1201 1202 } 1202 1203 catch (Exception exception) { 1203 Gatherer.printStackTrace(exception);1204 DebugStream.printStackTrace(exception); 1204 1205 command_element = null; 1205 1206 } … … 1394 1395 } 1395 1396 catch (Exception exception) { 1396 Gatherer.printStackTrace(exception);1397 DebugStream.printStackTrace(exception); 1397 1398 command_element = null; 1398 1399 } -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionDesignManager.java
r8231 r8236 33 33 import javax.swing.event.*; 34 34 import org.greenstone.gatherer.Configuration; 35 import org.greenstone.gatherer.DebugStream; 35 36 import org.greenstone.gatherer.Gatherer; 36 37 import org.greenstone.gatherer.cdm.ClassifierManager; … … 86 87 */ 87 88 public CollectionDesignManager(File collect_config_file) { 88 Gatherer.println("Initializaing CollectionDesignModule.");89 DebugStream.println("Initializaing CollectionDesignModule."); 89 90 change_listener = new CDMChangeListener(); 90 91 // Parse the collection configuration 91 92 collect_config = new CollectionConfiguration(collect_config_file); 92 if (Gatherer.debug != null) {93 if (DebugStream.isDebuggingEnabled()) { 93 94 collect_config.display(); 94 95 } 95 96 loadDesignDetails(); 96 Gatherer.println("CollectionDesignModule loaded.");97 DebugStream.println("CollectionDesignModule loaded."); 97 98 } 98 99 -
trunk/gli/src/org/greenstone/gatherer/cdm/CollectionMetaManager.java
r8231 r8236 33 33 import javax.swing.event.*; 34 34 import org.greenstone.gatherer.Configuration; 35 import org.greenstone.gatherer.DebugStream; 35 36 import org.greenstone.gatherer.Gatherer; 36 37 import org.greenstone.gatherer.cdm.CollectionDesignManager; … … 52 53 public CollectionMetaManager() { 53 54 super(CollectionDesignManager.collect_config.getDocumentElement(), StaticStrings.COLLECTIONMETADATA_ELEMENT, new CollectionMeta("")); 54 Gatherer.println("CollectionMetaManager: " + getSize() + " metadata parsed.");55 DebugStream.println("CollectionMetaManager: " + getSize() + " metadata parsed."); 55 56 } 56 57 /** Method to add a new piece of metadata. … … 121 122 122 123 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."); 124 125 int size = getSize(); 125 126 for(int i = 0; i < size; i++) { 126 127 CollectionMeta metadatum = (CollectionMeta) getElementAt(i); 127 128 if(metadatum.getName().equals(name) && metadatum.getLanguage().equals(Configuration.getLanguage())) { 128 Gatherer.println("Found '" + metadatum + "'");129 DebugStream.println("Found '" + metadatum + "'"); 129 130 return metadatum; 130 131 } 131 132 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() + "\""); 133 134 } 134 135 metadatum = null; … … 137 138 CollectionMeta result = new CollectionMeta(name); 138 139 addMetadatum(result); 139 Gatherer.println("Added new metadata: " + name);140 DebugStream.println("Added new metadata: " + name); 140 141 return result; 141 142 } -
trunk/gli/src/org/greenstone/gatherer/cdm/CommandTokenizer.java
r7206 r8236 46 46 import java.io.BufferedReader; 47 47 import java.util.StringTokenizer; 48 import org.greenstone.gatherer.DebugStream; 48 49 import org.greenstone.gatherer.Gatherer; 49 50 import org.greenstone.gatherer.util.StaticStrings; … … 205 206 // 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 206 207 catch(Exception exception) { 207 Gatherer.printStackTrace(exception);208 DebugStream.printStackTrace(exception); 208 209 if(strip_characters) { 209 210 return buffer.substring(1); -
trunk/gli/src/org/greenstone/gatherer/cdm/FormatManager.java
r8231 r8236 38 38 import javax.swing.event.*; 39 39 import org.greenstone.gatherer.Configuration; 40 import org.greenstone.gatherer.DebugStream; 40 41 import org.greenstone.gatherer.Dictionary; 41 42 import org.greenstone.gatherer.Gatherer; … … 85 86 super(CollectionDesignManager.collect_config.getDocumentElement(), CollectionConfiguration.FORMAT_ELEMENT, new Format()); 86 87 this.model = this; 87 Gatherer.println("FormatManager: parsed " + getSize() + " format statements.");88 DebugStream.println("FormatManager: parsed " + getSize() + " format statements."); 88 89 // 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. 89 90 int size = getSize(); … … 181 182 182 183 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."); 184 185 return new HashMap(); 185 186 } … … 201 202 202 203 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."); 204 205 ArrayList part_model = new ArrayList(); 205 206 part_model.add(new Part("", "")); … … 212 213 213 214 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."); 215 216 ArrayList variable_model = new ArrayList(); 216 217 variable_model.add("[Text]"); -
trunk/gli/src/org/greenstone/gatherer/cdm/GeneralManager.java
r8231 r8236 36 36 import javax.swing.tree.*; 37 37 import org.greenstone.gatherer.Configuration; 38 import org.greenstone.gatherer.DebugStream; 38 39 import org.greenstone.gatherer.Dictionary; 39 40 import org.greenstone.gatherer.Gatherer; … … 68 69 public GeneralManager() { 69 70 super(); 70 Gatherer.println("GeneralManager: Main GUI components created.");71 DebugStream.println("GeneralManager: Main GUI components created."); 71 72 // Assignments 72 73 this.controls = new GeneralControl(); … … 498 499 } 499 500 catch(Exception exception) { 500 Gatherer.printStackTrace(exception);501 DebugStream.printStackTrace(exception); 501 502 // Show warning 502 503 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 28 28 29 29 import java.util.*; 30 import org.greenstone.gatherer.DebugStream; 30 31 import org.greenstone.gatherer.Gatherer; 31 32 import org.greenstone.gatherer.cdm.CollectionConfiguration; … … 77 78 Object source_object = sources.get(i); 78 79 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()); 80 81 content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, ((ElementWrapper)source_object).getName()); 81 82 } 82 83 else { 83 /// Gatherer.println("Found String as source: " + source_object.toString());84 ///DebugStream.println("Found String as source: " + source_object.toString()); 84 85 content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, source_object.toString()); 85 86 } … … 254 255 } 255 256 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."); 257 258 } 258 259 } … … 271 272 Object source_object = sources.get(i); 272 273 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()); 274 275 String name = ((ElementWrapper)source_object).getName(); 275 276 content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, name); … … 277 278 } 278 279 else { 279 // Gatherer.println("Found String as source: " + source_object.toString());280 //DebugStream.println("Found String as source: " + source_object.toString()); 280 281 content_element.setAttribute(CollectionConfiguration.NAME_ATTRIBUTE, source_object.toString()); 281 282 } … … 288 289 } 289 290 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."); 291 292 } 292 293 } -
trunk/gli/src/org/greenstone/gatherer/cdm/IndexManager.java
r8231 r8236 33 33 import javax.swing.event.*; 34 34 import org.greenstone.gatherer.Configuration; 35 import org.greenstone.gatherer.DebugStream; 35 36 import org.greenstone.gatherer.Dictionary; 36 37 import org.greenstone.gatherer.Gatherer; … … 71 72 public IndexManager(Element indexes) { 72 73 super(indexes, CollectionConfiguration.INDEX_ELEMENT, new Index()); 73 Gatherer.println("IndexManager: " + getSize() + " indexes parsed.");74 DebugStream.println("IndexManager: " + getSize() + " indexes parsed."); 74 75 model = this; 75 76 // Parse and retrieve the default index … … 81 82 Element levels_element = CollectionDesignManager.collect_config.getLevels(); 82 83 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."); 84 85 } 85 86 -
trunk/gli/src/org/greenstone/gatherer/cdm/LanguageManager.java
r8231 r8236 39 39 import javax.swing.event.*; 40 40 import org.greenstone.gatherer.Configuration; 41 import org.greenstone.gatherer.DebugStream; 41 42 import org.greenstone.gatherer.Dictionary; 42 43 import org.greenstone.gatherer.Gatherer; … … 75 76 super(languages_element, CollectionConfiguration.LANGUAGE_ELEMENT, new Language()); 76 77 77 Gatherer.println("LanguageManager: " + getSize() + " languages parsed.");78 DebugStream.println("LanguageManager: " + getSize() + " languages parsed."); 78 79 79 80 this.model = this; -
trunk/gli/src/org/greenstone/gatherer/cdm/MetadataSetView.java
r8231 r8236 33 33 import javax.swing.event.*; 34 34 import org.greenstone.gatherer.Configuration; 35 import org.greenstone.gatherer.DebugStream; 35 36 import org.greenstone.gatherer.Dictionary; 36 37 import org.greenstone.gatherer.Gatherer; … … 60 61 */ 61 62 public MetadataSetView() { 62 Gatherer.println("MetadataSetView: Initialized.");63 DebugStream.println("MetadataSetView: Initialized."); 63 64 model = this; 64 65 Gatherer.c_man.getCollection().msm.addMSMListener(this); -
trunk/gli/src/org/greenstone/gatherer/cdm/PlugIn.java
r7111 r8236 59 59 this.element = element; 60 60 this.name = element.getAttribute(StaticStrings.TYPE_ATTRIBUTE); 61 // Gatherer.println("Establishing Plugin: " + name);61 //DebugStream.println("Establishing Plugin: " + name); 62 62 // Parse in any argument options for this plugin, keeping a list of the ones found 63 63 HashMap known_arguments = new HashMap(); … … 67 67 Element option_element = (Element) option_elements.item(i); 68 68 Argument argument = new Argument(option_element); 69 // Gatherer.println("Rebuilding existing argument: " + argument.getName());69 //DebugStream.println("Rebuilding existing argument: " + argument.getName()); 70 70 known_arguments.put(argument.getName(), argument); 71 71 if (argument.isAssigned() || base_plugin == null) { … … 77 77 // If a base plugin was given 78 78 if(base_plugin != null) { 79 // Gatherer.println("Based on previous plugin.");79 //DebugStream.println("Based on previous plugin."); 80 80 // Copy the details, and add a reference to whatever base_plugins super plugin is. ?? 81 81 description = base_plugin.getDescription(); … … 86 86 Argument base_argument = (Argument) all_arguments.get(j); 87 87 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); 89 89 Argument existing_argument = (Argument) known_arguments.get(base_argument_name); 90 90 // Found an existing argument. Complete its details 91 91 if(existing_argument != null) { 92 // Gatherer.println("Found existing argument. Filling out details.");92 //DebugStream.println("Found existing argument. Filling out details."); 93 93 existing_argument.setCustomArgument(false); 94 94 existing_argument.setDefaultValue(base_argument.getDefaultValue()); … … 108 108 // 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. 109 109 else { 110 // Gatherer.println("No such argument. Adding new, unassigned, argument.");110 //DebugStream.println("No such argument. Adding new, unassigned, argument."); 111 111 // The trick thing is that we have to create a new element in the DOM as well. 112 112 Argument new_argument = base_argument.copy(); -
trunk/gli/src/org/greenstone/gatherer/cdm/PlugInManager.java
r8231 r8236 38 38 import org.apache.xerces.parsers.*; 39 39 import org.greenstone.gatherer.Configuration; 40 import org.greenstone.gatherer.DebugStream; 40 41 import org.greenstone.gatherer.Dictionary; 41 42 import org.greenstone.gatherer.Gatherer; … … 70 71 public PlugInManager() { 71 72 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."); 73 74 model = this; 74 75 // Reload/Create the library … … 102 103 public static boolean clearPlugInCache() { 103 104 104 Gatherer.println("deleting plugins.dat");105 DebugStream.println("deleting plugins.dat"); 105 106 File plugin_file = new File(Utility.BASE_DIR + "plugins.dat"); 106 107 if (plugin_file.exists()) { … … 175 176 // Can't ever move RecPlug or ArcPlug 176 177 if(super.getSize() < 4) { 177 // Gatherer.println("Not enough plugins to allow moving.");178 //DebugStream.println("Not enough plugins to allow moving."); 178 179 return; 179 180 } … … 290 291 } 291 292 catch (Exception error) { 292 Gatherer.printStackTrace(error);293 DebugStream.printStackTrace(error); 293 294 } 294 295 } … … 335 336 // Now go through the assigned plugins, and remove any that match. 336 337 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."); 340 341 Collections.sort(available); 341 342 return available.toArray(); … … 429 430 } 430 431 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"); 432 433 } 433 434 … … 910 911 PlugIn new_plugin = null; 911 912 if(base_plugin != null) { 912 // Gatherer.println("New PlugIn based on existing PlugIn");913 //DebugStream.println("New PlugIn based on existing PlugIn"); 913 914 element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, base_plugin.getName()); 914 915 new_plugin = new PlugIn(element, base_plugin); 915 916 } 916 917 else { 917 // Gatherer.println("New Custom PlugIn");918 //DebugStream.println("New Custom PlugIn"); 918 919 element.setAttribute(CollectionConfiguration.TYPE_ATTRIBUTE, selected_object.toString()); 919 920 new_plugin = new PlugIn(element, null); -
trunk/gli/src/org/greenstone/gatherer/cdm/SearchTypeManager.java
r8231 r8236 37 37 import javax.swing.event.*; 38 38 import org.greenstone.gatherer.Configuration; 39 import org.greenstone.gatherer.DebugStream; 39 40 import org.greenstone.gatherer.Dictionary; 40 41 import org.greenstone.gatherer.Gatherer; … … 66 67 super(searchtypes_element, CollectionConfiguration.CONTENT_ELEMENT, new SearchType()); 67 68 this.model = this; 68 Gatherer.println("SearchTypeManager: parsed " + getSize() + " search types.");69 DebugStream.println("SearchTypeManager: parsed " + getSize() + " search types."); 69 70 } 70 71 -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndex.java
r8015 r8236 28 28 29 29 import java.util.*; 30 import org.greenstone.gatherer.DebugStream; 30 31 import org.greenstone.gatherer.Gatherer; 31 32 import org.greenstone.gatherer.cdm.CollectionConfiguration; … … 173 174 } 174 175 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."); 176 177 } 177 178 } -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionIndexManager.java
r8231 r8236 33 33 import javax.swing.event.*; 34 34 import org.greenstone.gatherer.Configuration; 35 import org.greenstone.gatherer.DebugStream; 35 36 import org.greenstone.gatherer.Dictionary; 36 37 import org.greenstone.gatherer.Gatherer; … … 60 61 public SubcollectionIndexManager(Element subindexes) { 61 62 super(subindexes, CollectionConfiguration.INDEX_ELEMENT, new SubcollectionIndex()); 62 Gatherer.println("SubcollectionIndexManager: " + getSize() + " subcollection indexes parsed.");63 DebugStream.println("SubcollectionIndexManager: " + getSize() + " subcollection indexes parsed."); 63 64 model = this; 64 65 // Parse and retrieve the default index -
trunk/gli/src/org/greenstone/gatherer/cdm/SubcollectionManager.java
r8231 r8236 37 37 import javax.swing.event.*; 38 38 import org.greenstone.gatherer.Configuration; 39 import org.greenstone.gatherer.DebugStream; 39 40 import org.greenstone.gatherer.Dictionary; 40 41 import org.greenstone.gatherer.Gatherer; … … 77 78 public SubcollectionManager() { 78 79 super(CollectionDesignManager.collect_config.getDocumentElement(), StaticStrings.SUBCOLLECTION_ELEMENT, new Subcollection()); 79 Gatherer.println("SubcollectionManager: " + getSize() + " subcollections parsed.");80 DebugStream.println("SubcollectionManager: " + getSize() + " subcollections parsed."); 80 81 this.model = this; 81 82 } -
trunk/gli/src/org/greenstone/gatherer/cdm/SuperCollectionManager.java
r8231 r8236 33 33 import javax.swing.event.*; 34 34 import org.greenstone.gatherer.Configuration; 35 import org.greenstone.gatherer.DebugStream; 35 36 import org.greenstone.gatherer.Dictionary; 36 37 import org.greenstone.gatherer.Gatherer; … … 57 58 public SuperCollectionManager(Element supercollections_element) { 58 59 super(supercollections_element, StaticStrings.COLLECTION_ELEMENT, new SuperCollection()); 59 Gatherer.println("SuperCollectionManager: " + getSize() + " supercollection members parsed.");60 DebugStream.println("SuperCollectionManager: " + getSize() + " supercollection members parsed."); 60 61 this.model = this; 61 62 } -
trunk/gli/src/org/greenstone/gatherer/cdm/TranslationView.java
r8231 r8236 34 34 import javax.swing.table.*; 35 35 import org.greenstone.gatherer.Configuration; 36 import org.greenstone.gatherer.DebugStream; 36 37 import org.greenstone.gatherer.Dictionary; 37 38 import org.greenstone.gatherer.Gatherer; … … 60 61 61 62 public TranslationView() { 62 Gatherer.println("TranslationView: Initialized.");63 DebugStream.println("TranslationView: Initialized."); 63 64 } 64 65
Note:
See TracChangeset
for help on using the changeset viewer.