Changeset 20098

Show
Ignore:
Timestamp:
29.07.2009 13:22:28 (10 years ago)
Author:
kjdon
Message:

use colcfg read_collection/building_cfg methods instead of switching on gs_mode.

Location:
gsdl/trunk/bin/script
Files:
5 modified

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/bin/script/buildcol.pl

    r18590 r20098  
    360360    my ($collectcfg, $buildtype);  
    361361    ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 
    362     if ($gs_mode eq "gs2") { 
    363         $collectcfg = &colcfg::read_collect_cfg ($configfilename); 
    364     } elsif ($gs_mode eq "gs3") { 
    365     $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename); 
    366     } 
     362    $collectcfg = &colcfg::read_collection_cfg ($configfilename, $gs_mode); 
    367363 
    368364    if ($verbosity !~ /\d+/) { 
  • gsdl/trunk/bin/script/explode_metadata_database.pl

    r19754 r20098  
    213213    # Read in the collection configuration file. 
    214214    my ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name(STDERR); 
    215     my $collectcfg; 
    216     if ($gs_mode eq "gs2") { 
    217         $collectcfg = &colcfg::read_collect_cfg ($configfilename); 
    218     } elsif ($gs_mode eq "gs3") { 
    219         $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename); 
    220     } 
     215    my $collectcfg = &colcfg::read_collect_cfg ($configfilename, $gs_mode); 
    221216    $plugin_options_string = &get_plugin_options($collectcfg, $plugin); 
    222217    } 
  • gsdl/trunk/bin/script/export.pl

    r19625 r20098  
    382382    # Read in the collection configuration file. 
    383383    ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 
    384          
    385      
    386     # Read in the collection configuration file. 
    387     ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 
    388      
    389     if ($gs_mode eq "gs2") { 
    390     $collectcfg = &colcfg::read_collect_cfg ($configfilename); 
    391     } elsif ($gs_mode eq "gs3") { 
    392     $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename); 
    393     } 
    394  
     384    $collectcfg = &colcfg::read_collection_cfg ($configfilename, $gs_mode); 
     385     
    395386    if (defined $collectcfg->{'importdir'} && $importdir eq "") { 
    396387    $importdir = $collectcfg->{'importdir'}; 
     
    648639    $doc_obj->add_utf8_metadata($section,$md_label, $val); 
    649640     
    650     # see cfgread4gs3.pm: GS2's "collectionextra" is called "description" in GS3, 
     641    # see collConfigxml.pm: GS2's "collectionextra" is called "description" in GS3, 
    651642    # while "collectionname" in GS2 is called "name" in GS3. 
    652     # Variable $nameMap variable in cfgread4gs3.pm maps between GS2 and GS3 
     643    # Variable $nameMap variable in collConfigxml.pm maps between GS2 and GS3 
    653644    if (($md_label eq "ex.collectionname^en") || ($md_label eq "ex.collectionname")) 
    654645    { 
  • gsdl/trunk/bin/script/import.pl

    r19775 r20098  
    371371    # Read in the collection configuration file. 
    372372    ($configfilename, $gs_mode) = &colcfg::get_collect_cfg_name($out); 
    373  
    374     if ($gs_mode eq "gs2") { 
    375         $collectcfg = &colcfg::read_collect_cfg ($configfilename); 
    376     } elsif ($gs_mode eq "gs3") { 
    377     $collectcfg = &colcfg::read_collection_cfg_xml ($configfilename); 
    378     } 
     373    $collectcfg = &colcfg::read_collection_cfg ($configfilename, $gs_mode); 
    379374 
    380375    if (defined $collectcfg->{'importdir'} && $importdir eq "") { 
  • gsdl/trunk/bin/script/incremental-buildcol.pl

    r19899 r20098  
    140140    # (e.g. collect.cfg now says lucene, but build.cfg says mgpp) 
    141141 
    142     my $buildcfg; 
    143     if ($gs_mode eq "gs2") { 
    144         $buildcfg = &colcfg::read_build_cfg ($build_cfg_filename); 
    145     } else { 
    146         $buildcfg = &colcfg::read_collection_cfg_xml($build_cfg_filename); 
    147     } 
     142    my $buildcfg = &colcfg::read_building_cfg ($build_cfg_filename, $gs_mode); 
    148143    if ($buildcfg->{'buildtype'} ne $collectcfg->{'buildtype'}) { 
    149144        print STDERR "*****\n";