| line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
|
1
|
|
|
|
|
|
|
package Astro::ADS::Result::Paper; |
|
2
|
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# --------------------------------------------------------------------------- |
|
4
|
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
#+ |
|
6
|
|
|
|
|
|
|
# Name: |
|
7
|
|
|
|
|
|
|
# Astro::ADS::Result::Paper |
|
8
|
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
# Purposes: |
|
10
|
|
|
|
|
|
|
# Perl wrapper for the ADS database |
|
11
|
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
# Language: |
|
13
|
|
|
|
|
|
|
# Perl module |
|
14
|
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
# Description: |
|
16
|
|
|
|
|
|
|
# This module wraps the ADS online database. |
|
17
|
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
# Authors: |
|
19
|
|
|
|
|
|
|
# Alasdair Allan (aa@astro.ex.ac.uk) |
|
20
|
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
# Revision: |
|
22
|
|
|
|
|
|
|
# $Id: Paper.pm,v 1.11 2001/11/10 20:58:43 timj Exp $ |
|
23
|
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
# Copyright: |
|
25
|
|
|
|
|
|
|
# Copyright (C) 2001 University of Exeter. All Rights Reserved. |
|
26
|
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
#- |
|
28
|
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
# --------------------------------------------------------------------------- |
|
30
|
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 NAME |
|
32
|
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Astro::ADS::Result::Paper - A individual paper in an Astro::ADS::Result object |
|
34
|
|
|
|
|
|
|
|
|
35
|
|
|
|
|
|
|
=head1 SYNOPSIS |
|
36
|
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
$paper = new Astro::ADS::Result::Paper( Bibcode => $bibcode, |
|
38
|
|
|
|
|
|
|
Title => $title, |
|
39
|
|
|
|
|
|
|
Authors => \@authors, |
|
40
|
|
|
|
|
|
|
Affil => \@affil, |
|
41
|
|
|
|
|
|
|
Journal => $journal_refernce, |
|
42
|
|
|
|
|
|
|
Published => $published, |
|
43
|
|
|
|
|
|
|
Keywords => \@keywords, |
|
44
|
|
|
|
|
|
|
Origin => $journal, |
|
45
|
|
|
|
|
|
|
Links => \@associated_links, |
|
46
|
|
|
|
|
|
|
URL => $abstract_url, |
|
47
|
|
|
|
|
|
|
Abstract => \@abstract, |
|
48
|
|
|
|
|
|
|
Object => $object, |
|
49
|
|
|
|
|
|
|
Score => $score ); |
|
50
|
|
|
|
|
|
|
|
|
51
|
|
|
|
|
|
|
$bibcode = $paper->bibcode(); |
|
52
|
|
|
|
|
|
|
@authors = $paper->authors(); |
|
53
|
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
$xml = $paper->summary(format => "XML"); |
|
55
|
|
|
|
|
|
|
$text= $paper->summary(format => "TEXT", fields => \@fields); |
|
56
|
|
|
|
|
|
|
|
|
57
|
|
|
|
|
|
|
=head1 DESCRIPTION |
|
58
|
|
|
|
|
|
|
|
|
59
|
|
|
|
|
|
|
Stores meta-data about an individual paper in the Astro::ADS::Result object |
|
60
|
|
|
|
|
|
|
returned by an Astro::ADS::Query object. |
|
61
|
|
|
|
|
|
|
|
|
62
|
|
|
|
|
|
|
=cut |
|
63
|
|
|
|
|
|
|
|
|
64
|
|
|
|
|
|
|
# L O A D M O D U L E S -------------------------------------------------- |
|
65
|
|
|
|
|
|
|
|
|
66
|
5
|
|
|
5
|
|
29
|
use strict; |
|
|
5
|
|
|
|
|
34
|
|
|
|
5
|
|
|
|
|
216
|
|
|
67
|
5
|
|
|
5
|
|
25
|
use warnings; |
|
|
5
|
|
|
|
|
7
|
|
|
|
5
|
|
|
|
|
135
|
|
|
68
|
5
|
|
|
5
|
|
23
|
use vars qw/ $VERSION /; |
|
|
5
|
|
|
|
|
7
|
|
|
|
5
|
|
|
|
|
214
|
|
|
69
|
|
|
|
|
|
|
|
|
70
|
|
|
|
|
|
|
# Overloading |
|
71
|
5
|
|
|
5
|
|
24
|
use overload '""' => "stringify"; |
|
|
5
|
|
|
|
|
18
|
|
|
|
5
|
|
|
|
|
32
|
|
|
72
|
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
'$Revision: 1.25_2 $ ' =~ /.*:\s(.*)\s\$/ && ($VERSION = $1); |
|
74
|
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
# C O N S T R U C T O R ---------------------------------------------------- |
|
76
|
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=head1 REVISION |
|
78
|
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
$Id: Paper.pm,v 1.25 2013/08/06 bjd Exp $ |
|
80
|
|
|
|
|
|
|
$Id: Paper.pm,v 1.11 2001/11/10 20:58:43 timj Exp $ |
|
81
|
|
|
|
|
|
|
|
|
82
|
|
|
|
|
|
|
=head1 METHODS |
|
83
|
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 Constructor |
|
85
|
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
=over 4 |
|
87
|
|
|
|
|
|
|
|
|
88
|
|
|
|
|
|
|
=item B |
|
89
|
|
|
|
|
|
|
|
|
90
|
|
|
|
|
|
|
Create a new instance from a hash of options |
|
91
|
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
$paper = new Astro::ADS::Result::Paper( Bibcode => $bibcode, |
|
93
|
|
|
|
|
|
|
Title => $title, |
|
94
|
|
|
|
|
|
|
Authors => \@authors, |
|
95
|
|
|
|
|
|
|
Affil => \@affil, |
|
96
|
|
|
|
|
|
|
Journal => $journal_refernce, |
|
97
|
|
|
|
|
|
|
Published => $published, |
|
98
|
|
|
|
|
|
|
Keywords => \@keywords, |
|
99
|
|
|
|
|
|
|
Origin => $journal, |
|
100
|
|
|
|
|
|
|
Links => \@outbound_links, |
|
101
|
|
|
|
|
|
|
URL => $abstract_url, |
|
102
|
|
|
|
|
|
|
Abstract => \@abstract, |
|
103
|
|
|
|
|
|
|
Object => $object, |
|
104
|
|
|
|
|
|
|
Score => $score ); |
|
105
|
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
returns a reference to an ADS paper object. |
|
107
|
|
|
|
|
|
|
|
|
108
|
|
|
|
|
|
|
=cut |
|
109
|
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
sub new { |
|
111
|
235
|
|
|
235
|
1
|
1077
|
my $proto = shift; |
|
112
|
235
|
|
33
|
|
|
1071
|
my $class = ref($proto) || $proto; |
|
113
|
|
|
|
|
|
|
|
|
114
|
|
|
|
|
|
|
# bless the query hash into the class |
|
115
|
235
|
|
|
|
|
3564
|
my $block = bless { BIBCODE => undef, |
|
116
|
|
|
|
|
|
|
TITLE => undef, |
|
117
|
|
|
|
|
|
|
AUTHORS => [], |
|
118
|
|
|
|
|
|
|
AFFIL => [], |
|
119
|
|
|
|
|
|
|
JOURNAL => undef, |
|
120
|
|
|
|
|
|
|
PUBLISHED => undef, |
|
121
|
|
|
|
|
|
|
KEYWORDS => [], |
|
122
|
|
|
|
|
|
|
ORIGIN => undef, |
|
123
|
|
|
|
|
|
|
LINKS => [], |
|
124
|
|
|
|
|
|
|
URL => undef, |
|
125
|
|
|
|
|
|
|
ABSTRACT => [], |
|
126
|
|
|
|
|
|
|
OBJECT => undef, |
|
127
|
|
|
|
|
|
|
SCORE => undef }, $class; |
|
128
|
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
# If we have arguments configure the object |
|
130
|
235
|
50
|
|
|
|
1020
|
$block->configure( @_ ) if @_; |
|
131
|
|
|
|
|
|
|
|
|
132
|
235
|
|
|
|
|
817
|
return $block; |
|
133
|
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
} |
|
135
|
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
# A C C E S S O R -------------------------------------------------------- |
|
137
|
|
|
|
|
|
|
|
|
138
|
|
|
|
|
|
|
=back |
|
139
|
|
|
|
|
|
|
|
|
140
|
|
|
|
|
|
|
=head2 Accessor Methods |
|
141
|
|
|
|
|
|
|
|
|
142
|
|
|
|
|
|
|
=over 4 |
|
143
|
|
|
|
|
|
|
|
|
144
|
|
|
|
|
|
|
=item B |
|
145
|
|
|
|
|
|
|
|
|
146
|
|
|
|
|
|
|
Return (or set) the bibcode for the paper |
|
147
|
|
|
|
|
|
|
|
|
148
|
|
|
|
|
|
|
$bibcode = $paper->bibcode(); |
|
149
|
|
|
|
|
|
|
$paper->bibcode( $bibcode ); |
|
150
|
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
=cut |
|
152
|
|
|
|
|
|
|
|
|
153
|
|
|
|
|
|
|
sub bibcode { |
|
154
|
476
|
|
|
476
|
1
|
773
|
my $self = shift; |
|
155
|
476
|
100
|
|
|
|
929
|
if (@_) { |
|
156
|
235
|
|
|
|
|
643
|
$self->{BIBCODE} = shift; |
|
157
|
|
|
|
|
|
|
} |
|
158
|
476
|
|
|
|
|
2804
|
return $self->{BIBCODE}; |
|
159
|
|
|
|
|
|
|
} |
|
160
|
|
|
|
|
|
|
|
|
161
|
|
|
|
|
|
|
=item B |
|
162
|
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
Return (or set) the title for the paper |
|
164
|
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
$title = $paper->title(); |
|
166
|
|
|
|
|
|
|
$paper->title( $title ); |
|
167
|
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=cut |
|
169
|
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
sub title { |
|
171
|
236
|
|
|
236
|
1
|
363
|
my $self = shift; |
|
172
|
236
|
100
|
|
|
|
550
|
if (@_) { |
|
173
|
234
|
|
|
|
|
515
|
$self->{TITLE} = shift; |
|
174
|
|
|
|
|
|
|
} |
|
175
|
236
|
|
|
|
|
888
|
return $self->{TITLE}; |
|
176
|
|
|
|
|
|
|
} |
|
177
|
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
=item B |
|
179
|
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
Return (or set) the authors for the paper |
|
181
|
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
@authors = $paper->authors(); |
|
183
|
|
|
|
|
|
|
$first_author = $paper->authors(); |
|
184
|
|
|
|
|
|
|
$paper->authors( \@authors ); |
|
185
|
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
if called in a scalar context it will return the first author. |
|
187
|
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=cut |
|
189
|
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
sub authors { |
|
191
|
237
|
|
|
237
|
0
|
1321
|
my $self = shift; |
|
192
|
237
|
100
|
|
|
|
496
|
if (@_) { |
|
193
|
235
|
|
|
|
|
553
|
$self->{AUTHORS} = shift; |
|
194
|
|
|
|
|
|
|
} |
|
195
|
237
|
|
|
|
|
330
|
my @authors = @{$self->{AUTHORS}}; |
|
|
237
|
|
|
|
|
1092
|
|
|
196
|
237
|
100
|
|
|
|
924
|
return wantarray ? @authors : $authors[0]; |
|
197
|
|
|
|
|
|
|
} |
|
198
|
|
|
|
|
|
|
|
|
199
|
|
|
|
|
|
|
=item B |
|
200
|
|
|
|
|
|
|
|
|
201
|
|
|
|
|
|
|
Return (or set) the affiliation of each author for the paper |
|
202
|
|
|
|
|
|
|
|
|
203
|
|
|
|
|
|
|
@institutions = $paper->affil(); |
|
204
|
|
|
|
|
|
|
$first_author_inst = $paper->affil(); |
|
205
|
|
|
|
|
|
|
$paper->affil( \@institutions ); |
|
206
|
|
|
|
|
|
|
|
|
207
|
|
|
|
|
|
|
if called in a scalar context it will return the affiliation of the |
|
208
|
|
|
|
|
|
|
first author. |
|
209
|
|
|
|
|
|
|
|
|
210
|
|
|
|
|
|
|
=cut |
|
211
|
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
sub affil { |
|
213
|
169
|
|
|
169
|
1
|
1827
|
my $self = shift; |
|
214
|
169
|
100
|
|
|
|
475
|
if (@_) { |
|
215
|
167
|
|
|
|
|
377
|
$self->{AFFIL} = shift; |
|
216
|
|
|
|
|
|
|
} |
|
217
|
169
|
|
|
|
|
264
|
my @affil = @{$self->{AFFIL}}; |
|
|
169
|
|
|
|
|
502
|
|
|
218
|
169
|
100
|
|
|
|
568
|
return wantarray ? @affil : $affil[0];; |
|
219
|
|
|
|
|
|
|
} |
|
220
|
|
|
|
|
|
|
|
|
221
|
|
|
|
|
|
|
=item B |
|
222
|
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
Return (or set) the journal reference for the paper |
|
224
|
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
$journal_ref = $paper->journal(); |
|
226
|
|
|
|
|
|
|
$paper->journal( $journal_ref ); |
|
227
|
|
|
|
|
|
|
|
|
228
|
|
|
|
|
|
|
=cut |
|
229
|
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
sub journal { |
|
231
|
236
|
|
|
236
|
0
|
796
|
my $self = shift; |
|
232
|
236
|
100
|
|
|
|
542
|
if (@_) { |
|
233
|
235
|
|
|
|
|
436
|
$self->{JOURNAL} = shift; |
|
234
|
|
|
|
|
|
|
} |
|
235
|
236
|
|
|
|
|
578
|
return $self->{JOURNAL}; |
|
236
|
|
|
|
|
|
|
} |
|
237
|
|
|
|
|
|
|
|
|
238
|
|
|
|
|
|
|
=item B |
|
239
|
|
|
|
|
|
|
|
|
240
|
|
|
|
|
|
|
Return (or set) the month and year when the paper was published. |
|
241
|
|
|
|
|
|
|
|
|
242
|
|
|
|
|
|
|
$published = $paper->published(); |
|
243
|
|
|
|
|
|
|
$paper->published( $published ); |
|
244
|
|
|
|
|
|
|
|
|
245
|
|
|
|
|
|
|
=cut |
|
246
|
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
sub published { |
|
248
|
236
|
|
|
236
|
0
|
318
|
my $self = shift; |
|
249
|
236
|
100
|
|
|
|
491
|
if (@_) { |
|
250
|
235
|
|
|
|
|
427
|
$self->{PUBLISHED} = shift; |
|
251
|
|
|
|
|
|
|
} |
|
252
|
236
|
|
|
|
|
753
|
return $self->{PUBLISHED}; |
|
253
|
|
|
|
|
|
|
} |
|
254
|
|
|
|
|
|
|
|
|
255
|
|
|
|
|
|
|
=item B |
|
256
|
|
|
|
|
|
|
|
|
257
|
|
|
|
|
|
|
Return (or set) the different keywords the paper is indexed by, could |
|
258
|
|
|
|
|
|
|
include such keys as ACCRETION DISCS, WHITE DWARFS, etc. |
|
259
|
|
|
|
|
|
|
|
|
260
|
|
|
|
|
|
|
@keywords = $paper->keywords(); |
|
261
|
|
|
|
|
|
|
$paper->keywords( \@keywords ); |
|
262
|
|
|
|
|
|
|
|
|
263
|
|
|
|
|
|
|
if called in a scalar context it will return the number of keywords. |
|
264
|
|
|
|
|
|
|
|
|
265
|
|
|
|
|
|
|
=cut |
|
266
|
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
sub keywords { |
|
268
|
161
|
|
|
161
|
1
|
1388
|
my $self = shift; |
|
269
|
161
|
100
|
|
|
|
411
|
if (@_) { |
|
270
|
159
|
|
|
|
|
338
|
$self->{KEYWORDS} = shift; |
|
271
|
|
|
|
|
|
|
} |
|
272
|
161
|
100
|
|
|
|
303
|
return wantarray ? @{$self->{KEYWORDS}} : $#{$self->{KEYWORDS}}; |
|
|
1
|
|
|
|
|
8
|
|
|
|
160
|
|
|
|
|
446
|
|
|
273
|
|
|
|
|
|
|
} |
|
274
|
|
|
|
|
|
|
|
|
275
|
|
|
|
|
|
|
=item B |
|
276
|
|
|
|
|
|
|
|
|
277
|
|
|
|
|
|
|
Return (or set) the origin of the paper in the ADS archive, this is not |
|
278
|
|
|
|
|
|
|
necessarily the journal in which the paper was published, but could be |
|
279
|
|
|
|
|
|
|
set to AUTHOR, ADS or SIMBAD for instance. |
|
280
|
|
|
|
|
|
|
|
|
281
|
|
|
|
|
|
|
$source = $paper->origin(); |
|
282
|
|
|
|
|
|
|
$paper->origin( $source ); |
|
283
|
|
|
|
|
|
|
|
|
284
|
|
|
|
|
|
|
=cut |
|
285
|
|
|
|
|
|
|
|
|
286
|
|
|
|
|
|
|
sub origin { |
|
287
|
236
|
|
|
236
|
1
|
312
|
my $self = shift; |
|
288
|
236
|
100
|
|
|
|
476
|
if (@_) { |
|
289
|
235
|
|
|
|
|
538
|
$self->{ORIGIN} = shift; |
|
290
|
|
|
|
|
|
|
} |
|
291
|
236
|
|
|
|
|
565
|
return $self->{ORIGIN}; |
|
292
|
|
|
|
|
|
|
} |
|
293
|
|
|
|
|
|
|
|
|
294
|
|
|
|
|
|
|
=item B |
|
295
|
|
|
|
|
|
|
|
|
296
|
|
|
|
|
|
|
Return (or set) the different type of outbounds links offered by ADS for this |
|
297
|
|
|
|
|
|
|
paper, examples include ABSTRACT, EJOURNAL, ARTICLE, REFERENCES, CITATIONS, |
|
298
|
|
|
|
|
|
|
SIMBAD objects etc. |
|
299
|
|
|
|
|
|
|
|
|
300
|
|
|
|
|
|
|
@outbound_links = $paper->links(); |
|
301
|
|
|
|
|
|
|
$paper->links( \@outbound_links ); |
|
302
|
|
|
|
|
|
|
|
|
303
|
|
|
|
|
|
|
if called in a scalar context it will return the number of outbound links |
|
304
|
|
|
|
|
|
|
available. |
|
305
|
|
|
|
|
|
|
|
|
306
|
|
|
|
|
|
|
=cut |
|
307
|
|
|
|
|
|
|
|
|
308
|
|
|
|
|
|
|
sub links { |
|
309
|
237
|
|
|
237
|
1
|
2043
|
my $self = shift; |
|
310
|
237
|
100
|
|
|
|
562
|
if (@_) { |
|
311
|
235
|
|
|
|
|
477
|
$self->{LINKS} = shift; |
|
312
|
|
|
|
|
|
|
} |
|
313
|
237
|
100
|
|
|
|
477
|
return wantarray ? @{$self->{LINKS}} : $#{$self->{LINKS}}; |
|
|
1
|
|
|
|
|
9
|
|
|
|
236
|
|
|
|
|
672
|
|
|
314
|
|
|
|
|
|
|
} |
|
315
|
|
|
|
|
|
|
|
|
316
|
|
|
|
|
|
|
=item B |
|
317
|
|
|
|
|
|
|
|
|
318
|
|
|
|
|
|
|
Return (or set) the URL pointing to the paper at the ADS |
|
319
|
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
$adsurl = $paper->url(); |
|
321
|
|
|
|
|
|
|
$paper->url( $adsurl ); |
|
322
|
|
|
|
|
|
|
|
|
323
|
|
|
|
|
|
|
=cut |
|
324
|
|
|
|
|
|
|
|
|
325
|
|
|
|
|
|
|
sub url { |
|
326
|
235
|
|
|
235
|
1
|
340
|
my $self = shift; |
|
327
|
235
|
50
|
|
|
|
481
|
if (@_) { |
|
328
|
235
|
|
|
|
|
1205
|
$self->{URL} = shift; |
|
329
|
|
|
|
|
|
|
} |
|
330
|
235
|
|
|
|
|
618
|
return $self->{URL}; |
|
331
|
|
|
|
|
|
|
} |
|
332
|
|
|
|
|
|
|
|
|
333
|
|
|
|
|
|
|
=item B |
|
334
|
|
|
|
|
|
|
|
|
335
|
|
|
|
|
|
|
Return (or set) the abstract of the paper, this may be either the full text |
|
336
|
|
|
|
|
|
|
of the abstract, or a URL pointing to the scanned abstract at the ADS. |
|
337
|
|
|
|
|
|
|
|
|
338
|
|
|
|
|
|
|
@abstract = $paper->abstract(); |
|
339
|
|
|
|
|
|
|
$paper->abstract( @abstract ); |
|
340
|
|
|
|
|
|
|
|
|
341
|
|
|
|
|
|
|
if called in a scalar context it will return the number of lines of text in |
|
342
|
|
|
|
|
|
|
the abstract. |
|
343
|
|
|
|
|
|
|
|
|
344
|
|
|
|
|
|
|
=cut |
|
345
|
|
|
|
|
|
|
|
|
346
|
|
|
|
|
|
|
sub abstract { |
|
347
|
238
|
|
|
238
|
1
|
1632
|
my $self = shift; |
|
348
|
238
|
100
|
|
|
|
577
|
if (@_) { |
|
349
|
235
|
|
|
|
|
449
|
$self->{ABSTRACT} = shift; |
|
350
|
|
|
|
|
|
|
} |
|
351
|
238
|
100
|
|
|
|
502
|
return wantarray ? @{$self->{ABSTRACT}} : $#{$self->{ABSTRACT}}; |
|
|
2
|
|
|
|
|
26
|
|
|
|
236
|
|
|
|
|
640
|
|
|
352
|
|
|
|
|
|
|
} |
|
353
|
|
|
|
|
|
|
|
|
354
|
|
|
|
|
|
|
=item B |
|
355
|
|
|
|
|
|
|
|
|
356
|
|
|
|
|
|
|
Return (or set) the object tag for the paper. |
|
357
|
|
|
|
|
|
|
|
|
358
|
|
|
|
|
|
|
$object = $paper->object(); |
|
359
|
|
|
|
|
|
|
$paper->object( $object ); |
|
360
|
|
|
|
|
|
|
|
|
361
|
|
|
|
|
|
|
=cut |
|
362
|
|
|
|
|
|
|
|
|
363
|
|
|
|
|
|
|
sub object { |
|
364
|
6
|
|
|
6
|
1
|
12
|
my $self = shift; |
|
365
|
6
|
100
|
|
|
|
18
|
if (@_) { |
|
366
|
5
|
|
|
|
|
12
|
$self->{OBJECT} = shift; |
|
367
|
|
|
|
|
|
|
} |
|
368
|
6
|
|
|
|
|
16
|
return $self->{OBJECT}; |
|
369
|
|
|
|
|
|
|
} |
|
370
|
|
|
|
|
|
|
|
|
371
|
|
|
|
|
|
|
=item B |
|
372
|
|
|
|
|
|
|
|
|
373
|
|
|
|
|
|
|
Return (or set) the score for the paper generated by the weightings of |
|
374
|
|
|
|
|
|
|
the different query criteria. |
|
375
|
|
|
|
|
|
|
|
|
376
|
|
|
|
|
|
|
$score = $paper->score(); |
|
377
|
|
|
|
|
|
|
$paper->score( $score ); |
|
378
|
|
|
|
|
|
|
|
|
379
|
|
|
|
|
|
|
=cut |
|
380
|
|
|
|
|
|
|
|
|
381
|
|
|
|
|
|
|
sub score { |
|
382
|
234
|
|
|
234
|
1
|
395
|
my $self = shift; |
|
383
|
234
|
100
|
|
|
|
534
|
if (@_) { |
|
384
|
233
|
|
|
|
|
585
|
$self->{SCORE} = shift; |
|
385
|
|
|
|
|
|
|
} |
|
386
|
234
|
|
|
|
|
2075
|
return $self->{SCORE}; |
|
387
|
|
|
|
|
|
|
} |
|
388
|
|
|
|
|
|
|
|
|
389
|
|
|
|
|
|
|
# F O L L O W U P M E T H O D S --------------------------------------- |
|
390
|
|
|
|
|
|
|
|
|
391
|
|
|
|
|
|
|
=back |
|
392
|
|
|
|
|
|
|
|
|
393
|
|
|
|
|
|
|
=head2 Followup Queries |
|
394
|
|
|
|
|
|
|
|
|
395
|
|
|
|
|
|
|
=over 4 |
|
396
|
|
|
|
|
|
|
|
|
397
|
|
|
|
|
|
|
=item B |
|
398
|
|
|
|
|
|
|
|
|
399
|
|
|
|
|
|
|
Returns an Astro::ADS::Result object containing the references for the paper. |
|
400
|
|
|
|
|
|
|
|
|
401
|
|
|
|
|
|
|
$result = $paper->references(); |
|
402
|
|
|
|
|
|
|
|
|
403
|
|
|
|
|
|
|
returns undef if this external link type is not available for this paper. |
|
404
|
|
|
|
|
|
|
|
|
405
|
|
|
|
|
|
|
=cut |
|
406
|
|
|
|
|
|
|
|
|
407
|
|
|
|
|
|
|
sub references { |
|
408
|
2
|
|
|
2
|
1
|
5008161
|
my $self = shift; |
|
409
|
|
|
|
|
|
|
|
|
410
|
|
|
|
|
|
|
# check to see if link is defined |
|
411
|
2
|
|
|
|
|
7
|
my $flag = undef; |
|
412
|
2
|
|
|
|
|
7
|
for my $i ( 0 ... $#{$self->{LINKS}} ) { |
|
|
2
|
|
|
|
|
16
|
|
|
413
|
13
|
100
|
|
|
|
15
|
$flag = 1 if ${$self->{LINKS}}[$i] eq "REFERENCES"; |
|
|
13
|
|
|
|
|
50
|
|
|
414
|
|
|
|
|
|
|
} |
|
415
|
|
|
|
|
|
|
|
|
416
|
|
|
|
|
|
|
# return if keyword has not been flagged |
|
417
|
2
|
50
|
|
|
|
15
|
return unless defined $flag; |
|
418
|
|
|
|
|
|
|
|
|
419
|
|
|
|
|
|
|
# grab the bibcode of the paper |
|
420
|
2
|
|
|
|
|
10
|
my $bibcode = $self->{BIBCODE}; |
|
421
|
|
|
|
|
|
|
|
|
422
|
|
|
|
|
|
|
# build a query object |
|
423
|
2
|
|
|
|
|
53
|
my $query = new Astro::ADS::Query(); |
|
424
|
|
|
|
|
|
|
|
|
425
|
2
|
|
|
|
|
13
|
return $query->followup( $bibcode, "REFERENCES" ); |
|
426
|
|
|
|
|
|
|
} |
|
427
|
|
|
|
|
|
|
|
|
428
|
|
|
|
|
|
|
=item B |
|
429
|
|
|
|
|
|
|
|
|
430
|
|
|
|
|
|
|
Returns an Astro::ADS::Result object containing the citations for the paper. |
|
431
|
|
|
|
|
|
|
|
|
432
|
|
|
|
|
|
|
$result = $paper->citations(); |
|
433
|
|
|
|
|
|
|
|
|
434
|
|
|
|
|
|
|
returns undef if this external link type is not available for this paper. |
|
435
|
|
|
|
|
|
|
|
|
436
|
|
|
|
|
|
|
=cut |
|
437
|
|
|
|
|
|
|
|
|
438
|
|
|
|
|
|
|
sub citations { |
|
439
|
1
|
|
|
1
|
1
|
5002205
|
my $self = shift; |
|
440
|
|
|
|
|
|
|
|
|
441
|
|
|
|
|
|
|
# check to see if link is defined |
|
442
|
1
|
|
|
|
|
5
|
my $flag = undef; |
|
443
|
1
|
|
|
|
|
3
|
for my $i ( 0 ... $#{$self->{LINKS}} ) { |
|
|
1
|
|
|
|
|
16
|
|
|
444
|
7
|
100
|
|
|
|
9
|
$flag = 1 if ${$self->{LINKS}}[$i] eq "CITATIONS"; |
|
|
7
|
|
|
|
|
34
|
|
|
445
|
|
|
|
|
|
|
} |
|
446
|
|
|
|
|
|
|
|
|
447
|
|
|
|
|
|
|
# return if keyword has not been flagged |
|
448
|
1
|
50
|
|
|
|
9
|
return unless defined $flag; |
|
449
|
|
|
|
|
|
|
|
|
450
|
|
|
|
|
|
|
# grab the bibcode of the paper |
|
451
|
1
|
|
|
|
|
7
|
my $bibcode = $self->{BIBCODE}; |
|
452
|
|
|
|
|
|
|
|
|
453
|
|
|
|
|
|
|
# build a query object |
|
454
|
1
|
|
|
|
|
189
|
my $query = new Astro::ADS::Query(); |
|
455
|
|
|
|
|
|
|
|
|
456
|
1
|
|
|
|
|
8
|
return $query->followup( $bibcode, "CITATIONS" ); |
|
457
|
|
|
|
|
|
|
} |
|
458
|
|
|
|
|
|
|
|
|
459
|
|
|
|
|
|
|
=item B |
|
460
|
|
|
|
|
|
|
|
|
461
|
|
|
|
|
|
|
Returns an Astro::ADS::Result object containing papers which were `also |
|
462
|
|
|
|
|
|
|
read' along with this paper. |
|
463
|
|
|
|
|
|
|
|
|
464
|
|
|
|
|
|
|
$result = $paper->alsoread(); |
|
465
|
|
|
|
|
|
|
|
|
466
|
|
|
|
|
|
|
returns undef if this external link type is not available for this paper. |
|
467
|
|
|
|
|
|
|
|
|
468
|
|
|
|
|
|
|
=cut |
|
469
|
|
|
|
|
|
|
|
|
470
|
|
|
|
|
|
|
sub alsoread { |
|
471
|
0
|
|
|
0
|
1
|
0
|
my $self = shift; |
|
472
|
|
|
|
|
|
|
|
|
473
|
|
|
|
|
|
|
# check to see if link is defined |
|
474
|
0
|
|
|
|
|
0
|
my $flag = undef; |
|
475
|
0
|
|
|
|
|
0
|
for my $i ( 0 ... $#{$self->{LINKS}} ) { |
|
|
0
|
|
|
|
|
0
|
|
|
476
|
0
|
0
|
|
|
|
0
|
$flag = 1 if ${$self->{LINKS}}[$i] eq "AR"; |
|
|
0
|
|
|
|
|
0
|
|
|
477
|
|
|
|
|
|
|
} |
|
478
|
|
|
|
|
|
|
|
|
479
|
|
|
|
|
|
|
# return if keyword has not been flagged |
|
480
|
0
|
0
|
|
|
|
0
|
return unless defined $flag; |
|
481
|
|
|
|
|
|
|
|
|
482
|
|
|
|
|
|
|
# grab the bibcode of the paper |
|
483
|
0
|
|
|
|
|
0
|
my $bibcode = $self->{BIBCODE}; |
|
484
|
|
|
|
|
|
|
|
|
485
|
|
|
|
|
|
|
# build a query object |
|
486
|
0
|
|
|
|
|
0
|
my $query = new Astro::ADS::Query(); |
|
487
|
|
|
|
|
|
|
|
|
488
|
0
|
|
|
|
|
0
|
return $query->followup( $bibcode, "AR" ); |
|
489
|
|
|
|
|
|
|
} |
|
490
|
|
|
|
|
|
|
|
|
491
|
|
|
|
|
|
|
|
|
492
|
|
|
|
|
|
|
=item B |
|
493
|
|
|
|
|
|
|
|
|
494
|
|
|
|
|
|
|
Returns an Astro::ADS::Result object containing the table of contents of |
|
495
|
|
|
|
|
|
|
the journal or proceedings. |
|
496
|
|
|
|
|
|
|
|
|
497
|
|
|
|
|
|
|
$result = $paper->tableofcontents(); |
|
498
|
|
|
|
|
|
|
|
|
499
|
|
|
|
|
|
|
returns undef if this external link type is not available for this paper. |
|
500
|
|
|
|
|
|
|
|
|
501
|
|
|
|
|
|
|
=cut |
|
502
|
|
|
|
|
|
|
|
|
503
|
|
|
|
|
|
|
sub tableofcontents { |
|
504
|
1
|
|
|
1
|
1
|
2439
|
my $self = shift; |
|
505
|
|
|
|
|
|
|
|
|
506
|
|
|
|
|
|
|
# check to see if link is defined |
|
507
|
1
|
|
|
|
|
2
|
my $flag = undef; |
|
508
|
1
|
|
|
|
|
3
|
for my $i ( 0 ... $#{$self->{LINKS}} ) { |
|
|
1
|
|
|
|
|
10
|
|
|
509
|
7
|
50
|
|
|
|
8
|
$flag = 1 if ${$self->{LINKS}}[$i] eq "TOC"; |
|
|
7
|
|
|
|
|
22
|
|
|
510
|
|
|
|
|
|
|
} |
|
511
|
|
|
|
|
|
|
|
|
512
|
|
|
|
|
|
|
# return if keyword has not been flagged |
|
513
|
1
|
50
|
|
|
|
6
|
return unless defined $flag; |
|
514
|
|
|
|
|
|
|
|
|
515
|
|
|
|
|
|
|
# grab the bibcode of the paper |
|
516
|
0
|
|
|
|
|
0
|
my $bibcode = $self->{BIBCODE}; |
|
517
|
|
|
|
|
|
|
|
|
518
|
|
|
|
|
|
|
# build a query object |
|
519
|
0
|
|
|
|
|
0
|
my $query = new Astro::ADS::Query(); |
|
520
|
|
|
|
|
|
|
|
|
521
|
0
|
|
|
|
|
0
|
return $query->followup( $bibcode, "TOC" ); |
|
522
|
|
|
|
|
|
|
} |
|
523
|
|
|
|
|
|
|
|
|
524
|
|
|
|
|
|
|
# C O N F I G U R E ------------------------------------------------------- |
|
525
|
|
|
|
|
|
|
|
|
526
|
|
|
|
|
|
|
=back |
|
527
|
|
|
|
|
|
|
|
|
528
|
|
|
|
|
|
|
=head2 General Methods |
|
529
|
|
|
|
|
|
|
|
|
530
|
|
|
|
|
|
|
=over 4 |
|
531
|
|
|
|
|
|
|
|
|
532
|
|
|
|
|
|
|
=item B |
|
533
|
|
|
|
|
|
|
|
|
534
|
|
|
|
|
|
|
Configures the object from multiple pieces of information. |
|
535
|
|
|
|
|
|
|
|
|
536
|
|
|
|
|
|
|
$paper->configure( %options ); |
|
537
|
|
|
|
|
|
|
|
|
538
|
|
|
|
|
|
|
Takes a hash as argument with the following keywords: |
|
539
|
|
|
|
|
|
|
|
|
540
|
|
|
|
|
|
|
=over 4 |
|
541
|
|
|
|
|
|
|
|
|
542
|
|
|
|
|
|
|
=item B |
|
543
|
|
|
|
|
|
|
|
|
544
|
|
|
|
|
|
|
The bibcode of the paper. A complete description of the bibcode reference |
|
545
|
|
|
|
|
|
|
coding has been published as a chapter of the book "Information & On-Line |
|
546
|
|
|
|
|
|
|
Data in Astronomy", 1995, D. Egret and M. A. Albrecht (Eds), Kluwer Acad. Publ. |
|
547
|
|
|
|
|
|
|
|
|
548
|
|
|
|
|
|
|
A copy of the relevant chapter in this book is available online as a Postscript |
|
549
|
|
|
|
|
|
|
file via the CDS at http://cdsweb.u-strasbg.fr/simbad/refcode.ps |
|
550
|
|
|
|
|
|
|
|
|
551
|
|
|
|
|
|
|
=item B |
|
552
|
|
|
|
|
|
|
|
|
553
|
|
|
|
|
|
|
The title of the paper. |
|
554
|
|
|
|
|
|
|
|
|
555
|
|
|
|
|
|
|
=item B |
|
556
|
|
|
|
|
|
|
|
|
557
|
|
|
|
|
|
|
The authors of the paper. |
|
558
|
|
|
|
|
|
|
|
|
559
|
|
|
|
|
|
|
=item B |
|
560
|
|
|
|
|
|
|
|
|
561
|
|
|
|
|
|
|
Institute affiliations associated with each author. |
|
562
|
|
|
|
|
|
|
|
|
563
|
|
|
|
|
|
|
=item B |
|
564
|
|
|
|
|
|
|
|
|
565
|
|
|
|
|
|
|
The journal reference for the paper, e.g. MNRAS, 279, 1345-1348 (1996) |
|
566
|
|
|
|
|
|
|
|
|
567
|
|
|
|
|
|
|
=item B |
|
568
|
|
|
|
|
|
|
|
|
569
|
|
|
|
|
|
|
Month and year published, e.g. 4/1996 |
|
570
|
|
|
|
|
|
|
|
|
571
|
|
|
|
|
|
|
=item B |
|
572
|
|
|
|
|
|
|
|
|
573
|
|
|
|
|
|
|
Keywords for the paper, e.g. ACCRETION DISCS |
|
574
|
|
|
|
|
|
|
|
|
575
|
|
|
|
|
|
|
=item B |
|
576
|
|
|
|
|
|
|
|
|
577
|
|
|
|
|
|
|
Origin of citation in ADS archive, this is not necessarily the journal, the |
|
578
|
|
|
|
|
|
|
origin of the entry could be AUTHOR, or ADS or SIMBAD for instance. |
|
579
|
|
|
|
|
|
|
|
|
580
|
|
|
|
|
|
|
=item B |
|
581
|
|
|
|
|
|
|
|
|
582
|
|
|
|
|
|
|
Available type of links relating to the paper, e.g. SIMBAD objects mentioned |
|
583
|
|
|
|
|
|
|
in the paper, References, Citations, Table of Contents of the Journal etc. |
|
584
|
|
|
|
|
|
|
|
|
585
|
|
|
|
|
|
|
=item B |
|
586
|
|
|
|
|
|
|
|
|
587
|
|
|
|
|
|
|
URL of the ADS page of the paper |
|
588
|
|
|
|
|
|
|
|
|
589
|
|
|
|
|
|
|
=item B |
|
590
|
|
|
|
|
|
|
|
|
591
|
|
|
|
|
|
|
Either the abstract text or a URL of the scanned abstract (for older papers). |
|
592
|
|
|
|
|
|
|
|
|
593
|
|
|
|
|
|
|
=item B |
|
594
|
|
|
|
|
|
|
|
|
595
|
|
|
|
|
|
|
Main object for the paper or article, not normally defined except for IAU |
|
596
|
|
|
|
|
|
|
circulars and other similar articles. |
|
597
|
|
|
|
|
|
|
|
|
598
|
|
|
|
|
|
|
=item B |
|
599
|
|
|
|
|
|
|
|
|
600
|
|
|
|
|
|
|
Weighting of the paper based on query criteria, the highest weighted paper |
|
601
|
|
|
|
|
|
|
is the ``most relevant'' to your search terms. |
|
602
|
|
|
|
|
|
|
|
|
603
|
|
|
|
|
|
|
=back |
|
604
|
|
|
|
|
|
|
|
|
605
|
|
|
|
|
|
|
Does nothing if these keys are not supplied. |
|
606
|
|
|
|
|
|
|
|
|
607
|
|
|
|
|
|
|
=cut |
|
608
|
|
|
|
|
|
|
|
|
609
|
|
|
|
|
|
|
sub configure { |
|
610
|
235
|
|
|
235
|
1
|
289
|
my $self = shift; |
|
611
|
|
|
|
|
|
|
|
|
612
|
|
|
|
|
|
|
# return unless we have arguments |
|
613
|
235
|
50
|
|
|
|
567
|
return unless @_; |
|
614
|
|
|
|
|
|
|
|
|
615
|
|
|
|
|
|
|
# grab the argument list |
|
616
|
235
|
|
|
|
|
1608
|
my %args = @_; |
|
617
|
|
|
|
|
|
|
|
|
618
|
|
|
|
|
|
|
# Loop over the allowed keys storing the values |
|
619
|
|
|
|
|
|
|
# in the object if they exist |
|
620
|
235
|
|
|
|
|
497
|
for my $key (qw / Bibcode Title Authors Affil Journal Published |
|
621
|
|
|
|
|
|
|
Keywords Origin Links URL Abstract Object Score /) { |
|
622
|
3055
|
|
|
|
|
16999
|
my $method = lc($key); |
|
623
|
3055
|
100
|
|
|
|
7268
|
$self->$method( $args{$key} ) if exists $args{$key}; |
|
624
|
|
|
|
|
|
|
} |
|
625
|
|
|
|
|
|
|
|
|
626
|
|
|
|
|
|
|
} |
|
627
|
|
|
|
|
|
|
|
|
628
|
|
|
|
|
|
|
=item B |
|
629
|
|
|
|
|
|
|
|
|
630
|
|
|
|
|
|
|
Return a summary of the paper in either XML or ASCII tabular format. |
|
631
|
|
|
|
|
|
|
|
|
632
|
|
|
|
|
|
|
$summary = $paper->summary( format => "XML" ); |
|
633
|
|
|
|
|
|
|
|
|
634
|
|
|
|
|
|
|
Takes a hash as argument. The following keys are supported: |
|
635
|
|
|
|
|
|
|
|
|
636
|
|
|
|
|
|
|
=over 4 |
|
637
|
|
|
|
|
|
|
|
|
638
|
|
|
|
|
|
|
=item format |
|
639
|
|
|
|
|
|
|
|
|
640
|
|
|
|
|
|
|
Format of the result string. Options are "XML" to return an XML |
|
641
|
|
|
|
|
|
|
representation of the paper, or "TEXT" to return an ASCII formatted |
|
642
|
|
|
|
|
|
|
table. Default is to return "TEXT". |
|
643
|
|
|
|
|
|
|
|
|
644
|
|
|
|
|
|
|
=item fields |
|
645
|
|
|
|
|
|
|
|
|
646
|
|
|
|
|
|
|
Fields to include in the result. Default is to include BIBCODE, |
|
647
|
|
|
|
|
|
|
SCORE, TITLE, PUBLISHED and AUTHORS. Supplied as an array reference. |
|
648
|
|
|
|
|
|
|
|
|
649
|
|
|
|
|
|
|
=back |
|
650
|
|
|
|
|
|
|
|
|
651
|
|
|
|
|
|
|
=cut |
|
652
|
|
|
|
|
|
|
|
|
653
|
|
|
|
|
|
|
sub summary { |
|
654
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
655
|
|
|
|
|
|
|
|
|
656
|
0
|
|
|
|
|
|
my %defaults = ( format => "TEXT", |
|
657
|
|
|
|
|
|
|
fields => [qw/ BIBCODE SCORE TITLE AUTHORS PUBLISHED/], |
|
658
|
|
|
|
|
|
|
); |
|
659
|
|
|
|
|
|
|
|
|
660
|
|
|
|
|
|
|
# Merge supplied arguments with the default values |
|
661
|
0
|
|
|
|
|
|
my %args = (%defaults, @_); |
|
662
|
|
|
|
|
|
|
|
|
663
|
|
|
|
|
|
|
# Loop over the fields building up an array of the results |
|
664
|
|
|
|
|
|
|
# One for each line |
|
665
|
0
|
|
|
|
|
|
my @output; |
|
666
|
|
|
|
|
|
|
|
|
667
|
|
|
|
|
|
|
# Have a top level element for XML |
|
668
|
0
|
0
|
|
|
|
|
push(@output, "") |
|
669
|
|
|
|
|
|
|
if $args{format} eq 'XML'; |
|
670
|
|
|
|
|
|
|
|
|
671
|
|
|
|
|
|
|
|
|
672
|
|
|
|
|
|
|
# Might be more efficient to pull out the if and double up the |
|
673
|
|
|
|
|
|
|
# loop but this is not really an issue at the moment |
|
674
|
0
|
|
|
|
|
|
for my $field ( @{$args{fields}} ) { |
|
|
0
|
|
|
|
|
|
|
|
675
|
|
|
|
|
|
|
|
|
676
|
0
|
|
|
|
|
|
my $lcfield = lc($field); |
|
677
|
0
|
|
|
|
|
|
my $method = $lcfield; |
|
678
|
|
|
|
|
|
|
|
|
679
|
|
|
|
|
|
|
# check that the method is allowed |
|
680
|
0
|
0
|
|
|
|
|
next unless $self->can($method); |
|
681
|
|
|
|
|
|
|
|
|
682
|
|
|
|
|
|
|
# Call the method associated with the field |
|
683
|
|
|
|
|
|
|
# in an array context |
|
684
|
0
|
|
|
|
|
|
my @results = $self->$method; |
|
685
|
|
|
|
|
|
|
|
|
686
|
|
|
|
|
|
|
# If we have more than one result we need to separate |
|
687
|
|
|
|
|
|
|
# them and include a wrapper XML field |
|
688
|
0
|
0
|
|
|
|
|
if (@results > 1) { |
|
689
|
0
|
0
|
|
|
|
|
if ($args{format} eq 'XML') { |
|
690
|
|
|
|
|
|
|
# We have a collection. The collection title is the plural and |
|
691
|
|
|
|
|
|
|
# the individual element is meant to be the singular |
|
692
|
|
|
|
|
|
|
# Instead of using a grammar module just take the simple approach |
|
693
|
0
|
|
|
|
|
|
my $plural = $lcfield; |
|
694
|
0
|
0
|
|
|
|
|
$plural .= "s" unless $lcfield =~ /s$/; |
|
695
|
0
|
|
|
|
|
|
my $single = $lcfield; |
|
696
|
0
|
|
|
|
|
|
$single =~ s/s$//; |
|
697
|
|
|
|
|
|
|
|
|
698
|
|
|
|
|
|
|
# Indent a little |
|
699
|
0
|
|
|
|
|
|
push(@output, " <$plural>"); |
|
700
|
0
|
|
|
|
|
|
push(@output, map { " <$single>$_$single>" } @results); |
|
|
0
|
|
|
|
|
|
|
|
701
|
0
|
|
|
|
|
|
push(@output, " $plural>"); |
|
702
|
|
|
|
|
|
|
|
|
703
|
|
|
|
|
|
|
} else { |
|
704
|
|
|
|
|
|
|
|
|
705
|
|
|
|
|
|
|
# Just print the field name and ; separated list |
|
706
|
0
|
|
|
|
|
|
my $string = sprintf("%-15s ", ucfirst($lcfield).":") . |
|
707
|
|
|
|
|
|
|
join("; ",@results); |
|
708
|
0
|
|
|
|
|
|
push(@output, $string); |
|
709
|
|
|
|
|
|
|
|
|
710
|
|
|
|
|
|
|
} |
|
711
|
|
|
|
|
|
|
|
|
712
|
|
|
|
|
|
|
} else { |
|
713
|
|
|
|
|
|
|
# Only a single thing. Just print it. Check for definedness |
|
714
|
0
|
0
|
|
|
|
|
if ($args{format} eq 'XML') { |
|
715
|
0
|
0
|
|
|
|
|
if (defined $results[0]) { |
|
716
|
0
|
|
|
|
|
|
push(@output, " <$lcfield>$results[0]$lcfield>"); |
|
717
|
|
|
|
|
|
|
} else { |
|
718
|
0
|
|
|
|
|
|
push(@output, " <$lcfield/>"); |
|
719
|
|
|
|
|
|
|
} |
|
720
|
|
|
|
|
|
|
} else { |
|
721
|
0
|
0
|
|
|
|
|
push(@output, sprintf("%-15s %s", ucfirst($lcfield).":", |
|
722
|
|
|
|
|
|
|
(defined $results[0] ? |
|
723
|
|
|
|
|
|
|
$results[0] : "undefined"))); |
|
724
|
|
|
|
|
|
|
} |
|
725
|
|
|
|
|
|
|
|
|
726
|
|
|
|
|
|
|
} |
|
727
|
|
|
|
|
|
|
|
|
728
|
|
|
|
|
|
|
} |
|
729
|
|
|
|
|
|
|
|
|
730
|
|
|
|
|
|
|
# Have a top level element for XML |
|
731
|
0
|
0
|
|
|
|
|
push(@output, "") |
|
732
|
|
|
|
|
|
|
if $args{format} eq 'XML'; |
|
733
|
|
|
|
|
|
|
|
|
734
|
|
|
|
|
|
|
|
|
735
|
|
|
|
|
|
|
# Join them all together with new lines |
|
736
|
0
|
|
|
|
|
|
return join("\n",@output) . "\n"; |
|
737
|
|
|
|
|
|
|
|
|
738
|
|
|
|
|
|
|
} |
|
739
|
|
|
|
|
|
|
|
|
740
|
|
|
|
|
|
|
=item B |
|
741
|
|
|
|
|
|
|
|
|
742
|
|
|
|
|
|
|
Method called automatically when the object is printed in |
|
743
|
|
|
|
|
|
|
a string context. Simple invokes the C method with |
|
744
|
|
|
|
|
|
|
default arguments. |
|
745
|
|
|
|
|
|
|
|
|
746
|
|
|
|
|
|
|
=cut |
|
747
|
|
|
|
|
|
|
|
|
748
|
|
|
|
|
|
|
sub stringify { |
|
749
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
|
750
|
0
|
|
|
|
|
|
return $self->summary(); |
|
751
|
|
|
|
|
|
|
} |
|
752
|
|
|
|
|
|
|
|
|
753
|
|
|
|
|
|
|
# T I M E A T T H E B A R -------------------------------------------- |
|
754
|
|
|
|
|
|
|
|
|
755
|
|
|
|
|
|
|
=back |
|
756
|
|
|
|
|
|
|
|
|
757
|
|
|
|
|
|
|
=head1 COPYRIGHT |
|
758
|
|
|
|
|
|
|
|
|
759
|
|
|
|
|
|
|
Copyright (C) 2001 University of Exeter. All Rights Reserved. |
|
760
|
|
|
|
|
|
|
|
|
761
|
|
|
|
|
|
|
This program was written as part of the eSTAR project and is free software; |
|
762
|
|
|
|
|
|
|
you can redistribute it and/or modify it under the terms of the GNU Public |
|
763
|
|
|
|
|
|
|
License. |
|
764
|
|
|
|
|
|
|
|
|
765
|
|
|
|
|
|
|
|
|
766
|
|
|
|
|
|
|
=head1 AUTHORS |
|
767
|
|
|
|
|
|
|
|
|
768
|
|
|
|
|
|
|
Alasdair Allan Eaa@astro.ex.ac.ukE, |
|
769
|
|
|
|
|
|
|
|
|
770
|
|
|
|
|
|
|
=cut |
|
771
|
|
|
|
|
|
|
|
|
772
|
|
|
|
|
|
|
# L A S T O R D E R S ------------------------------------------------------ |
|
773
|
|
|
|
|
|
|
|
|
774
|
|
|
|
|
|
|
1; |