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

Diff of /Sprout/RHLigands.pm

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

revision 1.2, Mon Aug 20 23:19:59 2007 UTC revision 1.4, Mon Jan 19 21:56:19 2009 UTC
# Line 21  Line 21 
21    
22  =head3 new  =head3 new
23    
24  C<< my $rhelp = RHLigands->new($shelp); >>      my $rhelp = RHLigands->new($shelp);
25    
26  Construct a new RHLigands object.  Construct a new RHLigands object.
27    
# Line 47  Line 47 
47    
48  =head3 DefaultResultColumns  =head3 DefaultResultColumns
49    
50  C<< my @colNames = $rhelp->DefaultResultColumns(); >>      my @colNames = $rhelp->DefaultResultColumns();
51    
52  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
53  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 63  Line 63 
63      return qw(zincId);      return qw(zincId);
64  }  }
65    
66    =head3 Permanent
67    
68        my $flag = $rhelp->Permanent($colName);
69    
70    Return TRUE if the specified column should be permanent when used in a
71    Seed Viewer table, else FALSE.
72    
73    =over 4
74    
75    =item colName
76    
77    Name of the column to check.
78    
79    =item RETURN
80    
81    Returns TRUE if the column should be permanent, else FALSE.
82    
83    =back
84    
85    =cut
86    
87    sub Permanent {
88        # Get the parameters.
89        my ($self, $colName) = @_;
90        # Declare the return variable.
91        my $retVal = ($colName eq 'zincId');
92        # Return the result.
93        return $retVal;
94    }
95    
96  =head2 Column Methods  =head2 Column Methods
97    
98  =head3 zincId  =head3 zincId
99    
100  C<< my $colDatum = RHLigands::zincId($type => $rhelp, $key); >>      my $colDatum = RHLigands::zincId($type => $rhelp, $key);
101    
102  This method computes the various things we need to know into order to process  This method computes the various things we need to know into order to process
103  the zincId column.  the zincId column.
# Line 116  Line 146 
146          my $record = $rhelp->Record();          my $record = $rhelp->Record();
147          # Extract the ID and name.          # Extract the ID and name.
148          my ($id, $name) = $record->Values(['Ligand(id)', 'Ligand(name)']);          my ($id, $name) = $record->Values(['Ligand(id)', 'Ligand(name)']);
         # Get the CGI object.  
         my $cgi = $rhelp->Parent()->Q();  
149          # Create a tooltip for the ligand name.          # Create a tooltip for the ligand name.
150          $retVal = $cgi->a({ href => "http://blaster.docking.org/zinc/srchdbk.pl?zinc=$id;go=Query",          $retVal = CGI::a({ href => "http://blaster.docking.org/zinc/srchdbk.pl?zinc=$id;go=Query",
151                              title => $name }, $id);                              title => $name }, $id);
152      } elsif ($type eq 'runTimeValue') {      } elsif ($type eq 'runTimeValue') {
153          # Runtime support is not needed for this column.          # Runtime support is not needed for this column.
154        } elsif ($type eq 'valueFromKey') {
155            # We can't do a tooltip on this one, it would be too expensive.
156            $retVal = CGI::a({ href => "http://blaster.docking.org/zinc/srchdbk.pl?zinc=$key;go=Query" },
157                             $key);
158      }      }
159      return $retVal;      return $retVal;
160  }  }

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3