• Main Page
  • Namespaces
  • Classes
  • Files
  • File List

/home/mark/model/software/ScrumPy/ScrumPy/Bioinf/PyoCyc/Regulation.py

00001 
00002 import Base, Tags
00003 
00004 DefaultFile="regulation.dat"
00005 
00006 NR = ["Not reported"]
00007 Compulsory = {
00008     Tags.Regul   : NR,
00009     Tags.RegEnt  : NR,
00010     Tags.RegMode : NR
00011 }
00012 # Every record will a regulator (ie the agent that acts to regulate something)
00013 # A regulated entity acted upon by the regulator
00014 # And a mode indicating + or - regulation
00015 
00016 
00017 class Record(Base.Record):
00018 
00019     ChildFields=[Tags.RegEnt]
00020     ParentFields=[Tags.Regul ]
00021 
00022     RecordClass = "Regulation"
00023 
00024     def Finished(self):
00025         for k,v in Compulsory.items():
00026             if not self.Attributes.has_key(k):
00027                 self.Attributes[k] = v
00028                 
00029 
00030 
00031 class DB(Base.DB):
00032     def __init__(self,path=Base.DefaultPath, file=DefaultFile, RecClass=Record, **kwargs):
00033         Base.DB.__init__(self,
00034                          path=path,
00035                          file=DefaultFile,
00036                          RecClass=Record,
00037                          **kwargs)
00038 

Generated on Tue Sep 4 2012 15:38:01 for ScrumPy by  doxygen 1.7.1