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

Diff of /Sprout/SHSubSearch.pm

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

revision 1.3, Sat Dec 2 09:46:01 2006 UTC revision 1.6, Mon Jul 16 20:04:51 2007 UTC
# Line 4  Line 4 
4    
5      use strict;      use strict;
6      use Tracer;      use Tracer;
     use SearchHelper;  
7      use CGI;      use CGI;
8      use HTML;      use HTML;
9      use Sprout;      use Sprout;
10      use FeatureData;      use RHFeatures;
11      use FeatureQuery;      use base 'SearchHelper';
   
     our @ISA = qw(SearchHelper);  
12    
13  =head1 Subsystem Feature Search Helper  =head1 Subsystem Feature Search Helper
14    
# Line 65  Line 62 
62      # Start with the subsystem tree.      # Start with the subsystem tree.
63      push @rows, $cgi->Tr($cgi->th({ colspan => 3, align => "center" }, "Subsystem Tree")),      push @rows, $cgi->Tr($cgi->th({ colspan => 3, align => "center" }, "Subsystem Tree")),
64                  $cgi->Tr($cgi->td({ colspan => 3 }, $treeField));                  $cgi->Tr($cgi->td({ colspan => 3 }, $treeField));
65      # Start with a keyword search box.      # Put in the keyword search box.
66      my $expressionString = $cgi->param('keywords') || "";      my $expressionString = $cgi->param('keywords') || "";
67      push @rows, $cgi->Tr($cgi->th("Search Words"),      push @rows, RHFeatures::WordSearchRow($self);
                          $cgi->td({ colspan => 2 },  
                                   $cgi->textfield(-name => 'keywords',  
                                                   -value => $expressionString,  
                                                   -size => 60)));  
68      # Add the special options.      # Add the special options.
69      push @rows, FeatureQuery::SpecialOptions($self);      push @rows, RHFeatures::FeatureFilterFormRows($self, 'options');
70      # Finish it off with the submit row.      # Finish it off with the submit row.
71      push @rows, $self->SubmitRow();      push @rows, $self->SubmitRow();
72      # Convert the form rows into a table.      # Convert the form rows into a table.
# Line 134  Line 127 
127              # any keywords were specified.              # any keywords were specified.
128              my $query;              my $query;
129              if ($keywords) {              if ($keywords) {
130                    $self->PrintLine("Word search query submitted.<br />");
131                  $query = $sprout->Search($keywords, 2, @majorParms);                  $query = $sprout->Search($keywords, 2, @majorParms);
132              } else {              } else {
133                    $self->PrintLine("Standard search query submitted.<br />");
134                  $query = $sprout->Get(@majorParms);                  $query = $sprout->Get(@majorParms);
135              }              }
136                # Get the result helper for a feature search.
137                my $rhelp = RHFeatures->new($self);
138                # Compute the default columns. This is a very simple search which
139                # has no extra columns.
140                $self->DefaultColumns($rhelp);
141              # Initialize the session file.              # Initialize the session file.
142              $self->OpenSession();              $self->OpenSession($rhelp);
143              # Initialize the result counter.              # Initialize the result counter.
144              $retVal = 0;              $retVal = 0;
145              # Loop through the selected features.              # Loop through the selected features.
# Line 147  Line 147 
147                  $fd->Store($record);                  $fd->Store($record);
148                  $self->PutFeature($fd);                  $self->PutFeature($fd);
149                  $retVal++;                  $retVal++;
150                    if ($retVal % 100 == 0) {
151                        $self->PrintLine("$retVal features processed.<br />");
152                    }
153              }              }
154              # Close the session file.              # Close the session file.
155              $self->CloseSession();              $self->CloseSession();

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.6

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3