Ignore:
Timestamp:
2011-08-12T18:10:11+12:00 (13 years ago)
Author:
ak19
Message:

Dr Bainbridge has fixed the conflict between OAIPlugin and EmbeddedMetadataPlugin which resulted in the oai tutorial (with the JCDL pictures) going wrong: meta was not attached to the images. Dr Bainbridge solved the problem by introducing a new method in BasePlugin: can_process_this_file_for_metadata, which by default returns undef so that things should work by default mostly. This method has been overridden in OAIPlugin and EmbeddedMetadataPlugin now to do the right thing there.

File:
1 edited

Legend:

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

    r24290 r24403  
    528528}
    529529
     530# Even if a plugin can extract metadata in its metadata_read pass,
     531# make the default return 'undef' so processing of the file continues
     532# down the pipeline, so other plugins can also have the opportunity to
     533# locate metadata and set it up in the extrametakeys variables that
     534# are passed around.
     535
     536sub can_process_this_file_for_metadata {
     537    my $self = shift(@_);
     538
     539    return undef;
     540}
     541
     542
    530543# just converts path as is to utf8.
    531544sub filepath_to_utf8 {
     
    11311144    # can we process this file??
    11321145    my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file);
    1133     return undef unless $self->can_process_this_file($filename_full_path);
     1146    return undef unless $self->can_process_this_file_for_metadata($filename_full_path);
    11341147
    11351148    return 1; # we recognise the file, but don't actually do anything with it
Note: See TracChangeset for help on using the changeset viewer.