Changeset 21584

Show
Ignore:
Timestamp:
22.01.2010 16:32:03 (9 years ago)
Author:
mdewsnip
Message:

Changed BasePlugout? to use the infodbtype value from the arcinfo object passed into it, instead of being hard-wired to use GDBM. Part of making the code less GDBM-specific.

Files:
1 modified

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm

    r21566 r21584  
    741741                     $collect_dir,$oid_files); 
    742742 
     743    # Get the infodbtype value for this collection from the arcinfo object 
     744    my $infodbtype = $self->{'output_info'}->{'infodbtype'}; 
    743745    my $output_dir = $self->{'output_dir'}; 
    744746 
    745     my $doc_db = &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", $output_dir); 
    746     my $src_db = &dbutil::get_infodb_file_path("gdbm", "archiveinf-src", $output_dir); 
     747    my $doc_db = &dbutil::get_infodb_file_path($infodbtype, "archiveinf-doc", $output_dir); 
     748    my $src_db = &dbutil::get_infodb_file_path($infodbtype, "archiveinf-src", $output_dir); 
    747749 
    748750    ##print STDERR "*** To set in db: \n\t$doc_db\n\t$oid\n\t$doc_db_text\n"; 
     
    753755    $oid_files->{'sort-meta'} = [ $oid_files->{'sort-meta'} ]; 
    754756 
    755     my $infodb_file_handle = &dbutil::open_infodb_write_handle("gdbm", $doc_db, "append"); 
    756     &dbutil::write_infodb_entry("gdbm", $infodb_file_handle, $oid, $oid_files); 
    757     &dbutil::close_infodb_write_handle("gdbm", $infodb_file_handle); 
     757    my $infodb_file_handle = &dbutil::open_infodb_write_handle($infodbtype, $doc_db, "append"); 
     758    &dbutil::write_infodb_entry($infodbtype, $infodb_file_handle, $oid, $oid_files); 
     759    &dbutil::close_infodb_write_handle($infodbtype, $infodb_file_handle); 
    758760 
    759761    foreach my $rl (keys %$reverse_lookups) {