Changeset 4567
- Timestamp:
- 2003-06-11T13:56:21+12:00 (21 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r4527 r4567 286 286 } 287 287 288 288 // Create the process. 289 289 Runtime runtime = Runtime.getRuntime(); 290 290 Process process = runtime.exec(args); … … 297 297 xml.append("\n"); 298 298 } 299 299 // Then read the xml from the piped input stream. 300 300 InputSource source = new InputSource(new StringReader(xml.toString())); 301 301 DOMParser parser = new DOMParser(); … … 305 305 catch (Exception error) { 306 306 error.printStackTrace(); 307 307 ///ystem.err.println("Error: Cannot parse " + getClassifierName(classifier)); 308 308 } 309 309 if(document != null) { … … 356 356 if(argument.getType() != Argument.FLAG && tokenizer.hasMoreTokens()) { 357 357 String value = tokenizer.nextToken(); 358 value = value.replace(':', MSMUtils.NS_SEP); 358 // special hack for metadata 359 if (argument.getType() == Argument.METADATA) { 360 value = value.replace(':', MSMUtils.NS_SEP); 361 if (value.indexOf(MSMUtils.NS_SEP)==-1){ 362 value = Utility.EXTRACTED_METADATA_NAMESPACE +MSMUtils.NS_SEP+value; 363 } 364 } 365 // shoudl probably do the same for METADATUM 366 359 367 argument.setValue(value); 360 368 } … … 497 505 if(object instanceof Classifier) { 498 506 Classifier classifier = (Classifier) object; 499 text.append(classifier.toString ());507 text.append(classifier.toStringConfig()); 500 508 } 501 509 else if(object instanceof CustomClassifier) { … … 574 582 File files[] = directory.listFiles(); 575 583 if(files != null) { 576 584 // Create a progress indicator. 577 585 ParsingProgress progress = new ParsingProgress(get("CDM.ClassifierManager.Parsing.Title"), get("CDM.ClassifierManager.Parsing.Message"), files.length); 578 586 for(int i = 0; i < files.length; i++) { … … 611 619 classifier.setDesc(MSMUtils.getValue(node)); 612 620 } 613 621 // Parse the multitude of arguments. 614 622 else if(node_name.equals("Arguments")) { 615 623 for(Node arg = node.getFirstChild(); arg != null; arg = arg.getNextSibling()) {
Note:
See TracChangeset
for help on using the changeset viewer.