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/OAIPlugin.pm

    r24404 r24547  
    3636use ReadTextFile; # needed for subroutine textcat_get_language_encoding
    3737use metadatautil;
    38 
     38use MetadataRead;
     39
     40# methods with identical signatures take precedence in the order given in the ISA list.
    3941sub BEGIN {
    40     @OAIPlugin::ISA = ('ReadXMLFile', 'ReadTextFile');
     42    @OAIPlugin::ISA = ('MetadataRead', 'ReadXMLFile', 'ReadTextFile');
    4143}
    4244
     
    183185    $self->{'metadata_xml'} .= $_;
    184186    }
    185 }
    186 
    187 sub can_process_this_file_for_metadata {
    188     my $self = shift(@_);
    189 
    190     return $self->can_process_this_file(@_);
    191187}
    192188
Note: See TracChangeset for help on using the changeset viewer.