Bio::Annotation Comment
SummaryIncluded librariesPackage variablesSynopsisDescriptionGeneral documentationMethods
Summary
Bio::Annotation::Comment - A comment object, holding text
Package variables
No package variables defined.
Included modules
Bio::AnnotationI
Bio::Root::Root
Inherit
Bio::AnnotationI Bio::Root::Root
Synopsis
    $comment = Bio::Annotation::Comment->new();
    $comment->text("This is the text of this comment");
    $annotation->add_Comment($comment);
Description
A holder for comments in annotations, just plain text. This is a very simple
object, and justifably so.
Methods
newDescriptionCode
as_textDescriptionCode
hash_treeDescriptionCode
textDescriptionCode
Methods description
newcode    nextTop
 Title   : new
 Usage   : $comment = Bio::Annotation::Comment->new( '-text' => 'some text for this comment');
 Function: This returns a new comment object, optionally with
           text filed
 Example :
 Returns : a Bio::Annotation::Comment object
 Args    : a hash with -text optionally set
as_textcodeprevnextTop
 Title   : as_text
 Usage   :
 Function:
 Example :
 Returns : 
 Args    :
hash_treecodeprevnextTop
 Title   : hash_tree
 Usage   :
 Function:
 Example :
 Returns : 
 Args    :
textcodeprevnextTop
 Title   : text
 Usage   : $value = $self->text($newval)
 Function: get/set for the text field. A comment object
           just holds a single string which is accessible through
           this method
 Example : 
 Returns : value of text
 Args    : newvalue (optional)
Methods code
newdescriptionprevnextTop
sub new {
  my($class,@args) = @_;

  my $self = $class->SUPER::new(@args);
  my ($text) = $self->_rearrange([qw( TEXT )], @args);

  defined $text && $self->text($text);

  return $self;
}
as_textdescriptionprevnextTop
sub as_text {
   my ($self) = @_;

   return "Comment: ".$self->text;
}
hash_treedescriptionprevnextTop
sub hash_tree {
   my ($self) = @_;
   
   my $h = {};
   $h->{'text'} = $self->text;
}
textdescriptionprevnextTop
sub text {
   my ($self,$value) = @_;
   if( defined $value) {
      $self->{'text'} = $value;
    }
    return $self->{'text'};
}
General documentation
CONTACTTop
Describe contact details here
APPENDIXTop
The rest of the documentation details each of the object
methods. Internal methods are usually preceded with a _
AnnotationI implementing functionsTop
Specific accessors for CommentsTop