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

Diff of /Sprout/Sprout.pm

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

revision 1.119, Tue Sep 30 15:23:55 2008 UTC revision 1.121, Wed Oct 15 11:46:22 2008 UTC
# Line 149  Line 149 
149      $retVal->{genomeHash} = undef;      $retVal->{genomeHash} = undef;
150      # Remember the data directory name.      # Remember the data directory name.
151      $retVal->{dataDir} = $dataDir;      $retVal->{dataDir} = $dataDir;
152      # Connect to the attributes.      # Return it.
153        return $retVal;
154    }
155    
156    =head3 ca
157    
158        my $ca = $sprout->ca():;
159    
160    Return the [[CustomAttributesPm]] object for retrieving object
161    properties.
162    
163    =cut
164    
165    sub ca {
166        # Get the parameters.
167        my ($self) = @_;
168        # Do we already have an attribute object?
169        my $retVal = $self->{_ca};
170        if (! defined $retVal) {
171            # No, create one. How we do it depends on the configuration.
172      if ($FIG_Config::attrURL) {      if ($FIG_Config::attrURL) {
173          Trace("Remote attribute server $FIG_Config::attrURL chosen.") if T(3);          Trace("Remote attribute server $FIG_Config::attrURL chosen.") if T(3);
174          $retVal->{_ca} = RemoteCustomAttributes->new($FIG_Config::attrURL);              $retVal = RemoteCustomAttributes->new($FIG_Config::attrURL);
175      } elsif ($FIG_Config::attrDbName) {      } elsif ($FIG_Config::attrDbName) {
176          Trace("Local attribute database $FIG_Config::attrDbName chosen.") if T(3);          Trace("Local attribute database $FIG_Config::attrDbName chosen.") if T(3);
177          my $user = ($FIG_Config::arch eq 'win' ? 'self' : scalar(getpwent()));          my $user = ($FIG_Config::arch eq 'win' ? 'self' : scalar(getpwent()));
178          $retVal->{_ca} = CustomAttributes->new(user => $user);              $retVal = CustomAttributes->new(user => $user);
179      }      }
180      # Return it.          # Save it for next time.
181            $self->{_ca} = $retVal;
182        }
183        # Return the result.
184      return $retVal;      return $retVal;
185  }  }
186    
# Line 675  Line 697 
697                       Hint("GenomeControl", "Type here to filter the genomes displayed.") . "<br />";                       Hint("GenomeControl", "Type here to filter the genomes displayed.") . "<br />";
698          # For multi-select mode, we also have buttons to set and clear selections.          # For multi-select mode, we also have buttons to set and clear selections.
699          if ($multiSelect) {          if ($multiSelect) {
700              push @lines, "<INPUT type=\"button\" name=\"ClearAll\" class=\"bigButton\"  value=\"Clear All\" onClick=\"clearAll('$menuID'); $showSelect\" />";              push @lines, "<INPUT type=\"button\" name=\"ClearAll\" class=\"bigButton\"  value=\"Clear All\" onClick=\"clearAll(getElementById('$menuID')); $showSelect\" />";
701              push @lines, "<INPUT type=\"button\" name=\"SelectAll\" class=\"bigButton\" value=\"Select All\" onClick=\"selectAll('$menuID'); $showSelect\" />";              push @lines, "<INPUT type=\"button\" name=\"SelectAll\" class=\"bigButton\" value=\"Select All\" onClick=\"selectAll(getElementById('$menuID')); $showSelect\" />";
702              push @lines, "<INPUT type=\"button\" name=\"NMPDROnly\" class=\"bigButton\"  value=\"Select NMPDR\" onClick=\"selectSome('$menuID', $nmpdrCount, true); $showSelect;\" />";              push @lines, "<INPUT type=\"button\" name=\"NMPDROnly\" class=\"bigButton\"  value=\"Select NMPDR\" onClick=\"selectSome(getElementById('$menuID'), $nmpdrCount, true); $showSelect;\" />";
703          }          }
704          # Add a hidden field we can use to generate organism page hyperlinks.          # Add a hidden field we can use to generate organism page hyperlinks.
705          push @lines, "<INPUT type=\"hidden\" id=\"$urlID\" value=\"$FIG_Config::cgi_url/wiki/rest.cgi/NmpdrPlugin/SeedViewer?page=Organism;organism=\" />";          push @lines, "<INPUT type=\"hidden\" id=\"$urlID\" value=\"$FIG_Config::cgi_url/wiki/rest.cgi/NmpdrPlugin/SeedViewer?page=Organism;organism=\" />";
# Line 2824  Line 2846 
2846      # Get the parameters.      # Get the parameters.
2847      my ($self, $featureID) = @_;      my ($self, $featureID) = @_;
2848      # Get the properties.      # Get the properties.
2849      my @attributes = $self->{_ca}->GetAttributes($featureID);      my @attributes = $self->ca->GetAttributes($featureID);
2850      # Strip the feature ID off each tuple.      # Strip the feature ID off each tuple.
2851      my @retVal = ();      my @retVal = ();
2852      for my $attributeRow (@attributes) {      for my $attributeRow (@attributes) {
# Line 3900  Line 3922 
3922      # Get the parameters.      # Get the parameters.
3923      my ($self, $featureID, $key, @values) = @_;      my ($self, $featureID, $key, @values) = @_;
3924      # Add the property using the attached attributes object.      # Add the property using the attached attributes object.
3925      $self->{_ca}->AddAttribute($featureID, $key, @values);      $self->ca->AddAttribute($featureID, $key, @values);
3926  }  }
3927    
3928  =head3 CheckGroupFile  =head3 CheckGroupFile
# Line 4108  Line 4130 
4130    
4131  sub LoadGroupList {  sub LoadGroupList {
4132      # Return the list.      # Return the list.
4133      return qw(Genome Subsystem Feature Annotation Property Source Reaction Synonym Drug);      return qw(Genome Subsystem Annotation Property Source Reaction Synonym Drug Feature);
4134  }  }
4135    
4136  =head3 LoadDirectory  =head3 LoadDirectory

Legend:
Removed from v.1.119  
changed lines
  Added in v.1.121

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3