GO::Model::Modification - GO::Model::Modification documentation


go-perl documentation Contained in the go-perl distribution.

Index


Code Index:

NAME

Top

  GO::Model::Modification;

DESCRIPTION

Top

represents a cross reference to an external database

mod_time

  Usage   -
  Returns -
  Args    -

time in seconds > 1970

person

  Usage   -
  Returns -
  Args    -

type

  Usage   -
  Returns -
  Args    -

time_gmtstr

  Usage   -
  Returns -
  Args    -

pre_term_list

  Usage   -
  Returns -
  Args    -

post_term_list

  Usage   -
  Returns -
  Args    -

add_pre_term

  Usage   -
  Returns -
  Args    -

add_post_term

  Usage   -
  Returns -
  Args    -


go-perl documentation Contained in the go-perl distribution.
# $Id: Modification.pm,v 1.2 2004/11/24 02:28:01 cmungall Exp $
#
# This GO module is maintained by Chris Mungall <cjm@fruitfly.org>
#
# see also - http://www.geneontology.org
#          - http://www.godatabase.org/dev
#
# You may distribute this module under the same terms as perl itself

package GO::Model::Modification;


use Carp;
use Exporter;
use GO::Utils qw(rearrange);
use GO::Model::Root;
use strict;
use vars qw(@ISA);

@ISA = qw(GO::Model::Root Exporter);


sub _valid_params {
    return qw(id type person mod_time rank);
}


sub time_gmtstr {
    my $self=shift;
    my $t = gmtime($self->mod_time);
    return $t;
}


sub pre_term_list {
    my $self = shift;
    $self->{pre_term_list} = shift if @_;
    return $self->{pre_term_list};
}

sub post_term_list {
    my $self = shift;
    $self->{post_term_list} = shift if @_;
    return $self->{post_term_list};
}


sub add_pre_term {
    my $self = shift;
    if (!$self->pre_term_list) {
	$self->pre_term_list([]);
    }
    push(@{$self->pre_term_list}, shift);
    $self->pre_term_list;
}


sub add_post_term {
    my $self = shift;
    if (!$self->post_term_list) {
	$self->post_term_list([]);
    }
    push(@{$self->post_term_list}, shift);
    $self->post_term_list;
}

1;