Ignore:
Timestamp:
2012-09-20T09:36:42+12:00 (12 years ago)
Author:
kjdon
Message:

added plugin_specific_process method - inheriting plugins can use this to add metadata etc

File:
1 edited

Legend:

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

    r25971 r26222  
    344344    $doc_obj = $self->{'doc_obj'};
    345345    } else {
    346     my ($dir);
    347     ($dir, $file) = $filename_full_path =~ /^(.*?)([^\/\\]*)$/;
     346    my ($dir, $item_file);
     347    ($dir, $item_file) = $filename_full_path =~ /^(.*?)([^\/\\]*)$/;
    348348
    349349    #process the .item file
    350     $doc_obj = $self->process_item($filename_full_path, $dir, $file, $processor, $metadata);
     350    $doc_obj = $self->process_item($filename_full_path, $dir, $item_file, $processor, $metadata);
    351351   
    352352    }
     
    362362    $self->extra_metadata ($doc_obj, $section, $metadata);
    363363    $self->auto_extract_metadata ($doc_obj);
    364 
     364    $self->plugin_specific_process($base_dir, $file, $doc_obj, $gli);
    365365    # if we haven't found any Title so far, assign one
    366366    $self->title_fallback($doc_obj,$section,$filename_no_path);
     
    368368    $self->add_OID($doc_obj);
    369369    return (1,$doc_obj);
     370}
     371# override this for an inheriting plugin to add extra metadata etc
     372sub plugin_specific_process {
     373    my $self = shift(@_);
     374    my ($base_dir, $file, $doc_obj, $gli) = @_;
     375
    370376}
    371377
Note: See TracChangeset for help on using the changeset viewer.