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/msm/parsers/GreenstoneMetadataParser.java

    r8022 r8236  
    3939import javax.swing.*;
    4040import javax.swing.tree.*;
     41import org.greenstone.gatherer.DebugStream;
    4142import org.greenstone.gatherer.Gatherer;
    4243import org.greenstone.gatherer.cdm.CommandTokenizer;
     
    9394    /** Locate and import any metadata parsed by this metadata parser given the file involved and its previous incarnation. */
    9495    public boolean process(FileNode destination, FileNode origin, boolean folder_level, boolean dummy_run) {
    95     Gatherer.println("GreenstoneMetadataParser: Process " + origin + ": ");
     96    DebugStream.println("GreenstoneMetadataParser: Process " + origin + ": ");
    9697    int counter = 0;
    9798    dialog_cancelled = false;
     
    114115        if(possible_cfg_file.exists() && (possible_gimport_directory.exists() || possible_import_directory.exists())) {
    115116        found = true;
    116         Gatherer.println("Found greenstone collection at " + collection_dir.getAbsolutePath());
     117        DebugStream.println("Found greenstone collection at " + collection_dir.getAbsolutePath());
    117118        }
    118119        else {
     
    131132
    132133    // 2. If a collection configuration file was found, attempt to merge in any mdses and make note of those that are successfully imported (by removing reference from collect.cfg).
    133     Gatherer.println("Merging in any metadata sets found.");
     134    DebugStream.println("Merging in any metadata sets found.");
    134135    if(collect_cfg != null) {
    135136        ArrayList mdses = collect_cfg.getMetadataSets();
     
    143144
    144145    // 3. Locate all of the metadata.xml files that may have an affect on the origin file. Make sure the metadata.xml closest to the origin files directory is last (to ensure property inheritance regarding accumulate/overwrite).
    145     Gatherer.println("Searching for metadata.xml files");
     146    DebugStream.println("Searching for metadata.xml files");
    146147    ArrayList search_files = new ArrayList();
    147148    File file = origin.getFile();
     
    176177    for(int i = 0; i < search_files.size(); i++) {
    177178        MetadataXMLFileSearch a_search = (MetadataXMLFileSearch) search_files.get(i);
    178         Gatherer.println("Search " + a_search.file.getAbsolutePath() + " for " + (a_search.filename != null ? a_search.filename : ".*"));
    179         Gatherer.println("Search at the " + (folder_level ? "Folder" : "Filename") + " level");
     179        DebugStream.println("Search " + a_search.file.getAbsolutePath() + " for " + (a_search.filename != null ? a_search.filename : ".*"));
     180        DebugStream.println("Search at the " + (folder_level ? "Folder" : "Filename") + " level");
    180181        // Retrieve the document
    181182        BasicGDMDocument document = getDocument(a_search.file);
     
    194195    search_files = null;
    195196    // Finally assign the metadata
    196     Gatherer.println("Found " + metadata.size() + " pieces of metadata for " + destination);
     197    DebugStream.println("Found " + metadata.size() + " pieces of metadata for " + destination);
    197198    if(metadata.size() > 0) {
    198199        addMetadata(origin, destination, metadata, collection_dir, collect_cfg, dummy_run);
     
    493494        directorymetadata_element = null;
    494495        }
    495         catch (Exception error) {
    496         Gatherer.self.printStackTrace(error);
     496        catch (Exception exception) {
     497        DebugStream.printStackTrace(exception);
    497498        }
    498499        return metadatum;
     
    583584            directorymetadata_element = null;
    584585        }
    585         catch (Exception error) {
    586             Gatherer.self.printStackTrace(error);
     586        catch (Exception exception) {
     587            DebugStream.printStackTrace(exception);
    587588        }
    588589        // Cache the result, given that these external metadata.xmls are taken to be static at the time of reading (if you happen to be sourcing information from a opened collection that someone is working on, too bad.
     
    703704        }
    704705        catch(Exception error) {
    705             Gatherer.printStackTrace(error);
     706            DebugStream.printStackTrace(error);
    706707            collect_cfg = null;
    707708        }
Note: See TracChangeset for help on using the changeset viewer.