Ignore:
Timestamp:
2011-08-24T16:21:08+12:00 (13 years ago)
Author:
davidb
Message:

Support for orthogonal build types (such as audioDB)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • main/trunk/greenstone2/perllib/collConfigxml.pm

    r24055 r24464  
    5757           "languageMetadata" => "languagemetadata",
    5858           "buildType" => "buildtype",
    59            "buildOption" => "buildOption"
     59           "orthogonalBuildTypes" => "orthogonalbuildtypes",
     60           "buildOption" => "buildOption"
    6061           };
    6162# A hash structure which is returned by sub read_cfg_file.
     
    7980# ("plugin", "option")
    8081my $currentIndex = 0;
    81 my $arrayexp = q/^(index|level|indexSubcollection|indexLanguage)$/;
     82my $arrayexp = q/^(index|level|indexSubcollection|indexLanguage|orthogonalBuildTypes)$/;
    8283my $arrayarrayexp= q/^(plugin|classifier)$/; #|buildOption)$/;
    8384my $hashexp = q/^(subcollection)$/; # add other element names that should be represented by hash expressions here
     
    129130    my $value = $_{'value'};
    130131    my $type = $_{'type'};
     132    my $orthogonal = $_{'orthogonal'};
    131133
    132134    # for subcollections
     
    169171   
    170172    #@ Handling indexer: mgpp/mg/lucene; stringexp
     173    #@ Handling orthogonal indexers: audioDB; arrayexp
    171174    elsif ($element eq "search") {
    172       $data->{'buildtype'} = $type;
     175    if ((defined $orthogonal) && ($orthogonal =~ m/^(true|on|1)$/i)) {
     176        push(@{$data->{'orthogonalbuildtypes'}},$type);
     177    }
     178    else {
     179        $data->{'buildtype'} = $type;
     180    }
    173181    }
    174182   
    175     elsif ($element eq "store_metadata_coverage")
    176     {
    177         print STDERR "*&*&*&*&*& HERE &*&*&*&*&*&*";
    178       $data->{'store_metadata_coverage'} = $value;
    179     }
     183    elsif ($element eq "store_metadata_coverage")
     184    {
     185##  print STDERR "*&*&*&*&*& HERE &*&*&*&*&*&*";
     186    $data->{'store_metadata_coverage'} = $value;
     187    }
    180188
    181189    #@ Handling searchtype: plain,form; arrayexp
     
    363371    print STDERR "*** default level: ".$data->{"defaultlevel"}."\n" if (defined $data->{"defaultlevel"});
    364372    print STDERR "*** build type: ".$data->{"buildtype"}."\n" if (defined $data->{"buildtype"});
     373    print STDERR "*** orthogonal build types: ".join(",",$data->{"orthogonalbuildtypes"})."\n" if (defined $data->{"orthogonalbuildtypes"});
    365374    print STDERR "*** search types: \n";
    366375    print STDERR join(",",@{$data->{"searchtype"}})."\n" if (defined $data->{"searchtype"});
Note: See TracChangeset for help on using the changeset viewer.