Mike Taylor > Net-Z3950-0.51 > Net::Z3950::Record

Download:
Net-Z3950-0.51.tar.gz

Dependencies

Annotate this POD

CPAN RT

New  1
Open  1
View/Report Bugs
Source  

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, Net::Z3950::Record::USMARC and Net::Z3950::Record::XML. 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 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, Net::Z3950::Record::UNIMARC

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/

Net::Z3950::Record::XML

Represents a a record using XML (Extended Markup Language), as defined by the W3C. Rendering is not currently defined: this module treats the record as a single opaque lump of data, to be parsed by other software.

For more information about XML, see http://www.w3.org/XML/

Net::Z3950::Record::HTML

Represents a a record using HTML (HyperText Markup Language), as defined by the W3C. Rendering is not currently defined: this module treats the record as a single opaque lump of data, to be handled by other software.

For more information about HTML, see http://www.w3.org/MarkUp/

Net::Z3950::Record::OPAC

Represents a a record using the OPAC (Online Public Access Catalogue) record syntax, as defined in Appendix 5 (REC) of the Z39.50 standard at http://lcweb.loc.gov/z3950/agency/asn1.html#RecordSyntax-opac

Net::Z3950::Record::MAB

Represents a record using the MAB record syntax (Maschinelles Austauschformat fuer Bibliotheken, ftp://ftp.ddb.de/pub/mab/); an interchange format defined by Die Deutsche Bibliothek (German National Library).

### others, not yet supported

AUTHOR ^

Mike Taylor <mike@indexdata.com>

First version Sunday 4th May 2000.

syntax highlighting: