Show
Ignore:
Timestamp:
06.11.2008 13:50:44 (11 years ago)
Author:
kjdon
Message:

AbstractPLugin has been removedd, so these now inherit from PrintInfo?, and code from AbstractPlugin? has been added to these two classes

Files:
1 modified

Legend:

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

    r16392 r17738  
    2424########################################################################### 
    2525 
    26 # plugin which recurses through an archives.inf file 
     26# plugin which reads through an archives.inf file 
    2727# (i.e. the file generated in the archives directory 
    2828# when an import is done), processing each file it finds  
    2929 
    30 # 12-05-02 Added usage datastructure - John Thompson 
    31  
    3230package ArchivesInfPlugin; 
    3331 
    3432use util; 
    35 use AbstractPlugin; 
     33use PrintInfo; 
    3634use plugin; 
    3735use arcinfo; 
     
    4240 
    4341BEGIN { 
    44     @ArchivesInfPlugin::ISA = ('AbstractPlugin'); 
     42    @ArchivesInfPlugin::ISA = ('PrintInfo'); 
    4543} 
    4644 
     
    6664    push(@{$hashArgOptLists->{"OptList"}},$options); 
    6765 
    68     my $self = new AbstractPlugin($pluginlist, $inputargs, $hashArgOptLists); 
     66    my $self = new PrintInfo($pluginlist, $inputargs, $hashArgOptLists); 
    6967 
    7068    return bless $self, $class; 
     69} 
     70 
     71# called once, at the start of processing 
     72sub init { 
     73    my $self = shift (@_); 
     74    my ($verbosity, $outhandle, $failhandle) = @_; 
     75 
     76    # verbosity is passed through from the processor 
     77    $self->{'verbosity'} = $verbosity; 
     78 
     79    # as are the outhandle and failhandle 
     80    $self->{'outhandle'} = $outhandle if defined $outhandle; 
     81    $self->{'failhandle'} = $failhandle; 
     82 
    7183} 
    7284 
     
    94106} 
    95107 
     108# called at the beginning of each plugin pass (import has one, buildin has many) 
     109sub begin { 
     110    my $self = shift (@_); 
     111    my ($pluginfo, $base_dir, $processor, $maxdocs) = @_; 
     112 
     113} 
     114 
     115# called at the end of each plugin pass 
     116sub end { 
     117    my ($self) = shift (@_); 
     118 
     119} 
     120 
     121# called if we are doing incremental building 
     122sub set_incremental { 
     123    my $self = shift(@_); 
     124    my ($incremental) = @_; 
     125 
     126    $self->{'incremental'} = $incremental; 
     127} 
     128 
    96129# return 1 if this class might recurse using $pluginfo 
    97130sub is_recursive { 
     
    102135 
    103136 
     137sub compile_stats { 
     138    my $self = shift(@_); 
     139    my ($stats) = @_; 
     140} 
     141 
     142# We don't do metadata_read 
     143sub metadata_read { 
     144    my $self = shift (@_); 
     145    my ($pluginfo, $base_dir, $file, $block_hash, $extrametakeys, $extrametadata, $processor, $maxdocs, $gli) = @_; 
     146 
     147    return undef; 
     148} 
     149 
     150# we don't do any file blocking 
     151sub file_block_read { 
     152 
     153    my $self = shift (@_);   
     154    my ($pluginfo, $base_dir, $file, $block_hash, $metadata, $gli) = @_; 
     155 
     156    return undef; 
     157} 
    104158 
    105159