Changeset 21412

Show
Ignore:
Timestamp:
04.01.2010 23:11:26 (9 years ago)
Author:
davidb
Message:

Separation of different database back-ends into individual files

Files:
1 modified

Legend:

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

    r20802 r21412  
    4242use strict; 
    4343 
    44 use dbutil; 
     44use dbutil::gdbm; 
    4545 
    4646# File format read in: OID <tab> Filename <tab> Optional-Index-Status 
     
    9292    my $infodb_map = {}; 
    9393 
    94     &dbutil::read_infodb_file_gdbm($filename,$infodb_map); 
     94    &dbutil::gdbm::read_infodb_file($filename,$infodb_map); 
    9595 
    9696    foreach my $oid ( keys %$infodb_map ) { 
     
    129129    my $infodb_map = {}; 
    130130 
    131     &dbutil::read_infodb_keys_gdbm($filename,$infodb_map); 
     131    &dbutil::gdbm::read_infodb_keys($filename,$infodb_map); 
    132132 
    133133    foreach my $file ( keys %$infodb_map ) { 
     
    162162    my $rev_infodb_map = {}; 
    163163 
    164     &dbutil::read_infodb_file_gdbm($rev_filename,$rev_infodb_map); 
     164    &dbutil::gdbm::read_infodb_file($rev_filename,$rev_infodb_map); 
    165165 
    166166    foreach my $srcfile ( keys %$rev_infodb_map ) { 
     
    199199    # read it in 
    200200    my $infodb_map = {}; 
    201     &dbutil::read_infodb_file_gdbm($filename,$infodb_map); 
     201    &dbutil::gdbm::read_infodb_file($filename,$infodb_map); 
    202202 
    203203    # change index-status values 
     
    217217 
    218218    # write out again 
    219     my $infodb_handle = &dbutil::open_infodb_write_handle_gdbm($filename); 
     219    my $infodb_handle = &dbutil::gdbm::open_infodb_write_handle($filename); 
    220220    foreach my $oid ( keys %$infodb_map ) { 
    221221    # consider making the following a method in dbutil 
     
    227227    print $infodb_handle '-' x 70, "\n"; 
    228228    } 
    229     &dbutil::close_infodb_write_handle_gdbm($infodb_handle); 
     229    &dbutil::gdbm::close_infodb_write_handle($infodb_handle); 
    230230 
    231231} 
     
    239239    my $rev_infodb_map = $self->{'reverse-info'}; 
    240240    my $rev_infodb_handle  
    241     = &dbutil::open_infodb_write_handle_gdbm($rev_filename,"append"); 
     241    = &dbutil::gdbm::open_infodb_write_handle($rev_filename,"append"); 
    242242 
    243243    foreach my $key ( keys %$rev_infodb_map ) { 
    244244    my $val_hash = $rev_infodb_map->{$key}; 
    245     &dbutil::write_infodb_entry_gdbm($rev_infodb_handle,$key,$val_hash); 
    246     } 
    247     &dbutil::close_infodb_write_handle_gdbm($rev_infodb_handle); 
     245    &dbutil::gdbm::write_infodb_entry($rev_infodb_handle,$key,$val_hash); 
     246    } 
     247    &dbutil::gdbm::close_infodb_write_handle($rev_infodb_handle); 
    248248 
    249249}