- Timestamp:
- 2022-10-19T12:29:09+13:00 (19 months ago)
- Location:
- main/trunk/greenstone2/perllib
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/buildConfigxml.pm
r30858 r36839 215 215 216 216 if (defined $collectcfg->{"orthogonalbuildtypes"}) { 217 # Note the use of collectcfg, not bu lidcfg217 # Note the use of collectcfg, not buildcfg 218 218 $settings->{'orthogonalbuildtypes'} = $collectcfg->{"orthogonalbuildtypes"}; 219 219 } else { 220 220 $settings->{'orthogonalbuildtypes '}= []; 221 } 222 if (defined $collectcfg->{"orthogonalcustomservicerack"}) { 223 # Note the use of collectcfg, not buildcfg 224 $settings->{'orthogonalcustomservicerack'} = $collectcfg->{"orthogonalcustomservicerack"}; 225 } else { 226 $settings->{'orthogonalcustomservicerack'}= {}; 221 227 } 222 228 … … 616 622 my $orthogonalbuildtypes = $settings->{'orthogonalbuildtypes'}; 617 623 624 #if a custom service rack has been specified, then we don't output anything here 625 my $orthogonalcustomservicerack = $settings->{'orthogonalcustomservicerack'}; 626 618 627 foreach my $obt (@$orthogonalbuildtypes) { 619 $obt =~ s/^(.)/\u$1/; # capitialize initial letter 620 $obt =~ s/-(.)/\u$1/g; # change any hyphenated words to cap next letter 621 622 &write_line('COLCFG', ["<serviceRack name=\"GS2", $obt, "Search\">"]); 623 624 &write_line('COLCFG',["<databaseType name=\"",$infodbtype,"\" />"]); 625 &write_line('COLCFG', ["</serviceRack>"]); 628 if (!defined $orthogonalcustomservicerack->{$obt}) { 629 $obt =~ s/^(.)/\u$1/; # capitialize initial letter 630 $obt =~ s/-(.)/\u$1/g; # change any hyphenated words to cap next letter 631 632 &write_line('COLCFG', ["<serviceRack name=\"GS2", $obt, "Search\">"]); 633 634 &write_line('COLCFG',["<databaseType name=\"",$infodbtype,"\" />"]); 635 &write_line('COLCFG', ["</serviceRack>"]); 636 print STDERR "Outputting orthogonal service rack to buildConfig, derived name = GS2".$obt. "Search\n"; 637 } else { 638 print STDERR "Orthogonal search specified a serviceRack: ".$orthogonalcustomservicerack->{$obt}.", make sure you have specified that in your collectionConfig.xml serviceRackList\n"; 639 } 640 626 641 } 627 642 } -
main/trunk/greenstone2/perllib/collConfigxml.pm
r36375 r36839 113 113 return undef; 114 114 } 115 116 115 # Removed ProtocolEncoding (see MetadataXMLPlugin for details) 117 116 … … 192 191 if ((defined $orthogonal) && ($orthogonal =~ m/^(true|on|1)$/i)) { 193 192 push(@{$data->{'orthogonalbuildtypes'}},$type); 193 my $service_rack = $_{'serviceRack'}; 194 if ((defined $service_rack) && $service_rack =~ /\w/) { 195 $data->{'orthogonalcustomservicerack'}->{$type} = $service_rack;; 196 } 194 197 } 195 198 else { … … 431 434 print STDERR "*** default level: ".$data->{"defaultlevel"}."\n" if (defined $data->{"defaultlevel"}); 432 435 print STDERR "*** build type: ".$data->{"buildtype"}."\n" if (defined $data->{"buildtype"}); 433 print STDERR "*** orthogonal build types: ".join(",",$data->{"orthogonalbuildtypes"})."\n" if (defined $data->{"orthogonalbuildtypes"}); 436 print STDERR "*** orthogonal build types: ".join(",",@{$data->{"orthogonalbuildtypes"}})."\n" if (defined $data->{"orthogonalbuildtypes"}); 437 if (defined $data->{"orthogonalcustomservicerack"}) { 438 print STDERR "*** orthogonal custom service racks: \n"; 439 foreach my $s (keys %{$data->{"orthogonalcustomservicerack"}}) { 440 print STDERR "$s -> ". $data->{"orthogonalcustomservicerack"}->{$s}."\n"; 441 } 442 } 434 443 print STDERR "*** search types: \n"; 435 444 print STDERR join(",",@{$data->{"searchtype"}})."\n" if (defined $data->{"searchtype"});
Note:
See TracChangeset
for help on using the changeset viewer.