Show
Ignore:
Timestamp:
05.06.2008 09:24:02 (11 years ago)
Author:
kjdon
Message:

plugin overhaul: ArchivesInf? and Directory plugins are not true plugins as they don't process a file during import. I'd like to get rid of them all together and make them part of import/build scripts. In the meantime they are still here, and inherit from AbstractPlugin? not BasePlugin? as they don't need all the options that BasePlugin? provides

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/plugins/ArchivesInfPlugin.pm

    r15865 r15870  
    11########################################################################### 
    22# 
    3 # ArcPlug.pm -- 
     3# ArchivesInfPlug.pm.pm -- 
    44# A component of the Greenstone digital library software 
    55# from the New Zealand Digital Library Project at the  
     
    3030# 12-05-02 Added usage datastructure - John Thompson 
    3131 
    32 package ArcPlug; 
     32package ArchivesInfPlugin; 
    3333 
    3434use util; 
    35 use BasPlug; 
     35use AbstractPlugin; 
    3636use plugin; 
    3737use arcinfo; 
     
    4242 
    4343BEGIN { 
    44     @ArcPlug::ISA = ('BasPlug'); 
     44    @ArchivesInfPlugin::ISA = ('AbstractPlugin'); 
    4545} 
    4646 
     
    4848         ]; 
    4949 
    50 my $options = { 'name'     => "ArcPlug", 
    51         'desc'     => "{ArcPlug.desc}", 
     50my $options = { 'name'     => "ArchivesInfPlugin", 
     51        'desc'     => "{ArchivesInfPlugin.desc}", 
    5252        'abstract' => "no", 
    5353        'inherits' => "yes" }; 
     
    6363    push(@$pluginlist, $class); 
    6464 
    65     if(defined $arguments){ push(@{$hashArgOptLists->{"ArgList"}},@{$arguments});} 
    66     if(defined $options) { push(@{$hashArgOptLists->{"OptList"}},$options)}; 
     65    push(@{$hashArgOptLists->{"ArgList"}},@{$arguments}); 
     66    push(@{$hashArgOptLists->{"OptList"}},$options); 
    6767 
    68     my $self = new BasPlug($pluginlist, $inputargs, $hashArgOptLists); 
     68    my $self = new AbstractPlugin($pluginlist, $inputargs, $hashArgOptLists); 
    6969 
    7070    return bless $self, $class; 
     
    120120 
    121121    # found an archives.inf file 
    122     &gsprintf($outhandle, "ArcPlug: {common.processing} $archive_info_filename\n") if $self->{'verbosity'} > 1; 
     122    &gsprintf($outhandle, "ArchivesInfPlugin: {common.processing} $archive_info_filename\n") if $self->{'verbosity'} > 1; 
    123123 
    124124    # read in the archives information file