[Bio] / FigKernelPackages / SSserver.pm Repository:
ViewVC logotype

Diff of /FigKernelPackages/SSserver.pm

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

revision 1.2, Mon May 11 18:37:24 2009 UTC revision 1.8, Wed Jul 15 23:37:46 2009 UTC
# Line 1  Line 1 
1    
2  package SSserver;  package SSserver;
3    
4    #
5    #       This is a SAS Component.
6    #
7    
8  use LWP::UserAgent;  use LWP::UserAgent;
9  use Data::Dumper;  use Data::Dumper;
10  use YAML;  use YAML;
# Line 11  Line 15 
15  {  {
16      my($class, $server_url) = @_;      my($class, $server_url) = @_;
17    
18      $server_url = "http://bio-macpro-1.mcs.anl.gov/~disz/FIG/subsystem_server.cgi" unless $server_url;  #    $server_url = "http://servers.nmpdr.org/subsystem/subsystem_server_sapling.cgi" unless $server_url;
19        $server_url = "http://bio-macpro-1.mcs.anl.gov/~parrello/FIG/subsystem_server_sapling.cgi" unless $server_url;
20      #$server_url = "http://bio-macpro-1.mcs.anl.gov/ross-proj/FIG/co_occurs_server.cgi" unless $server_url;      #$server_url = "http://bio-macpro-1.mcs.anl.gov/ross-proj/FIG/co_occurs_server.cgi" unless $server_url;
21    
22      my $self = {      my $self = {
23          server_url => $server_url,          server_url => $server_url,
24          ua => LWP::UserAgent->new(),          ua => LWP::UserAgent->new(),
25      };      };
26        $self->{ua}->timeout(30*60);
27      return bless $self, $class;      return bless $self, $class;
28  }  }
29    
# Line 35  Line 41 
41          return $self->run_query("all_subsystems", @args);          return $self->run_query("all_subsystems", @args);
42  }  }
43    
44    sub pegs_in_subsystems {
45            my ($self, @args) = @_;
46            return $self->run_query("pegs_in_subsystems", @args);
47    }
48    
49  sub subsystem_spreadsheet {  sub subsystem_spreadsheet {
50          my ($self, @args) = @_;          my ($self, @args) = @_;
51          return $self->run_query("subsystem_spreadsheet", @args);          return $self->run_query("subsystem_spreadsheet", @args);
52  }  }
53    
54    
55    sub metabolic_reconstruction {
56            my ($self, @args) = @_;
57            return $self->run_query("metabolic_reconstruction", @args);
58    }
59    
60  sub run_query  sub run_query
61  {  {
62      my($self, $function, @args ) = @_;      my($self, $function, @args ) = @_;
# Line 52  Line 68 
68              my $res = $self->{ua}->post($self->{server_url}, $form);              my $res = $self->{ua}->post($self->{server_url}, $form);
69              if ($res->is_success)              if ($res->is_success)
70              {              {
 #print "Content ", $res->content, "\n";  
71                  return Load($res->content);                  return Load($res->content);
72              }              }
73              else              else

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.8

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3