| 1 | package Biblio::ILL::ISO::Cancel; | ||||||||||||||||||||||||||
| 2 | |||||||||||||||||||||||||||
| 3 | =head1 NAME | ||||||||||||||||||||||||||
| 4 | |||||||||||||||||||||||||||
| 5 | Biblio::ILL::ISO::Cancel - Perl extension for handling ISO 10161 interlibrary loan Cancel messages | ||||||||||||||||||||||||||
| 6 | |||||||||||||||||||||||||||
| 7 | =cut | ||||||||||||||||||||||||||
| 8 | |||||||||||||||||||||||||||
| 9 | 2 | ▶ | use Biblio::ILL::ISO::ISO; | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 10 | 2 | ▶ | use Carp; | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 11 | |||||||||||||||||||||||||||
| 12 | =head1 VERSION | ||||||||||||||||||||||||||
| 13 | |||||||||||||||||||||||||||
| 14 | Version 0.02 | ||||||||||||||||||||||||||
| 15 | |||||||||||||||||||||||||||
| 16 | =cut | ||||||||||||||||||||||||||
| 17 | |||||||||||||||||||||||||||
| 18 | 2 | our $VERSION = '0.02'; | |||||||||||||||||||||||||
| 19 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||
| 20 | # Mods | ||||||||||||||||||||||||||
| 21 | # 0.02 - 2003.09.07 - fixed the POD | ||||||||||||||||||||||||||
| 22 | # 0.01 - 2003.08.11 - original version | ||||||||||||||||||||||||||
| 23 | #--------------------------------------------------------------------------- | ||||||||||||||||||||||||||
| 24 | |||||||||||||||||||||||||||
| 25 | =head1 DESCRIPTION | ||||||||||||||||||||||||||
| 26 | |||||||||||||||||||||||||||
| 27 | Biblio::ILL::ISO::Cancel is a derivation of the abstract | ||||||||||||||||||||||||||
| 28 | Biblio::ILL::ISO::ISO object, and handles the Cancel message type. | ||||||||||||||||||||||||||
| 29 | |||||||||||||||||||||||||||
| 30 | =head1 EXPORT | ||||||||||||||||||||||||||
| 31 | |||||||||||||||||||||||||||
| 32 | None. | ||||||||||||||||||||||||||
| 33 | |||||||||||||||||||||||||||
| 34 | =head1 ERROR HANDLING | ||||||||||||||||||||||||||
| 35 | |||||||||||||||||||||||||||
| 36 | Each of the set_() methods will croak on missing or invalid parameters. | ||||||||||||||||||||||||||
| 37 | |||||||||||||||||||||||||||
| 38 | =cut | ||||||||||||||||||||||||||
| 39 | |||||||||||||||||||||||||||
| 40 | 2 | ▶ | BEGIN{@ISA = qw ( Biblio::ILL::ISO::ISO ); } | ||||||||||||||||||||||||
|
Subroutine
BEGIN: called CC=1 SCAR=0.0
| |||||||||||||||||||||||||||
| 41 | |||||||||||||||||||||||||||
| 42 | =head1 FROM THE ASN DEFINITION | ||||||||||||||||||||||||||
| 43 | |||||||||||||||||||||||||||
| 44 | Cancel ::= [APPLICATION 6] SEQUENCE { | ||||||||||||||||||||||||||
| 45 | protocol-version-num [0] IMPLICIT INTEGER, -- { | ||||||||||||||||||||||||||
| 46 | -- version-1 (1), | ||||||||||||||||||||||||||
| 47 | -- version-2 (2) | ||||||||||||||||||||||||||
| 48 | -- }, | ||||||||||||||||||||||||||
| 49 | transaction-id [1] IMPLICIT Transaction-Id, | ||||||||||||||||||||||||||
| 50 | service-date-time [2] IMPLICIT Service-Date-Time, | ||||||||||||||||||||||||||
| 51 | requester-id [3] IMPLICIT System-Id OPTIONAL, | ||||||||||||||||||||||||||
| 52 | -- mandatory when using store-and-forward communications | ||||||||||||||||||||||||||
| 53 | -- optional when using connection-oriented communications | ||||||||||||||||||||||||||
| 54 | responder-id [4] IMPLICIT System-Id OPTIONAL, | ||||||||||||||||||||||||||
| 55 | -- mandatory when using store-and-forward communications | ||||||||||||||||||||||||||
| 56 | -- optional when using connection-oriented communications | ||||||||||||||||||||||||||
| 57 | requester-note [46] ILL-String OPTIONAL, | ||||||||||||||||||||||||||
| 58 | cancel-extensions [49] IMPLICIT SEQUENCE OF Extension OPTIONAL | ||||||||||||||||||||||||||
| 59 | } | ||||||||||||||||||||||||||
| 60 | |||||||||||||||||||||||||||
| 61 | =cut | ||||||||||||||||||||||||||
| 62 | |||||||||||||||||||||||||||
| 63 | =head1 CONSTRUCTORS | ||||||||||||||||||||||||||
| 64 | |||||||||||||||||||||||||||
| 65 | new() | ||||||||||||||||||||||||||
| 66 | |||||||||||||||||||||||||||
| 67 | Base constructor for the class. It just returns a completely | ||||||||||||||||||||||||||
| 68 | empty message object, which you'll need to populate with the | ||||||||||||||||||||||||||
| 69 | various set_() methods, or use the read() method to read an | ||||||||||||||||||||||||||
| 70 | Cancel message from a file (followed by a call to | ||||||||||||||||||||||||||
| 71 | from_asn() to turn the read's returned hash into a proper | ||||||||||||||||||||||||||
| 72 | Cancel message. | ||||||||||||||||||||||||||
| 73 | |||||||||||||||||||||||||||
| 74 | The constructor also initializes the Convert::ASN1 if it | ||||||||||||||||||||||||||
| 75 | hasn't been initialized. | ||||||||||||||||||||||||||
| 76 | |||||||||||||||||||||||||||
| 77 | =cut | ||||||||||||||||||||||||||
| 78 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 79 | # | ||||||||||||||||||||||||||
| 80 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 81 | 2 | ▶ | sub new { | ||||||||||||||||||||||||
|
Subroutine
new: called CC=3 SCAR=11.6
Pod
documented
| |||||||||||||||||||||||||||
| 82 | 2 | my $class = shift; | |||||||||||||||||||||||||
| 83 | 2 | my $self = {}; | |||||||||||||||||||||||||
| 84 | |||||||||||||||||||||||||||
| 85 | 2 | ▶ | Biblio::ILL::ISO::ISO::_init() if (not $Biblio::ILL::ISO::ISO::_asn_initialized); | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 86 | 2 | $self->{"ASN_TYPE"} = "Cancel"; | |||||||||||||||||||||||||
| 87 | |||||||||||||||||||||||||||
| 88 | 2 | ▶ | bless($self, ref($class) || $class); | ||||||||||||||||||||||||
|
Condition33%1/3
ref $class || $class
MC/DC0%0/2
ref $class || $class
ref $class
$class
Truth table33%1/3
A || B
A= ref $classB= $class
| |||||||||||||||||||||||||||
| 89 | 2 | return ($self); | |||||||||||||||||||||||||
| 90 | } | ||||||||||||||||||||||||||
| 91 | |||||||||||||||||||||||||||
| 92 | |||||||||||||||||||||||||||
| 93 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 94 | # | ||||||||||||||||||||||||||
| 95 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 96 | 0 | ▶ | sub as_pretty_string { | ||||||||||||||||||||||||
|
Subroutine
as_pretty_string: not called CC=3 SCAR=24.8
Pod
documented
| |||||||||||||||||||||||||||
| 97 | 0 | my $self = shift; | |||||||||||||||||||||||||
| 98 | |||||||||||||||||||||||||||
| 99 | 0 | foreach my $key (sort keys %$self) { | |||||||||||||||||||||||||
| 100 | 0 | ▶ | if ($key ne "ASN_TYPE") { | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 101 | 0 | print "\n[$key]\n"; | |||||||||||||||||||||||||
| 102 | 0 | print $self->{$key}->as_pretty_string(); | |||||||||||||||||||||||||
| 103 | } | ||||||||||||||||||||||||||
| 104 | } | ||||||||||||||||||||||||||
| 105 | 0 | return; | |||||||||||||||||||||||||
| 106 | } | ||||||||||||||||||||||||||
| 107 | |||||||||||||||||||||||||||
| 108 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 109 | # This will return a structure usable by Convert::ASN1 | ||||||||||||||||||||||||||
| 110 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 111 | 1 | ▶ | sub as_asn { | ||||||||||||||||||||||||
|
Subroutine
as_asn: called CC=3 SCAR=11.0
Pod
documented
| |||||||||||||||||||||||||||
| 112 | 1 | my $self = shift; | |||||||||||||||||||||||||
| 113 | |||||||||||||||||||||||||||
| 114 | 1 | my %h = (); | |||||||||||||||||||||||||
| 115 | 1 | foreach my $key (sort keys %$self) { | |||||||||||||||||||||||||
| 116 | 7 | ▶ | if ($key ne "ASN_TYPE") { | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 117 | #print "\n[$key]\n"; | ||||||||||||||||||||||||||
| 118 | 6 | $h{$key} = $self->{$key}->as_asn(); | |||||||||||||||||||||||||
| 119 | } | ||||||||||||||||||||||||||
| 120 | } | ||||||||||||||||||||||||||
| 121 | 1 | return \%h; | |||||||||||||||||||||||||
| 122 | } | ||||||||||||||||||||||||||
| 123 | |||||||||||||||||||||||||||
| 124 | =head1 METHODS | ||||||||||||||||||||||||||
| 125 | |||||||||||||||||||||||||||
| 126 | For any example code, assume the following: | ||||||||||||||||||||||||||
| 127 | my $msg = new Biblio::ILL::ISO::Cancel; | ||||||||||||||||||||||||||
| 128 | |||||||||||||||||||||||||||
| 129 | =cut | ||||||||||||||||||||||||||
| 130 | |||||||||||||||||||||||||||
| 131 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 132 | # | ||||||||||||||||||||||||||
| 133 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 134 | =head1 | ||||||||||||||||||||||||||
| 135 | |||||||||||||||||||||||||||
| 136 | =head2 from_asn($href) | ||||||||||||||||||||||||||
| 137 | |||||||||||||||||||||||||||
| 138 | To read a message from a file, use the following: | ||||||||||||||||||||||||||
| 139 | |||||||||||||||||||||||||||
| 140 | my $href = $msg->read("msg_06.cancel.ber"); | ||||||||||||||||||||||||||
| 141 | $msg = $msg->from_asn($href); | ||||||||||||||||||||||||||
| 142 | |||||||||||||||||||||||||||
| 143 | The from_asn() method turns the hash returned from read() into | ||||||||||||||||||||||||||
| 144 | a proper message-type object. | ||||||||||||||||||||||||||
| 145 | |||||||||||||||||||||||||||
| 146 | =cut | ||||||||||||||||||||||||||
| 147 | 0 | ▶ | sub from_asn { | ||||||||||||||||||||||||
|
Subroutine
from_asn: not called CC=8 SCAR=42.8
Pod
documented
| |||||||||||||||||||||||||||
| 148 | 0 | my $self = shift; | |||||||||||||||||||||||||
| 149 | 0 | my $href = shift; | |||||||||||||||||||||||||
| 150 | |||||||||||||||||||||||||||
| 151 | 0 | foreach my $k (keys %$href) { | |||||||||||||||||||||||||
| 152 | |||||||||||||||||||||||||||
| 153 | 0 | ▶ | if ($k =~ /^protocol-version-num$/) { | ||||||||||||||||||||||||
|
Branch: 5 branches
| |||||||||||||||||||||||||||
| 154 | 0 | $self->{$k} = new Biblio::ILL::ISO::ProtocolVersionNum(); | |||||||||||||||||||||||||
| 155 | 0 | $self->{$k}->from_asn($href->{$k}); | |||||||||||||||||||||||||
| 156 | |||||||||||||||||||||||||||
| 157 | } elsif ($k =~ /^transaction-id$/) { | ||||||||||||||||||||||||||
| 158 | 0 | $self->{$k} = new Biblio::ILL::ISO::TransactionId(); | |||||||||||||||||||||||||
| 159 | 0 | $self->{$k}->from_asn($href->{$k}); | |||||||||||||||||||||||||
| 160 | |||||||||||||||||||||||||||
| 161 | } elsif ($k =~ /^service-date-time$/) { | ||||||||||||||||||||||||||
| 162 | 0 | $self->{$k} = new Biblio::ILL::ISO::ServiceDateTime(); | |||||||||||||||||||||||||
| 163 | 0 | $self->{$k}->from_asn($href->{$k}); | |||||||||||||||||||||||||
| 164 | |||||||||||||||||||||||||||
| 165 | ▶ | } elsif (($k =~ /^requester-id$/) | |||||||||||||||||||||||||
|
Condition0%0/3
$k =~ /^requester-id$/ or $k =~ /^responder-id$/
MC/DC0%0/2
$k =~ /^requester-id$/ or $k =~ /^responder-id$/
$k =~ /^requester-id$/
$k =~ /^responder-id$/
Truth table0%0/3
A or B
A= $k =~ /^requester-id$/B= $k =~ /^responder-id$/
| |||||||||||||||||||||||||||
| 166 | || ($k =~ /^responder-id$/) | ||||||||||||||||||||||||||
| 167 | ) { | ||||||||||||||||||||||||||
| 168 | 0 | $self->{$k} = new Biblio::ILL::ISO::SystemId(); | |||||||||||||||||||||||||
| 169 | 0 | $self->{$k}->from_asn($href->{$k}); | |||||||||||||||||||||||||
| 170 | |||||||||||||||||||||||||||
| 171 | } elsif ($k =~ /^requester-note$/) { | ||||||||||||||||||||||||||
| 172 | 0 | $self->{$k} = new Biblio::ILL::ISO::ILLString(); | |||||||||||||||||||||||||
| 173 | 0 | $self->{$k}->from_asn($href->{$k}); | |||||||||||||||||||||||||
| 174 | |||||||||||||||||||||||||||
| 175 | } else { | ||||||||||||||||||||||||||
| 176 | 0 | croak "invalid " . ref($self) . " element: [$k]"; | |||||||||||||||||||||||||
| 177 | } | ||||||||||||||||||||||||||
| 178 | |||||||||||||||||||||||||||
| 179 | } | ||||||||||||||||||||||||||
| 180 | 0 | return $self; | |||||||||||||||||||||||||
| 181 | } | ||||||||||||||||||||||||||
| 182 | |||||||||||||||||||||||||||
| 183 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 184 | # | ||||||||||||||||||||||||||
| 185 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 186 | =head1 | ||||||||||||||||||||||||||
| 187 | |||||||||||||||||||||||||||
| 188 | =head2 set_protocol_version_num($pvn) | ||||||||||||||||||||||||||
| 189 | |||||||||||||||||||||||||||
| 190 | Sets the protocol version number. | ||||||||||||||||||||||||||
| 191 | Acceptable parameter values are the strings: | ||||||||||||||||||||||||||
| 192 | version-1 | ||||||||||||||||||||||||||
| 193 | version-2 | ||||||||||||||||||||||||||
| 194 | |||||||||||||||||||||||||||
| 195 | =cut | ||||||||||||||||||||||||||
| 196 | 1 | ▶ | sub set_protocol_version_num { | ||||||||||||||||||||||||
|
Subroutine
set_protocol_version_num: called CC=2 SCAR=7.0
Pod
documented
| |||||||||||||||||||||||||||
| 197 | 1 | my $self = shift; | |||||||||||||||||||||||||
| 198 | 1 | my ($parm) = shift; | |||||||||||||||||||||||||
| 199 | |||||||||||||||||||||||||||
| 200 | 1 | ▶ | croak "missing protocol-version-num" unless $parm; | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 201 | |||||||||||||||||||||||||||
| 202 | 1 | $self->{"protocol-version-num"} = new Biblio::ILL::ISO::ProtocolVersionNum($parm); | |||||||||||||||||||||||||
| 203 | |||||||||||||||||||||||||||
| 204 | 1 | return; | |||||||||||||||||||||||||
| 205 | } | ||||||||||||||||||||||||||
| 206 | |||||||||||||||||||||||||||
| 207 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 208 | # | ||||||||||||||||||||||||||
| 209 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 210 | =head1 | ||||||||||||||||||||||||||
| 211 | |||||||||||||||||||||||||||
| 212 | =head2 set_transaction_id($tid) | ||||||||||||||||||||||||||
| 213 | |||||||||||||||||||||||||||
| 214 | Sets the message's transaction-id. | ||||||||||||||||||||||||||
| 215 | Expects a valid Biblio::ILL::ISO::TransactionId. | ||||||||||||||||||||||||||
| 216 | |||||||||||||||||||||||||||
| 217 | my $tid = new Biblio::ILL::ISO::TransactionId("PLS","001","", | ||||||||||||||||||||||||||
| 218 | new Biblio::ILL::ISO::SystemId("MWPL")); | ||||||||||||||||||||||||||
| 219 | $msg->set_transaction_id($tid); | ||||||||||||||||||||||||||
| 220 | |||||||||||||||||||||||||||
| 221 | This is a mandatory field. | ||||||||||||||||||||||||||
| 222 | |||||||||||||||||||||||||||
| 223 | =cut | ||||||||||||||||||||||||||
| 224 | 1 | ▶ | sub set_transaction_id { | ||||||||||||||||||||||||
|
Subroutine
set_transaction_id: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||
| 225 | 1 | my $self = shift; | |||||||||||||||||||||||||
| 226 | 1 | my ($parm) = shift; | |||||||||||||||||||||||||
| 227 | |||||||||||||||||||||||||||
| 228 | 1 | ▶ | croak "missing transaction-id" unless $parm; | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 229 | 1 | ▶ | croak "invalid transaction-id" unless (ref($parm) eq "Biblio::ILL::ISO::TransactionId"); | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 230 | |||||||||||||||||||||||||||
| 231 | 1 | $self->{"transaction-id"} = $parm; | |||||||||||||||||||||||||
| 232 | |||||||||||||||||||||||||||
| 233 | 1 | return; | |||||||||||||||||||||||||
| 234 | } | ||||||||||||||||||||||||||
| 235 | |||||||||||||||||||||||||||
| 236 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 237 | # | ||||||||||||||||||||||||||
| 238 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 239 | =head1 | ||||||||||||||||||||||||||
| 240 | |||||||||||||||||||||||||||
| 241 | =head2 set_service_date_time($sdt) | ||||||||||||||||||||||||||
| 242 | |||||||||||||||||||||||||||
| 243 | Sets the message's service-date-time. | ||||||||||||||||||||||||||
| 244 | Expects a valid Biblio::ILL::ISO::ServiceDateTime. | ||||||||||||||||||||||||||
| 245 | |||||||||||||||||||||||||||
| 246 | my $dt_this = new Biblio::ILL::ISO::DateTime("20030623","114400"); | ||||||||||||||||||||||||||
| 247 | my $dt_orig = new Biblio::ILL::ISO::DateTime("20030623","114015") | ||||||||||||||||||||||||||
| 248 | my $sdt = new Biblio::ILL::ISO::ServiceDateTime( $dt_this, $dt_orig); | ||||||||||||||||||||||||||
| 249 | $msg->set_service_date_time($sdt); | ||||||||||||||||||||||||||
| 250 | |||||||||||||||||||||||||||
| 251 | This is a mandatory field. | ||||||||||||||||||||||||||
| 252 | |||||||||||||||||||||||||||
| 253 | =cut | ||||||||||||||||||||||||||
| 254 | 1 | ▶ | sub set_service_date_time { | ||||||||||||||||||||||||
|
Subroutine
set_service_date_time: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||
| 255 | 1 | my $self = shift; | |||||||||||||||||||||||||
| 256 | 1 | my ($sdt) = shift; | |||||||||||||||||||||||||
| 257 | |||||||||||||||||||||||||||
| 258 | 1 | ▶ | croak "missing service-date-time" unless $sdt; | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 259 | 1 | ▶ | croak "invalid service-date-time" unless (ref($sdt) eq "Biblio::ILL::ISO::ServiceDateTime"); | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 260 | |||||||||||||||||||||||||||
| 261 | 1 | $self->{"service-date-time"} = $sdt; | |||||||||||||||||||||||||
| 262 | |||||||||||||||||||||||||||
| 263 | 1 | return; | |||||||||||||||||||||||||
| 264 | } | ||||||||||||||||||||||||||
| 265 | |||||||||||||||||||||||||||
| 266 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 267 | # | ||||||||||||||||||||||||||
| 268 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 269 | =head1 | ||||||||||||||||||||||||||
| 270 | |||||||||||||||||||||||||||
| 271 | =head2 set_requester_id($reqid) | ||||||||||||||||||||||||||
| 272 | |||||||||||||||||||||||||||
| 273 | Sets the message's requester-id. | ||||||||||||||||||||||||||
| 274 | Expects a valid Biblio::ILL::ISO::SystemId. | ||||||||||||||||||||||||||
| 275 | |||||||||||||||||||||||||||
| 276 | my $reqid = new Biblio::ILL::ISO::SystemId(); | ||||||||||||||||||||||||||
| 277 | $reqid->set_person_name("David A. Christensen"); | ||||||||||||||||||||||||||
| 278 | $msg->set_requester_id($reqid); | ||||||||||||||||||||||||||
| 279 | |||||||||||||||||||||||||||
| 280 | This is an optional field. | ||||||||||||||||||||||||||
| 281 | |||||||||||||||||||||||||||
| 282 | =cut | ||||||||||||||||||||||||||
| 283 | 1 | ▶ | sub set_requester_id { | ||||||||||||||||||||||||
|
Subroutine
set_requester_id: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||
| 284 | 1 | my $self = shift; | |||||||||||||||||||||||||
| 285 | 1 | my ($parm) = shift; | |||||||||||||||||||||||||
| 286 | |||||||||||||||||||||||||||
| 287 | 1 | ▶ | croak "missing requester-id" unless $parm; | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 288 | 1 | ▶ | croak "invalid requester-id" unless (ref($parm) eq "Biblio::ILL::ISO::SystemId"); | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 289 | |||||||||||||||||||||||||||
| 290 | 1 | $self->{"requester-id"} = $parm; | |||||||||||||||||||||||||
| 291 | |||||||||||||||||||||||||||
| 292 | 1 | return; | |||||||||||||||||||||||||
| 293 | } | ||||||||||||||||||||||||||
| 294 | |||||||||||||||||||||||||||
| 295 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 296 | # | ||||||||||||||||||||||||||
| 297 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 298 | =head1 | ||||||||||||||||||||||||||
| 299 | |||||||||||||||||||||||||||
| 300 | =head2 set_responder_id($resid) | ||||||||||||||||||||||||||
| 301 | |||||||||||||||||||||||||||
| 302 | Sets the message's responder-id. | ||||||||||||||||||||||||||
| 303 | Expects a valid Biblio::ILL::ISO::SystemId. | ||||||||||||||||||||||||||
| 304 | |||||||||||||||||||||||||||
| 305 | my $resid = new Biblio::ILL::ISO::SystemId("MWPL"); | ||||||||||||||||||||||||||
| 306 | $msg->set_responder_id($resid); | ||||||||||||||||||||||||||
| 307 | |||||||||||||||||||||||||||
| 308 | This is an optional field. | ||||||||||||||||||||||||||
| 309 | |||||||||||||||||||||||||||
| 310 | =cut | ||||||||||||||||||||||||||
| 311 | 1 | ▶ | sub set_responder_id { | ||||||||||||||||||||||||
|
Subroutine
set_responder_id: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||
| 312 | 1 | my $self = shift; | |||||||||||||||||||||||||
| 313 | 1 | my ($parm) = shift; | |||||||||||||||||||||||||
| 314 | |||||||||||||||||||||||||||
| 315 | 1 | ▶ | croak "missing responder-id" unless $parm; | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 316 | 1 | ▶ | croak "invalid responder-id" unless (ref($parm) eq "Biblio::ILL::ISO::SystemId"); | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 317 | |||||||||||||||||||||||||||
| 318 | 1 | $self->{"responder-id"} = $parm; | |||||||||||||||||||||||||
| 319 | |||||||||||||||||||||||||||
| 320 | 1 | return; | |||||||||||||||||||||||||
| 321 | } | ||||||||||||||||||||||||||
| 322 | |||||||||||||||||||||||||||
| 323 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 324 | # | ||||||||||||||||||||||||||
| 325 | #--------------------------------------------------------------- | ||||||||||||||||||||||||||
| 326 | =head1 | ||||||||||||||||||||||||||
| 327 | |||||||||||||||||||||||||||
| 328 | =head2 set_requester_note($note) | ||||||||||||||||||||||||||
| 329 | |||||||||||||||||||||||||||
| 330 | Sets the message's requester-note. | ||||||||||||||||||||||||||
| 331 | Expects a simple text string. | ||||||||||||||||||||||||||
| 332 | |||||||||||||||||||||||||||
| 333 | $msg->set_requester_note("This is a requester note"); | ||||||||||||||||||||||||||
| 334 | |||||||||||||||||||||||||||
| 335 | This is an optional field. | ||||||||||||||||||||||||||
| 336 | |||||||||||||||||||||||||||
| 337 | =cut | ||||||||||||||||||||||||||
| 338 | 1 | ▶ | sub set_requester_note { | ||||||||||||||||||||||||
|
Subroutine
set_requester_note: called CC=3 SCAR=11.2
Pod
documented
| |||||||||||||||||||||||||||
| 339 | 1 | my $self = shift; | |||||||||||||||||||||||||
| 340 | 1 | my ($parm) = shift; | |||||||||||||||||||||||||
| 341 | |||||||||||||||||||||||||||
| 342 | 1 | ▶ | croak "missing requester-note" unless $parm; | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 343 | 1 | ▶ | croak "invalid requester-note" unless (ref($parm) eq "Biblio::ILL::ISO::ILLString"); | ||||||||||||||||||||||||
|
Branch: 1 branch
| |||||||||||||||||||||||||||
| 344 | |||||||||||||||||||||||||||
| 345 | 1 | $self->{"requester-note"} = $parm; | |||||||||||||||||||||||||
| 346 | |||||||||||||||||||||||||||
| 347 | 1 | return; | |||||||||||||||||||||||||
| 348 | } | ||||||||||||||||||||||||||
| 349 | |||||||||||||||||||||||||||
| 350 | =head1 RELATED MODULES | ||||||||||||||||||||||||||
| 351 | |||||||||||||||||||||||||||
| 352 | Biblio::ILL::ISO::ISO | ||||||||||||||||||||||||||
| 353 | Biblio::ILL::ISO::Request | ||||||||||||||||||||||||||
| 354 | Biblio::ILL::ISO::ForwardNotification | ||||||||||||||||||||||||||
| 355 | Biblio::ILL::ISO::Shipped | ||||||||||||||||||||||||||
| 356 | Biblio::ILL::ISO::Answer | ||||||||||||||||||||||||||
| 357 | Biblio::ILL::ISO::ConditionalReply | ||||||||||||||||||||||||||
| 358 | Biblio::ILL::ISO::Cancel | ||||||||||||||||||||||||||
| 359 | Biblio::ILL::ISO::CancelReply | ||||||||||||||||||||||||||
| 360 | Biblio::ILL::ISO::Received | ||||||||||||||||||||||||||
| 361 | Biblio::ILL::ISO::Recall | ||||||||||||||||||||||||||
| 362 | Biblio::ILL::ISO::Returned | ||||||||||||||||||||||||||
| 363 | Biblio::ILL::ISO::CheckedIn | ||||||||||||||||||||||||||
| 364 | Biblio::ILL::ISO::Overdue | ||||||||||||||||||||||||||
| 365 | Biblio::ILL::ISO::Renew | ||||||||||||||||||||||||||
| 366 | Biblio::ILL::ISO::RenewAnswer | ||||||||||||||||||||||||||
| 367 | Biblio::ILL::ISO::Lost | ||||||||||||||||||||||||||
| 368 | Biblio::ILL::ISO::Damaged | ||||||||||||||||||||||||||
| 369 | Biblio::ILL::ISO::Message | ||||||||||||||||||||||||||
| 370 | Biblio::ILL::ISO::StatusQuery | ||||||||||||||||||||||||||
| 371 | Biblio::ILL::ISO::StatusOrErrorReport | ||||||||||||||||||||||||||
| 372 | Biblio::ILL::ISO::Expired | ||||||||||||||||||||||||||
| 373 | |||||||||||||||||||||||||||
| 374 | =cut | ||||||||||||||||||||||||||
| 375 | |||||||||||||||||||||||||||
| 376 | =head1 SEE ALSO | ||||||||||||||||||||||||||
| 377 | |||||||||||||||||||||||||||
| 378 | See the README for system design notes. | ||||||||||||||||||||||||||
| 379 | |||||||||||||||||||||||||||
| 380 | For more information on Interlibrary Loan standards (ISO 10160/10161), | ||||||||||||||||||||||||||
| 381 | a good place to start is: | ||||||||||||||||||||||||||
| 382 | |||||||||||||||||||||||||||
| 383 | http://www.nlc-bnc.ca/iso/ill/main.htm | ||||||||||||||||||||||||||
| 384 | |||||||||||||||||||||||||||
| 385 | =cut | ||||||||||||||||||||||||||
| 386 | |||||||||||||||||||||||||||
| 387 | =head1 AUTHOR | ||||||||||||||||||||||||||
| 388 | |||||||||||||||||||||||||||
| 389 | David Christensen, <DChristensenSPAMLESS@westman.wave.ca> | ||||||||||||||||||||||||||
| 390 | |||||||||||||||||||||||||||
| 391 | =cut | ||||||||||||||||||||||||||
| 392 | |||||||||||||||||||||||||||
| 393 | |||||||||||||||||||||||||||
| 394 | =head1 COPYRIGHT AND LICENSE | ||||||||||||||||||||||||||
| 395 | |||||||||||||||||||||||||||
| 396 | Copyright 2003 by David Christensen | ||||||||||||||||||||||||||
| 397 | |||||||||||||||||||||||||||
| 398 | This library is free software; you can redistribute it and/or modify it | ||||||||||||||||||||||||||
| 399 | under the same terms as Perl itself. | ||||||||||||||||||||||||||
| 400 | |||||||||||||||||||||||||||
| 401 | =cut | ||||||||||||||||||||||||||
| 402 | |||||||||||||||||||||||||||
| 403 | 2 | 1; | |||||||||||||||||||||||||