- Timestamp:
- 2004-10-08T09:46:12+13:00 (20 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gli/src/org/greenstone/gatherer/collection/DownloadJob.java
r8231 r8236 43 43 import javax.swing.tree.*; 44 44 import org.greenstone.gatherer.Configuration; 45 import org.greenstone.gatherer.DebugStream; 45 46 import org.greenstone.gatherer.Dictionary; 46 47 import org.greenstone.gatherer.Gatherer; … … 254 255 } 255 256 else { 256 Gatherer.println("Unknown user/pass");257 DebugStream.println("Unknown user/pass"); 257 258 } 258 259 } … … 284 285 // Run it 285 286 try { 286 // Gatherer.println("Cmd: " + command); // don't print it out cos it may have the password in it287 //DebugStream.println("Cmd: " + command); // don't print it out cos it may have the password in it 287 288 Runtime rt = Runtime.getRuntime(); 288 289 String [] env = null; … … 300 301 while ((line = br.readLine()) != null && state != STOPPED) { 301 302 302 Gatherer.println(line);303 DebugStream.println(line); 303 304 download_log.appendLine(line); 304 305 // The first magic special test is to see if we've just … … 306 307 // the next add and then the next complete/error. 307 308 if(line.lastIndexOf("robots.txt;") != -1) { 308 Gatherer.println("***** Requesting robot.txt");309 DebugStream.println("***** Requesting robot.txt"); 309 310 ignore_for_robots = true; 310 311 } … … 323 324 String current_file_downloading = line.substring(line.indexOf("`") + 1, line.lastIndexOf("'")); 324 325 if(!ignore_for_robots) { 325 Gatherer.println("Not ignore for robots");326 DebugStream.println("Not ignore for robots"); 326 327 // Download complete 327 328 downloadComplete(current_file_downloading); 328 329 } 329 330 else { 330 Gatherer.println("Ignore for robots");331 DebugStream.println("Ignore for robots"); 331 332 ignore_for_robots = false; 332 333 } … … 340 341 else if(line.lastIndexOf(" `") != -1) { 341 342 // Not Overwriting 342 Gatherer.println("Already there.");343 DebugStream.println("Already there."); 343 344 String new_url = 344 345 line.substring(line.indexOf("`") + 1, line.lastIndexOf("'")); … … 350 351 if(line.charAt(2) == ':' && line.charAt(5) == ':') { 351 352 if(!ignore_for_robots) { 352 Gatherer.println("Error.");353 DebugStream.println("Error."); 353 354 downloadFailed(); 354 355 } … … 370 371 catch (Exception ioe) { 371 372 //message(Utility.ERROR, ioe.toString()); 372 Gatherer.printStackTrace(ioe);373 DebugStream.printStackTrace(ioe); 373 374 } 374 375 // If we've got to here and the state isn't STOPPED then the … … 462 463 args.add(initial.toString()); 463 464 464 Gatherer.println("Calling wget ");465 DebugStream.println("Calling wget "); 465 466 for(Enumeration e = args.elements(); e.hasMoreElements();) { 466 Gatherer.println(e.nextElement() + " ");467 } 468 Gatherer.println("");467 DebugStream.println(e.nextElement() + " "); 468 } 469 DebugStream.println(""); 469 470 470 471 // Run home to mummy. … … 490 491 public void downloadComplete(String current_file_downloading) { 491 492 progress.downloadComplete(); 492 Gatherer.println("Current File: " + current_file_downloading);493 DebugStream.println("Current File: " + current_file_downloading); 493 494 // !! TEMPORARILY DISABLED !! 494 495 //WorkspaceTreeModel.refreshWebCacheMappings(); … … 518 519 // // It suddenly occurs to me that by retrieving the destination path, we are causing the potential destination node to map its children which includes the file which I am about to add. Hence I was ending up with two copies. 519 520 // ///atherer.println("Ready to insert new FileNode."); 520 // Gatherer.println("Model: " + tree_model);521 // Gatherer.println("Destination path: " + destination_path);521 // DebugStream.println("Model: " + tree_model); 522 // DebugStream.println("Destination path: " + destination_path); 522 523 // destination_node.unmap(); 523 524 // ///atherer.println("Destination node: " + destination_node);
Note:
See TracChangeset
for help on using the changeset viewer.