Changeset 14741 for gsdl/trunk/perllib/cfgread4gs3.pm
- Timestamp:
- 2007-10-30T12:41:23+13:00 (17 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/cfgread4gs3.pm
r14667 r14741 78 78 "index" => "indexes", 79 79 "plugin" => "plugin", 80 80 "plugout" => "plugout", 81 81 "indexOption" => "indexoptions", 82 82 "searchType" => "searchtype", … … 100 100 my $arrayexp = q/^(index|level|indexSubcollection|indexLanguage)$/; 101 101 my $arrayarrayexp= q/^(plugin|classifier)$/; 102 102 103 my $defaults = q/^(defaultIndex|defaultLevel|defaultIndexLanguage|languageMetadata)$/; 103 104 … … 114 115 my $filter = $_{'filter'}; 115 116 117 # for flax activities 118 my $desid = $_{'desid'}; 119 my $assigned = $_{'assigned'}; 120 116 121 #@ Marking repeated block 117 122 if ($element =~ /$repeatedBlock/) { … … 147 152 $data->{$key} = []; 148 153 } 154 149 155 push (@{$data->{$key}},$name); 150 156 } … … 184 190 } 185 191 } 192 186 193 #@ use hash of hash of strings: hashexp 187 194 elsif ($element eq "subcollection") { … … 225 232 226 233 } 227 234 #@ Handling each flaxActivity element (arrayarrayexp) 235 elsif ($element eq "flaxActivity") { 236 if (!defined $data->{'flaxActivity'}) { 237 $data->{'flaxActivity'} = []; 238 } 239 if(defined $assigned and $assigned =~ /\w/ and $assigned eq "true") { 240 if (defined $name and $name =~ /\w/) { 241 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'name'); 242 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $name); 243 } 244 245 if (defined $desid and $desid =~ /\w/) { 246 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'desid'); 247 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $desid); 248 } 249 } 250 } 228 251 } 229 252 … … 232 255 my $endTags = q/^(browse|pluginList)$/; 233 256 if ($element =~ /$endTags/) { 234 $currentIndex = 0;235 $currentLevel = "";257 $currentIndex = 0; 258 $currentLevel = ""; 236 259 } 237 260 # $arrayarrayexp contains classifier|plugin 238 elsif($element =~ /$arrayarrayexp/ ){261 elsif($element =~ /$arrayarrayexp/ || $element eq "flaxActivity"){ 239 262 $currentIndex = $currentIndex + 1; 240 263 } 241 264 242 265 } … … 697 720 &write_line('COLCFG', ["<serviceRack name=\"PhindPhraseBrowse\" />"]); 698 721 } 699 722 723 my $flaxActivities = $collectcfg->{"flaxActivity"}; 724 foreach my $fa (@$flaxActivities) { 725 if(defined $fa and @$fa[0] =~ /\w/ and @$fa[1] =~ /\w/ and @$fa[2] =~ /\w/ and @$fa[3] =~ /\w/ ) { 726 &write_line('COLCFG', ["<serviceRack ", @$fa[0], "=\"", @$fa[1], "\" ", @$fa[2], "=\"", @$fa[3], "\" />"]); 727 } 728 } 729 700 730 &write_line('COLCFG', ["</serviceRackList>"]); 701 731 &write_line('COLCFG', ["</buildConfig>"]);
Note:
See TracChangeset
for help on using the changeset viewer.