--- SHSubSearch.pm 2007/07/16 20:04:51 1.6 +++ SHSubSearch.pm 2007/12/06 14:58:03 1.8 @@ -36,7 +36,7 @@ =head3 Form -C<< my $html = $shelp->Form(); >> + my $html = $shelp->Form(); Generate the HTML for a form to request a new search. @@ -79,7 +79,7 @@ =head3 Find -C<< my $resultCount = $shelp->Find(); >> + my $resultCount = $shelp->Find(); Conduct a search based on the current CGI query parameters. The search results will be written to the session cache file and the number of results will be @@ -101,10 +101,8 @@ if (! $spec) { $self->SetMessage("No subsystem or class selected."); } else { - # Create a feature data object to store our results. - my $fd = FeatureData->new($self); - # We need to build a query to get our features. We need to remember - # the filter clause format and the parameter. + # We need to build a query to get our features. This involves building + # a filter clause and a parameter list. my ($filterClause, $parameter); if ($spec =~ /^id=(.+)$/) { # Here we're filtering for a single subsystem. @@ -140,16 +138,16 @@ $self->DefaultColumns($rhelp); # Initialize the session file. $self->OpenSession($rhelp); - # Initialize the result counter. + # Clear the result counter. $retVal = 0; - # Loop through the selected features. + # Process the query results. while (my $record = $query->Fetch()) { - $fd->Store($record); - $self->PutFeature($fd); + # Compute the sort key. + my $sort = $rhelp->SortKey($record); + # Store this feature. + $rhelp->PutData($sort, $record->PrimaryValue('Feature(id)'), $record); + # Increment the result counter. $retVal++; - if ($retVal % 100 == 0) { - $self->PrintLine("$retVal features processed.
"); - } } # Close the session file. $self->CloseSession(); @@ -161,7 +159,7 @@ =head3 Description -C<< my $htmlText = $shelp->Description(); >> + my $htmlText = $shelp->Description(); Return a description of this search. The description is used for the table of contents on the main search tools page. It may contain HTML, but it should be character-level, @@ -176,4 +174,4 @@ return "Search for genes by keyword in a specified subsystem or subsystem class."; } -1; \ No newline at end of file +1;