[Bio] / Sprout / SearchHelper.pm Repository:
ViewVC logotype

Diff of /Sprout/SearchHelper.pm

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.11, Mon Oct 16 07:44:13 2006 UTC revision 1.12, Mon Oct 16 22:58:37 2006 UTC
# Line 1590  Line 1590 
1590          # a singleton list, but that's okay.          # a singleton list, but that's okay.
1591          my @values = split (/\0/, $parms{$parmKey});          my @values = split (/\0/, $parms{$parmKey});
1592          # Check for special cases.          # Check for special cases.
1593          if ($parmKey eq 'featureTypes') {          if (grep { $_ eq $parmKey } qw(SessionID ResultCount Page PageSize Trace TF ShowURL)) {
             # Here we need to see if the user wants all the feature types. If he  
             # does, we erase all the values so that the parameter is not output.  
             my %valueCheck = map { $_ => 1 } @values;  
             my @list = FeatureQuery::AllFeatureTypes();  
             my $okFlag = 1;  
             for (my $i = 0; $okFlag && $i <= $#list; $i++) {  
                 if (! $valueCheck{$list[$i]}) {  
                     $okFlag = 0;  
                 }  
             }  
             if ($okFlag) {  
                 @values = ();  
             }  
         } elsif (grep { $_ eq $parmKey } qw(SessionID ResultCount Page PageSize Trace TF ShowURL)) {  
1594              # These are bookkeeping parameters we don't need to start a search.              # These are bookkeeping parameters we don't need to start a search.
1595              @values = ();              @values = ();
1596          } elsif ($parmKey =~ /_SearchThing$/) {          } elsif ($parmKey =~ /_SearchThing$/) {
# Line 1666  Line 1652 
1652      return $retVal;      return $retVal;
1653  }  }
1654    
 =head3 FeatureTypeMap  
   
 C<< my %features = SearchHelper::FeatureTypeMap(); >>  
   
 Return a map of feature types to descriptions. The feature type data is stored  
 in the B<FIG_Config> file. Currently, it only contains a space-delimited list of  
 feature types. The map returned by this method is a hash mapping the type codes to  
 descriptive names.  
   
 The reason we have to convert the list from a string is that the B<NMPDRSetup.pl>  
 script is only able to insert strings into the generated B<FIG_Config> file.  
   
 =cut  
   
 sub FeatureTypeMap {  
     my @list = split /\s+/, $FIG_Config::feature_types;  
     my %retVal = map { $_ => $_ } @list;  
     return %retVal;  
 }  
   
1655  =head3 AdvancedClassList  =head3 AdvancedClassList
1656    
1657  C<< my @classes = SearchHelper::AdvancedClassList(); >>  C<< my @classes = SearchHelper::AdvancedClassList(); >>

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.12

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3