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

Annotation of /FigKernelPackages/ACHserver.pm

Parent Directory Parent Directory | Revision Log Revision Log


Revision 1.15 - (view) (download) (as text)

1 : disz 1.1
2 :     package ACHserver;
3 :    
4 : olson 1.4 #
5 :     # This is a SAS Component
6 :     #
7 : parrello 1.7 use strict;
8 : parrello 1.13 use base qw(ClientThing);
9 : disz 1.1
10 : parrello 1.6 =head1 Annotation Clearinghouse Server Helper Object
11 :    
12 :     =head2 Description
13 :    
14 :     This module is used to call the Annotation Clearinghouse Server, which is a
15 :     special-purpose server for assertion data from the Sapling database. Each
16 :     Annotation Clearinghouse Server function corresponds to a method of this object.
17 :    
18 :     This package deliberately uses no internal SEED packages or scripts, only common
19 :     PERL modules.
20 :    
21 :     The fields in this object are as follows.
22 :    
23 :     =over 4
24 :    
25 :     =item server_url
26 :    
27 :     The URL used to request data from the subsystem server.
28 :    
29 :     =item ua
30 :    
31 :     The user agent for communication with the server.
32 :    
33 :     =item singleton
34 :    
35 :     Indicates whether or not results are to be returned in singleton mode. In
36 :     singleton mode, if the return document is a hash reference with only one
37 :     entry, the entry value is returned rather than the hash.
38 :    
39 :     =back
40 :    
41 :     =cut
42 :    
43 :     =head3 new
44 :    
45 : parrello 1.7 my $ss = ACHserver->new(%options);
46 : parrello 1.6
47 : parrello 1.7 Construct a new server object. The
48 :     following options are supported.
49 : parrello 1.6
50 :     =over 4
51 :    
52 :     =item url
53 : disz 1.1
54 : parrello 1.7 URL for the server. This option is required.
55 : disz 1.5
56 : parrello 1.7 =item singleton (optional)
57 : disz 1.5
58 : parrello 1.6 If TRUE, results from methods will be returned in singleton mode. In singleton
59 :     mode, if a single result comes back, it will come back as a scalar rather than
60 :     as a hash value accessible via an incoming ID.
61 : disz 1.1
62 : parrello 1.6 =back
63 : olson 1.3
64 : parrello 1.6 =cut
65 : disz 1.1
66 : parrello 1.6 sub new {
67 :     # Get the parameters.
68 :     my ($class, %options) = @_;
69 : parrello 1.13 # Compute the URL.
70 : parrello 1.15 $options{url} = "http://servers.nmpdr.org/ach/server.cgi" if ! $options{url};
71 : parrello 1.13 # Construct the subclass.
72 :     return $class->SUPER::new(ACH => %options);
73 : disz 1.1 }
74 :    
75 : parrello 1.6 1;

MCS Webmaster
ViewVC Help
Powered by ViewVC 1.0.3