GSP
Quick Navigator

Search Site

Unix VPS
A - Starter
B - Basic
C - Preferred
D - Commercial
MPS - Dedicated
Previous VPSs
* Sign Up! *

Support
Contact Us
Online Help
Handbooks
Domain Status
Man Pages

FAQ
Virtual Servers
Pricing
Billing
Technical

Network
Facilities
Connectivity
Topology Map

Miscellaneous
Server Agreement
Year 2038
Credits
 

USA Flag

 

 

Man Pages


Manual Reference Pages  -  NET::OAI::BASE (3)

.ds Aq ’

NAME

Net::OAI::Base - A base class for all OAI-PMH responses

CONTENTS

SYNOPSIS



    if ( $object->resumptionToken() ) {
        ...
    }

    if ( $object->error() ) {
        print "verb action resulted in error code:" . $object->errorCode() .
            " message:" . $object->errorString() . "\n";
    }

    print "xml response can be found here: " . $obj->file() . "\n";
    print "the response xml is " . $obj->xml();



DESCRIPTION

Net::OAI::Base is the base class for all the OAI-PMH verb responses. It is used to provide similar methods to all the responses. The following classes inherit from Net::OAI::Base.
o Net::OAI::GetRecord
o Net::OAI::Identify
o Net::OAI::ListIdentifiers
o Net::OAI::ListMetadataFormats
o Net::OAI::ListRecords
o Net::OAI::ListSets

METHODS

responseDate()

Returns the content of the mandatory responseDate element.

request()

In scalar context this method returns just the base URL (text content) of the mandatory OAI request element.



 $requestText = $OAI->request();



In array context a hash with the delivered attributes of the OAI request element (mirroring the valid query parameters) is appended.



  my ($requestURI, %requestParams) = $OAI->request();
  print STDERR "Repository URL: ", $requestURI, "\n";
  print STDERR "verb was: ", $requestParams->{verb}, "\n";



Returns undef / () if the OAI response could not be parsed or did not contain the mandatory response element.

is_error()

Returns -1 for HTTP or XML errors, 1 for OAI error respones, 0 for no errors;

errorCode()

Returns an error code associated with the verb result.

errorString()

Returns an error message associated with an error code.

HTTPRetryAfter()

Returns the HTTP Retry-After header in case of HTTP level errors.

HTTPError()

Returns the HTTP::Response object in case of HTTP level errors.

resumptionToken()

Returns a Net::OAI::ResumptionToken object associated with the call. If there was no resumption token returned in the response then you will be returned undef.

xml()

Returns a reference to a scalar that contains the raw content of the response as XML.

file()

Returns the path to a file that contains the complete XML response.

TODO

SEE ALSO

AUTHORS

Ed Summers <ehs@pobox.com>
Search for    or go to Top of page |  Section 3 |  Main Index


perl v5.20.3 NET::OAI::BASE (3) 2016-01-24

Powered by GSP Visit the GSP FreeBSD Man Page Interface.
Output converted with manServer 1.07.