- Timestamp:
- 2005-09-22T16:59:56+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/shell
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/shell/GBuildProgressMonitor.java
r10530 r10618 79 79 static final int CREATINGAUXILARY = 50; 80 80 /** Now the language independant sentinel strings. */ 81 static final String BADARGUMENT_ELEMENT = "BadArgument"; 82 static final String BADARGUMENTVALUE_ELEMENT = "BadArgumentValue"; 83 static final String BADCLASSIFIER_ELEMENT = "BadClassifier"; 84 static final String BADPLUGIN_ELEMENT = "BadPlugin"; 81 85 static final String BUILD_ELEMENT = "Build"; 82 86 static final String COLLECTTEXTSTATS_VALUE = "CollectTextStats"; … … 106 110 static final String WARNING_ELEMENT = "Warning"; 107 111 static final String WORDLEVELINDEXES_VALUE = "WordLevelIndexes"; 112 113 static final private String ARGUMENT_ATTRIBUTE = "a"; 114 static final private String CLASSIFIER_ATTRIBUTE = "c"; 115 static final private String PLUGIN_ATTRIBUTE = "p"; 116 108 117 /** Indicates if the GUI has asked the process this object monitors to stop. */ 109 118 private boolean stop = false; … … 226 235 break; 227 236 case BUILD: 228 // The only thing we would expect is a stage element 237 // The only thing we would expect is a stage element or a 238 // bad classifier arg name 229 239 name = element.getElementName(); 240 230 241 if(name.equals(STAGE_ELEMENT)) { 231 242 progress_bar.setIndeterminate(false); … … 281 292 } 282 293 } 294 // We had a bad argument to a plugin/classifier 295 else if (name.equals(BADARGUMENT_ELEMENT)) { 296 if(Configuration.getMode() <= threshold) { 297 String args[] = new String[1]; 298 args[0] = element.getAttribute(ARGUMENT_ATTRIBUTE); 299 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.BadArgument", args), event.getStatus())); 300 args = null; 301 } 302 } 303 // We had a bad argument value to a plugin/clasifier 304 else if (name.equals(BADARGUMENTVALUE_ELEMENT)) { 305 if(Configuration.getMode() <= threshold) { 306 String args[] = new String[1]; 307 args[0] = element.getAttribute(ARGUMENT_ATTRIBUTE); 308 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.BadArgumentValue", args), event.getStatus())); 309 args = null; 310 } 311 } 312 // And this one tellsa us the plugin 313 else if (name.equals(BADPLUGIN_ELEMENT)) { 314 if(Configuration.getMode() <= threshold) { 315 String args[] = new String[1]; 316 args[0] = element.getAttribute(PLUGIN_ATTRIBUTE); 317 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.BadPluginOptions", args), event.getStatus())); 318 args = null; 319 } 320 } 321 // or the classifier 322 else if (name.equals(BADCLASSIFIER_ELEMENT)) { 323 if(Configuration.getMode() <= threshold) { 324 String args[] = new String[1]; 325 args[0] = element.getAttribute(CLASSIFIER_ATTRIBUTE); 326 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.BadClassifierOptions", args), event.getStatus())); 327 args = null; 328 } 329 } 330 283 331 else { 284 332 // Unknown command, go indeterminate -
trunk/gli/src/org/greenstone/gatherer/shell/GImportProgressMonitor.java
r9583 r10618 80 80 static final private String IGNORED_ATTRIBUTE = "ignored"; 81 81 static final private String IMPORT_ELEMENT = "Import"; 82 static final private String PROCESSED_ATTRIBUTE = "processed"; 82 static final private String PROCESSED_ATTRIBUTE = "processed"; 83 84 static final private String ARGUMENT_ATTRIBUTE = "a"; 83 85 /** */ 84 86 static final private String NAME_ATTRIBUTE = "n"; … … 106 108 /** The element name of a file not recognised. */ 107 109 static final private String NONRECOGNISEDFILE_ELEMENT = "NonRecognisedFile"; 108 110 /** The element name of a BadArgument message */ 111 static final private String BADARGUMENT_ELEMENT = "BadArgument"; 112 static final private String BADARGUMENTVALUE_ELEMENT = "BadArgumentValue"; 113 static final private String BADPLUGIN_ELEMENT = "BadPlugin"; 109 114 110 115 public GImportProgressMonitor() { … … 281 286 } 282 287 } 288 // We had a bad argument to a plugin 289 else if (name.equals(BADARGUMENT_ELEMENT)) { 290 if(Configuration.getMode() <= threshold) { 291 String args[] = new String[1]; 292 args[0] = element.getAttribute(ARGUMENT_ATTRIBUTE); 293 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.BadArgument", args), event.getStatus())); 294 args = null; 295 } 296 } 297 // We had a bad argument value to a plugin 298 else if (name.equals(BADARGUMENTVALUE_ELEMENT)) { 299 if(Configuration.getMode() <= threshold) { 300 String args[] = new String[1]; 301 args[0] = element.getAttribute(ARGUMENT_ATTRIBUTE); 302 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.BadArgumentValue", args), event.getStatus())); 303 args = null; 304 } 305 } 306 // And this one tellsa us the plugin 307 else if (name.equals(BADPLUGIN_ELEMENT)) { 308 if(Configuration.getMode() <= threshold) { 309 String args[] = new String[1]; 310 args[0] = element.getAttribute(PLUGIN_ATTRIBUTE); 311 queue.add(new GShellEvent(event.getSource(), 0, event.getType(), Dictionary.get("GShell.BadPluginOptions", args), event.getStatus())); 312 args = null; 313 } 314 } 283 315 // Or the import complete element 284 316 else if(name.equals(IMPORTCOMPLETE_ELEMENT)) {
Note:
See TracChangeset
for help on using the changeset viewer.