lib/Biblio/ILL/ISO/HistoryReport.pm

filter: Statementstmt 44.4% 64 / 144 Branchbran 20.7% 22 / 106 Conditioncond 4.7% 1 / 21 MC/DCmcdc 0.0% 0 / 10 Subroutinesub 83.3% 10 / 12 Podpod 100% 3 / 3 totaltotal 33.7% 100 / 296 CC 62 SCAR 55.7
CC
62
Cov
32%
set
600.0
from_asn
210.0
new
73.2
CRAP 263.7
↑ Summary lib/Biblio/ILL/ISO/Request.pm »
1 package Biblio::ILL::ISO::HistoryReport;
2  
3 =head1 NAME
4  
5 Biblio::ILL::ISO::HistoryReport
6  
7 =cut
8  
9 4 ▶use Biblio::ILL::ISO::ILLASNtype;
Subroutine BEGIN: called CC=1 SCAR=0.0
10 4 ▶use Biblio::ILL::ISO::ILLString;
Subroutine BEGIN: called CC=1 SCAR=0.0
11 4 ▶use Biblio::ILL::ISO::ISODate;
Subroutine BEGIN: called CC=1 SCAR=0.0
12 4 ▶use Biblio::ILL::ISO::MostRecentService;
Subroutine BEGIN: called CC=1 SCAR=0.0
13 4 ▶use Biblio::ILL::ISO::SystemId;
Subroutine BEGIN: called CC=1 SCAR=0.0
14 4 ▶use Biblio::ILL::ISO::ShippedServiceType;
Subroutine BEGIN: called CC=1 SCAR=0.0
15 4 ▶use Biblio::ILL::ISO::TransactionResults;
Subroutine BEGIN: called CC=1 SCAR=0.0
16 4 ▶use Carp;
Subroutine BEGIN: called CC=1 SCAR=0.0
17  
18 =head1 VERSION
19  
20 Version 0.02
21  
22 =cut
23  
24 4 our $VERSION = '0.02';
25 #---------------------------------------------------------------------------
26 # Mods
27 # 0.02 - 2003.08.13 - allow passing in of text ShippedServiceType
28 # 0.01 - 2003.08.11 - original version
29 #---------------------------------------------------------------------------
30  
31 =head1 DESCRIPTION
32  
33 Biblio::ILL::ISO::HistoryReport is a derivation of Biblio::ILL::ISO::ILLASNtype.
34  
35 =head1 USES
36  
37 Biblio::ILL::ISO::ILLString
38 Biblio::ILL::ISO::ISODate
39 Biblio::ILL::ISO::MostRecentService
40 Biblio::ILL::ISO::SystemId
41 Biblio::ILL::ISO::ShippedServiceType
42 Biblio::ILL::ISO::TransactionResults
43  
44 =head1 USED IN
45  
46 Biblio::ILL::ISO::StatusReport
47  
48 =cut
49  
50 4 ▶BEGIN{@ISA = qw ( Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype
Subroutine BEGIN: called CC=1 SCAR=0.0
51  
52 =head1 FROM THE ASN DEFINITION
53
54 History-Report ::= EXPLICIT SEQUENCE {
55 date-requested [0] IMPLICIT ISO-Date OPTIONAL,
56 author [1] ILL-String OPTIONAL,
57 title [2] ILL-String OPTIONAL,
58 author-of-article [3] ILL-String OPTIONAL,
59 title-of-article [4] ILL-String OPTIONAL,
60 date-of-last-transition [5] IMPLICIT ISO-Date,
61 most-recent-service [6] IMPLICIT ENUMERATED {
62 iLL-REQUEST (1),
63 fORWARD (21),
64 fORWARD-NOTIFICATION (2),
65 sHIPPED (3),
66 iLL-ANSWER (4),
67 cONDITIONAL-REPLY (5),
68 cANCEL (6),
69 cANCEL-REPLY (7),
70 rECEIVED (8),
71 rECALL (9),
72 rETURNED (10),
73 cHECKED-IN (11),
74 rENEW-ANSWER (14),
75 lOST (15),
76 dAMAGED (16),
77 mESSAGE (17),
78 sTATUS-QUERY (18),
79 sTATUS-OR-ERROR-REPORT (19),
80 eXPIRED (20)
81 }
82 date-of-most-recent-service [7] IMPLICIT ISO-Date,
83 initiator-of-most-recent-service [8] IMPLICIT System-Id,
84 shipped-service-type [9] IMPLICIT Shipped-Service-Type OPTIONAL,
85 -- If the information is available, i.e. if a SHIPPED or
86 -- RECEIVED APDU has been sent or received, then the
87 -- value in this parameter shall be supplied.
88 -- Value must contain the most current information, e.g. if a
89 -- requester has received a SHIPPED APDU and then
90 -- invokes a RECEIVED.request, then the value from the
91 -- RECEIVED.request is used
92 transaction-results [10] IMPLICIT Transaction-Results OPTIONAL,
93 -- If the information is available, i.e. if an ILL-ANWSER
94 -- APDU has been sent or received, then the value in this
95 -- parameter shall be supplied.
96 most-recent-service-note [11] ILL-String OPTIONAL
97 -- If the information is available, i.e. if a note has been
98 -- supplied in the most recent service primitive, then the
99 -- value in this parameter shall be supplied.
100 }
101  
102 =cut
103  
104 =head1 METHODS
105  
106 =cut
107 #---------------------------------------------------------------
108 #
109 #---------------------------------------------------------------
110 =head1
111  
112 =head2 new( [...a whole bunch of parameters...] )
113  
114 Creates a new HistoryReport object.
115 Expects either no parameters, or
116 date-of-last-transition (Biblio::ILL::ISO::ISODate or text string (YYYYMMDD)),
117 most-recent-service (Biblio::ILL::ISO::MostRecentService),
118 date-of-most-recent-service (Biblio::ILL::ISO::ISODate or text string (YYYYMMDD)),
119 initiator-of-most-recent-service (Biblio::ILL::ISO::SystemId),
120 (optionally) date-requested (Biblio::ILL::ISO::ISODate or text string (YYYYMMDD)),
121 (optionally) author (Biblio::ILL::ISO::ILLString or text string),
122 (optionally) title (Biblio::ILL::ISO::ILLString or text string),
123 (optionally) author-of-article (Biblio::ILL::ISO::ILLString or text string),
124 (optionally) title-of-article (Biblio::ILL::ISO::ILLString or text string),
125 (optionally) shipped-service-type (Biblio::ILL::ISO::ShippedServiceType),
126 (optionally) transaction-results (Biblio::ILL::ISO::TransactionResults), and
127 (optionally) most-recent-service-note (Biblio::ILL::ISO::ILLString or text string)
128  
129 Pass empty strings ("") as placeholders.
130  
131 =cut
132 2 ▶sub new {
Subroutine new: called CC=26 SCAR=42.9
Pod documented
133 2 my $class = shift;
134 2 my $self = {};
135  
136 2 ▶ if (@_) {
Branch: 1 branch
BranchTrueFalseTotal
if (@_) 2 0 2
137 2 my ($dolt, $mrsvc, $date_of_mrsvc, $init_of_mrsvc,
138 $date_req, $author, $title, $author_of_article, $title_of_article,
139 $sst, $trans_res, $mrsvc_note) = @_;
140  
141 2 ▶ croak "missing date-of-last-transition" unless ($dolt);
Branch: 1 branch
BranchTrueFalseTotal
unless $dolt 0 2 2
142 2 ▶ if (ref($dolt) eq "Biblio::ILL::ISO::ISODate") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $dolt eq 'Biblio::ILL::ISO::ISODate') { } 0 2 2
143 0 $self->{"date-of-last-transition"} = $dolt;
144 } else {
145 # Huh. Must be in text format - ISODate will let us know if it's not....
146 2 $self->{"date-of-last-transition"} = new Biblio::ILL::ISO::ISODate($dolt);
147 }
148  
149 2 ▶ croak "missing most-recent-service" unless ($mrsvc);
Branch: 1 branch
BranchTrueFalseTotal
unless $mrsvc 0 2 2
150 2 ▶ if (ref($mrsvc) eq "Biblio::ILL::ISO::MostRecentService") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $mrsvc eq 'Biblio::ILL::ISO::MostRecentService') { } 0 2 2
151 0 $self->{"most-recent-service"} = $mrsvc;
152 } else {
153 # Huh. Must be in text format - MostRecentService will let us know if it's not....
154 2 $self->{"most-recent-service"} = new Biblio::ILL::ISO::MostRecentService($mrsvc);
155 }
156  
157 2 ▶ croak "missing date-of-most-recent-service" unless ($date_of_mrsvc);
Branch: 1 branch
BranchTrueFalseTotal
unless $date_of_mrsvc 0 2 2
158 2 ▶ if (ref($date_of_mrsvc) eq "Biblio::ILL::ISO::ISODate") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $date_of_mrsvc eq 'Biblio::ILL::ISO::ISODate') { } 0 2 2
159 0 $self->{"date-of-most-recent-service"} = $date_of_mrsvc;
160 } else {
161 # Huh. Must be in text format - ISODate will let us know if it's not....
162 2 $self->{"date-of-most-recent-service"} = new Biblio::ILL::ISO::ISODate($date_of_mrsvc);
163 }
164  
165 2 ▶ croak "missing initiator-of-most-recent-service" unless ($init_of_mrsvc);
Branch: 1 branch
BranchTrueFalseTotal
unless $init_of_mrsvc 0 2 2
166 2 ▶ croak "invalid initiator-of-most-recent-service" unless (ref($init_of_mrsvc) eq "Biblio::ILL::ISO::SystemId");
Branch: 1 branch
BranchTrueFalseTotal
unless ref $init_of_mrsvc eq "Biblio::ILL::ISO::SystemId" 0 2 2
167 2 $self->{"initiator-of-most-recent-service"} = $init_of_mrsvc;
168  
169 2 ▶ if ($date_req) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date_req) 2 0 2
170 2 ▶ if (ref($date_req) eq "Biblio::ILL::ISO::ISODate") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $date_req eq 'Biblio::ILL::ISO::ISODate') { } 0 2 2
171 0 $self->{"date-requested"} = $date_req;
172 } else {
173 # Huh. Must be in text format - ISODate will let us know if it's not....
174 2 $self->{"date-requested"} = new Biblio::ILL::ISO::ISODate($date_req);
175 }
176 }
177  
178 2 ▶ if ($author) {
Branch: 1 branch
BranchTrueFalseTotal
if ($author) 2 0 2
179 2 ▶ if (ref($author) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $author eq 'Biblio::ILL::ISO::ILLString') { } 0 2 2
180 0 $self->{"author"} = $author;
181 } else {
182 2 $self->{"author"} = new Biblio::ILL::ISO::ILLString($author);
183 }
184 }
185  
186 2 ▶ if ($title) {
Branch: 1 branch
BranchTrueFalseTotal
if ($title) 2 0 2
187 2 ▶ if (ref($title) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $title eq 'Biblio::ILL::ISO::ILLString') { } 0 2 2
188 0 $self->{"title"} = $title;
189 } else {
190 2 $self->{"title"} = new Biblio::ILL::ISO::ILLString($title);
191 }
192 }
193  
194 2 ▶ if ($author_of_article) {
Branch: 1 branch
BranchTrueFalseTotal
if ($author_of_article) 0 2 2
195 0 ▶ if (ref($author_of_article) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $author_of_article eq 'Biblio::ILL::ISO::ILLString') { } 0 0 0
196 0 $self->{"author-of-article"} = $author_of_article;
197 } else {
198 0 $self->{"author-of-article"} = new Biblio::ILL::ISO::ILLString($author_of_article);
199 }
200 }
201  
202 2 ▶ if ($title_of_article) {
Branch: 1 branch
BranchTrueFalseTotal
if ($title_of_article) 0 2 2
203 0 ▶ if (ref($title_of_article) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $title_of_article eq 'Biblio::ILL::ISO::ILLString') { } 0 0 0
204 0 $self->{"title-of-article"} = $title_of_article;
205 } else {
206 0 $self->{"title-of-article"} = new Biblio::ILL::ISO::ILLString($title_of_article);
207 }
208 }
209  
210 2 ▶ if ($sst) {
Branch: 1 branch
BranchTrueFalseTotal
if ($sst) 2 0 2
211 2 ▶ if (ref($sst) eq "Biblio::ILL::ISO::ShippedServiceType") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sst eq 'Biblio::ILL::ISO::ShippedServiceType') { } 0 2 2
212 0 $self->{"shipped-service-type"} = $sst;
213 } else {
214 # Huh. Must be in text format - ShippedServiceType will let us know if it's not....
215 2 $self->{"shipped-service-type"} = new Biblio::ILL::ISO::ShippedServiceType($sst);
216 }
217 }
218  
219 2 ▶ croak "invalid transaction-results" unless (ref($trans_res) eq "Biblio::ILL::ISO::TransactionResults");
Branch: 1 branch
BranchTrueFalseTotal
unless ref $trans_res eq "Biblio::ILL::ISO::TransactionResults" 0 2 2
220 2 $self->{"transaction-results"} = $trans_res;
221  
222 2 ▶ if ($mrsvc_note) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mrsvc_note) 2 0 2
223 2 ▶ if (ref($mrsvc_note) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $mrsvc_note eq 'Biblio::ILL::ISO::ILLString') { } 0 2 2
224 0 $self->{"most-recent-service-note"} = $mrsvc_note;
225 } else {
226 # Huh. Must be in text format - ILLString will let us know if it's not....
227 2 $self->{"most-recent-service-note"} = new Biblio::ILL::ISO::ILLString($mrsvc_note);
228 }
229 }
230  
231 }
232  
233 2 ▶ bless($self, ref($class) || $class);
Condition33%1/3
ref $class || $class
l!l&&r!l&&!r
020
MC/DC0%0/2
ref $class || $class
ref $class $class
Truth table33%1/3
A || B
A= ref $classB= $class
ABresult
1X1
011
000
234 2 return ($self);
235 }
236  
237  
238 #---------------------------------------------------------------
239 #
240 #---------------------------------------------------------------
241 =head1
242  
243 =head2 set( [...a whole bunch of parameters...] )
244  
245 Sets the object's date-of-last-transition (Biblio::ILL::ISO::ISODate or text string (YYYYMMDD)),
246 most-recent-service (Biblio::ILL::ISO::MostRecentService),
247 date-of-most-recent-service (Biblio::ILL::ISO::ISODate or text string (YYYYMMDD)),
248 initiator-of-most-recent-service (Biblio::ILL::ISO::SystemId),
249 (optionally) date-requested (Biblio::ILL::ISO::ISODate or text string (YYYYMMDD)),
250 (optionally) author (Biblio::ILL::ISO::ILLString or text string),
251 (optionally) title (Biblio::ILL::ISO::ILLString or text string),
252 (optionally) author-of-article (Biblio::ILL::ISO::ILLString or text string),
253 (optionally) title-of-article (Biblio::ILL::ISO::ILLString or text string),
254 (optionally) shipped-service-type (Biblio::ILL::ISO::ShippedServiceType),
255 (optionally) transaction-results (Biblio::ILL::ISO::TransactionResults), and
256 (optionally) most-recent-service-note (Biblio::ILL::ISO::ILLString or text string)
257  
258 Pass empty strings ("") as placeholders.
259  
260 =cut
261 0 ▶sub set {
Subroutine set: not called CC=24 SCAR=64.0
Pod documented
262 0 my $self = shift;
263  
264 0 my ($dolt, $mrsvc, $date_of_mrsvc, $init_of_mrsvc,
265 $date_req, $author, $title, $author_of_article, $title_of_article,
266 $sst, $trans_res, $mrsvc_note) = @_;
267
268 0 ▶ croak "missing date-of-last-transition" unless ($dolt);
Branch: 1 branch
BranchTrueFalseTotal
unless $dolt 0 0 0
269 0 ▶ if (ref($dolt) eq "Biblio::ILL::ISO::ISODate") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $dolt eq 'Biblio::ILL::ISO::ISODate') { } 0 0 0
270 0 $self->{"date-of-last-transition"} = $dolt;
271 } else {
272 # Huh. Must be in text format - ISODate will let us know if it's not....
273 0 $self->{"date-of-last-transition"} = new Biblio::ILL::ISO::ISODate($dolt);
274 }
275
276 0 ▶ croak "missing most-recent-service" unless ($mrsvc);
Branch: 1 branch
BranchTrueFalseTotal
unless $mrsvc 0 0 0
277 0 ▶ if (ref($mrsvc) eq "Biblio::ILL::ISO::MostRecentService") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $mrsvc eq 'Biblio::ILL::ISO::MostRecentService') { } 0 0 0
278 0 $self->{"most-recent-service"} = $mrsvc;
279 } else {
280 # Huh. Must be in text format - MostRecentService will let us know if it's not....
281 0 $self->{"most-recent-service"} = new Biblio::ILL::ISO::MostRecentService($mrsvc);
282 }
283
284 0 ▶ croak "missing date-of-most-recent-service" unless ($date_of_mrsvc);
Branch: 1 branch
BranchTrueFalseTotal
unless $date_of_mrsvc 0 0 0
285 0 ▶ if (ref($date_of_mrsvc) eq "Biblio::ILL::ISO::ISODate") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $date_of_mrsvc eq 'Biblio::ILL::ISO::ISODate') { } 0 0 0
286 0 $self->{"date-of-most-recent-service"} = $date_of_mrsvc;
287 } else {
288 # Huh. Must be in text format - ISODate will let us know if it's not....
289 0 $self->{"date-of-most-recent-service"} = new Biblio::ILL::ISO::ISODate($date_of_mrsvc);
290 }
291
292 0 ▶ croak "missing initiator-of-most-recent-service" unless ($init_of_mrsvc);
Branch: 1 branch
BranchTrueFalseTotal
unless $init_of_mrsvc 0 0 0
293 0 ▶ croak "invalid initiator-of-most-recent-service" unless (ref($init_of_mrsvc) eq "Biblio::ILL::ISO::SystemId");
Branch: 1 branch
BranchTrueFalseTotal
unless ref $init_of_mrsvc eq "Biblio::ILL::ISO::SystemId" 0 0 0
294 0 $self->{"initiator-of-most-recent-service"} = $init_of_mrsvc;
295
296 0 ▶ if ($date_req) {
Branch: 1 branch
BranchTrueFalseTotal
if ($date_req) 0 0 0
297 0 ▶ if (ref($date_req) eq "Biblio::ILL::ISO::ISODate") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $date_req eq 'Biblio::ILL::ISO::ISODate') { } 0 0 0
298 0 $self->{"date-requested"} = $date_req;
299 } else {
300 # Huh. Must be in text format - ISODate will let us know if it's not....
301 0 $self->{"date-requested"} = new Biblio::ILL::ISO::ISODate($date_req);
302 }
303 }
304
305 0 ▶ if ($author) {
Branch: 1 branch
BranchTrueFalseTotal
if ($author) 0 0 0
306 0 ▶ if (ref($author) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $author eq 'Biblio::ILL::ISO::ILLString') { } 0 0 0
307 0 $self->{"author"} = $author;
308 } else {
309 0 $self->{"author"} = new Biblio::ILL::ISO::ILLString($author);
310 }
311 }
312
313 0 ▶ if ($title) {
Branch: 1 branch
BranchTrueFalseTotal
if ($title) 0 0 0
314 0 ▶ if (ref($title) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $title eq 'Biblio::ILL::ISO::ILLString') { } 0 0 0
315 0 $self->{"title"} = $title;
316 } else {
317 0 $self->{"title"} = new Biblio::ILL::ISO::ILLString($title);
318 }
319 }
320
321 0 ▶ if ($author_of_article) {
Branch: 1 branch
BranchTrueFalseTotal
if ($author_of_article) 0 0 0
322 0 ▶ if (ref($author_of_article) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $author_of_article eq 'Biblio::ILL::ISO::ILLString') { } 0 0 0
323 0 $self->{"author-of-article"} = $author_of_article;
324 } else {
325 0 $self->{"author-of-article"} = new Biblio::ILL::ISO::ILLString($author_of_article);
326 }
327 }
328
329 0 ▶ if ($title_of_article) {
Branch: 1 branch
BranchTrueFalseTotal
if ($title_of_article) 0 0 0
330 0 ▶ if (ref($title_of_article) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $title_of_article eq 'Biblio::ILL::ISO::ILLString') { } 0 0 0
331 0 $self->{"title-of-article"} = $title_of_article;
332 } else {
333 0 $self->{"title-of-article"} = new Biblio::ILL::ISO::ILLString($title_of_article);
334 }
335 }
336
337 0 ▶ if ($sst) {
Branch: 1 branch
BranchTrueFalseTotal
if ($sst) 0 0 0
338 0 ▶ if (ref($sst) eq "Biblio::ILL::ISO::ShippedServiceType") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $sst eq 'Biblio::ILL::ISO::ShippedServiceType') { } 0 0 0
339 0 $self->{"shipped-service-type"} = $sst;
340 } else {
341 # Huh. Must be in text format - ShippedServiceType will let us know if it's not....
342 0 $self->{"shipped-service-type"} = new Biblio::ILL::ISO::ShippedServiceType($sst);
343 }
344 }
345
346 0 ▶ croak "invalid transaction-results" unless (ref($trans_res) eq "Biblio::ILL::ISO::TransactionResults");
Branch: 1 branch
BranchTrueFalseTotal
unless ref $trans_res eq "Biblio::ILL::ISO::TransactionResults" 0 0 0
347 0 $self->{"transaction-results"} = $trans_res;
348
349 0 ▶ if ($mrsvc_note) {
Branch: 1 branch
BranchTrueFalseTotal
if ($mrsvc_note) 0 0 0
350 0 ▶ if (ref($mrsvc_note) eq "Biblio::ILL::ISO::ILLString") {
Branch: 1 branch
BranchTrueFalseTotal
if (ref $mrsvc_note eq 'Biblio::ILL::ISO::ILLString') { } 0 0 0
351 0 $self->{"most-recent-service-note"} = $mrsvc_note;
352 } else {
353 # Huh. Must be in text format - ILLString will let us know if it's not....
354 0 $self->{"most-recent-service-note"} = new Biblio::ILL::ISO::ILLString($mrsvc_note);
355 }
356 }
357
358 0 return;
359 }
360  
361 #---------------------------------------------------------------
362 #
363 #---------------------------------------------------------------
364 =head1
365  
366 =head2 from_asn($href)
367  
368 Given a properly formatted hash, builds the object.
369  
370 =cut
371 0 ▶sub from_asn {
Subroutine from_asn: not called CC=14 SCAR=53.5
Pod documented
372 0 my $self = shift;
373 0 my $href = shift;
374  
375 0 foreach my $k (keys %$href) {
376 #print ref($self) . "...$k\n";
377  
378 0 ▶ if (($k =~ /^date-requested$/)
Branch: 6 branches
BranchTrueFalseTotal
if ($k =~ /^date-requested$/ or $k =~ /^date-of-last-transition$/ or $k =~ /^date-of-most-recent-service$/) { } 0 0 0
elsif ($k =~ /^author$/ or $k =~ /^title$/ or $k =~ /^author-of-article$/ or $k =~ /^title-of-article$/ or $k =~ /^most-recent-service-note$/) { } 0 0 0
elsif ($k =~ /^most-recent-service$/) { } 0 0 0
elsif ($k =~ /^initiator-of-most-recent-service$/) { } 0 0 0
elsif ($k =~ /^shipped-service-type$/) { } 0 0 0
elsif ($k =~ /^transaction-results$/) { } 0 0 0
Condition0%0/6
$k =~ /^date-requested$/ or $k =~ /^date-of-last-transition$/ or $k =~ /^date-of-most-recent-service$/
l!l&&r!l&&!r
000
$k =~ /^date-requested$/ or $k =~ /^date-of-last-transition$/
l!l&&r!l&&!r
000
MC/DC0%0/3
$k =~ /^date-requested$/ or $k =~ /^date-of-last-transition$/ or $k =~ /^date-of-most-recent-service$/
$k =~ /^date-requested$/ $k =~ /^date-of-last-transition$/ $k =~ /^date-of-most-recent-service$/
Truth table0%0/4
A or B or C
A= $k =~ /^date-requested$/B= $k =~ /^date-of-last-transition$/C= $k =~ /^date-of-most-recent-service$/
ABCresult
1XX1
01X1
0011
0000
379 || ($k =~ /^date-of-last-transition$/)
380 || ($k =~ /^date-of-most-recent-service$/)
381 ) {
382 0 $self->{$k} = new Biblio::ILL::ISO::ISODate();
383 0 $self->{$k}->from_asn($href->{$k});
384
385 ▶ } elsif (($k =~ /^author$/)
Condition0%0/12
$k =~ /^author$/ or $k =~ /^title$/ or $k =~ /^author-of-article$/ or $k =~ /^title-of-article$/ or $k =~ /^most-recent-service-note$/
l!l&&r!l&&!r
000
$k =~ /^author$/ or $k =~ /^title$/ or $k =~ /^author-of-article$/ or $k =~ /^title-of-article$/
l!l&&r!l&&!r
000
$k =~ /^author$/ or $k =~ /^title$/ or $k =~ /^author-of-article$/
l!l&&r!l&&!r
000
$k =~ /^author$/ or $k =~ /^title$/
l!l&&r!l&&!r
000
MC/DC0%0/5
$k =~ /^author$/ or $k =~ /^title$/ or $k =~ /^author-of-article$/ or $k =~ /^title-of-article$/ or $k =~ /^most-recent-service-note$/
$k =~ /^author$/ $k =~ /^title$/ $k =~ /^author-of-article$/ $k =~ /^title-of-article$/ $k =~ /^most-recent-service-note$/
Truth table0%0/6
A or B or C or D or E
A= $k =~ /^author$/B= $k =~ /^title$/C= $k =~ /^author-of-article$/D= $k =~ /^title-of-article$/E= $k =~ /^most-recent-service-note$/
ABCDEresult
1XXXX1
01XXX1
001XX1
0001X1
000011
000000
386 || ($k =~ /^title$/)
387 || ($k =~ /^author-of-article$/)
388 || ($k =~ /^title-of-article$/)
389 || ($k =~ /^most-recent-service-note$/)
390 ) {
391 0 $self->{$k} = new Biblio::ILL::ISO::ILLString();
392 0 $self->{$k}->from_asn($href->{$k});
393  
394 } elsif ($k =~ /^most-recent-service$/) {
395 0 $self->{$k} = new Biblio::ILL::ISO::MostRecentService();
396 0 $self->{$k}->from_asn($href->{$k});
397  
398 } elsif ($k =~ /^initiator-of-most-recent-service$/) {
399 0 $self->{$k} = new Biblio::ILL::ISO::SystemId();
400 0 $self->{$k}->from_asn($href->{$k});
401  
402 } elsif ($k =~ /^shipped-service-type$/) {
403 0 $self->{$k} = new Biblio::ILL::ISO::ShippedServiceType();
404 0 $self->{$k}->from_asn($href->{$k});
405  
406 } elsif ($k =~ /^transaction-results$/) {
407 0 $self->{$k} = new Biblio::ILL::ISO::TransactionResults();
408 0 $self->{$k}->from_asn($href->{$k});
409  
410 } else {
411 0 croak "invalid " . ref($self) . " element: [$k]";
412 }
413  
414 }
415 0 return $self;
416 }
417  
418 =head1 SEE ALSO
419  
420 See the README for system design notes.
421 See the parent class(es) for other available methods.
422  
423 For more information on Interlibrary Loan standards (ISO 10160/10161),
424 a good place to start is:
425  
426 http://www.nlc-bnc.ca/iso/ill/main.htm
427  
428 =cut
429  
430 =head1 AUTHOR
431  
432 David Christensen, <DChristensenSPAMLESS@westman.wave.ca>
433  
434 =cut
435  
436  
437 =head1 COPYRIGHT AND LICENSE
438  
439 Copyright 2003 by David Christensen
440  
441 This library is free software; you can redistribute it and/or modify it
442 under the same terms as Perl itself.
443  
444 =cut
445  
446 4 1;
↑ Summary lib/Biblio/ILL/ISO/Request.pm »