Changeset 14558 for gsdl/trunk


Ignore:
Timestamp:
2007-09-22T16:18:03+12:00 (17 years ago)
Author:
shaoqun
Message:

make it parse the plugout element in the collectionConfig.xml

File:
1 edited

Legend:

Unmodified
Added
Removed
  • gsdl/trunk/perllib/cfgread4gs3.pm

    r14244 r14558  
    7878           "index" => "indexes",
    7979           "plugin" => "plugin",
     80               "plugout" => "plugout",
    8081           "indexOption" => "indexoptions",
    8182           "searchType" => "searchtype",
     
    99100my $arrayexp = q/^(index|level|indexSubcollection|indexLanguage)$/;
    100101my $arrayarrayexp= q/^(plugin|classifier)$/;
    101 
    102102my $defaults = q/^(defaultIndex|defaultLevel|defaultIndexLanguage|languageMetadata)$/;
    103103
     
    147147    $data->{$key} = [];
    148148      }
    149 
    150149      push (@{$data->{$key}},$name);
    151150    }
     
    162161      push (@{$data->{$key}},$name);
    163162    }
    164 
     163    #@ plugout options
     164    elsif ($element eq "plugout") {
     165    $currentLevel = "plugout";
     166    my $key = $nameMap->{$currentLevel};   
     167    if (!defined $data->{$key}) {
     168        $data->{$key} = [];
     169    }
     170    if(defined $name and $name ne ""){
     171        push (@{$data->{$key}},$name);
     172    }
     173    else{
     174       push (@{$data->{$key}},"GAPlugout");
     175    }
     176    }
     177    if ($currentLevel eq "plugout" and $element eq "option") {     
     178    my $key = $nameMap->{$currentLevel};
     179    if (defined $name and $name ne ""){
     180        push (@{$data->{$key}},$name);
     181    }
     182    if (defined $value and $value ne  ""){
     183        push (@{$data->{$key}},$value);
     184    }
     185    }
    165186    #@ use hash of hash of strings: hashexp
    166187    elsif ($element eq "subcollection") {
Note: See TracChangeset for help on using the changeset viewer.