Changeset 21566

Show
Ignore:
Timestamp:
21.01.2010 16:20:42 (9 years ago)
Author:
mdewsnip
Message:

Changed all places explicitly using "archiveinf-doc.gdb" or "archiveinf-src.gdb" to use the dbutil::get_infodb_file_path() function... you know, the one that should have been used originally? In preparation for making it possible to use something other than GDBM, and part of making the code less GDBM-specific.

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

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/cgiactions/metadataaction.pm

    r21564 r21566  
    515515    $metapos = 0 if (!defined $metapos); 
    516516 
    517     my $doc_db = "archiveinf-doc.gdb"; 
    518     my $arcinfo_doc_filename = &util::filename_cat ($archive_dir, $doc_db); 
     517    my $arcinfo_doc_filename = &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", $archive_dir); 
    519518 
    520519    my $doc_rec_string = &dbutil::read_infodb_entry("gdbm", $arcinfo_doc_filename, $docid); 
     
    693692 
    694693    if (defined $docid) { 
    695  
    696     my $doc_db = "archiveinf-doc.gdb"; 
    697     my $arcinfo_doc_filename = &util::filename_cat ($archive_dir, $doc_db); 
    698  
     694    my $arcinfo_doc_filename = &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", $archive_dir); 
    699695    my $doc_rec_string = &dbutil::read_infodb_entry("gdbm", $arcinfo_doc_filename, $docid); 
    700696    my $doc_rec = &dbutil::convert_infodb_string_to_hash($doc_rec_string); 
  • main/trunk/greenstone2/perllib/doc.pm

    r20775 r21566  
    10301030} 
    10311031 
    1032 # used for writing out archiveinf-doc.gdb, to list all the metadata files 
     1032# used for writing out the archiveinf-doc info database, to list all the metadata files 
    10331033sub get_meta_files { 
    10341034    my $self = shift (@_); 
  • main/trunk/greenstone2/perllib/inexport.pm

    r21564 r21566  
    3636sub src_db_file { 
    3737    my ($archivedir) = @_; 
    38     return &util::filename_cat ($archivedir, "archiveinf-src.gdb"); 
     38    return &dbutil::get_infodb_file_path("gdbm", "archiveinf-src", $archivedir); 
    3939} 
    4040 
    4141sub doc_db_file { 
    4242    my ($archivedir) = @_; 
    43     return &util::filename_cat ($archivedir, "archiveinf-doc.gdb"); 
     43    return &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", $archivedir); 
    4444} 
    4545 
  • main/trunk/greenstone2/perllib/plugins/ArchivesInfPlugin.pm

    r21564 r21566  
    2424########################################################################### 
    2525 
    26 # plugin which reads through an archives.inf (or info database equivalent, 
    27 # archiveinf-doc.gdb file -- i.e. the file generated in the 
    28 # archives directory when an import is done), processing each file it 
    29 # finds 
     26# plugin which reads through an archives.inf (or archiveinf-doc info database equivalent) 
     27# -- i.e. the file generated in the archives directory when an import is done), 
     28# processing each file it finds 
    3029 
    3130package ArchivesInfPlugin; 
     
    224223##    my $archive_info_filename = &util::filename_cat($base_dir,$file,"archives.inf"); 
    225224 
    226     my $doc_db = "archiveinf-doc.gdb"; 
    227     my $archive_info_filename = &util::filename_cat($base_dir,$file,$doc_db); 
     225    my $archive_info_filename = &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", &util::filename_cat($base_dir, $file)); 
    228226 
    229227    if (-e $archive_info_filename) { 
  • main/trunk/greenstone2/perllib/plugins/DirectoryPlugin.pm

    r21563 r21566  
    132132    my $output_dir = $processor->getoutputdir(); 
    133133##  my $archives_inf = &util::filename_cat($output_dir,"archives.inf"); 
    134     my $doc_db = "archiveinf-doc.gdb"; 
    135         my $archives_inf = &util::filename_cat($output_dir,$doc_db); 
     134        my $archives_inf = &dbutil::get_infodb_file_path("gdbm", "archiveinf-doc", $output_dir); 
    136135 
    137136    if ( -e $archives_inf ) { 
  • main/trunk/greenstone2/perllib/plugouts/BasePlugout.pm

    r21565 r21566  
    743743    my $output_dir = $self->{'output_dir'}; 
    744744 
    745     my $doc_db = &util::filename_cat($output_dir,"archiveinf-doc.gdb"); 
    746     my $src_db = &util::filename_cat($output_dir,"archiveinf-src.gdb"); 
     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); 
    747747 
    748748    ##print STDERR "*** To set in db: \n\t$doc_db\n\t$oid\n\t$doc_db_text\n"; 
  • main/trunk/greenstone2/perllib/strings.properties

    r20883 r21566  
    705705AcronymExtractor.markup_acronyms:Add acronym metadata into document text. 
    706706 
    707 ArchivesInfPlugin.desc:Plugin which processes the archive info database (archiveinf-doc.gdb) which is generated by the import process. It passes each archive file listed in the database to the plugin pipeline to be processed by GreenstoneXMLPlugin. 
     707ArchivesInfPlugin.desc:Plugin which processes the archive info database (archiveinf-doc) which is generated by the import process. It passes each archive file listed in the database to the plugin pipeline to be processed by GreenstoneXMLPlugin. 
    708708ArchivesInfPlugin.reversesort:Sort in reverse order. Useful if the -sortmeta option was used with import.pl. 
    709709 
  • main/trunk/greenstone2/perllib/strings_fr.properties

    r19551 r21566  
    692692AcronymExtractor.markup_acronyms:Ajouter des métadonnées d'acromyme au texte du document   
    693693 
    694 ArchivesInfPlugin.desc:Plugiciel qui traite la base de données d'informations sur les archives (archiveinf-doc.gdb) qui est générée pendant le processus d'importation. Il transmet chaque fichier d'archive référencé dans la base au pipeline de plugiciels pour être traité par GreenstoneXMLPlugin.   
     694ArchivesInfPlugin.desc:Plugiciel qui traite la base de données d'informations sur les archives (archiveinf-doc) qui est générée pendant le processus d'importation. Il transmet chaque fichier d'archive référencé dans la base au pipeline de plugiciels pour être traité par GreenstoneXMLPlugin.   
    695695 
    696696AutoExtractMetadata.desc:Plugiciel de base qui rassemble toutes les fonctionnalités d'extraction des plugiciels d'extraction.   
  • main/trunk/greenstone2/perllib/strings_zh.properties

    r19658 r21566  
    884884 
    885885ArchivesInfPlugin.desc:本插件倄理富å 
    886 ¥è¿‡çš‹ç”Ÿæˆçš„存档文件数据库archives-doc.gdb。它将该数据库䞭的每䞪存档archive文件通过管道机制递亀给GreenstoneXMLPlugin倄理。   
     886¥è¿‡çš‹ç”Ÿæˆçš„存档文件数据库archives-doc。它将该数据库䞭的每䞪存档archive文件通过管道机制递亀给GreenstoneXMLPlugin倄理。   
    887887 
    888888AutoExtractMetadata.desc:将抜取插件䞭所有抜取功胜聚集到䞀起的基本插件