Changeset 4399


Ignore:
Timestamp:
2003-05-29T11:08:06+12:00 (21 years ago)
Author:
jmt12
Message:

2030087: Fixed both the problem with adding metadata where an existing fileset element was found but not used, and the bug where removing the first (and hence overwriting) entry of several metadata entries with the same element caused inherited metadata to be, um, inherited where the second entry should have still been overwriting.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/gli/src/org/greenstone/gatherer/msm/GDMDocument.java

    r4370 r4399  
    7676    /** Add this metadata to the named file. There is one tricky thing to consider. Whenever a metadata entry is added it is taken to be accumulating except if it is the first added, in which case it overwrites! */
    7777    public void addMetadata(String filename, Metadata metadata) {
    78     System.err.println("Add '" + metadata + "' to " + (filename != null ? filename : "directory."));
     78    ///ystem.err.println("Add '" + metadata + "' to " + (filename != null ? filename : "directory."));
    7979    try {
    8080        // Retrieve the document element.
     
    9292            // Have we found a match. If so break out of for loop.
    9393            if(filename != null && filename.matches(filename_pattern) && !filename_pattern.equals(DIRECTORY_FILENAME)) {
    94             System.err.println("Adding to existing file fileset!");
     94            ///ystem.err.println("Adding to existing file fileset!");
    9595            found = true;
    9696            }
    9797            else if(filename == null && filename_pattern.equals(DIRECTORY_FILENAME)) {
    98             System.err.println("Adding to existing folder fileset!");
     98            ///ystem.err.println("Adding to existing folder fileset!");
    9999            ///ystem.err.println("filename_pattern = '" + filename_pattern + "'");
    100100            found = true;
     
    111111        // If we still haven't found an existing fileset, then its time to create one.
    112112        if(fileset_element == null) {
    113         System.err.println("Creating a new fileset.");
     113        ///ystem.err.println("Creating a new fileset.");
    114114        fileset_element = base_document.createElement(FILESET_ELEMENT);
    115115        Element filename_element = base_document.createElement(FILENAME_ELEMENT);
Note: See TracChangeset for help on using the changeset viewer.