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