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/util/Utility.java

    r8231 r8236  
    4747import org.apache.xml.serialize.*;
    4848import org.greenstone.gatherer.Configuration;
     49import org.greenstone.gatherer.DebugStream;
    4950import org.greenstone.gatherer.Dictionary;
    5051import org.greenstone.gatherer.Gatherer;
     
    259260    catch (Exception exception) {
    260261        if(!file.getName().endsWith(METADATA_XML)) {
    261         Gatherer.printStackTrace(exception);
     262        DebugStream.printStackTrace(exception);
    262263        return false;
    263264        }
     
    740741        ZipEntry zipentry = (ZipEntry) e.nextElement();
    741742        String zentryname = dst_dir + zipentry.getName();
    742         Gatherer.println("    Unzipping: " + zentryname);
     743        DebugStream.println("    Unzipping: " + zentryname);
    743744
    744745        if (zipentry.isDirectory()) {
     
    774775    catch (ZipException error) {
    775776        System.err.println("Error: Unable to open '"+zip_file.getAbsolutePath()+"'");
    776         Gatherer.printStackTrace(error);
     777        DebugStream.printStackTrace(error);
    777778    }
    778779
     
    977978    }
    978979   
    979     Gatherer.println("    Zipping up: " + file_path);
     980    DebugStream.println("    Zipping up: " + file_path);
    980981    }
    981982
     
    10921093        ZipEntry zipentry = (ZipEntry) e.nextElement();
    10931094        String zentryname = col_dir + zipentry.getName();
    1094         Gatherer.println("    Unzipping: " + zentryname);
     1095        DebugStream.println("    Unzipping: " + zentryname);
    10951096
    10961097        if (zipentry.isDirectory()) {
     
    11261127    catch (ZipException error) {
    11271128        System.err.println("Error: Unable to open '"+zip_fname+"'");
    1128         Gatherer.printStackTrace(error);
     1129        DebugStream.printStackTrace(error);
    11291130    }
    11301131
     
    13131314    try {
    13141315        if (file.exists()) {
    1315         Gatherer.println("Parsing XML file: " + file);
     1316        DebugStream.println("Parsing XML file: " + file);
    13161317        FileInputStream fis = new FileInputStream(file);
    13171318        document = parse(fis, noisey);
     
    13211322        if(noisey) {
    13221323        error.printStackTrace();
    1323         Gatherer.println("Exception in Utility.parse() - Unexpected");
     1324        DebugStream.println("Exception in Utility.parse() - Unexpected");
    13241325        }
    13251326        else {
    1326         Gatherer.println("Exception in Utility.parse() - Expected");
    1327         Gatherer.printStackTrace(error);
     1327        DebugStream.println("Exception in Utility.parse() - Expected");
     1328        DebugStream.printStackTrace(error);
    13281329        }
    13291330    }
     
    13451346        if(noisey) {
    13461347        error.printStackTrace();
    1347         Gatherer.println("Exception in Utility.parse() - Unexpected");
     1348        DebugStream.println("Exception in Utility.parse() - Unexpected");
    13481349        }
    13491350        else {
    1350         Gatherer.println("Exception in Utility.parse() - Expected");
    1351         Gatherer.printStackTrace(error);
     1351        DebugStream.println("Exception in Utility.parse() - Expected");
     1352        DebugStream.printStackTrace(error);
    13521353        }
    13531354    }
     
    13821383        if(noisey) {
    13831384        error.printStackTrace();
    1384         Gatherer.println("Exception in Utility.parse() - Unexpected");
     1385        DebugStream.println("Exception in Utility.parse() - Unexpected");
    13851386        }
    13861387        else {
    1387         Gatherer.println("Exception in Utility.parse() - Expected");
    1388         }
    1389         Gatherer.printStackTrace(error);
     1388        DebugStream.println("Exception in Utility.parse() - Expected");
     1389        }
     1390        DebugStream.printStackTrace(error);
    13901391    }
    13911392    return document;
     
    14451446    }
    14461447    else {
    1447         //Gatherer.println("Zero length argument xml detected for: " + form);
     1448        //DebugStream.println("Zero length argument xml detected for: " + form);
    14481449        String[] margs = new String[1];
    14491450        margs[0] = form;
Note: See TracChangeset for help on using the changeset viewer.