line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::ILL::ISO::RequesterOptionalMessageType; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Biblio::ILL::ISO::RequesterOptionalMessageType |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
754
|
use Biblio::ILL::ISO::ILLASNtype; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
107
|
|
10
|
4
|
|
|
4
|
|
2362
|
use Biblio::ILL::ISO::RequesterSHIPPED; |
|
4
|
|
|
|
|
14
|
|
|
4
|
|
|
|
|
123
|
|
11
|
4
|
|
|
4
|
|
26
|
use Biblio::ILL::ISO::RequesterCHECKEDIN; |
|
4
|
|
|
|
|
10
|
|
|
4
|
|
|
|
|
83
|
|
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
22
|
use Carp; |
|
4
|
|
|
|
|
5
|
|
|
4
|
|
|
|
|
349
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Version 0.01 |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.01'; |
22
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
# Mods |
24
|
|
|
|
|
|
|
# 0.01 - 2003.07.15 - original version |
25
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
=head1 DESCRIPTION |
28
|
|
|
|
|
|
|
|
29
|
|
|
|
|
|
|
Biblio::ILL::ISO::RequesterOptionalMessageType is a derivation of Biblio::ILL::ISO::ILLASNtype. |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
=head1 USES |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
Biblio::ILL::ISO::RequesterSHIPPED |
34
|
|
|
|
|
|
|
Biblio::ILL::ISO::RequesterCHECKEDIN |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
=head1 USED IN |
37
|
|
|
|
|
|
|
|
38
|
|
|
|
|
|
|
Biblio::ILL::ISO::Request |
39
|
|
|
|
|
|
|
|
40
|
|
|
|
|
|
|
=cut |
41
|
|
|
|
|
|
|
|
42
|
4
|
|
|
4
|
|
2443
|
BEGIN{@ISA = qw ( Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype |
43
|
|
|
|
|
|
|
|
44
|
|
|
|
|
|
|
=head1 FROM THE ASN DEFINITION |
45
|
|
|
|
|
|
|
|
46
|
|
|
|
|
|
|
Requester-Optional-Messages-Type ::= SEQUENCE { |
47
|
|
|
|
|
|
|
can-send-RECEIVED [0] IMPLICIT BOOLEAN, |
48
|
|
|
|
|
|
|
can-send-RETURNED [1] IMPLICIT BOOLEAN, |
49
|
|
|
|
|
|
|
requester-SHIPPED [2] IMPLICIT ENUMERATED { |
50
|
|
|
|
|
|
|
requires (1), |
51
|
|
|
|
|
|
|
desires (2), |
52
|
|
|
|
|
|
|
neither (3) |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
requester-CHECKED-IN [3] IMPLICIT ENUMERATED { |
55
|
|
|
|
|
|
|
requires (1), |
56
|
|
|
|
|
|
|
desires (2), |
57
|
|
|
|
|
|
|
neither (3) |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
} |
60
|
|
|
|
|
|
|
|
61
|
|
|
|
|
|
|
=cut |
62
|
|
|
|
|
|
|
|
63
|
|
|
|
|
|
|
=head1 METHODS |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=cut |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
68
|
|
|
|
|
|
|
# |
69
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
70
|
|
|
|
|
|
|
=head1 |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=head2 new( $can_send_received, $can_send_shipped, $requester_shipped, $requester_checked_in ) |
73
|
|
|
|
|
|
|
|
74
|
|
|
|
|
|
|
Creates a new RequesterOptionalMessageType object. |
75
|
|
|
|
|
|
|
Expects a can-send-RECEIVED flag ( 0|1 ), |
76
|
|
|
|
|
|
|
a can-send-RETURNED flag ( 0|1 ), |
77
|
|
|
|
|
|
|
a requester-SHIPPED string (a valid Biblio::ILL::ISO::RequesterSHIPPED enumerated value), and |
78
|
|
|
|
|
|
|
a requester-CHECKED-IN string (a valid Biblio::ILL::ISO::RequesterCHECKEDIN enumerated value). |
79
|
|
|
|
|
|
|
|
80
|
|
|
|
|
|
|
=cut |
81
|
|
|
|
|
|
|
sub new { |
82
|
2
|
|
|
2
|
1
|
15
|
my $class = shift; |
83
|
2
|
|
|
|
|
4
|
my $self = {}; |
84
|
|
|
|
|
|
|
|
85
|
2
|
50
|
|
|
|
8
|
if (@_) { |
86
|
2
|
|
|
|
|
10
|
my ($brec, $bret, $sshipped, $scheckedin) = @_; |
87
|
|
|
|
|
|
|
|
88
|
2
|
50
|
|
|
|
8
|
croak "missing RequesterOptionalMessageType parameter can-send-RECEIVED" unless $brec; |
89
|
2
|
50
|
|
|
|
8
|
croak "missing RequesterOptionalMessageType parameter can-send-RETURNED" unless $bret; |
90
|
2
|
50
|
|
|
|
7
|
croak "missing RequesterOptionalMessageType parameter requester-SHIPPED" unless $sshipped; |
91
|
2
|
50
|
|
|
|
13
|
croak "missing RequesterOptionalMessageType parameter requester-CHECKED-IN" unless $scheckedin; |
92
|
|
|
|
|
|
|
|
93
|
2
|
|
|
|
|
5
|
$self->{"can-send-RECEIVED"} = $brec; |
94
|
2
|
|
|
|
|
7
|
$self->{"can-send-RETURNED"} = $bret; |
95
|
2
|
|
|
|
|
26
|
$self->{"requester-SHIPPED"} = new Biblio::ILL::ISO::RequesterSHIPPED($sshipped); |
96
|
2
|
|
|
|
|
21
|
$self->{"requester-CHECKED-IN"} = new Biblio::ILL::ISO::RequesterCHECKEDIN($scheckedin); |
97
|
|
|
|
|
|
|
} |
98
|
|
|
|
|
|
|
|
99
|
2
|
|
33
|
|
|
18
|
bless($self, ref($class) || $class); |
100
|
2
|
|
|
|
|
8
|
return ($self); |
101
|
|
|
|
|
|
|
} |
102
|
|
|
|
|
|
|
|
103
|
|
|
|
|
|
|
|
104
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
105
|
|
|
|
|
|
|
# |
106
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
107
|
|
|
|
|
|
|
=head1 |
108
|
|
|
|
|
|
|
|
109
|
|
|
|
|
|
|
=head2 set( $can_send_received, $can_send_shipped, $requester_shipped, $requester_checked_in ) |
110
|
|
|
|
|
|
|
|
111
|
|
|
|
|
|
|
Sets the object's can-send-RECEIVED flag ( 0|1 ), |
112
|
|
|
|
|
|
|
can-send-RETURNED flag ( 0|1 ), |
113
|
|
|
|
|
|
|
requester-SHIPPED string (a valid Biblio::ILL::ISO::RequesterSHIPPED enumerated value), and |
114
|
|
|
|
|
|
|
requester-CHECKED-IN string (a valid Biblio::ILL::ISO::RequesterCHECKEDIN enumerated value). |
115
|
|
|
|
|
|
|
|
116
|
|
|
|
|
|
|
=cut |
117
|
|
|
|
|
|
|
sub set { |
118
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
119
|
0
|
|
|
|
|
|
my ($brec, $bret, $sshipped, $scheckedin) = @_; |
120
|
|
|
|
|
|
|
|
121
|
0
|
0
|
|
|
|
|
croak "missing RequesterOptionalMessageType parameter can-send-RECEIVED" unless $brec; |
122
|
0
|
0
|
|
|
|
|
croak "missing RequesterOptionalMessageType parameter can-send-RETURNED" unless $bret; |
123
|
0
|
0
|
|
|
|
|
croak "missing RequesterOptionalMessageType parameter requester-SHIPPED" unless $sshipped; |
124
|
0
|
0
|
|
|
|
|
croak "missing RequesterOptionalMessageType parameter requester-CHECKED-IN" unless $scheckedin; |
125
|
|
|
|
|
|
|
|
126
|
0
|
|
|
|
|
|
$self->{"can-send-RECEIVED"} = $brec; |
127
|
0
|
|
|
|
|
|
$self->{"can-send-RETURNED"} = $bret; |
128
|
0
|
|
|
|
|
|
$self->{"requester-SHIPPED"} = new Biblio::ILL::ISO::RequesterSHIPPED($sshipped); |
129
|
0
|
|
|
|
|
|
$self->{"requester-CHECKED-IN"} = new Biblio::ILL::ISO::RequesterCHECKEDIN($scheckedin); |
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
|
0
|
|
|
|
if (($k =~ /^can-send-RECEIVED$/) |
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
152
|
|
|
|
|
|
|
|| ($k =~ /^can-send-RETURNED$/) |
153
|
|
|
|
|
|
|
) { |
154
|
0
|
|
|
|
|
|
$self->{$k} = $href->{$k}; |
155
|
|
|
|
|
|
|
|
156
|
|
|
|
|
|
|
} elsif ($k =~ /^requester-SHIPPED$/) { |
157
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::RequesterSHIPPED(); |
158
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
} elsif ($k =~ /^requester-CHECKED-IN$/) { |
161
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::RequesterCHECKEDIN(); |
162
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
163
|
|
|
|
|
|
|
|
164
|
|
|
|
|
|
|
} else { |
165
|
0
|
|
|
|
|
|
croak "invalid " . ref($self) . " element: [$k]"; |
166
|
|
|
|
|
|
|
} |
167
|
|
|
|
|
|
|
|
168
|
|
|
|
|
|
|
} |
169
|
0
|
|
|
|
|
|
return $self; |
170
|
|
|
|
|
|
|
} |
171
|
|
|
|
|
|
|
|
172
|
|
|
|
|
|
|
=head1 SEE ALSO |
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
See the README for system design notes. |
175
|
|
|
|
|
|
|
See the parent class(es) for other available methods. |
176
|
|
|
|
|
|
|
|
177
|
|
|
|
|
|
|
For more information on Interlibrary Loan standards (ISO 10160/10161), |
178
|
|
|
|
|
|
|
a good place to start is: |
179
|
|
|
|
|
|
|
|
180
|
|
|
|
|
|
|
http://www.nlc-bnc.ca/iso/ill/main.htm |
181
|
|
|
|
|
|
|
|
182
|
|
|
|
|
|
|
=cut |
183
|
|
|
|
|
|
|
|
184
|
|
|
|
|
|
|
=head1 AUTHOR |
185
|
|
|
|
|
|
|
|
186
|
|
|
|
|
|
|
David Christensen, |
187
|
|
|
|
|
|
|
|
188
|
|
|
|
|
|
|
=cut |
189
|
|
|
|
|
|
|
|
190
|
|
|
|
|
|
|
|
191
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
192
|
|
|
|
|
|
|
|
193
|
|
|
|
|
|
|
Copyright 2003 by David Christensen |
194
|
|
|
|
|
|
|
|
195
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
196
|
|
|
|
|
|
|
under the same terms as Perl itself. |
197
|
|
|
|
|
|
|
|
198
|
|
|
|
|
|
|
=cut |
199
|
|
|
|
|
|
|
|
200
|
|
|
|
|
|
|
1; |