Package Pyblio :: Package External :: Module CrossRef :: Class DOIQuery
[show private | hide private]
[frames | no frames]

Type DOIQuery

object --+
         |
        DOIQuery


Query DOI numbers.

Convenience module that properly groups queries to CrossRef in order to increase throughput.
>>> cnx = DOIQuery(db, user=..., pwd=...)
>>> for info in to_resolve:
...     cnx.journalSearch(...).addCallback(got_results)
>>> cnx.finished()

The 'db' parameter is a database from which the queries and results will be composed. It must conform to the org.pybliographer/crossref/0.1 schema.

The actual queries take place when enough searches have been requested, or when the .finished() method is called.

For each query, a list of possible DOIs is returned. It can possibly be empty if the citation could not be resolved.

In case of a failure in the query protocol itself, the registered errback handlers are called for each query.
Method Summary
  __init__(self, db, user, pwd)
  finished(self)
  search(self, record)
  _batch_done(self)
  _make_batch(self)
  _prepare(self, q)
  _send(self)
    Inherited from object
  __delattr__(...)
x.__delattr__('name') <==> del x.name
  __getattribute__(...)
x.__getattribute__('name') <==> x.name
  __hash__(x)
x.__hash__() <==> hash(x)
  __new__(T, S, ...)
T.__new__(S, ...) -> a new object with type S, a subtype of T
  __reduce__(...)
helper for pickle
  __reduce_ex__(...)
helper for pickle
  __repr__(x)
x.__repr__() <==> repr(x)
  __setattr__(...)
x.__setattr__('name', value) <==> x.name = value
  __str__(x)
x.__str__() <==> str(x)

Class Variable Summary
str baseURL = 'http://doi.crossref.org/servlet/query'
int BATCH = 30                                                                    
Logger log = <logging.Logger instance at 0xa6a406cc>

Class Variable Details

baseURL

Type:
str
Value:
'http://doi.crossref.org/servlet/query'                                

BATCH

Type:
int
Value:
30                                                                    

log

Type:
Logger
Value:
<logging.Logger instance at 0xa6a406cc>                                

Generated by Epydoc 2.1 on Sun Sep 24 23:52:44 2006 http://epydoc.sf.net