line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::ILL::ISO::DeliveryService; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Biblio::ILL::ISO::DeliveryService |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
639
|
use Biblio::ILL::ISO::ILLASNtype; |
|
4
|
|
|
|
|
43
|
|
|
4
|
|
|
|
|
146
|
|
10
|
4
|
|
|
4
|
|
2612
|
use Biblio::ILL::ISO::TransportationMode; |
|
4
|
|
|
|
|
11
|
|
|
4
|
|
|
|
|
115
|
|
11
|
4
|
|
|
4
|
|
2453
|
use Biblio::ILL::ISO::ElectronicDeliveryServiceSequence; |
|
4
|
|
|
|
|
12
|
|
|
4
|
|
|
|
|
133
|
|
12
|
|
|
|
|
|
|
|
13
|
4
|
|
|
4
|
|
29
|
use Carp; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
404
|
|
14
|
|
|
|
|
|
|
|
15
|
|
|
|
|
|
|
=head1 VERSION |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
Version 0.01 |
18
|
|
|
|
|
|
|
|
19
|
|
|
|
|
|
|
=cut |
20
|
|
|
|
|
|
|
|
21
|
|
|
|
|
|
|
our $VERSION = '0.02'; |
22
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
23
|
|
|
|
|
|
|
# Mods |
24
|
|
|
|
|
|
|
# 0.02 - 2003.09.07 - fixed the POD |
25
|
|
|
|
|
|
|
# 0.01 - 2003.07.15 - original version |
26
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
=head1 DESCRIPTION |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
Biblio::ILL::ISO::DeliveryService is a derivation of Biblio::ILL::ISO::ILLASNtype. |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
=head1 USES |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
Biblio::ILL::ISO::TransportationMode |
35
|
|
|
|
|
|
|
Biblio::ILL::ISO::ElectronicDeliveryServiceSequence |
36
|
|
|
|
|
|
|
|
37
|
|
|
|
|
|
|
=head1 USED IN |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
Biblio::ILL::ISO::ConditionalResults |
40
|
|
|
|
|
|
|
|
41
|
|
|
|
|
|
|
=cut |
42
|
|
|
|
|
|
|
|
43
|
4
|
|
|
4
|
|
1935
|
BEGIN{@ISA = qw ( Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype |
44
|
|
|
|
|
|
|
|
45
|
|
|
|
|
|
|
=head1 FROM THE ASN DEFINITION |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
Delivery-Service ::= CHOICE { |
48
|
|
|
|
|
|
|
physical-delivery [7] Transportation-Mode, |
49
|
|
|
|
|
|
|
electronic-delivery [50] IMPLICIT SEQUENCE OF Electronic-Delivery-Service |
50
|
|
|
|
|
|
|
-- electronic-delivery may only be present in APDUs |
51
|
|
|
|
|
|
|
-- with a protocol-version-num value of 2 or greater |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 METHODS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
61
|
|
|
|
|
|
|
# |
62
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
63
|
|
|
|
|
|
|
=head1 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 new( [$transportation_mode | $e_delivery_service_seq] ) |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Creates a new DeliveryService object. |
68
|
|
|
|
|
|
|
Expects either no paramaters, or one of: |
69
|
|
|
|
|
|
|
physical-delivery (Biblio::ILL::ISO::TransportationMode), or |
70
|
|
|
|
|
|
|
electronic-delivery (Biblio::ILL::ISO::ElectronicDeliveryServiceSequence). |
71
|
|
|
|
|
|
|
|
72
|
|
|
|
|
|
|
=cut |
73
|
|
|
|
|
|
|
sub new { |
74
|
4
|
|
|
4
|
1
|
8
|
my $class = shift; |
75
|
4
|
|
|
|
|
8
|
my $self = {}; |
76
|
|
|
|
|
|
|
|
77
|
4
|
50
|
|
|
|
12
|
if (@_) { |
78
|
4
|
|
|
|
|
13
|
my ($objref) = @_; |
79
|
|
|
|
|
|
|
|
80
|
4
|
50
|
|
|
|
17
|
if (ref($objref) eq "Biblio::ILL::ISO::TransportationMode") { |
|
|
0
|
|
|
|
|
|
81
|
4
|
|
|
|
|
10
|
$self->{"physical-delivery"} = $objref; |
82
|
|
|
|
|
|
|
} elsif (ref($objref) eq "Biblio::ILL::ISO::ElectronicDeliveryServiceSequence") { |
83
|
0
|
|
|
|
|
0
|
$self->{"electronic-delivery"} = $objref; |
84
|
|
|
|
|
|
|
} else { |
85
|
0
|
|
|
|
|
0
|
croak "Invalid ElectronicDeliveryServiceSequence"; |
86
|
|
|
|
|
|
|
} |
87
|
|
|
|
|
|
|
} |
88
|
|
|
|
|
|
|
|
89
|
4
|
|
33
|
|
|
25
|
bless($self, ref($class) || $class); |
90
|
4
|
|
|
|
|
31
|
return ($self); |
91
|
|
|
|
|
|
|
} |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
|
94
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
95
|
|
|
|
|
|
|
# |
96
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
97
|
|
|
|
|
|
|
=head1 |
98
|
|
|
|
|
|
|
|
99
|
|
|
|
|
|
|
=head2 set( [$transportation_mode | $e_delivery_service_seq] ) |
100
|
|
|
|
|
|
|
|
101
|
|
|
|
|
|
|
Sets the object's physical-delivery or electronic-delivery. |
102
|
|
|
|
|
|
|
Expects one of: |
103
|
|
|
|
|
|
|
physical-delivery (Biblio::ILL::ISO::TransportationMode), or |
104
|
|
|
|
|
|
|
electronic-delivery (Biblio::ILL::ISO::ElectronicDeliveryServiceSequence). |
105
|
|
|
|
|
|
|
|
106
|
|
|
|
|
|
|
=cut |
107
|
|
|
|
|
|
|
sub set { |
108
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
109
|
0
|
|
|
|
|
|
my ($objref) = @_; |
110
|
|
|
|
|
|
|
|
111
|
0
|
0
|
|
|
|
|
if (ref($objref) eq "Biblio::ILL::ISO::TransportationMode") { |
|
|
0
|
|
|
|
|
|
112
|
0
|
|
|
|
|
|
$self->{"physical-delivery"} = $objref; |
113
|
|
|
|
|
|
|
} elsif (ref($objref) eq "Biblio::ILL::ISO::ElectronicDeliveryServiceSequence") { |
114
|
0
|
|
|
|
|
|
$self->{"electronic-delivery"} = $objref; |
115
|
|
|
|
|
|
|
} else { |
116
|
0
|
|
|
|
|
|
croak "Invalid ElectronicDeliveryServiceSequence"; |
117
|
|
|
|
|
|
|
} |
118
|
|
|
|
|
|
|
|
119
|
0
|
|
|
|
|
|
return; |
120
|
|
|
|
|
|
|
} |
121
|
|
|
|
|
|
|
|
122
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
123
|
|
|
|
|
|
|
# |
124
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
125
|
|
|
|
|
|
|
=head1 |
126
|
|
|
|
|
|
|
|
127
|
|
|
|
|
|
|
=head2 from_asn($href) |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
Given a properly formatted hash, builds the object. |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
=cut |
132
|
|
|
|
|
|
|
sub from_asn { |
133
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
134
|
0
|
|
|
|
|
|
my $href = shift; |
135
|
|
|
|
|
|
|
|
136
|
0
|
|
|
|
|
|
foreach my $k (keys %$href) { |
137
|
|
|
|
|
|
|
#print ref($self) . "...$k\n"; |
138
|
|
|
|
|
|
|
|
139
|
0
|
0
|
|
|
|
|
if ($k =~ /^physical-delivery$/) { |
|
|
0
|
|
|
|
|
|
140
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::TransportationMode(); |
141
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
142
|
|
|
|
|
|
|
|
143
|
|
|
|
|
|
|
} elsif ($k =~ /^electronic-delivery$/) { |
144
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::ElectronicDeliveryServiceSequence(); |
145
|
0
|
|
|
|
|
|
$self->{$k}->from_asn($href->{$k}); |
146
|
|
|
|
|
|
|
|
147
|
|
|
|
|
|
|
} else { |
148
|
0
|
|
|
|
|
|
croak "invalid " . ref($self) . " element: [$k]"; |
149
|
|
|
|
|
|
|
} |
150
|
|
|
|
|
|
|
|
151
|
|
|
|
|
|
|
} |
152
|
0
|
|
|
|
|
|
return $self; |
153
|
|
|
|
|
|
|
} |
154
|
|
|
|
|
|
|
|
155
|
|
|
|
|
|
|
=head1 SEE ALSO |
156
|
|
|
|
|
|
|
|
157
|
|
|
|
|
|
|
See the README for system design notes. |
158
|
|
|
|
|
|
|
See the parent class(es) for other available methods. |
159
|
|
|
|
|
|
|
|
160
|
|
|
|
|
|
|
For more information on Interlibrary Loan standards (ISO 10160/10161), |
161
|
|
|
|
|
|
|
a good place to start is: |
162
|
|
|
|
|
|
|
|
163
|
|
|
|
|
|
|
http://www.nlc-bnc.ca/iso/ill/main.htm |
164
|
|
|
|
|
|
|
|
165
|
|
|
|
|
|
|
=cut |
166
|
|
|
|
|
|
|
|
167
|
|
|
|
|
|
|
=head1 AUTHOR |
168
|
|
|
|
|
|
|
|
169
|
|
|
|
|
|
|
David Christensen, |
170
|
|
|
|
|
|
|
|
171
|
|
|
|
|
|
|
=cut |
172
|
|
|
|
|
|
|
|
173
|
|
|
|
|
|
|
|
174
|
|
|
|
|
|
|
=head1 COPYRIGHT AND LICENSE |
175
|
|
|
|
|
|
|
|
176
|
|
|
|
|
|
|
Copyright 2003 by David Christensen |
177
|
|
|
|
|
|
|
|
178
|
|
|
|
|
|
|
This library is free software; you can redistribute it and/or modify it |
179
|
|
|
|
|
|
|
under the same terms as Perl itself. |
180
|
|
|
|
|
|
|
|
181
|
|
|
|
|
|
|
=cut |
182
|
|
|
|
|
|
|
|
183
|
|
|
|
|
|
|
1; |