X-Git-Url: http://jsfdemo.indexdata.com/?a=blobdiff_plain;f=perl%2Flib%2FIDZebra%2FRetrievalRecord.pm;h=294fae5887fae78e3c60958eda669257789d7765;hb=01d68c3e68001168758afc0c4ffd101a7c5cf149;hp=e1429326d0acbfeeaf4afe791fb6bf0d80ef9eb6;hpb=5981b70de0f2d78207ec598384a4b7915c012da9;p=idzebra-moved-to-github.git diff --git a/perl/lib/IDZebra/RetrievalRecord.pm b/perl/lib/IDZebra/RetrievalRecord.pm index e142932..294fae5 100644 --- a/perl/lib/IDZebra/RetrievalRecord.pm +++ b/perl/lib/IDZebra/RetrievalRecord.pm @@ -1,4 +1,4 @@ -# $Id: RetrievalRecord.pm,v 1.1 2003-03-03 00:45:37 pop Exp $ +# $Id: RetrievalRecord.pm,v 1.3 2003-03-05 13:55:22 pop Exp $ # # Zebra perl API header # ============================================================================= @@ -9,13 +9,26 @@ use warnings; BEGIN { use IDZebra; - our $VERSION = do { my @r = (q$Revision: 1.1 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; + our $VERSION = do { my @r = (q$Revision: 1.3 $ =~ /\d+/g); sprintf "%d."."%02d" x $#r, @r }; } +1; +# ============================================================================= +# THIS IS Just the documentation, and some access methods... +# The real code is autogenerated by SWIG in IDZebra.pm # ============================================================================= -# THIS IS Just the documentation, the real code is autogenerated by SWIG in -# IDZebra.pm + +sub errCode { $_[0]->{errCode} } +sub errString { $_[0]->{errString} } +sub position { $_[0]->{position} } +sub base { $_[0]->{base} } +sub sysno { $_[0]->{sysno} } +sub score { $_[0]->{score} } +sub format { $_[0]->{format} } +sub buf { $_[0]->{buf} } + # ============================================================================= + __END__ =head1 NAME @@ -24,10 +37,64 @@ IDZebra::RetrievalRecord - Structure representing a retrieval record =head1 SYNOPSIS + foreach my $rec ($rs1->records()) { + unless ($rec->errCode) { + printf ("Pos:%d, Base: %s, sysno: %d, score %d format: %s\n%s\n\n", + $rec->position, + $rec->base, + $rec->sysno, + $rec->score, + $rec->format, + $rec->buf + ); + } + } + + =head1 DESCRIPTION +The object represents a Zebra retrieval record, as a "member" of a resultset. It's a read-only object. Beeing a tied reference, access to undefined members ("properties") may hurt. + =head1 PROPERTIES +The following properties are available trough both methods ($rec->errCode) and hash members ($rec->{errCode}): + +=over 4 + +=item B + +The error code received when fetching this record. 0, if everything went OK. + +=item B + +Supplemental error information if applicable. + +=item B + +Position of record in the resultset. + +=item B + +The database the record belongs to + +=item B + +System number (unique identifier provided by Zebra for each record) + +=item B + +The score of the resulting record + +=item B + +Record format, (Z39.50) + +=item B + +The record data itself + +=back + =head1 COPYRIGHT Fill in @@ -38,8 +105,7 @@ Peter Popovics, pop@technomat.hu =head1 SEE ALSO -IDZebra, IDZebra::Session, IDZebra::Resultset, Zebra documentation +Zebra documentation, IDZebra::Session, IDZebra::ResultSet manpages. =cut -1;