line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::ILL::ISO::RetryResults; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Biblio::ILL::ISO::RetryResults |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
24
|
use Biblio::ILL::ISO::ILLASNtype; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
104
|
|
10
|
4
|
|
|
4
|
|
2287
|
use Biblio::ILL::ISO::ReasonNotAvailable; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
117
|
|
11
|
4
|
|
|
4
|
|
23
|
use Biblio::ILL::ISO::ISODate; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
87
|
|
12
|
4
|
|
|
4
|
|
22
|
use Biblio::ILL::ISO::LocationInfoSequence; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
81
|
|
13
|
|
|
|
|
|
|
|
14
|
4
|
|
|
4
|
|
18
|
use Carp; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
329
|
|
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
=head1 VERSION |
17
|
|
|
|
|
|
|
|
18
|
|
|
|
|
|
|
Version 0.01 |
19
|
|
|
|
|
|
|
|
20
|
|
|
|
|
|
|
=cut |
21
|
|
|
|
|
|
|
|
22
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
23
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
24
|
|
|
|
|
|
|
# Mods |
25
|
|
|
|
|
|
|
# 0.01 - 2003.07.26 - original version |
26
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Biblio::ILL::ISO::RetryResults is a derivation of Biblio::ILL::ISO::ILLASNtype. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 USES |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Biblio::ILL::ISO::ReasonNotAvailable; |
35
|
|
|
|
|
|
|
Biblio::ILL::ISO::ISODate; |
36
|
|
|
|
|
|
|
Biblio::ILL::ISO::LocationInfoSequence; |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
=head1 USED IN |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
Biblio::ILL::ISO::ResultsExplanation |
41
|
|
|
|
|
|
|
|
42
|
|
|
|
|
|
|
=cut |
43
|
|
|
|
|
|
|
|
44
|
4
|
|
|
4
|
|
2209
|
BEGIN{@ISA = qw ( Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
=head1 FROM THE ASN DEFINITION |
47
|
|
|
|
|
|
|
|
48
|
|
|
|
|
|
|
Retry-Results ::= EXPLICIT SEQUENCE { |
49
|
|
|
|
|
|
|
reason-not-available [0] IMPLICIT Reason-Not-Available OPTIONAL, |
50
|
|
|
|
|
|
|
retry-date [1] IMPLICIT ISO-Date OPTIONAL, |
51
|
|
|
|
|
|
|
locations [2] IMPLICIT SEQUENCE OF Location-Info OPTIONAL |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 METHODS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
61
|
|
|
|
|
|
|
# |
62
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
63
|
|
|
|
|
|
|
=head1 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 new( $reason [,$replydate] [,$locations] ) |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Creates a new RetryResults object. |
68
|
|
|
|
|
|
|
Expects a reason-not-available (Biblio::ILL::ISO::ReasonNotAvailable), |
69
|
|
|
|
|
|
|
(optionally) a date for reply (Biblio::ILL::ISO::ISODate), and |
70
|
|
|
|
|
|
|
(optionally) a location sequence (Biblio::ILL::ISO::LocationInfoSequence). |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
sub new { |
74
|
1
|
|
|
1
|
1
|
2
|
my $class = shift; |
75
|
1
|
|
|
|
|
2
|
my $self = {}; |
76
|
|
|
|
|
|
|
|
77
|
1
|
50
|
|
|
|
4
|
if (@_) { |
78
|
1
|
|
|
|
|
2
|
my ($reason, $replydate, $locations) = @_; |
79
|
|
|
|
|
|
|
|
80
|
1
|
50
|
|
|
|
7
|
croak "missing retry-result reason-not-available" unless ($reason); |
81
|
1
|
50
|
|
|
|
4
|
croak "invalid retry-result reason-not-available" unless (ref($reason) eq "Biblio::ILL::ISO::ReasonNotAvailable"); |
82
|
|
|
|
|
|
|
|
83
|
1
|
50
|
|
|
|
2
|
if ($replydate) { |
84
|
1
|
50
|
|
|
|
4
|
croak "invalid retry-date" unless (ref($replydate) eq "Biblio::ILL::ISO::ISODate"); |
85
|
|
|
|
|
|
|
} |
86
|
1
|
50
|
|
|
|
2
|
if ($locations) { |
87
|
1
|
50
|
|
|
|
4
|
croak "invalid locations" unless (ref($locations) eq "Biblio::ILL::ISO::LocationInfoSequence"); |
88
|
|
|
|
|
|
|
} |
89
|
|
|
|
|
|
|
|
90
|
1
|
|
|
|
|
2
|
$self->{"reason-not-available"} = $reason; |
91
|
1
|
50
|
|
|
|
3
|
$self->{"retry-date"} = $replydate if ($replydate); |
92
|
1
|
50
|
|
|
|
3
|
$self->{"locations"} = $locations if ($locations);; |
93
|
|
|
|
|
|
|
} |
94
|
|
|
|
|
|
|
|
95
|
1
|
|
33
|
|
|
10
|
bless($self, ref($class) || $class); |
96
|
1
|
|
|
|
|
4
|
return ($self); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
|
100
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
101
|
|
|
|
|
|
|
# |
102
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
103
|
|
|
|
|
|
|
=head1 |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
=head2 set( $reason [,$replydate] [,$locations] [,proposed_delivery_service] ) |
106
|
|
|
|
|
|
|
|
107
|
|
|
|
|
|
|
Sets the object's reason-not-available (Biblio::ILL::ISO::ReasonNotAvailable), |
108
|
|
|
|
|
|
|
(optionally) date-for-reply (Biblio::ILL::ISO::ISODate), and |
109
|
|
|
|
|
|
|
(optionally) locations (Biblio::ILL::ISO::LocationInfoSequence). |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
=cut |
112
|
|
|
|
|
|
|
sub set { |
113
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
114
|
|
|
|
|
|
|
|
115
|
0
|
|
|
|
|
|
my ($reason, $replydate, $locations) = @_; |
116
|
|
|
|
|
|
|
|
117
|
0
|
0
|
|
|
|
|
croak "missing retry-result reason-not-available" unless ($reason); |
118
|
0
|
0
|
|
|
|
|
croak "invalid retry-result reason-not-available" unless (ref($reason) eq "Biblio::ILL::ISO::ReasonNotAvailable"); |
119
|
|
|
|
|
|
|
|
120
|
0
|
0
|
|
|
|
|
if ($replydate) { |
121
|
0
|
0
|
|
|
|
|
croak "invalid retry-date" unless (ref($replydate) eq "Biblio::ILL::ISO::ISODate"); |
122
|
|
|
|
|
|
|
} |
123
|
0
|
0
|
|
|
|
|
if ($locations) { |
124
|
0
|
0
|
|
|
|
|
croak "invalid locations" unless (ref($locations) eq "Biblio::ILL::ISO::LocationInfoSequence"); |
125
|
|
|
|
|
|
|
} |
126
|
|
|
|
|
|
|
|
127
|
0
|
|
|
|
|
|
$self->{"reason-not-available"} = $reason; |
128
|
0
|
0
|
|
|
|
|
$self->{"retry-date"} = $replydate if ($replydate); |
129
|
0
|
0
|
|
|
|
|
$self->{"locations"} = $locations if ($locations);; |
130
|
|
|
|
|
|
|
|
131
|
0
|
|
|
|
|
|
return; |
132
|
|
|
|
|
|
|
} |
133
|
|
|
|
|
|
|
|
134
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
135
|
|
|
|
|
|
|
# |
136
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
137
|
|
|
|
|
|
|
=head1 |
138
|
|
|
|
|
|
|
|
139
|
|
|
|
|
|
|
=head2 from_asn($href) |
140
|
|
|
|
|
|
|
|
141
|
|
|
|
|
|
|
Given a properly formatted hash, builds the object. |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
=cut |
144
|
|
|
|
|
|
|
sub from_asn { |
145
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
146
|
0
|
|
|
|
|
|
my $href = shift; |
147
|
|
|
|
|
|
|
|
148
|
0
|
|
|
|
|
|
foreach my $k (keys %$href) { |
149
|
|
|
|
|
|
|
#print ref($self) . "...$k\n"; |
150
|
|
|
|
|
|
|
|
151
|
0
|
0
|
|
|
|
|
if ($k =~ /^reason-not-available$/) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
152
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::ReasonNotAvailable(); |
153
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
} elsif ($k =~ /^retry-date$/) { |
156
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::ISODate(); |
157
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
158
|
|
|
|
|
|
|
|
159
|
|
|
|
|
|
|
} elsif ($k =~ /^locations$/) { |
160
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::LocationInfoSequence(); |
161
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
} else { |
164
|
0
|
|
|
|
|
|
croak "invalid " . ref($self) . " element: [$k]"; |
165
|
|
|
|
|
|
|
} |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
} |
168
|
0
|
|
|
|
|
|
return $self; |
169
|
|
|
|
|
|
|
} |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=head1 SEE ALSO |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
See the README for system design notes. |
174
|
|
|
|
|
|
|
See the parent class(es) for other available methods. |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
For more information on Interlibrary Loan standards (ISO 10160/10161), |
177
|
|
|
|
|
|
|
a good place to start is: |
178
|
|
|
|
|
|
|
|
179
|
|
|
|
|
|
|
http://www.nlc-bnc.ca/iso/ill/main.htm |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=cut |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
=head1 AUTHOR |
184
|
|
|
|
|
|
|
|
185
|
|
|
|
|
|
|
David Christensen, |
186
|
|
|
|
|
|
|
|
187
|
|
|
|
|
|
|
=cut |
188
|
|
|
|
|
|
|
|
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
Copyright 2003 by David Christensen |
193
|
|
|
|
|
|
|
|
194
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
195
|
|
|
|
|
|
|
under the same terms as Perl itself. |
196
|
|
|
|
|
|
|
|
197
|
|
|
|
|
|
|
=cut |
198
|
|
|
|
|
|
|
=head1 |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
=head2 from_asn($href) |
201
|
|
|
|
|
|
|
|
202
|
|
|
|
|
|
|
Given a properly formatted hash, builds the object. |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=cut |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
1; |