Changeset 23212

Show
Ignore:
Timestamp:
26.10.2010 15:33:45 (9 years ago)
Author:
kjdon
Message:

metadata_read no longer takes maxdocs args - metadata_read must process all docs, so that whatever few are actually processed by read will get their metadata

Location:
main/trunk/greenstone2/perllib
Files:
13 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugin.pm

    r23170 r23212  
    280280    my ($pluginfo, $base_dir, $file, $block_hash,  
    281281    $extrametakeys, $extrametadata, $extrametafile,  
    282     $processor, $maxdocs, $gli, $aux) = @_; 
    283  
    284     $maxdocs = -1 unless defined $maxdocs && $maxdocs =~ /\d/; 
     282    $processor, $gli, $aux) = @_; 
     283 
    285284    $gli = 0 unless defined $gli; 
    286285 
     
    313312    $rv = $plugobj->metadata_read($pluginfo, $base_dir, $file, $block_hash, 
    314313                 $extrametakeys, $extrametadata, $extrametafile, 
    315                  $processor, $maxdocs, $gli, $aux); 
     314                 $processor, $gli, $aux); 
    316315 
    317316    if (defined $rv) { 
  • main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm

    r23171 r23212  
    189189    my ($pluginfo, $base_dir, $file, $block_hash,  
    190190    $extrametakeys, $extrametadata, $extrametafile, 
    191     $processor, $maxdocs, $gli) = @_; 
     191    $processor, $gli, $aux) = @_; 
    192192 
    193193    return undef; 
  • main/trunk/greenstone2/perllib/plugins/BasePlugin.pm

    r22953 r23212  
    939939    my ($pluginfo, $base_dir, $file, $block_hash,  
    940940    $extrametakeys, $extrametadata, $extrametafile, 
    941     $processor, $maxdocs, $gli) = @_; 
     941    $processor, $gli, $aux) = @_; 
    942942     
    943943    # can we process this file?? 
  • main/trunk/greenstone2/perllib/plugins/DSpacePlugin.pm

    r21367 r23212  
    256256    my ($pluginfo, $base_dir, $file, $block_hash,  
    257257    $extrametakeys, $extrametadata, $extrametafile, 
    258     $processor, $maxdocs, $gli) = @_; 
     258    $processor, $gli, $aux) = @_; 
    259259 
    260260    my $only_first_doc = $self->{'only_first_doc'}; 
  • main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm

    r23171 r23212  
    336336    my ($pluginfo, $base_dir, $file, $block_hash,  
    337337    $extrametakeys, $extrametadata, $extrametafile, 
    338     $processor, $maxdocs, $gli) = @_; 
     338    $processor, $gli, $aux) = @_; 
    339339 
    340340    return undef; 
     
    379379    # Recur over directory contents. 
    380380    my (@dir, $subfile); 
    381     my $count = 0; 
    382381     
    383382    print $outhandle "DirectoryPlugin read: getting directory $dirname\n" if ($verbosity > 2); 
     
    433432    } 
    434433    } 
    435     # apply metadata pass for each of the files in the directory 
     434    # apply metadata pass for each of the files in the directory -- ignore 
     435    # maxdocs here 
    436436    my $num_files = scalar(@dir); 
    437437    for (my $i = 0; $i < scalar(@dir); $i++) { 
    438438    my $subfile = $dir[$i]; 
    439439    my $this_file_base_dir = $base_dir; 
    440     last if ($maxdocs != -1 && $count >= $maxdocs); 
    441440    next if ($subfile =~ m/^\.\.?$/); 
    442441    my $file_subfile = &util::filename_cat($file, $subfile); 
     
    450449    print $outhandle "DirectoryPlugin metadata recurring: $subfile\n" if ($verbosity > 2); 
    451450     
    452     $count += &plugin::metadata_read ($pluginfo, $this_file_base_dir, 
    453                       $file_subfile,$block_hash, 
    454                       \@extrametakeys, \%extrametadata, 
    455                       \%extrametafile, 
    456                       $processor, $maxdocs, $gli); 
     451    &plugin::metadata_read ($pluginfo, $this_file_base_dir, 
     452                $file_subfile,$block_hash, 
     453                \@extrametakeys, \%extrametadata, 
     454                \%extrametafile, 
     455                $processor, $gli); 
    457456    $additionalmetadata = 1; 
    458457    } 
     
    485484     
    486485    # import each of the files in the directory 
    487     $count=0; 
     486    my $count=0; 
    488487    for (my $i = 0; $i <= scalar(@dir); $i++) { 
    489488    # When every file in the directory has been done, pause for a moment (figuratively!) 
  • main/trunk/greenstone2/perllib/plugins/EmbeddedMetadataPlugin.pm

    r22552 r23212  
    203203  my ($pluginfo, $base_dir, $file, $block_hash,  
    204204      $extrametakeys, $extrametadata, $extrametafile, 
    205       $processor, $maxdocs, $gli) = @_; 
     205      $processor, $gli, $aux) = @_; 
    206206   
    207207  my ($filename_full_path, $filename_no_path) = &util::get_full_filenames($base_dir, $file); 
  • main/trunk/greenstone2/perllib/plugins/GreenstoneXMLPlugin.pm

    r23167 r23212  
    9797    my ($pluginfo, $base_dir, $file, $block_hash,  
    9898    $extrametakeys, $extrametadata, $extrametafile, 
    99     $processor, $maxdocs, $gli) = @_; 
     99    $processor, $gli, $aux) = @_; 
    100100 
    101101    my $outhandle = $self->{'outhandle'}; 
  • main/trunk/greenstone2/perllib/plugins/LOMPlugin.pm

    r22900 r23212  
    123123    my ($pluginfo, $base_dir, $file, $block_hash,  
    124124    $extrametakeys, $extrametadata, $extrametafile, 
    125     $processor, $maxdocs, $gli) = @_; 
     125    $processor, $gli, $aux) = @_; 
    126126 
    127127    my $outhandle = $self->{'outhandle'}; 
  • main/trunk/greenstone2/perllib/plugins/MetadataCSVPlugin.pm

    r22852 r23212  
    9999    my ($pluginfo, $base_dir, $file, $block_hash,  
    100100    $extrametakeys, $extrametadata, $extrametafile, 
    101     $processor, $maxdocs, $gli) = @_; 
     101    $processor, $gli, $aux) = @_; 
    102102 
    103103    # Read metadata from CSV files 
  • main/trunk/greenstone2/perllib/plugins/MetadataXMLPlugin.pm

    r22857 r23212  
    228228    my ($pluginfo, $base_dir, $file, $block_hash,  
    229229    $extrametakeys, $extrametadata,$extrametafile, 
    230     $processor, $maxdocs, $gli) = @_; 
     230    $processor, $gli, $aux) = @_; 
    231231 
    232232    my $filename = &util::filename_cat($base_dir, $file); 
  • main/trunk/greenstone2/perllib/plugins/OAIMetadataXMLPlugin.pm

    r22232 r23212  
    8484{ 
    8585  my $self = shift (@_); 
    86   my ($pluginfo, $base_dir, $file, $block_hash, $extrametakeys, $extrametadata,$extrametafile, $processor, $maxdocs, $gli) = @_; 
     86  my ($pluginfo, $base_dir, $file, $block_hash, $extrametakeys, $extrametadata,$extrametafile, $processor, $gli, $aux) = @_; 
    8787   
    8888  # Read in the normal metadata.xml file 
  • main/trunk/greenstone2/perllib/plugins/OAIPlugin.pm

    r22316 r23212  
    191191    my ($pluginfo, $base_dir, $file, $block_hash,  
    192192    $extrametakeys, $extrametadata, $extrametafile, 
    193     $processor, $maxdocs, $gli) = @_; 
     193    $processor, $gli, $aux) = @_; 
    194194 
    195195    # can we process this file?? 
  • main/trunk/greenstone2/perllib/plugins/SplitTextFile.pm

    r19617 r23212  
    120120    my ($pluginfo, $base_dir, $file, $block_hash,  
    121121    $extrametakeys, $extrametadata, $extrametafile, 
    122     $processor, $maxdocs, $gli) = @_; 
    123  
    124     # returns 1 if matches process_exp, and has done blocking in the meantime 
     122    $processor, $gli, $aux) = @_; 
     123 
     124    # returns 1 if matches process_exp 
    125125    my $matched = $self->SUPER::metadata_read($pluginfo, $base_dir, $file, 
    126126                          $block_hash,  
     
    128128                          $extrametadata,  
    129129                          $extrametafile, 
    130                           $processor, $maxdocs, $gli); 
     130                          $processor, $gli, $aux); 
    131131    my $split_matched = undef; 
    132132