Ignore:
Timestamp:
2011-09-02T16:28:57+12:00 (13 years ago)
Author:
ak19
Message:

Added new abstract plugin MetadataRead that defines can_process_this_file_for_metadata that MetadataPlugin subclasses can inherit (if MetadataRead is listed first in the ISA inheritance list) and which will then override the one defined in BasePlugin. For now committing MARC, ISIS and OAIPlugins which now additionally inherit from MetadataRead. Other metadataPlugins also need to be committed.

File:
1 edited

Legend:

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

    r18563 r24547  
    2828
    2929use SplitTextFile;
     30use MetadataRead;
    3031
    3132use unicode;
     
    3637no strict 'refs'; # allow filehandles to be variables and viceversa
    3738
     39# methods defined in superclasses that have the same signature take
     40# precedence in the order given in the ISA list. We want MetaPlugins to
     41# call MetadataRead's can_process_this_file_for_metadata(), rather than
     42# calling BasePlugin's version of the same method, so list inherited
     43# superclasses in this order.
    3844sub BEGIN {
    39     @MARCPlugin::ISA = ('SplitTextFile');
     45    @MARCPlugin::ISA = ('MetadataRead', 'SplitTextFile');
    4046    unshift (@INC, "$ENV{'GSDLHOME'}/perllib/cpan");
    4147}
     
    8490    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});
    8591    push(@{$hashArgOptLists->{"OptList"}},$options);
    86 
     92 
     93    # this does nothing yet, but if member vars are ever added
     94    # to MetadataRead, will need to do this anyway:
     95    #new MetadataRead($pluginlist, $inputargs, $hashArgOptLists);
    8796    my $self = new SplitTextFile($pluginlist, $inputargs, $hashArgOptLists);
    8897
Note: See TracChangeset for help on using the changeset viewer.