Changeset 21240

Show
Ignore:
Timestamp:
02.12.2009 17:11:32 (10 years ago)
Author:
kjdon
Message:

use the new PharosImageIndexer? plugin

Files:
1 modified

Legend:

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

    r19361 r21240  
    2828use BasePlugin; 
    2929use ImageConverter; 
     30use PharosImageIndexer; 
    3031 
    3132use strict; 
     
    3637 
    3738sub BEGIN { 
    38     @ImagePlugin::ISA = ('BasePlugin', 'ImageConverter'); 
     39    @ImagePlugin::ISA = ('BasePlugin', 'ImageConverter', 'PharosImageIndexer'); 
    3940} 
    4041 
     
    6364    push(@{$hashArgOptLists->{"OptList"}},$options); 
    6465 
     66     
    6567    new ImageConverter($pluginlist, $inputargs, $hashArgOptLists); 
     68    new PharosImageIndexer($pluginlist, $inputargs, $hashArgOptLists); 
    6669    my $self = new BasePlugin($pluginlist, $inputargs, $hashArgOptLists); 
    6770 
     
    7578    $self->SUPER::init(@_); 
    7679    $self->ImageConverter::init(); 
     80    $self->PharosImageIndexer::init(); 
    7781    $self->{'cover_image'} = 0; # makes no sense for images 
    7882} 
     
    8488    $self->SUPER::begin(@_); 
    8589    $self->ImageConverter::begin(@_); 
     90    $self->PharosImageIndexer::begin(@_); 
    8691} 
    8792 
     
    144149} 
    145150 
     151sub post_process_doc_obj { 
     152    my $self = shift (@_); 
     153    # options?? 
     154    my ($pluginfo, $base_dir, $file, $metadata, $doc_obj, $gli) = @_; 
     155    if ($self->{'enable_pharos_imageis'}) { 
     156    $self->pharos_index_image(&util::filename_cat($base_dir, $file), $doc_obj); 
     157    } 
     158} 
     159 
    146160sub clean_up_after_doc_obj_processing { 
    147161    my $self = shift(@_);