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