Ignore:
Timestamp:
2011-08-17T18:52:58+12:00 (13 years ago)
Author:
ak19
Message:
  1. Dr Bainbridge fixed another bug with the EmbeddedMetadataPlugin and its interaction with OAIPlugin: extracted metadata is now merged into any earlier extracted metadata table, so that ex.dc.* meta extracted by the OAIPlugin higher up in the plugin pipeline is preserved after EmbeddedMetaPlug is through with the file. 2. Removed recent PDFPlugin commit where can_process_this_file_for_metadata was overridden. It isn't needed and may have adverse effects.
File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugins/EmbeddedMetadataPlugin.pm

    r24414 r24419  
    281281    # Associate the metadata now
    282282
    283     $extrametadata->{$file} = \%exif_metadata;
    284     push(@$extrametakeys, $file);
     283    if (defined $extrametadata->{$file}) {
     284    print STDERR "\n****  Need to merge new metadata with existing stored metadata: file = $file\n" if $verbosity > 2;
     285
     286    my $file_metadata_table =     $extrametadata->{$file};
     287
     288    foreach my $metaname (keys %exif_metadata) {
     289        # will create new entry if one does not already exist
     290        push(@{$file_metadata_table->{$metaname}}, @{$exif_metadata{$metaname}});       
     291    }
     292
     293    # no need to push $file on to $extrametakeys as it is already in the list
     294    }
     295    else {
     296    $extrametadata->{$file} = \%exif_metadata;
     297    push(@$extrametakeys, $file);
     298    }
    285299
    286300}
Note: See TracChangeset for help on using the changeset viewer.