line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::ILL::ISO::ConditionalResults; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Biblio::ILL::ISO::ConditionalResults |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
623
|
use Biblio::ILL::ISO::ILLASNtype; |
|
4
|
|
|
|
|
7
|
|
|
4
|
|
|
|
|
103
|
|
10
|
4
|
|
|
4
|
|
2327
|
use Biblio::ILL::ISO::ConditionalResultsCondition; |
|
4
|
|
|
|
|
13
|
|
|
4
|
|
|
|
|
114
|
|
11
|
4
|
|
|
4
|
|
28
|
use Biblio::ILL::ISO::ISODate; |
|
4
|
|
|
|
|
6
|
|
|
4
|
|
|
|
|
83
|
|
12
|
4
|
|
|
4
|
|
2742
|
use Biblio::ILL::ISO::LocationInfoSequence; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
129
|
|
13
|
4
|
|
|
4
|
|
28
|
use Biblio::ILL::ISO::DeliveryService; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
106
|
|
14
|
4
|
|
|
4
|
|
20
|
use Carp; |
|
4
|
|
|
|
|
8
|
|
|
4
|
|
|
|
|
344
|
|
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::ConditionalResults is a derivation of Biblio::ILL::ISO::ILLASNtype. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 USES |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Biblio::ILL::ISO::ConditionalResultsCondition |
35
|
|
|
|
|
|
|
Biblio::ILL::ISO::ISODate |
36
|
|
|
|
|
|
|
Biblio::ILL::ISO::LocationInfoSequence |
37
|
|
|
|
|
|
|
Biblio::ILL::ISO::DeliveryService |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
=head1 USED IN |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
Biblio::ILL::ISO::ResultsExplanation |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
4
|
|
|
4
|
|
2848
|
BEGIN{@ISA = qw ( Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 FROM THE ASN DEFINITION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
Conditional-Results ::= EXPLICIT SEQUENCE { |
50
|
|
|
|
|
|
|
conditions [0] IMPLICIT ENUMERATED { |
51
|
|
|
|
|
|
|
cost-exceeds-limit (13), |
52
|
|
|
|
|
|
|
charges (14), |
53
|
|
|
|
|
|
|
prepayment-required (15), |
54
|
|
|
|
|
|
|
lacks-copyright-compliance (16), |
55
|
|
|
|
|
|
|
library-use-only (22), |
56
|
|
|
|
|
|
|
no-reproduction (23), |
57
|
|
|
|
|
|
|
client-signature-required (24), |
58
|
|
|
|
|
|
|
special-collections-supervision-required (25), |
59
|
|
|
|
|
|
|
other (27), |
60
|
|
|
|
|
|
|
responder-specific (28), |
61
|
|
|
|
|
|
|
proposed-delivery-service (30) |
62
|
|
|
|
|
|
|
}, |
63
|
|
|
|
|
|
|
date-for-reply [1] IMPLICIT ISO-Date OPTIONAL, |
64
|
|
|
|
|
|
|
locations [2] IMPLICIT SEQUENCE OF Location-Info OPTIONAL, |
65
|
|
|
|
|
|
|
proposed-delivery-service Delivery-Service OPTIONAL |
66
|
|
|
|
|
|
|
-- this parameter specifies a proposed delivery service the |
67
|
|
|
|
|
|
|
-- acceptance of which is a condition of supply. It may be a |
68
|
|
|
|
|
|
|
-- physical service or an electronic service. This parameter |
69
|
|
|
|
|
|
|
-- may only be present in APDUs with a |
70
|
|
|
|
|
|
|
-- protocol-version-num value of 2 or greater |
71
|
|
|
|
|
|
|
} |
72
|
|
|
|
|
|
|
|
73
|
|
|
|
|
|
|
=cut |
74
|
|
|
|
|
|
|
|
75
|
|
|
|
|
|
|
=head1 METHODS |
76
|
|
|
|
|
|
|
|
77
|
|
|
|
|
|
|
=cut |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
80
|
|
|
|
|
|
|
# |
81
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
82
|
|
|
|
|
|
|
=head1 |
83
|
|
|
|
|
|
|
|
84
|
|
|
|
|
|
|
=head2 new( $condition [,$replydate] [,$locations] [,proposed_delivery_service] ) |
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
Creates a new ConditionalResults object. |
87
|
|
|
|
|
|
|
Expects a condition (Biblio::ILL::ISO::ConditionalResultsCondition), |
88
|
|
|
|
|
|
|
(optionally) a date for reply (Biblio::ILL::ISO::ISODate), |
89
|
|
|
|
|
|
|
(optionally) a location sequence (Biblio::ILL::ISO::LocationInfoSequence), and |
90
|
|
|
|
|
|
|
(optionally) a proposed delivery service (Biblio::ILL::ISO::DeliveryService). |
91
|
|
|
|
|
|
|
|
92
|
|
|
|
|
|
|
=cut |
93
|
|
|
|
|
|
|
sub new { |
94
|
2
|
|
|
2
|
1
|
4
|
my $class = shift; |
95
|
2
|
|
|
|
|
4
|
my $self = {}; |
96
|
|
|
|
|
|
|
|
97
|
2
|
50
|
|
|
|
7
|
if (@_) { |
98
|
2
|
|
|
|
|
3
|
my ($condition, $replydate, $locations, $proposed_delivery_service) = @_; |
99
|
|
|
|
|
|
|
|
100
|
2
|
50
|
|
|
|
18
|
croak "missing conditional-result condition" unless ($condition); |
101
|
2
|
50
|
|
|
|
7
|
croak "invalid conditional-result condition" unless (ref($condition) eq "Biblio::ILL::ISO::ConditionalResultsCondition"); |
102
|
|
|
|
|
|
|
|
103
|
2
|
50
|
|
|
|
11
|
if ($replydate) { |
104
|
2
|
50
|
|
|
|
16
|
croak "invalid date-for-reply" unless (ref($replydate) eq "Biblio::ILL::ISO::ISODate"); |
105
|
|
|
|
|
|
|
} |
106
|
2
|
50
|
|
|
|
6
|
if ($locations) { |
107
|
2
|
50
|
|
|
|
10
|
croak "invalid locations" unless (ref($locations) eq "Biblio::ILL::ISO::LocationInfoSequence"); |
108
|
|
|
|
|
|
|
} |
109
|
2
|
50
|
|
|
|
9
|
if ($proposed_delivery_service) { |
110
|
2
|
50
|
|
|
|
16
|
croak "invalid proposed-delivery-service" unless (ref($proposed_delivery_service) eq "Biblio::ILL::ISO::DeliveryService"); |
111
|
|
|
|
|
|
|
} |
112
|
|
|
|
|
|
|
|
113
|
2
|
|
|
|
|
5
|
$self->{"conditions"} = $condition; |
114
|
2
|
50
|
|
|
|
8
|
$self->{"date-for-reply"} = $replydate if ($replydate); |
115
|
2
|
50
|
|
|
|
9
|
$self->{"locations"} = $locations if ($locations);; |
116
|
2
|
50
|
|
|
|
8
|
$self->{"proposed-delivery-service"} = $proposed_delivery_service if ($proposed_delivery_service); |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
2
|
|
33
|
|
|
13
|
bless($self, ref($class) || $class); |
120
|
2
|
|
|
|
|
8
|
return ($self); |
121
|
|
|
|
|
|
|
} |
122
|
|
|
|
|
|
|
|
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
125
|
|
|
|
|
|
|
# |
126
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
127
|
|
|
|
|
|
|
=head1 |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 set( $condition [,$replydate] [,$locations] [,proposed_delivery_service] ) |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Sets the object's conditional-result (Biblio::ILL::ISO::ConditionalResultsCondition), |
132
|
|
|
|
|
|
|
(optionally) date-for-reply (Biblio::ILL::ISO::ISODate), |
133
|
|
|
|
|
|
|
(optionally) locations (Biblio::ILL::ISO::LocationInfoSequence), and |
134
|
|
|
|
|
|
|
(optionally) a proposed-delivery-service (Biblio::ILL::ISO::DeliveryService). |
135
|
|
|
|
|
|
|
|
136
|
|
|
|
|
|
|
=cut |
137
|
|
|
|
|
|
|
sub set { |
138
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
139
|
|
|
|
|
|
|
|
140
|
0
|
|
|
|
|
|
my ($condition, $replydate, $locations, $proposed_delivery_service) = @_; |
141
|
|
|
|
|
|
|
|
142
|
0
|
0
|
|
|
|
|
croak "missing conditional-result condition" unless ($condition); |
143
|
0
|
0
|
|
|
|
|
croak "invalid conditional-result condition" unless (ref($condition) eq "Biblio::ILL::ISO::ConditionalResultsCondition"); |
144
|
|
|
|
|
|
|
|
145
|
0
|
0
|
|
|
|
|
if ($replydate) { |
146
|
0
|
0
|
|
|
|
|
croak "invalid date-for-reply" unless (ref($replydate) eq "Biblio::ILL::ISO::ISODate"); |
147
|
|
|
|
|
|
|
} |
148
|
0
|
0
|
|
|
|
|
if ($locations) { |
149
|
0
|
0
|
|
|
|
|
croak "invalid locations" unless (ref($locations) eq "Biblio::ILL::ISO::LocationInfoSequence"); |
150
|
|
|
|
|
|
|
} |
151
|
0
|
0
|
|
|
|
|
if ($proposed_delivery_service) { |
152
|
0
|
0
|
|
|
|
|
croak "invalid proposed-delivery-service" unless (ref($proposed_delivery_service) eq "Biblio::ILL::ISO::DeliveryService"); |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
0
|
|
|
|
|
|
$self->{"conditions"} = $condition; |
156
|
0
|
0
|
|
|
|
|
$self->{"date-for-reply"} = $replydate if ($replydate); |
157
|
0
|
0
|
|
|
|
|
$self->{"locations"} = $locations if ($locations);; |
158
|
0
|
0
|
|
|
|
|
$self->{"proposed-delivery-service"} = $proposed_delivery_service if ($proposed_delivery_service); |
159
|
|
|
|
|
|
|
|
160
|
0
|
|
|
|
|
|
return; |
161
|
|
|
|
|
|
|
} |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
164
|
|
|
|
|
|
|
# |
165
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
166
|
|
|
|
|
|
|
=head1 |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
=head2 from_asn($href) |
169
|
|
|
|
|
|
|
|
170
|
|
|
|
|
|
|
Given a properly formatted hash, builds the object. |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=cut |
173
|
|
|
|
|
|
|
sub from_asn { |
174
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
175
|
0
|
|
|
|
|
|
my $href = shift; |
176
|
|
|
|
|
|
|
|
177
|
0
|
|
|
|
|
|
foreach my $k (keys %$href) { |
178
|
|
|
|
|
|
|
#print ref($self) . "...$k\n"; |
179
|
|
|
|
|
|
|
|
180
|
0
|
0
|
|
|
|
|
if ($k =~ /^conditions$/) { |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
181
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::ConditionalResultsCondition(); |
182
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
} elsif ($k =~ /^date-for-reply$/) { |
185
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::ISODate(); |
186
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
} elsif ($k =~ /^locations$/) { |
189
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::LocationInfoSequence(); |
190
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
191
|
|
|
|
|
|
|
|
192
|
|
|
|
|
|
|
} elsif ($k =~ /^proposed-delivery-service$/) { |
193
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::DeliveryService(); |
194
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
195
|
|
|
|
|
|
|
|
196
|
|
|
|
|
|
|
} else { |
197
|
0
|
|
|
|
|
|
croak "invalid " . ref($self) . " element: [$k]"; |
198
|
|
|
|
|
|
|
} |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
} |
201
|
0
|
|
|
|
|
|
return $self; |
202
|
|
|
|
|
|
|
} |
203
|
|
|
|
|
|
|
|
204
|
|
|
|
|
|
|
=head1 SEE ALSO |
205
|
|
|
|
|
|
|
|
206
|
|
|
|
|
|
|
See the README for system design notes. |
207
|
|
|
|
|
|
|
See the parent class(es) for other available methods. |
208
|
|
|
|
|
|
|
|
209
|
|
|
|
|
|
|
For more information on Interlibrary Loan standards (ISO 10160/10161), |
210
|
|
|
|
|
|
|
a good place to start is: |
211
|
|
|
|
|
|
|
|
212
|
|
|
|
|
|
|
http://www.nlc-bnc.ca/iso/ill/main.htm |
213
|
|
|
|
|
|
|
|
214
|
|
|
|
|
|
|
=cut |
215
|
|
|
|
|
|
|
|
216
|
|
|
|
|
|
|
=head1 AUTHOR |
217
|
|
|
|
|
|
|
|
218
|
|
|
|
|
|
|
David Christensen, |
219
|
|
|
|
|
|
|
|
220
|
|
|
|
|
|
|
=cut |
221
|
|
|
|
|
|
|
|
222
|
|
|
|
|
|
|
|
223
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
224
|
|
|
|
|
|
|
|
225
|
|
|
|
|
|
|
Copyright 2003 by David Christensen |
226
|
|
|
|
|
|
|
|
227
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
228
|
|
|
|
|
|
|
under the same terms as Perl itself. |
229
|
|
|
|
|
|
|
|
230
|
|
|
|
|
|
|
=cut |
231
|
|
|
|
|
|
|
|
232
|
|
|
|
|
|
|
1; |