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
00013
00014
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