Package gavo :: Package protocols :: Module oaiclient :: Class OAIQuery
[frames] | no frames]

Class OAIQuery

source code

object --+
         |
        OAIQuery

A container for queries to OAI interfaces.

Construct it with the oai endpoint and the OAI verb, plus some optional query attributes. If you want to retain or access the raw responses of the server, pass a contentCallback function -- it will be called with a byte string containing the payload of the server response if it was parsed successfully. Error responses cannot be obtained in this way.

The OAIQuery is constructed with OAI-PMH parameters (verb, startDate, endDate, set, metadataPrefix; see the OAI-PMH docs for what they mean, only verb is mandatory). In addition, you can pass granularity, which is the granularity

Instance Methods
 
__init__(self, registry, verb, startDate=None, endDate=None, set=None, metadataPrefix='ivo_vor', identifier=None, contentCallback=None, granularity=None)
x.__init__(...) initializes x; see help(type(x)) for signature
source code
 
getKWs(self, **moreArgs)
returns a dictionary containing query keywords for OAI interfaces from what's specified on the command line.
source code
 
doHTTP(self, **moreArgs)
returns the result of parsing the current query plus moreArgs to the current registry.
source code
 
talkOAI(self, parserClass)
processes an OAI dialogue for verb using the IdParser-derived parserClass.
source code

Inherited from object: __delattr__, __format__, __getattribute__, __hash__, __new__, __reduce__, __reduce_ex__, __repr__, __setattr__, __sizeof__, __str__, __subclasshook__

Class Variables
  startDate = None
hash(x)
  endDate = None
hash(x)
  set = None
hash(x)
  registry = None
hash(x)
  metadataPrefix = None
hash(x)
  maxRecords = None
hash(x)
  timeout = 100
Properties

Inherited from object: __class__

Method Details

__init__(self, registry, verb, startDate=None, endDate=None, set=None, metadataPrefix='ivo_vor', identifier=None, contentCallback=None, granularity=None)
(Constructor)

source code 

x.__init__(...) initializes x; see help(type(x)) for signature

Overrides: object.__init__
(inherited documentation)

doHTTP(self, **moreArgs)

source code 

returns the result of parsing the current query plus moreArgs to the current registry.

The result is returned as a string.