Thomas Berger > OAI-Harvester > Net::OAI::Record

Download:
OAI-Harvester-1.20.tar.gz

Dependencies

Annotate this POD

Website

CPAN RT

Open  0
View/Report Bugs
Source  

NAME ^

Net::OAI::Record - An OAI-PMH record.

SYNOPSIS ^

DESCRIPTION ^

Net::OAI::Record objects represent the OAI records harvested by GetRecord() or ListRecords() calls (an OAI record consists of the mandatory header, an optional metadata container element and zero or more about containers) and also the reduced (header only) ones delivered by ListIdentifiers().

The objects are created within the processing performed by the corresponding Net::OAI::GetRecord, Net:OAI::ListRecords, and Net::OAI::ListIdentifiers filter classes. They all sit on top of (slightly misnomed) SAX filters of class Net::OAI::Record::Header. Please consult the documentation of that class if you are interested in writing custom handlers.

METHODS ^

new()

probably don't want to instantiate this yourself

header()

Returns the Net::OAI::Header object for the OAI header element that accompanied the record.

metadata() =head2 recorddata()

Returns the object (SAX Handler!) used or created by the metadataHandler rsp. recordHandler filter class at the moment the OAI::Record was created, namely right after parsing encounters the closing OAI record tag.

In the case of ListRecords requests, a clone of the OAI::record is immediately created (by means of Storable) thus on processing by the next() method these metadata() rsp. recorddata() methods will return clones of the original handler object taken at the moment described above.

Will be undef when no corresponding option was provided.

Access to the actual data if desired has to be provided by the Handler class. Note that in the case of deleted records the record element of the OAI-PMH response must not contain a metadata container and therefore the metadataHandler for that record will never have been active at all.

AUTHOR ^

Ed Summers <ehs@pobox.com>

syntax highlighting: