Changeset 10305


Ignore:
Timestamp:
2005-07-26T10:17:12+12:00 (19 years ago)
Author:
davidb
Message:

newly introduced is_incremental() used to help determine if file needs
to be indexed or not.

File:
1 edited

Legend:

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

    r10254 r10305  
    137137        my $tmp = &util::filename_cat ($file, $subfile->[0]);
    138138        next if $tmp eq $file;
    139        
    140         my $doc_oid = $subfile->[1];
    141139
     140        # Decide if file needs to be processed
    142141        my $index_status = $archive_info->get_status_info($doc_oid);
    143142
    144         my $processor_mode = $processor->get_mode();       
     143        my $process_file = 0;
     144       
     145        if ($processor->get_mode() eq "infodb") {
     146        $process_file = 1;
     147        }
     148        else {
     149        if (!$processor->is_incremental()) {
     150            $process_file = 1;
     151        }
     152        else {
     153            # is incremental
    145154
    146         if (($processor_mode eq "infodb") || ($index_status eq "I")) {
     155            # check to see if file needs to be indexed
     156            my $doc_oid = $subfile->[1];
     157            $index_status = $archive_info->get_status_info($doc_oid);
    147158
     159            if ($index_status eq "I") {
     160            $process_file = 1;
     161            }
     162        }
     163        }
     164
     165
     166        if ($process_file) {
    148167        # note: metadata is not carried on to the next level
    149168        $count += &plugin::read ($pluginfo, $base_dir, $tmp, {}, $processor, $maxdocs, ($total_count+$count), $gli);
Note: See TracChangeset for help on using the changeset viewer.