Ignore:
Timestamp:
2004-10-08T09:46:12+13:00 (20 years ago)
Author:
mdewsnip
Message:

Replaced all Gatherer.print* with DebugStream.print*.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/collection/DownloadJob.java

    r8231 r8236  
    4343import javax.swing.tree.*;
    4444import org.greenstone.gatherer.Configuration;
     45import org.greenstone.gatherer.DebugStream;
    4546import org.greenstone.gatherer.Dictionary;
    4647import org.greenstone.gatherer.Gatherer;
     
    254255        }
    255256        else {
    256         Gatherer.println("Unknown user/pass");
     257        DebugStream.println("Unknown user/pass");
    257258        }
    258259    }
     
    284285    // Run it
    285286    try {
    286         //Gatherer.println("Cmd: " + command); // don't print it out cos it may have the password in it
     287        //DebugStream.println("Cmd: " + command); // don't print it out cos it may have the password in it
    287288        Runtime rt = Runtime.getRuntime();
    288289        String [] env = null;
     
    300301        while ((line = br.readLine()) != null && state != STOPPED) {
    301302       
    302         Gatherer.println(line);
     303        DebugStream.println(line);
    303304        download_log.appendLine(line);
    304305        // The first magic special test is to see if we've just
     
    306307        // the next add and then the next complete/error.
    307308        if(line.lastIndexOf("robots.txt;") != -1) {
    308             Gatherer.println("***** Requesting robot.txt");
     309            DebugStream.println("***** Requesting robot.txt");
    309310            ignore_for_robots = true;
    310311        }
     
    323324            String current_file_downloading = line.substring(line.indexOf("`") + 1, line.lastIndexOf("'"));
    324325            if(!ignore_for_robots) {
    325             Gatherer.println("Not ignore for robots");
     326            DebugStream.println("Not ignore for robots");
    326327            // Download complete
    327328            downloadComplete(current_file_downloading);
    328329            }
    329330            else {
    330             Gatherer.println("Ignore for robots");
     331            DebugStream.println("Ignore for robots");
    331332            ignore_for_robots = false;
    332333            }
     
    340341        else if(line.lastIndexOf(" `") != -1) {
    341342            // Not Overwriting
    342             Gatherer.println("Already there.");
     343            DebugStream.println("Already there.");
    343344            String new_url =
    344345            line.substring(line.indexOf("`") + 1, line.lastIndexOf("'"));
     
    350351            if(line.charAt(2) == ':' && line.charAt(5) == ':') {
    351352            if(!ignore_for_robots) {
    352                 Gatherer.println("Error.");
     353                DebugStream.println("Error.");
    353354                downloadFailed();
    354355            }
     
    370371    catch (Exception ioe) {
    371372        //message(Utility.ERROR, ioe.toString());
    372         Gatherer.printStackTrace(ioe);
     373        DebugStream.printStackTrace(ioe);
    373374    }
    374375    // If we've got to here and the state isn't STOPPED then the
     
    462463    args.add(initial.toString());
    463464
    464     Gatherer.println("Calling wget ");
     465    DebugStream.println("Calling wget ");
    465466    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("");
    469470
    470471    // Run home to mummy.
     
    490491    public void downloadComplete(String current_file_downloading) {
    491492    progress.downloadComplete();
    492     Gatherer.println("Current File: " + current_file_downloading);
     493    DebugStream.println("Current File: " + current_file_downloading);
    493494    // !! TEMPORARILY DISABLED !!
    494495    //WorkspaceTreeModel.refreshWebCacheMappings();
     
    518519//          // 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.
    519520//          ///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);
    522523//          destination_node.unmap();
    523524//          ///atherer.println("Destination node: " + destination_node);
Note: See TracChangeset for help on using the changeset viewer.