NAME

Net::Z3950::Record - base class for records retrieved from a Z39.50 server

SYNOPSIS

$rs = $conn->resultSet();
$rec = $rs->record($n);
print $rec->render();

DESCRIPTION

A Record object represents a record retrieved from a Z39.50 server. In fact, the Net::Z3950::Record class itself is never instantiated: instead, the Net::Z3950 module creates objects of subclasses such as Net::Z3950::Record::SUTRS, Net::Z3950::Record::GRS1 and Net::Z3950::Record::USMARC. This class defines a common interface which must be supported by all such subclasses.

METHODS

nfields()

$count = $rec->nfields();

Returns the number of fields in the record $rec.

render()

print $rec->render();

Returns a human-readable string representing the content of the record $rec in a form appropriate to its specific type.

rawdata()

$raw = $rec->rawdata();

Returns the raw form of the data in the record, which will in general be different in form for different record syntaxes.

SUBCLASSES

Net::Z3950::Record::SUTRS

Represents a a record using the Simple Unstructured Text Record Syntax (SUTRS) - a simple flat string containing the record's data in a form suitable for presentation to humans (so that the same thing is returned by the render() and rawdata() methods return the same thing.)

See Appendix REC.2 (Simple Unstructured Text Record Syntax) of the Z39.50 Standard for more information.

Net::Z3950::Record::GRS1

Represents a record using Generic Record Syntax 1 (GRS1) - a list of tagged fields where each tag is made up of a tag type and tag value, and each field may be of any type, including numeric, string, and recursively contained sub-record. Fields may also be annotated with metadata, variant information etc.

See Appendix REC.5 (Generic Record Syntax 1) of the Z39.50 Standard for more information.

Net::Z3950::Record::USMARC, Net::Z3950::Record::UKMARC, Net::Z3950::Record::NORMARC, Net::Z3950::Record::LIBRISMARC, Net::Z3950::Record::DANMARC

Represents a record using the appropriate MARC (MAchine Readable Catalogue) format - binary formats used extensively in libraries.

For further information on the MARC formats, see the Library of Congress Network Development and MARC Standards Office web page at http://lcweb.loc.gov/marc/ and the MARC module in Ed Summers's directory at CPAN, http://cpan.valueclick.com/authors/id/E/ES/ESUMMERS/

### others, not yet supported

AUTHOR

Mike Taylor <mike@tecc.co.uk>

First version Sunday 4th May 2000.