Changeset 20102
- Timestamp:
- 2009-07-29T13:32:12+12:00 (14 years ago)
- Location:
- gsdl/trunk/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
gsdl/trunk/perllib/buildConfigxml.pm
r20096 r20102 128 128 # for subcollections 129 129 my $filter = $_{'filter'}; 130 131 # for flax activities132 my $desid = $_{'desid'};133 my $assigned = $_{'assigned'};134 my $lang = $_{'lang'};135 130 136 131 #@ Marking repeated block … … 263 258 264 259 } 265 #@ Handling each flaxActivity element (arrayarrayexp)266 elsif ($element eq "flaxActivity") {267 if (!defined $data->{'flaxActivity'}) {268 $data->{'flaxActivity'} = [];269 }270 if(defined $assigned and $assigned =~ /\w/ and $assigned eq "true") {271 if (defined $name and $name =~ /\w/) {272 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'name');273 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $name);274 }275 276 if (defined $desid and $desid =~ /\w/) {277 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'desid');278 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $desid);279 }280 281 if (defined $lang and $lang =~ /\w/) {282 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'lang');283 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $lang);284 }285 }286 }287 260 } 288 261 … … 295 268 } 296 269 # $arrayarrayexp contains classifier|plugin 297 elsif($element =~ /$arrayarrayexp/ || $element eq "flaxActivity"){270 elsif($element =~ /$arrayarrayexp/ ){ 298 271 $currentIndex = $currentIndex + 1; 299 272 } … … 782 755 } 783 756 784 my $flaxActivities = $collectcfg->{"flaxActivity"};785 foreach my $fa (@$flaxActivities) {786 # Six elements of the array for three attribute name/value pairs: name, desid, and lang.787 if(defined $fa and @$fa[0] =~ /\w/ and @$fa[1] =~ /\w/ and @$fa[2] =~ /\w/ and @$fa[3] =~ /\w/ and @$fa[4] =~ /\w/ and @$fa[5] =~ /\w/) {788 &write_line('COLCFG', ["<serviceRack type=\"flaxActivity\" ", @$fa[0], "=\"", @$fa[1], "\" ", @$fa[2], "=\"", @$fa[3], "\" ", @$fa[4], "=\"", @$fa[5], "\" />"]);789 }790 }791 757 792 758 &write_line('COLCFG', ["</serviceRackList>"]); -
gsdl/trunk/perllib/collConfigxml.pm
r20099 r20102 168 168 # for subcollections 169 169 my $filter = $_{'filter'}; 170 171 # for flax activities172 my $desid = $_{'desid'};173 my $assigned = $_{'assigned'};174 my $lang = $_{'lang'};175 170 176 171 #@ Marking repeated block … … 303 298 304 299 } 305 #@ Handling each flaxActivity element (arrayarrayexp) 306 elsif ($element eq "flaxActivity") { 307 if (!defined $data->{'flaxActivity'}) { 308 $data->{'flaxActivity'} = []; 309 } 310 if(defined $assigned and $assigned =~ /\w/ and $assigned eq "true") { 311 if (defined $name and $name =~ /\w/) { 312 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'name'); 313 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $name); 314 } 315 316 if (defined $desid and $desid =~ /\w/) { 317 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'desid'); 318 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $desid); 319 } 320 321 if (defined $lang and $lang =~ /\w/) { 322 push (@{$data->{'flaxActivity'}->[$currentIndex]}, 'lang'); 323 push (@{$data->{'flaxActivity'}->[$currentIndex]}, $lang); 324 } 325 } 326 } 300 327 301 } 328 302 … … 335 309 } 336 310 # $arrayarrayexp contains classifier|plugin 337 elsif($element =~ /$arrayarrayexp/ || $element eq "flaxActivity"){311 elsif($element =~ /$arrayarrayexp/ ){ 338 312 $currentIndex = $currentIndex + 1; 339 313 }
Note:
See TracChangeset
for help on using the changeset viewer.