Changeset 6047


Ignore:
Timestamp:
2003-11-28T17:53:00+13:00 (20 years ago)
Author:
jmt12
Message:

Extracted metadata is now always re-extracted as it may have changed since the last build (ie thumbsize)

File:
1 edited

Legend:

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

    r5880 r6047  
    131131                // If we successfully retrieved an element (and we should have) we can continue.
    132132                // WARNING!! There is one known exception - MARC records. Adding the extracted elements is all good, but adding the extracted metadata causes the whole thing to collapse in a pile of unhappy.
    133                 if(element != null && !file_path.endsWith(StaticStrings.MARC_EXTENSION)) {
     133                if(element != null && !file_path.endsWith(StaticStrings.MARC_EXTENSION) && (element.getNamespace().equals("") || element.getNamespace().equals(Utility.EXTRACTED_METADATA_NAMESPACE))) {
    134134                // Retrieve the metadata for the current file
    135135                File target_file = new File(file_path);
    136136                ArrayList metadatum = Gatherer.c_man.getCollection().gdm.getMetadata(target_file);
    137                 // If no metadata exists for the current element, add it
     137                // Remove any existing metadata for this element
    138138                boolean found = false;
    139139                for(int k = 0; !found && k < metadatum.size(); k++) {
    140140                    Metadata sibling = (Metadata) metadatum.get(k);
    141                     found = element.equals(sibling.getElement());
     141                    if(element.equals(sibling.getElement())) {
     142                    Gatherer.c_man.getCollection().gdm.metadataChanged(new MSMEvent(this, System.currentTimeMillis(), target_file, sibling, null));
     143                    }
    142144                }
    143145                metadatum = null;
Note: See TracChangeset for help on using the changeset viewer.