line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Biblio::ILL::ISO::SystemAddress; |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
=head1 NAME |
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
Biblio::ILL::ISO::SystemAddress |
6
|
|
|
|
|
|
|
|
7
|
|
|
|
|
|
|
=cut |
8
|
|
|
|
|
|
|
|
9
|
4
|
|
|
4
|
|
24
|
use Biblio::ILL::ISO::ILLASNtype; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
105
|
|
10
|
4
|
|
|
4
|
|
20
|
use Biblio::ILL::ISO::ILLString; |
|
4
|
|
|
|
|
9
|
|
|
4
|
|
|
|
|
79
|
|
11
|
|
|
|
|
|
|
|
12
|
4
|
|
|
4
|
|
20
|
use Carp; |
|
4
|
|
|
|
|
48
|
|
|
4
|
|
|
|
|
416
|
|
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.15 - original version |
24
|
|
|
|
|
|
|
#--------------------------------------------------------------------------- |
25
|
|
|
|
|
|
|
|
26
|
|
|
|
|
|
|
=head1 DESCRIPTION |
27
|
|
|
|
|
|
|
|
28
|
|
|
|
|
|
|
Biblio::ILL::ISO::SystemAddress is a derivation of Biblio::ILL::ISO::ILLASNtype. |
29
|
|
|
|
|
|
|
|
30
|
|
|
|
|
|
|
=head1 USES |
31
|
|
|
|
|
|
|
|
32
|
|
|
|
|
|
|
Biblio::ILL::ISO::ILLString |
33
|
|
|
|
|
|
|
|
34
|
|
|
|
|
|
|
=head1 USED IN |
35
|
|
|
|
|
|
|
|
36
|
|
|
|
|
|
|
Biblio::ILL::ISO::AlreadyForwarded |
37
|
|
|
|
|
|
|
Biblio::ILL::ISO::DeliveryAddress |
38
|
|
|
|
|
|
|
Biblio::ILL::ISO::EDeliveryDetails |
39
|
|
|
|
|
|
|
Biblio::ILL::ISO::LocationInfo |
40
|
|
|
|
|
|
|
Biblio::ILL::ISO::SendToListType |
41
|
|
|
|
|
|
|
Biblio::ILL::ISO::ThirdPartyInfoType |
42
|
|
|
|
|
|
|
|
43
|
|
|
|
|
|
|
=cut |
44
|
|
|
|
|
|
|
|
45
|
4
|
|
|
4
|
|
1743
|
BEGIN{@ISA = qw ( Biblio::ILL::ISO::ILLASNtype );} # inherit from ILLASNtype |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
=head1 FROM THE ASN DEFINITION |
48
|
|
|
|
|
|
|
|
49
|
|
|
|
|
|
|
System-Address ::= SEQUENCE { |
50
|
|
|
|
|
|
|
telecom-service-identifier [0] ILL-String OPTIONAL, |
51
|
|
|
|
|
|
|
telecom-service-address [1] ILL-String OPTIONAL |
52
|
|
|
|
|
|
|
} |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
=cut |
55
|
|
|
|
|
|
|
|
56
|
|
|
|
|
|
|
=head1 METHODS |
57
|
|
|
|
|
|
|
|
58
|
|
|
|
|
|
|
=cut |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
61
|
|
|
|
|
|
|
# |
62
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
63
|
|
|
|
|
|
|
=head1 |
64
|
|
|
|
|
|
|
|
65
|
|
|
|
|
|
|
=head2 new( $telecom_service_identifier, $telecom_service_address ) |
66
|
|
|
|
|
|
|
|
67
|
|
|
|
|
|
|
Creates a new SystemAddress object. |
68
|
|
|
|
|
|
|
Expects a telecom-service-identifier (Biblio::ILL::ISO::ILLString), and |
69
|
|
|
|
|
|
|
a telecom-service-address (Biblio::ILL::ISO::ILLString). |
70
|
|
|
|
|
|
|
|
71
|
|
|
|
|
|
|
=cut |
72
|
|
|
|
|
|
|
sub new { |
73
|
16
|
|
|
16
|
1
|
85
|
my $class = shift; |
74
|
16
|
|
|
|
|
24
|
my $self = {}; |
75
|
|
|
|
|
|
|
|
76
|
16
|
50
|
|
|
|
35
|
if (@_) { |
77
|
16
|
|
|
|
|
29
|
my ($id, $addr) = @_; |
78
|
16
|
|
|
|
|
48
|
$self->{"telecom-service-identifier"} = new Biblio::ILL::ISO::ILLString($id); |
79
|
16
|
|
|
|
|
48
|
$self->{"telecom-service-address"} = new Biblio::ILL::ISO::ILLString($addr); |
80
|
|
|
|
|
|
|
} |
81
|
16
|
|
33
|
|
|
75
|
bless($self, ref($class) || $class); |
82
|
16
|
|
|
|
|
101
|
return ($self); |
83
|
|
|
|
|
|
|
} |
84
|
|
|
|
|
|
|
|
85
|
|
|
|
|
|
|
|
86
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
87
|
|
|
|
|
|
|
# |
88
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
89
|
|
|
|
|
|
|
=head1 |
90
|
|
|
|
|
|
|
|
91
|
|
|
|
|
|
|
=head2 set_id( $telecom_service_identifier ) |
92
|
|
|
|
|
|
|
|
93
|
|
|
|
|
|
|
Sets the object's telecom-service-identifier. |
94
|
|
|
|
|
|
|
Expects a valid Biblio::ILL::ISO::ILLString. |
95
|
|
|
|
|
|
|
|
96
|
|
|
|
|
|
|
=cut |
97
|
|
|
|
|
|
|
sub set_id { |
98
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
99
|
0
|
|
|
|
|
|
my ($s) = @_; |
100
|
|
|
|
|
|
|
|
101
|
0
|
|
|
|
|
|
$self->{"telecom-service-identifier"} = new Biblio::ILL::ISO::ILLString($s); |
102
|
0
|
|
|
|
|
|
return; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
106
|
|
|
|
|
|
|
# |
107
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
108
|
|
|
|
|
|
|
=head1 |
109
|
|
|
|
|
|
|
|
110
|
|
|
|
|
|
|
=head2 set_address( $telecom_service_address ) |
111
|
|
|
|
|
|
|
|
112
|
|
|
|
|
|
|
Sets the object's telecom-service-address. |
113
|
|
|
|
|
|
|
Expects a valid Biblio::ILL::ISO::ILLString. |
114
|
|
|
|
|
|
|
|
115
|
|
|
|
|
|
|
=cut |
116
|
|
|
|
|
|
|
sub set_address { |
117
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
118
|
0
|
|
|
|
|
|
my ($s) = @_; |
119
|
|
|
|
|
|
|
|
120
|
0
|
|
|
|
|
|
$self->{"telecom-service-address"} = new Biblio::ILL::ISO::ILLString($s); |
121
|
0
|
|
|
|
|
|
return; |
122
|
|
|
|
|
|
|
} |
123
|
|
|
|
|
|
|
|
124
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
125
|
|
|
|
|
|
|
# |
126
|
|
|
|
|
|
|
#--------------------------------------------------------------- |
127
|
|
|
|
|
|
|
=head1 |
128
|
|
|
|
|
|
|
|
129
|
|
|
|
|
|
|
=head2 from_asn($href) |
130
|
|
|
|
|
|
|
|
131
|
|
|
|
|
|
|
Given a properly formatted hash, builds the object. |
132
|
|
|
|
|
|
|
|
133
|
|
|
|
|
|
|
=cut |
134
|
|
|
|
|
|
|
sub from_asn { |
135
|
0
|
|
|
0
|
1
|
|
my $self = shift; |
136
|
0
|
|
|
|
|
|
my $href = shift; |
137
|
|
|
|
|
|
|
|
138
|
0
|
|
|
|
|
|
foreach my $k (keys %$href) { |
139
|
|
|
|
|
|
|
#print ref($self) . "...$k\n"; |
140
|
|
|
|
|
|
|
|
141
|
0
|
0
|
0
|
|
|
|
if (($k =~ /^telecom-service-identifier$/) |
142
|
|
|
|
|
|
|
|| ($k =~ /^telecom-service-address$/) |
143
|
|
|
|
|
|
|
) { |
144
|
0
|
|
|
|
|
|
$self->{$k} = new Biblio::ILL::ISO::ILLString(); |
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; |