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