Changeset 10576
- Timestamp:
- 2005-08-28T16:58:35+12:00 (19 years ago)
- Location:
- trunk/gli/src/org/greenstone/gatherer/cdm
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/cdm/ClassifierManager.java
r10556 r10576 309 309 // Run classinfo on this classifier, and then send the results for parsing. 310 310 try { 311 StringBuffer xml = null; 311 312 if (Gatherer.isGsdlRemote) { 312 313 String launch = Gatherer.cgiBase + "launch"; … … 320 321 URLConnection launch_connection = launch_url.openConnection(); 321 322 input_stream = launch_connection.getInputStream(); 323 xml = Utility.readXMLStream(input_stream); 322 324 } 323 325 else { … … 351 353 352 354 input_stream = process.getErrorStream(); 353 }354 355 StringBuffer xml = Utility.readXMLStream(input_stream); 355 xml = Utility.readXMLStream(input_stream); 356 } 357 356 358 document = CollectionDesignManager.XMLStringToDOM(xml,classifier); 357 359 } … … 398 400 URLConnection launch_connection = launch_url.openConnection(); 399 401 InputStream input_stream = launch_connection.getInputStream(); 400 loadClassifiers(input_stream); 402 StringBuffer xml = Utility.readXMLStream(input_stream); 403 loadClassifiers(xml); 401 404 } 402 405 catch (Exception error) { … … 437 440 * @param input_stream An <strong>InputStream</strong> indicating the where list of classifiers -- encoded in XML -- can be read from 438 441 */ 439 private void loadClassifiers( InputStream input_stream)442 private void loadClassifiers(StringBuffer xml) 440 443 { 441 StringBuffer xml = Utility.readXMLStream(input_stream);442 444 Document document = CollectionDesignManager.XMLStringToDOM(xml, "-listall"); 443 445 -
trunk/gli/src/org/greenstone/gatherer/cdm/PluginManager.java
r10556 r10576 441 441 // Run pluginfo on this plugin, and then send the results for parsing. 442 442 try { 443 StringBuffer xml = null; 443 444 if (Gatherer.isGsdlRemote) { 444 445 String launch = Gatherer.cgiBase + "launch"; … … 452 453 URLConnection launch_connection = launch_url.openConnection(); 453 454 input_stream = launch_connection.getInputStream(); 455 xml = Utility.readXMLStream(input_stream); 454 456 } 455 457 else { … … 482 484 Process process = runtime.exec(args); 483 485 input_stream = process.getErrorStream(); 484 }485 486 StringBuffer xml = Utility.readXMLStream(input_stream); 486 xml = Utility.readXMLStream(input_stream); 487 } 488 487 489 document = CollectionDesignManager.XMLStringToDOM(xml,plugin); 488 490 } … … 527 529 URLConnection launch_connection = launch_url.openConnection(); 528 530 InputStream input_stream = launch_connection.getInputStream(); 529 loadPlugins(input_stream); 531 StringBuffer xml = Utility.readXMLStream(input_stream); 532 loadPlugins(xml); 530 533 } 531 534 catch (Exception error) { … … 550 553 * @param input_stream An <strong>InputStream</strong> indicating the where list of plugins -- encoded in XML -- can be read from 551 554 */ 552 private void loadPlugins( InputStream input_stream)555 private void loadPlugins(StringBuffer xml) 553 556 { 554 StringBuffer xml = Utility.readXMLStream(input_stream);555 557 Document document = CollectionDesignManager.XMLStringToDOM(xml, "-listall"); 556 558
Note:
See TracChangeset
for help on using the changeset viewer.