Package Pyblio :: Module Adapter :: Class OneToOneAdapter
[show private | hide private]
[frames | no frames]

Type OneToOneAdapter

object --+        
         |        
  Database --+    
             |    
       Adapter --+
                 |
                OneToOneAdapter

Known Subclasses:
PubMed2BibTeX

This adapter assumes a one-to-one mapping between the source and the target databases.
Method Summary
  __getitem__(self, key)
Get a record by key.
  __setitem__(self, key, record)
Update a record.
  add(self, record)
  has_key(self, key)
Check for the existence of a key.
  source2target(self, record)
Translates a record from the source db to the target db
  target2source(self, record)
Translates a record from the target db to the source db
    Inherited from Adapter
  __init__(self, base)
  save(self)
  xmlread(self)
    Inherited from Database
  collate(self, rs, field)
Partition the result set in a list of sets for every value taken by the specified field
  query(self, query, permanent)
  validate(self, entry)
Check an entry for conformance against the Schema.
  xmlwrite(self, fd)
Output a database in XML format
    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)

Property Summary
    Inherited from Database
  entries
  rs
  txo

Class Variable Summary
    Inherited from Adapter
NoneType header = None                                                                  
    Inherited from Database
  entries = Pyblio.Store.Database.entries
  rs: a ResultSetStore instance, containing all the result sets defined on this database.
  txo = Pyblio.Store.Database.txo

Method Details

__getitem__(self, key)
(Indexing operator)

Get a record by key.
Parameters:
key - the key of the requested record
           (type=a Key)
Overrides:
Pyblio.Store.Database.__getitem__ (inherited documentation)

__setitem__(self, key, record)
(Index assignment operator)

Update a record.

Updates a record with a new value.
Parameters:
key - the record's key
           (type=a Key)
record - the new value of the record
           (type=a Record)
Overrides:
Pyblio.Store.Database.__setitem__ (inherited documentation)

has_key(self, key)

Check for the existence of a key.
Parameters:
key - the key to check for
           (type=a Key)
Overrides:
Pyblio.Store.Database.has_key (inherited documentation)

source2target(self, record)

Translates a record from the source db to the target db

target2source(self, record)

Translates a record from the target db to the source db

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