Package CHEM :: Package DB :: Module BaseDBPopulator :: Class BaseProcessor
[hide private]
[frames] | no frames]

Class BaseProcessor



Base class for all object processors. Given an object that maps to a table row, and perhaps its "parent" object, the processor should know how to modify the object for any curation / processing needed or how to insert the object into the database, etc.

Note that it is possible for an object to have multiple parents (e.g. source2chemicalmix is child of both source and chemicalmix). In that case, the parentObj parameter should be a list of parent objects listed in descending order of the schema hierarchy (e.g., source before chemicalmix).

Instance Methods [hide private]
 
__init__(self, conn, tableName)
Default constructor should specify the connection object to the database and name of the table it is meant to affect / relate to, but subclasses may override.
 
process(self, parentObj, currObj)