.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.43) .\" .\" Standard preamble: .\" ======================================================================== .de Sp \" Vertical space (when we can't use .PP) .if t .sp .5v .if n .sp .. .de Vb \" Begin verbatim text .ft CW .nf .ne \\$1 .. .de Ve \" End verbatim text .ft R .fi .. .\" Set up some character translations and predefined strings. \*(-- will .\" give an unbreakable dash, \*(PI will give pi, \*(L" will give a left .\" double quote, and \*(R" will give a right double quote. \*(C+ will .\" give a nicer C++. Capital omega is used to do unbreakable dashes and .\" therefore won't be available. \*(C` and \*(C' expand to `' in nroff, .\" nothing in troff, for use with C<>. .tr \(*W- .ds C+ C\v'-.1v'\h'-1p'\s-2+\h'-1p'+\s0\v'.1v'\h'-1p' .ie n \{\ . ds -- \(*W- . ds PI pi . if (\n(.H=4u)&(1m=24u) .ds -- \(*W\h'-12u'\(*W\h'-12u'-\" diablo 10 pitch . if (\n(.H=4u)&(1m=20u) .ds -- \(*W\h'-12u'\(*W\h'-8u'-\" diablo 12 pitch . ds L" "" . ds R" "" . ds C` "" . ds C' "" 'br\} .el\{\ . ds -- \|\(em\| . ds PI \(*p . ds L" `` . ds R" '' . ds C` . ds C' 'br\} .\" .\" Escape single quotes in literal strings from groff's Unicode transform. .ie \n(.g .ds Aq \(aq .el .ds Aq ' .\" .\" If the F register is >0, we'll generate index entries on stderr for .\" titles (.TH), headers (.SH), subsections (.SS), items (.Ip), and index .\" entries marked with X<> in POD. Of course, you'll have to process the .\" output yourself in some meaningful fashion. .\" .\" Avoid warning from groff about undefined register 'F'. .de IX .. .nr rF 0 .if \n(.g .if rF .nr rF 1 .if (\n(rF:(\n(.g==0)) \{\ . if \nF \{\ . de IX . tm Index:\\$1\t\\n%\t"\\$2" .. . if !\nF==2 \{\ . nr % 0 . nr F 2 . \} . \} .\} .rr rF .\" .\" Accent mark definitions (@(#)ms.acc 1.5 88/02/08 SMI; from UCB 4.2). .\" Fear. Run. Save yourself. No user-serviceable parts. . \" fudge factors for nroff and troff .if n \{\ . ds #H 0 . ds #V .8m . ds #F .3m . ds #[ \f1 . ds #] \fP .\} .if t \{\ . ds #H ((1u-(\\\\n(.fu%2u))*.13m) . ds #V .6m . ds #F 0 . ds #[ \& . ds #] \& .\} . \" simple accents for nroff and troff .if n \{\ . ds ' \& . ds ` \& . ds ^ \& . ds , \& . ds ~ ~ . ds / .\} .if t \{\ . ds ' \\k:\h'-(\\n(.wu*8/10-\*(#H)'\'\h"|\\n:u" . ds ` \\k:\h'-(\\n(.wu*8/10-\*(#H)'\`\h'|\\n:u' . ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'^\h'|\\n:u' . ds , \\k:\h'-(\\n(.wu*8/10)',\h'|\\n:u' . ds ~ \\k:\h'-(\\n(.wu-\*(#H-.1m)'~\h'|\\n:u' . ds / \\k:\h'-(\\n(.wu*8/10-\*(#H)'\z\(sl\h'|\\n:u' .\} . \" troff and (daisy-wheel) nroff accents .ds : \\k:\h'-(\\n(.wu*8/10-\*(#H+.1m+\*(#F)'\v'-\*(#V'\z.\h'.2m+\*(#F'.\h'|\\n:u'\v'\*(#V' .ds 8 \h'\*(#H'\(*b\h'-\*(#H' .ds o \\k:\h'-(\\n(.wu+\w'\(de'u-\*(#H)/2u'\v'-.3n'\*(#[\z\(de\v'.3n'\h'|\\n:u'\*(#] .ds d- \h'\*(#H'\(pd\h'-\w'~'u'\v'-.25m'\f2\(hy\fP\v'.25m'\h'-\*(#H' .ds D- D\\k:\h'-\w'D'u'\v'-.11m'\z\(hy\v'.11m'\h'|\\n:u' .ds th \*(#[\v'.3m'\s+1I\s-1\v'-.3m'\h'-(\w'I'u*2/3)'\s-1o\s+1\*(#] .ds Th \*(#[\s+2I\s-2\h'-\w'I'u*3/5'\v'-.3m'o\v'.3m'\*(#] .ds ae a\h'-(\w'a'u*4/10)'e .ds Ae A\h'-(\w'A'u*4/10)'E . \" corrections for vroff .if v .ds ~ \\k:\h'-(\\n(.wu*9/10-\*(#H)'\s-2\u~\d\s+2\h'|\\n:u' .if v .ds ^ \\k:\h'-(\\n(.wu*10/11-\*(#H)'\v'-.4m'^\v'.4m'\h'|\\n:u' . \" for low resolution devices (crt and lpr) .if \n(.H>23 .if \n(.V>19 \ \{\ . ds : e . ds 8 ss . ds o a . ds d- d\h'-1'\(ga . ds D- D\h'-1'\(hy . ds th \o'bp' . ds Th \o'LP' . ds ae ae . ds Ae AE .\} .rm #[ #] #H #V #F C .\" ======================================================================== .\" .IX Title "Catmandu::AlephX 3pm" .TH Catmandu::AlephX 3pm "2023-02-02" "perl v5.36.0" "User Contributed Perl Documentation" .\" For nroff, turn off justification. Always turn off hyphenation; it makes .\" way too many mistakes in technical documents. .if n .ad l .nh .SH "NAME" .Vb 1 \& Catmandu::AlephX \- Low level client for Aleph X\-Services .Ve .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& my $aleph = Catmandu::AlephX\->new(url => "http://localhost/X"); \& my $item_data = $aleph\->item_data(base => "rug01",doc_number => "001484477"); \& \& \& #all public methods return a Catmandu::AlephX::Response \& # \*(Aqis_success\*(Aq means that the xml\-response did not contain the element \*(Aqerror\*(Aq \& # most methods return only one \*(Aqerror\*(Aq, but some (like update_doc) multiple. \& # other errors are thrown (xml parse error, no connection ..) \& \& \& if($item_data\->is_success){ \& \& say "valid response from aleph x server"; \& \& }else{ \& \& say "aleph x server returned error\-response: ".join("\en",@{$item_data\->errors}); \& \& } .Ve .SH "METHODS" .IX Header "METHODS" .SS "item-data" .IX Subsection "item-data" \fIdocumentation from AlephX\fR .IX Subsection "documentation from AlephX" .PP The service retrieves the document number from the user. For each of the document's items it retrieves: Item information (From Z30). Loan information (from Z36). An indication whether the request is on-hold .PP \fIexample\fR .IX Subsection "example" .PP .Vb 8 \& my $item_data = $aleph\->item_data(base => "rug01",doc_number => "001484477"); \& if($item_data\->is_success){ \& for my $item(@{ $item_data\->items() }){ \& print Dumper($item); \& }; \& }else{ \& print STDERR join("\en",@{$item_data\->errors})."\en"; \& } .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 1 \& This method is equivalent to \*(Aqop\*(Aq = \*(Aqitem\-data\*(Aq .Ve .SS "item-data-multi" .IX Subsection "item-data-multi" \fIdocumentation from AlephX\fR .IX Subsection "documentation from AlephX" .PP This service takes a document number from the user and for each of the document's items retrieves the following: Item information (from Z30) Loan information (from Z36) An indication of whether or not the item is on hold, has hold requests, or is expected (that is, has not arrived yet but is expected) It is similar to the item_data X\-service, except for the parameter \s-1START_POINT,\s0 which enables the retrieval of information for documents with more than 1000 items. .PP \fIexample\fR .IX Subsection "example" .PP .Vb 8 \& my $item_data_m = $aleph\->item_data_multi(base => "rug01",doc_number => "001484477",start_point => \*(Aq000000990\*(Aq); \& if($item_data_m\->is_success){ \& for my $item(@{ $item_data_m\->items() }){ \& print Dumper($item); \& }; \& }else{ \& print STDERR join("\en",@{$item_data_m\->errors})."\en"; \& } \& \& say "items retrieved, starting at ".$item_data_m\->start_point() if $item_data_m\->start_point(); .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 2 \& This method is equivalent to \*(Aqop\*(Aq = \*(Aqitem\-data\-multi\*(Aq \& The attribute \*(Aqstart_point\*(Aq only supplies a value, if the document has over 990 items .Ve .SS "read_item" .IX Subsection "read_item" \fIdocumentation from AlephX\fR .IX Subsection "documentation from AlephX" .PP .Vb 1 \& The service retrieves a requested item\*(Aqs record from a given ADM library in case such an item does exist in that ADM library. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 8 \& my $readitem = $aleph\->read_item(library=>"usm50",item_barcode=>293); \& if($readitem\->is_success){ \& for my $z30(@{ $readitem\->z30 }){ \& print Dumper($z30); \& } \& }else{ \& say STDERR join("\en",@{$readitem\->errors}); \& } .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 1 \& This method is equivalent to \*(Aqop\*(Aq = \*(Aqread\-item\*(Aq .Ve .SS "find" .IX Subsection "find" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 1 \& This service retrieves a set number and the number of records answering a search request inserted by the user. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 8 \& my $find = $aleph\->find(request => \*(Aqwrd=(art)\*(Aq,base=>\*(Aqrug01\*(Aq); \& if($find\->is_success){ \& say "set_number: ".$find\->set_number; \& say "no_records: ".$find\->no_records; \& say "no_entries: ".$find\->no_entries; \& }else{ \& say STDERR join("\en",@{$find\->errors}); \& } .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 1 \& This method is equivalent to \*(Aqop\*(Aq = \*(Aqfind\*(Aq .Ve .PP \fIarguments\fR .IX Subsection "arguments" .PP .Vb 2 \& request \- search request \& adjacent \- if \*(AqY\*(Aq then the documents should contain all the search words adjacent to each other, otherwise \*(AqN\*(Aq .Ve .SS "find_doc" .IX Subsection "find_doc" \fIdocumentation from AlephX\fR .IX Subsection "documentation from AlephX" .PP .Vb 1 \& This service retrieves the OAI XML format of an expanded document as given by the user. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 6 \& my $find = $aleph\->find_doc(base=>\*(Aqrug01\*(Aq,doc_num=>\*(Aq000000444\*(Aq,format=>\*(Aqmarc\*(Aq); \& if($find\->is_success){ \& say Dumper($find\->record); \& }else{ \& say STDERR join("\en",@{$find\->errors}); \& } .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 1 \& This method is equivalent to \*(Aqop\*(Aq = \*(Aqfind\-doc\*(Aq .Ve .SS "present" .IX Subsection "present" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 2 \& This service retrieves OAI XML format of expanded documents. \& You can view documents according to the locations within a specific set number. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 10 \& my $set_number = $aleph\->find(request => "wrd=(BIB.AFF)",base => "rug01")\->set_number; \& my $present = $aleph\->present( \& set_number => $set_number, \& set_entry => "000000001\-000000003" \& ); \& if($present\->is_success){ \& for my $record(@{ $present\->records() }){ \& say "doc_number: ".$record\->doc_number; \& say "\etmetadata: ".$record\->metadata\->type; \& } \& }else{ \& say STDERR join("\en",@{$present\->errors}); \& } .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 1 \& This method is equivalent to \*(Aqop\*(Aq = \*(Aqpresent\*(Aq .Ve .SS "ill_get_doc_short" .IX Subsection "ill_get_doc_short" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 1 \& The service retrieves the doc number and the XML of the short document (Z13). .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 8 \& my $result = $aleph\->ill_get_doc_short(doc_number => "000000001",library=>"usm01"); \& if($result\->is_success){ \& for my $z30(@{ $result\->z13 }){ \& print Dumper($z30); \& } \& }else{ \& say STDERR join("\en",@{$result\->errors}); \& } .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 1 \& This method is equivalent to \*(Aqop\*(Aq = \*(Aqill\-get\-doc\-short\*(Aq .Ve .SS "bor_auth" .IX Subsection "bor_auth" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 2 \& This service retrieves the Global record (Z303), Local record (Z305) and the Data record (Z304) for a given Patron if the given ID and verification code match. \& Otherwise, an error message is returned. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 6 \& my %args = ( \& library => $library, \& bor_id => $bor_id, \& verification => $verification \& ); \& my $auth = $aleph\->bor_auth(%args); \& \& if($auth\->is_success){ \& \& for my $type(qw(z303 z304 z305)){ \& say "$type:"; \& my $data = $auth\->$type(); \& for my $key(keys %$data){ \& say "\et$key : $data\->{$key}\->[0]"; \& } \& } \& \& }else{ \& say STDERR "error: ".join("\en",@{$auth\->errors}); \& exit 1; \& } .Ve .SS "bor_info" .IX Subsection "bor_info" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 1 \& This service retrieves all information related to a given Patron: Global and Local records, Loan records, Loaned items records, Short doc record, Cash record, and so on, if the ID and verification code provided match. \& \& If not, an error message is returned. Since the bor\-info X\-Service retrieves a very large amount of data, and not all of it may be relevant, you can choose to receive a part of the data, based on your needs. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 7 \& my %args = ( \& library => $library, \& bor_id => $bor_id, \& verification => $verification, \& loans => \*(AqP\*(Aq \& ); \& my $info = $aleph\->bor_info(%args); \& \& if($info\->is_success){ \& \& for my $type(qw(z303 z304 z305)){ \& say "$type:"; \& my $data = $info\->$type(); \& for my $key(keys %$data){ \& say "\et$key : $data\->{$key}\->[0]"; \& } \& } \& say "fine:"; \& for my $fine(@{ $info\->fine() }){ \& for my $type(qw(z13 z30 z31)){ \& say "\et$type:"; \& my $data = $fine\->{$type}\->[0]; \& for my $key(keys %$data){ \& say "\et\et$key : $data\->{$key}\->[0]"; \& } \& } \& } \& \& }else{ \& say STDERR "error: ".join("\en",@{$info\->errors}); \& exit 1; \& } .Ve .SS "ill_bor_info" .IX Subsection "ill_bor_info" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 1 \& This service retrieves Z303, Z304, Z305 and Z308 records for a given borrower ID / barcode. .Ve .PP \fIexample\fR .IX Subsection "example" .SS "circ_status" .IX Subsection "circ_status" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP The service retrieves the circulation status for each document number entered by the user. .PP .Vb 3 \& Item information (From Z30). \& Loan information (from Z36). \& Loan Status (Tab15), Due Date, Due Hour etc. .Ve .PP \fIexample\fR .IX Subsection "example" .SS "circ_stat_m" .IX Subsection "circ_stat_m" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP The service retrieves the circulation status for each document number entered by the user (suitable for documents with more than 1000 items). .PP .Vb 3 \& Item information (From Z30). \& Loan information (from Z36). \& Loan Status (Tab15), Due Date, Due Hour etc. .Ve .PP This service is similar to circ-status X\-service, except for the parameter \s-1START_POINT\s0 which enables to retrieve information for documents with more than 1000 items. .PP \fIexample\fR .IX Subsection "example" .SS "publish_avail" .IX Subsection "publish_avail" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP This service supplies the current availability status of a document. .PP The X\-Server does not change any data. .PP \fIexample\fR .IX Subsection "example" .PP my \f(CW$publish\fR = \f(CW$aleph\fR\->publish_avail(doc_num => '000196220,001313162,001484478,001484538,001317121,000000000',library=>'rug01'); if($publish\->is_success){ .PP .Vb 1 \& #format for $publish\->list() : [ [,], .. ] \& \& for my $item(@{ $publish\->list }){ \& \& say "id: $item\->[0]"; \& if($item\->[1]){ \& say "marc array:"; \& say Dumper($item\->[1]); \& }else{ \& say "nothing for $item\->[0]"; \& } \& \& say "\en\-\-\-"; \& } \&}else{ \& say STDERR join("\en",@{$publish\->errors}); \&} .Ve .PP \fIremarks\fR .IX Subsection "remarks" .PP .Vb 2 \& The parameter \*(Aqdoc_num\*(Aq supports multiple values, separated by \*(Aq,\*(Aq. \& Compare this to ill_get_doc, that does not support this. .Ve .SS "ill_get_doc" .IX Subsection "ill_get_doc" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP This service takes a document number and the library where the corresponding document is located and generates the \s-1XML\s0 of the requested document as it appears in the library given. .PP \fIexample\fR .IX Subsection "example" .PP my \f(CW$illgetdoc\fR = \f(CW$aleph\fR\->ill_get_doc(doc_number => '001317121',library=>'rug01'); if($illgetdoc\->is_success){ .PP .Vb 6 \& if($illgetdoc\->record){ \& say "data: ".to_json($illgetdoc\->record,{ pretty => 1 }); \& } \& else{ \& say "nothing found"; \& } .Ve .PP }else{ say \s-1STDERR\s0 join(\*(L"\en\*(R",@{$illgetdoc\->errors}); } .SS "renew" .IX Subsection "renew" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 2 \& This service renews the loan of a given item for a given patron. \& The X\-Service renews the loan only if it can be done. If, for example, there is a delinquency on the patron, the service does not renew the loan. .Ve .PP \fIexample\fR .IX Subsection "example" .SS "hold_req" .IX Subsection "hold_req" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP The service creates a hold-request record (Z37) for a given item after performing initial checks. .PP \fIexample\fR .IX Subsection "example" .SS "update_doc" .IX Subsection "update_doc" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 2 \& The service performs actions (Update / Insert / Delete) related to the update of a document. \& (The service uses pc_cat_c0203 which updates a document via the GUI). .Ve .PP \fInotes\fR .IX Subsection "notes" .PP .Vb 3 \& When executing an update request, most of the \*(Aqerrors\*(Aq will be warnings instead of real errors. \& This happens because AlephX performs an \*(AqUPDATE\-CHK\*(Aq before trying to execute an \*(AqUPDATE\*(Aq, \& and stores all warnings during that check in the xml attribute \*(Aqerror\*(Aq. \& \& Therefore the method \*(Aqis_success\*(Aq of the Catmandu::AlephX::Response is not very useful in this case. \& Search for the last \*(Aqerror\*(Aq, and check weather it contains \*(Aqupdated successfully\*(Aq. .Ve .PP \fIwarnings\fR .IX Subsection "warnings" .PP .Vb 2 \& An updates replaces the WHOLE record. So if you fail to supply \*(Aqxml_full_req\*(Aq (or indirectly \*(Aqmarc\*(Aq), \& the record will be deleted! \& \& To be sure, please use the full xml response of \*(Aqfind\-doc\*(Aq, change the fields inside \*(Aqoai_marc\*(Aq, and \& supply this xml as xml_full_req. \& \& Every updates adds a CAT\-field to the record. Your updates can be recognized by CAT$$a == "WWW\-X". \& When updating a record you need to include the old CAT fields (default), otherwise these fields will be deleted \& (and all history will be lost). \& \& "Unlike other X\-Services, the parameters can include XML up to 20,000 characters in length" \& \& When you update often (and therefore add a lot of CAT fields), this can lead to the error \*(AqServer closed connection\*(Aq. \& This is due to the maximum of characters allowed in an XML request. \& \& Possible solution: \& 1. retrieve record by \*(Aqfind_doc\*(Aq \& 2. get marc record: \& \& my $marc = $res\->record\->metadata\->data \& \& 3. filter out your CAT fields ($a == "WWW\-X") to shorten the XML: \& \& $marc = [grep { !( $_\->[0] eq "CAT" && $_\->[4] eq "WWW\-X" ) } @$marc]; \& \& 4. update $marc \& 5. send \& \& $aleph\->update_doc(library => \*(Aqusm01\*(Aq,doc_action => \*(AqUPDATE\*(Aq,doc_number => $doc_number,marc => $marc); \& \& => your xml will now contain one CAT field with subfield \*(Aqa\*(Aq equal to \*(AqWWW\-X\*(Aq. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 1 \& my $aleph = Catmandu::AlephX\->new(url => "http://localhost/X"); \& \& my $doc_number = \*(Aq000000444\*(Aq; \& my $find_doc = $aleph\->find_doc( \& doc_num => $doc_number, \& base => "usm01" \& ); \& my $marc = $find_doc\->record\->metadata\->data; \& my $content_ref = $find_doc\->content_ref; \& \& my %args = ( \& \*(Aqlibrary\*(Aq => \*(Aqusm01\*(Aq, \& \*(Aqdoc_action\*(Aq => \*(AqUPDATE\*(Aq, \& \*(Aqdoc_number\*(Aq => $doc_number, \& xml_full_req => $$content_ref \& ); \& my $u = $aleph\->update_doc(%args); \& if($u\->is_success){ \& say "all ok"; \& }else{ \& say STDERR join("\en",@{$u\->errors}); \& } .Ve .PP \fIspecial support for catmandu marc records\fR .IX Subsection "special support for catmandu marc records" .PP .Vb 3 \& when you supply the argument \*(Aqmarc\*(Aq, an xml document will be created for you, \& and stored in the argument \*(Aqxml_full_req\*(Aq. \*(Aqmarc\*(Aq must be an array of arrays. \& When you already supplied \*(Aqxml_full_req\*(Aq, it will be overwritten. .Ve .SS "update_item" .IX Subsection "update_item" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP .Vb 1 \& The service updates an existing item in the required ADM library after performing all relevant initial checks prior to that action. .Ve .PP \fInotes\fR .IX Subsection "notes" .PP .Vb 1 \& AlephX stores not only errors in \*(Aqerrors\*(Aq, but also the success message. \& \& Therefore the method \*(Aqis_success\*(Aq of the Catmandu::AlephX::Response is not very useful in this case. \& Search for the last \*(Aqerror\*(Aq, and check weather it contains \*(Aqupdated successfully\*(Aq. \& \& The result of \*(Aqread_item\*(Aq often contains translations, instead of the real values. But these \& translation cannot be used when updating items. \& \& e.g. z30\-item\-status contains \*(AqRegular loan\*(Aq instead of \*(Aq001\*(Aq. .Ve .PP \fIexample\fR .IX Subsection "example" .PP .Vb 2 \& my $alephx = Catmandu::AlephX\->new(url => "http://localhost/X"); \& my $item_barcode = \*(Aq32044044980076\*(Aq; \& \& my %args = ( \& \*(Aqlibrary\*(Aq => \*(Aqusm50\*(Aq, \& \*(Aqitem_barcode\*(Aq => $item_barcode, \& ); \& \& my $z30 = $alephx\->read_item(%args)\->z30(); \& \& my $xml = XMLout($z30,,RootName=>"z30",NoAttr => 1); \& $xml = "\en".$xml; \& \& $args{xml_full_req} = $xml; \& \& my $u = alephx\->update_item(%args); \& if($u\->is_success){ \& say "all ok"; \& }else{ \& say STDERR join("\en",@{$u\->errors}); \& } .Ve .SS "create_item" .IX Subsection "create_item" \fIdocumentation from Aleph X\fR .IX Subsection "documentation from Aleph X" .PP The service creates a new item in the required \s-1ADM\s0 library after performing all relevant initial checks prior to that action. .PP The item can be created for a bib record when no \s-1ADM\s0 record is linked to it yet, or it can be created to an \s-1ADM\s0 record with existing items. .PP \fInotes\fR .IX Subsection "notes" .PP \fIexample\fR .IX Subsection "example" .PP .Vb 2 \& my $alephx = Catmandu::AlephX\->new(url => "http://localhost/X"); \& my $item_barcode = \*(Aq32044044980076\*(Aq; \& \& my %args = ( \& \*(Aqadm_library\*(Aq => \*(Aqrug50\*(Aq, \& \*(Aqbib_library\*(Aq => \*(Aqrug01\*(Aq, \& \*(Aqbib_doc_number\*(Aq => \*(Aq231843137\*(Aq, \& ); \& \& my $xml = < \& \& 15 \& 10 \& 32044003924339 \& WID \& BOOK \& 01 \& 19980804 \& 20020708 \& EXLIBRIS \& 20080607 \& 1631 \& CONV \& 011 \& L \& GEN \& 7 \& Heb 2106.385.5 \& 7 selected \& \& \& \& v.1 \& \& \& \& \& \& \& 00000000 \& \& \& 00000000 \& 000000 \& 000000015 \& 00000 \& 00000 \& \& \& 00000 \& \& \& \& \& \& XX \& 1 \& 000000046 \& No \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& \& 000000000 \& \& 007 \& 20080408 \& \&EOF \& \& $args{xml_full_req} = $xml; \& \& my $u = alephx\->create_item(%args); \& if($u\->is_success){ \& say "all ok"; \& }else{ \& say STDERR join("\en",@{$u\->errors}); \& } .Ve .SH "AUTHOR" .IX Header "AUTHOR" Nicolas Franck, \f(CW\*(C`\*(C'\fR .SH "LICENSE AND COPYRIGHT" .IX Header "LICENSE AND COPYRIGHT" This program is free software; you can redistribute it and/or modify it under the terms of either: the \s-1GNU\s0 General Public License as published by the Free Software Foundation; or the Artistic License. .PP See for more information.