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

Diff of /Sprout/SproutSubsys.pm

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

revision 1.3, Thu Oct 20 10:19:30 2005 UTC revision 1.4, Mon Nov 28 22:52:11 2005 UTC
# Line 459  Line 459 
459  =item pegID  =item pegID
460    
461  ID of the PEG whose cluster number is desired.  ID of the PEG whose cluster number is desired.
462  TODO: items  
463    =item RETURN
464    
465    Returns the appropriate cluster number.
466    
467  =back  =back
468    
# Line 547  Line 550 
550      return @retVal;      return @retVal;
551  }  }
552    
553  1;  =head3 get_diagrams
554    
555    C<< my @list = $sub->get_diagrams(); >>
556    
557    Return a list of the diagrams associated with this subsystem. Each diagram
558    is represented in the return list as a 4-tuple C<[diagram_id, diagram_name,
559    page_link, img_link]> where
560    
561    =over 4
562    
563    =item diagram_id
564    
565    ID code for this diagram.
566    
567    =item diagram_name
568    
569    Displayable name of the diagram.
570    
571    =item page_link
572    
573    URL of an HTML page containing information about the diagram.
574    
575    =item img_link
576    
577    URL of an HTML page containing an image for the diagram.
578    
579    =back
580    
581    Note that the URLs are in fact for CGI scripts with parameters that point them
582    to the correct place. Though Sprout has diagram information in it, it has
583    no relationship to the diagrams displayed in SEED, so the work is done entirely
584    on the SEED side.
585    
586    =cut
587    
588    sub get_diagrams {
589        # Get the parameters.
590        my ($self) = @_;
591        # Find the subsystem directory.
592        my $subDir = Subsystem::get_dir_from_name($self->{name});
593        # Get the diagram IDs.
594        my @diagramIDs = Subsystem::GetDiagramIDs($subDir);
595        # Create the return variable.
596        my @retVal = ();
597        # Loop through the diagram IDs.
598        for my $diagramID (@diagramIDs) {
599            # Get the diagram name.
600            my $name = Subsystem::GetDiagramName($diagramID);
601            # If a name was found, get the URLs.
602            if ($name) {
603                my ($link, $imgLink) = Subsystem::ComputeDiagramURLs($self->{name},
604                                                                     $diagramID);
605                push @retVal, [$diagramID, $name, $link, $imgLink];
606            }
607        }
608    }
609    
610    
611    1;

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

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3