.\" Automatically generated by Pod::Man 4.14 (Pod::Simple 3.42) .\" .\" 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 .\" ======================================================================== .\" .IX Title "SRU::Response::SearchRetrieve 3pm" .TH SRU::Response::SearchRetrieve 3pm "2022-06-17" "perl v5.34.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" SRU::Response::SearchRetrieve \- A class for representing SRU searchRetrieve responses .SH "SYNOPSIS" .IX Header "SYNOPSIS" .Vb 2 \& ## create response from the request object \& my $response = SRU::Response::SearchRetrieve\->new( $request ); \& \& ## add records to the response \& foreach my $record ( @records ) { $response\->addRecord( $record ); } \& \& ## print out the response as XML \& print $response\->asXML(); .Ve .SH "DESCRIPTION" .IX Header "DESCRIPTION" SRU::Response::SearchRetrieve provides a framework for bundling up the response to a searchRetrieve request. You are responsible for generating the \s-1XML\s0 representation of the records, and the rest should be taken care of. .SH "METHODS" .IX Header "METHODS" .SS "\fBnew()\fP" .IX Subsection "new()" .SS "\fBnumberOfRecords()\fP" .IX Subsection "numberOfRecords()" Returns the number of results associated with the object. .SS "\fBaddRecord()\fP" .IX Subsection "addRecord()" Add a SRU::Response::Record object to the response. .PP .Vb 1 \& $response\->addRecord( $r ); .Ve .PP If you don't pass in the right sort of object you'll get back undef and \f(CW$SRU::Error\fR will be populated appropriately. .SS "\fBrecords()\fP" .IX Subsection "records()" Gets or sets all the records associated with the object. Be careful with this one :) You must pass in an array ref, and expect an array ref back. .SS "\fBresultSetId()\fP" .IX Subsection "resultSetId()" .SS "\fBresultSetIdleTime()\fP" .IX Subsection "resultSetIdleTime()" .SS "\fBnextRecordPosition()\fP" .IX Subsection "nextRecordPosition()" .SS "\fBdiagnostics()\fP" .IX Subsection "diagnostics()" .SS "\fBextraResponseData()\fP" .IX Subsection "extraResponseData()" .SS "\fBechoedSearchRetrieveRequest()\fP" .IX Subsection "echoedSearchRetrieveRequest()" .SS "\fBasXML()\fP" .IX Subsection "asXML()" .Vb 1 \& asXML(encoding=>"ISO\-8859\-1") .Ve .PP Returns the object serialized as \s-1XML. UTF\-8\s0 and \s-1UTF\-16\s0 are default encodings if you don't pass the encoding parameter. You can define different encoding in order to parse you \s-1XML\s0 document correctly. .SH "COPYRIGHT AND LICENSE" .IX Header "COPYRIGHT AND LICENSE" This software is copyright (c) 2013 by Ed Summers. .PP This is free software; you can redistribute it and/or modify it under the same terms as the Perl 5 programming language system itself.