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