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

Diff of /Sprout/ResultHelper.pm

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

revision 1.4, Tue Aug 21 00:41:56 2007 UTC revision 1.5, Thu Dec 6 14:58:03 2007 UTC
# Line 164  Line 164 
164    
165  =head3 new  =head3 new
166    
167  C<< my $rhelp = ResultHelper->new($shelp); >>      my $rhelp = ResultHelper->new($shelp);
168    
169  Construct a new ResultHelper object to serve the specified search helper.  Construct a new ResultHelper object to serve the specified search helper.
170    
# Line 232  Line 232 
232    
233  =head3 DB  =head3 DB
234    
235  C<< my $sprout = $rhelp->DB(); >>      my $sprout = $rhelp->DB();
236    
237  Return the Sprout object for accessing the database.  Return the Sprout object for accessing the database.
238    
# Line 247  Line 247 
247    
248  =head3 PutData  =head3 PutData
249    
250  C<< $rhelp->PutData($sortKey, $id, $record); >>      $rhelp->PutData($sortKey, $id, $record);
251    
252  Store a line of data in the result file.  Store a line of data in the result file.
253    
# Line 289  Line 289 
289    
290  =head3 GetColumnHeaders  =head3 GetColumnHeaders
291    
292  C<< my $colHdrs = $rhelp->GetColumnHeaders(); >>      my $colHdrs = $rhelp->GetColumnHeaders();
293    
294  Return the list of column headers for this session. The return value is a  Return the list of column headers for this session. The return value is a
295  reference to the live column header list.  reference to the live column header list.
# Line 305  Line 305 
305    
306  =head3 DownloadFormatsAvailable  =head3 DownloadFormatsAvailable
307    
308  C<< my %dlTypes = $rhelp->DownloadFormatsAvailable(); >>      my %dlTypes = $rhelp->DownloadFormatsAvailable();
309    
310  Return a hash mapping each download type to a download description. The default is  Return a hash mapping each download type to a download description. The default is
311  the C<tbl> format, which is a tab-delimited download, and the C<xml> format,  the C<tbl> format, which is a tab-delimited download, and the C<xml> format,
# Line 329  Line 329 
329    
330  =head3 DownloadDataLine  =head3 DownloadDataLine
331    
332  C<< $rhelp->DownloadDataLine($objectID, $dlType, \@cols, \@colHdrs); >>      $rhelp->DownloadDataLine($objectID, $dlType, \@cols, \@colHdrs);
333    
334  Return one or more lines of download data. The exact data returned depends on the  Return one or more lines of download data. The exact data returned depends on the
335  download type.  download type.
# Line 448  Line 448 
448    
449  =head3 Formlet  =head3 Formlet
450    
451  C<< my $html = $rhelp->Formlet($caption, $url, $target, %parms); >>      my $html = $rhelp->Formlet($caption, $url, $target, %parms);
452    
453  Create a mini-form that posts to the specified URL with the specified parameters. The  Create a mini-form that posts to the specified URL with the specified parameters. The
454  parameters will be stored in hidden fields, and the form's only visible control will  parameters will be stored in hidden fields, and the form's only visible control will
# Line 504  Line 504 
504    
505  =head3 HtmlCleanup  =head3 HtmlCleanup
506    
507  C<< my $text = ResultHelper::HtmlCleanup($htmlText, $type); >>      my $text = ResultHelper::HtmlCleanup($htmlText, $type);
508    
509  Take a string of Html text and clean it up so it appears as real text.  Take a string of Html text and clean it up so it appears as real text.
510  Note that this method is not yet sophisticated enough to detect right-angle brackets  Note that this method is not yet sophisticated enough to detect right-angle brackets
# Line 563  Line 563 
563    
564  =head3 XmlCleanup  =head3 XmlCleanup
565    
566  C<< my $text = ResultHelper::XmlCleanup($htmlText, $type); >>      my $text = ResultHelper::XmlCleanup($htmlText, $type);
567    
568  Take a string of Html text and clean it up so it appears as html.  Take a string of Html text and clean it up so it appears as html.
569    
# Line 632  Line 632 
632    
633  =head3 ButtonToLink  =head3 ButtonToLink
634    
635  C<< my $url = ResultHelper::ButtonToLink($htmlText); >>      my $url = ResultHelper::ButtonToLink($htmlText);
636    
637  Convert a formlet or fake button to a link. This process is bound very tightly with  Convert a formlet or fake button to a link. This process is bound very tightly with
638  the way L</Formlet> and L</FakeButton> generate Html. A change there requires a  the way L</Formlet> and L</FakeButton> generate Html. A change there requires a
# Line 696  Line 696 
696    
697  =head3 FakeButton  =head3 FakeButton
698    
699  C<< my $html = $rhelp->FakeButton($caption, $url, $target, %parms); >>      my $html = $rhelp->FakeButton($caption, $url, $target, %parms);
700    
701  Create a fake button that hyperlinks to the specified URL with the specified parameters.  Create a fake button that hyperlinks to the specified URL with the specified parameters.
702  Unlike a real button, this one won't visibly click, but it will take the user to the  Unlike a real button, this one won't visibly click, but it will take the user to the
# Line 744  Line 744 
744    
745  =head3 Parent  =head3 Parent
746    
747  C<< my $shelp = $rhelp->Parent(); >>      my $shelp = $rhelp->Parent();
748    
749  Return this helper's parent search helper.  Return this helper's parent search helper.
750    
# Line 759  Line 759 
759    
760  =head3 Record  =head3 Record
761    
762  C<< my $erdbObject = $rhelp->Record(); >>      my $erdbObject = $rhelp->Record();
763    
764  Return the record currently stored in this object. The record contains the data for  Return the record currently stored in this object. The record contains the data for
765  the result output line being built, and is in the form of a B<ERDBObject>.  the result output line being built, and is in the form of a B<ERDBObject>.
# Line 779  Line 779 
779    
780  =head3 ID  =head3 ID
781    
782  C<< my $id = $rhelp->ID(); >>      my $id = $rhelp->ID();
783    
784  Return the ID for the record currently stored in this object (if any).  Return the ID for the record currently stored in this object (if any).
785    
# Line 802  Line 802 
802    
803  =head3 Cache  =head3 Cache
804    
805  C<< my $cacheHash = $rhelp->Cache(); >>      my $cacheHash = $rhelp->Cache();
806    
807  Return a reference to the internal cache. The internal cache is used by the  Return a reference to the internal cache. The internal cache is used by the
808  run-time value methods to keep stuff in memory between calls for the same  run-time value methods to keep stuff in memory between calls for the same
# Line 819  Line 819 
819    
820  =head3 PreferredID  =head3 PreferredID
821    
822  C<< my $featureID = $rhelp->PreferredID($featureObject); >>      my $featureID = $rhelp->PreferredID($featureObject);
823    
824  Return the preferred ID for the specified feature. The feature passed in must be in the  Return the preferred ID for the specified feature. The feature passed in must be in the
825  form of an ERDB feature object. The preferred alias type will be determined using the  form of an ERDB feature object. The preferred alias type will be determined using the
# Line 882  Line 882 
882    
883  =head3 Compute  =head3 Compute
884    
885  C<< my $retVal = $rhelp->Compute($type, $colName, $runTimeKey); >>      my $retVal = $rhelp->Compute($type, $colName, $runTimeKey);
886    
887  Call a column method to return a result. This involves some fancy C<eval> stuff.  Call a column method to return a result. This involves some fancy C<eval> stuff.
888  The column method is called as a static method of the relevant subclass.  The column method is called as a static method of the relevant subclass.
# Line 972  Line 972 
972    
973  =head3 ColumnDownload  =head3 ColumnDownload
974    
975  C<< my $flag = $rhelp->ColumnDownload($colName); >>      my $flag = $rhelp->ColumnDownload($colName);
976    
977  Return the type of data in the column, or an empty string if it should  Return the type of data in the column, or an empty string if it should
978  not be downloaded. In general, all columns are downloaded except those  not be downloaded. In general, all columns are downloaded except those
# Line 1003  Line 1003 
1003    
1004  =head3 ColumnTitle  =head3 ColumnTitle
1005    
1006  C<< my $titleHtml = $rhelp->ColumnTitle($colName); >>      my $titleHtml = $rhelp->ColumnTitle($colName);
1007    
1008  Return the title to be used in the result table for the specified column.  Return the title to be used in the result table for the specified column.
1009    
# Line 1032  Line 1032 
1032    
1033  =head3 ColumnValue  =head3 ColumnValue
1034    
1035  C<< my $htmlValue = $rhelp->ColumnValue($colName); >>      my $htmlValue = $rhelp->ColumnValue($colName);
1036    
1037  Return the display value for a column. This could be HTML text or it  Return the display value for a column. This could be HTML text or it
1038  could be a run-time value specification. The column value is computed  could be a run-time value specification. The column value is computed
# Line 1063  Line 1063 
1063    
1064  =head3 ColumnStyle  =head3 ColumnStyle
1065    
1066  C<< my $className = $rhelp->ColumnStyle($colName); >>      my $className = $rhelp->ColumnStyle($colName);
1067    
1068  Return the display style for the specified column. This must be a classname  Return the display style for the specified column. This must be a classname
1069  defined for C<TD> tags in the active style sheet.  defined for C<TD> tags in the active style sheet.
# Line 1093  Line 1093 
1093    
1094  =head3 GetRunTimeValues  =head3 GetRunTimeValues
1095    
1096  C<< my @valueHtml = $rhelp->GetRunTimeValues(@cols); >>      my @valueHtml = $rhelp->GetRunTimeValues(@cols);
1097    
1098  Return the run-time values of a row of columns. The incoming values contain  Return the run-time values of a row of columns. The incoming values contain
1099  the actual column contents. Run-time columns will be identified by the  the actual column contents. Run-time columns will be identified by the
# Line 1145  Line 1145 
1145    
1146  =head3 SetColumns  =head3 SetColumns
1147    
1148  C<< $rhelp->SetColumns(@cols); >>      $rhelp->SetColumns(@cols);
1149    
1150  Store the specified object columns. These are the columns computed by the search  Store the specified object columns. These are the columns computed by the search
1151  framework, and should generally be specified first. If the search itself is  framework, and should generally be specified first. If the search itself is
# Line 1173  Line 1173 
1173    
1174  =head3 AddExtraColumn  =head3 AddExtraColumn
1175    
1176  C<< $rhelp->AddExtraColumn($name => $loc, %data); >>      $rhelp->AddExtraColumn($name => $loc, %data);
1177    
1178  Add an extra column to the column list at a specified location.  Add an extra column to the column list at a specified location.
1179    
# Line 1215  Line 1215 
1215    
1216  =head3 AddOptionalColumn  =head3 AddOptionalColumn
1217    
1218  C<< $rhelp->AddOptionalColumn($name => $loc); >>      $rhelp->AddOptionalColumn($name => $loc);
1219    
1220  Store the specified column name in the column list at the  Store the specified column name in the column list at the
1221  specified location. The column name must be one that  specified location. The column name must be one that
# Line 1247  Line 1247 
1247    
1248  =head3 PutExtraColumns  =head3 PutExtraColumns
1249    
1250  C<< $rhelp->PutExtraColumns(name1 => value1, name2 => value2, ...); >>      $rhelp->PutExtraColumns(name1 => value1, name2 => value2, ...);
1251    
1252  Store the values of one or more extra columns. If a search produces extra columns (that is,  Store the values of one or more extra columns. If a search produces extra columns (that is,
1253  columns whose data is determined by the search instead of queries against the database), then  columns whose data is determined by the search instead of queries against the database), then
# Line 1281  Line 1281 
1281    
1282  =head3 StoreColumnSpec  =head3 StoreColumnSpec
1283    
1284  C<< $rhelp->_StoreColumnSpec($column, $location); >>      $rhelp->_StoreColumnSpec($column, $location);
1285    
1286  Store the specified column information at the specified location in the column name list.  Store the specified column information at the specified location in the column name list.
1287  The information is a string for an ordinary column and a hash for an extra column. The  The information is a string for an ordinary column and a hash for an extra column. The
# Line 1325  Line 1325 
1325    
1326  =head3 DefaultResultColumns  =head3 DefaultResultColumns
1327    
1328  C<< my @colNames = $rhelp->DefaultResultColumns(); >>      my @colNames = $rhelp->DefaultResultColumns();
1329    
1330  Return a list of the default columns to be used by searches with this  Return a list of the default columns to be used by searches with this
1331  type of result. Note that the actual default columns are computed by  type of result. Note that the actual default columns are computed by
# Line 1344  Line 1344 
1344    
1345  =head3 MoreDownloadFormats  =head3 MoreDownloadFormats
1346    
1347  C<< $rhelp->MoreDownloadFormats(\%dlTypes); >>      $rhelp->MoreDownloadFormats(\%dlTypes);
1348    
1349  Add additional supported download formats to the type table. The table is a  Add additional supported download formats to the type table. The table is a
1350  hash keyed on the download type code for which the values are the download  hash keyed on the download type code for which the values are the download
# Line 1376  Line 1376 
1376    
1377  =head3 MoreDownloadDataMethods  =head3 MoreDownloadDataMethods
1378    
1379  C<< my @lines = $rhelp->MoreDownloadDataMethods($objectID, $dlType, \@cols, \@colHdrs); >>      my @lines = $rhelp->MoreDownloadDataMethods($objectID, $dlType, \@cols, \@colHdrs);
1380    
1381  Create one or more lines of download data for a download of the specified type. Override  Create one or more lines of download data for a download of the specified type. Override
1382  this method if you need to process more download types than the default C<tbl> method.  this method if you need to process more download types than the default C<tbl> method.

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3