| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Bio::Das::Request::Dsn; |
|
2
|
|
|
|
|
|
|
# $Id: Dsn.pm,v 1.4 2004/01/03 00:23:40 lstein Exp $ |
|
3
|
|
|
|
|
|
|
# this module issues and parses the dsn command, with no arguments |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
=head1 NAME |
|
6
|
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
Bio::Das::Request::Dsn - The DAS "dsn" request |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
10
|
|
|
|
|
|
|
|
|
11
|
|
|
|
|
|
|
my @dsn = $request->results; |
|
12
|
|
|
|
|
|
|
my $das_command = $request->command; |
|
13
|
|
|
|
|
|
|
my $successful = $request->is_success; |
|
14
|
|
|
|
|
|
|
my $error_msg = $request->error; |
|
15
|
|
|
|
|
|
|
my ($username,$password) = $request->auth; |
|
16
|
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
18
|
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
This is a subclass of L<Bio::Das::Request> specialized for the "dsn" |
|
20
|
|
|
|
|
|
|
command. It is used to retrieve the data sources known to a set of |
|
21
|
|
|
|
|
|
|
DAS servers. |
|
22
|
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
The results() method returns a list of L<Bio::Das::DSN> objects. All |
|
24
|
|
|
|
|
|
|
other methods are as described in L<Bio::Das::Request>. |
|
25
|
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=cut |
|
27
|
|
|
|
|
|
|
|
|
28
|
1
|
|
|
1
|
|
5
|
use strict; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
40
|
|
|
29
|
1
|
|
|
1
|
|
436
|
use Bio::Das::DSN; |
|
|
1
|
|
|
|
|
3
|
|
|
|
1
|
|
|
|
|
23
|
|
|
30
|
1
|
|
|
1
|
|
6
|
use Bio::Das::Request; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
22
|
|
|
31
|
1
|
|
|
1
|
|
5
|
use Bio::Das::Util 'rearrange'; |
|
|
1
|
|
|
|
|
1
|
|
|
|
1
|
|
|
|
|
70
|
|
|
32
|
|
|
|
|
|
|
|
|
33
|
1
|
|
|
1
|
|
5
|
use vars '@ISA'; |
|
|
1
|
|
|
|
|
2
|
|
|
|
1
|
|
|
|
|
365
|
|
|
34
|
|
|
|
|
|
|
@ISA = 'Bio::Das::Request'; |
|
35
|
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
#sub new { |
|
37
|
|
|
|
|
|
|
# my $pack = shift; |
|
38
|
|
|
|
|
|
|
# my ($base,$callback) = rearrange(['dsn', |
|
39
|
|
|
|
|
|
|
# 'callback' |
|
40
|
|
|
|
|
|
|
# ],@_); |
|
41
|
|
|
|
|
|
|
# |
|
42
|
|
|
|
|
|
|
# return $pack->SUPER::new(-dsn=>$base,-callback=>$callback); |
|
43
|
|
|
|
|
|
|
#} |
|
44
|
|
|
|
|
|
|
|
|
45
|
9
|
|
|
9
|
1
|
17
|
sub command { 'dsn' } |
|
46
|
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
# top-level tag |
|
48
|
|
|
|
|
|
|
sub t_DASDSN { |
|
49
|
2
|
|
|
2
|
0
|
3
|
my $self = shift; |
|
50
|
2
|
|
|
|
|
3
|
my $attrs = shift; |
|
51
|
2
|
100
|
|
|
|
4
|
if ($attrs) { # section is starting |
|
52
|
1
|
|
|
|
|
7
|
$self->clear_results; |
|
53
|
|
|
|
|
|
|
} |
|
54
|
2
|
|
|
|
|
16
|
$self->{current_dsn} = undef; |
|
55
|
|
|
|
|
|
|
} |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
# the beginning of a dsn |
|
58
|
|
|
|
|
|
|
sub t_DSN { |
|
59
|
32
|
|
|
32
|
0
|
33
|
my $self = shift; |
|
60
|
32
|
|
|
|
|
24
|
my $attrs = shift; |
|
61
|
32
|
100
|
|
|
|
42
|
if ($attrs) { # tag starts |
|
62
|
16
|
|
|
|
|
35
|
$self->{current_dsn} = Bio::Das::DSN->new($self->dsn->base); |
|
63
|
|
|
|
|
|
|
} else { |
|
64
|
16
|
|
|
|
|
39
|
$self->add_object($self->{current_dsn}); |
|
65
|
|
|
|
|
|
|
} |
|
66
|
|
|
|
|
|
|
} |
|
67
|
|
|
|
|
|
|
|
|
68
|
|
|
|
|
|
|
sub t_SOURCE { |
|
69
|
32
|
|
|
32
|
0
|
29
|
my $self = shift; |
|
70
|
32
|
|
|
|
|
31
|
my $attrs = shift; |
|
71
|
32
|
50
|
|
|
|
66
|
my $dsn = $self->{current_dsn} or return; |
|
72
|
32
|
100
|
|
|
|
52
|
if ($attrs) { |
|
73
|
16
|
|
|
|
|
36
|
$dsn->id($attrs->{id}); |
|
74
|
|
|
|
|
|
|
} else { |
|
75
|
16
|
|
|
|
|
48
|
my $name = $self->trim($self->{char_data}); |
|
76
|
16
|
|
|
|
|
32
|
$dsn->name($name); |
|
77
|
|
|
|
|
|
|
} |
|
78
|
|
|
|
|
|
|
} |
|
79
|
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
sub t_MAPMASTER { |
|
81
|
32
|
|
|
32
|
0
|
31
|
my $self = shift; |
|
82
|
32
|
|
|
|
|
29
|
my $attrs = shift; |
|
83
|
32
|
50
|
|
|
|
65
|
my $dsn = $self->{current_dsn} or return; |
|
84
|
32
|
100
|
|
|
|
93
|
if ($attrs) { |
|
85
|
|
|
|
|
|
|
; # do nothing here |
|
86
|
|
|
|
|
|
|
} else { |
|
87
|
16
|
|
|
|
|
33
|
my $name = $self->char_data; |
|
88
|
16
|
|
|
|
|
34
|
$dsn->master($name); |
|
89
|
|
|
|
|
|
|
} |
|
90
|
|
|
|
|
|
|
} |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
sub t_DESCRIPTION { |
|
93
|
32
|
|
|
32
|
0
|
35
|
my $self = shift; |
|
94
|
32
|
|
|
|
|
28
|
my $attrs = shift; |
|
95
|
32
|
50
|
|
|
|
67
|
my $dsn = $self->{current_dsn} or return; |
|
96
|
32
|
100
|
|
|
|
133
|
if ($attrs) { |
|
97
|
|
|
|
|
|
|
; # do nothing here |
|
98
|
|
|
|
|
|
|
} else { |
|
99
|
16
|
|
|
|
|
21
|
my $name = $self->{char_data}; |
|
100
|
16
|
|
|
|
|
30
|
$dsn->description($name); |
|
101
|
|
|
|
|
|
|
} |
|
102
|
|
|
|
|
|
|
} |
|
103
|
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
=head1 AUTHOR |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
Lincoln Stein <lstein@cshl.org>. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
Copyright (c) 2001 Cold Spring Harbor Laboratory |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify |
|
111
|
|
|
|
|
|
|
it under the same terms as Perl itself. See DISCLAIMER.txt for |
|
112
|
|
|
|
|
|
|
disclaimers of warranty. |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
=head1 SEE ALSO |
|
115
|
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
L<Bio::Das::Request>, L<Bio::Das::HTTP::Fetch>, |
|
117
|
|
|
|
|
|
|
L<Bio::Das::Segment>, L<Bio::Das::Type>, L<Bio::Das::Stylesheet>, |
|
118
|
|
|
|
|
|
|
L<Bio::Das::Source>, L<Bio::RangeI> |
|
119
|
|
|
|
|
|
|
|
|
120
|
|
|
|
|
|
|
=cut |
|
121
|
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
1; |
|
123
|
|
|
|
|
|
|
|