[Bio] / SubsystemExtension / ExtensionInterface.pm Repository:
ViewVC logotype

View of /SubsystemExtension/ExtensionInterface.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.1.1.1 - (download) (as text) (annotate) (vendor branch)
Fri Dec 30 08:41:53 2005 UTC (12 years, 9 months ago) by heiko
Branch: BRF, MAIN
CVS Tags: release_0_1, HEAD
Changes since 1.1: +0 -0 lines
Initial import

package SubsystemExtension::ExtensionInterface;


use strict;
use warnings;
use FIG;
use Subsystem;
use SubsystemExtension::RoleCandidate;
use SubsystemExtension::SubsystemCandidate;
use Data::Dumper;
use CGI;
use constant DEBUG => 1;


=pod

=head1 SubsystemExtension::ExtensionInterface

This Class contains a set of methods needed for the interactive subsystem extension 

=back

=cut

=pod

this Class encaplsulated functionality to display organisms included and missing in subsystems


=back

=cut

=pod

=head1 new
Constructor:

Params
    subsystem: submit reference to subsystem object or subsystem name 
    organism: organism name (taxon id)
	fig: fig object (optional)

=cut

    1;

sub new {

    my ($class, $fig, $parameters) = @_;
    
    my $self  = {};
    
    $self->{fig}  = ref $fig ? $fig : FIG->new();
    $self->{header} = $parameters=>{header};
    $self->{controller} = $parameters->{controller};
    
    bless $self, $class;
    
    print STDERR "created extension interface: \n" if (DEBUG);
    
    return $self;
     
}


sub subsystem_selection {}

sub complete_organism_selection {}

sub extend_organism_selection {} 

sub html_output {
	my ($self) = @_;
	my $q = CGI->new();

	my $html = $self->{'header'} ? $q->header().
	    $q->start_html(-title=>'SubsystemExtension: ValidationInterface',
			   -author=>'hneuwege@cebitec.uni-bielefeld.de',
			   -base=>'true',
			   -meta=>{'keywords'=>'SEED Subsystem Extension',
				   'copyright'=>'copyright 2005'}
			   ) : '';
	

	$html .= $q->h3("SubsystemExtension: Validation Interface");
	$html .= $q->h4($self->{subsystem}->get_name() ." ".$self->{organism});
	

	$html .= $q->h5("Probaly variant ".$self->subsystem_candidate()->functional_variant()." score ".$self->subsystem_candidate()->functional_variant_score()." similar to ".$self->subsystem_candidate()->functional_variant_template());
	$html .= $q->start_form($self->{controller});
	$q->input({-type=>'hidden', -value=>$self->{subsystem}->get_name(), -name=>'subsystem'});
	$q->input({-type=>'hidden', -value=>$self->{organism}, -name=>'genome'});	
	$q->input({-type=>'hidden', -value=>"add_genome", -name=>'request'});	
	
	$html .= $self->subsystem_candidate()->to_html();


	$html .= $q->submit(-name=>'assign',
			    -value=>'Just Make Assignments');
	$html .= $q->submit(-name=>'extend',
			    -value=>'Add Genome');
	$html .= $q->end_form();
		
	$html .= $self->{'header'} ? $q->end_html() : '';

	return $html;
}

sub subsystem {
	my ($self, $value) = @_;

	return $self->{subsystem} if (scalar(@_) == 1);
	$self->{subsystem} = $value;

}

sub subsystem_candidate {
	my ($self, $value) = @_;

	return $self->{subsystem_candidate} if (scalar(@_) == 1);
	$self->{subsystem_candidate} = $value;
}


sub doAssignment {
    my ($self, $q) = @_;
  

}
    

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3