def __init__(self, conn, suite): table = ujoin(suite, 'templates') TraitRelation.__init__(self, conn, suite, table, name='TraitTemplate') self.traitparent = TraitParent(conn, suite) self.template = Template() self.template_path = None self.textfiles = TextFileManager(self.conn) self._jtable = '%s as s join textfiles as t ' % table self._jtable += 'on s.templatefile = t.fileid'
def set_trait(self, trait): TraitRelation.set_trait(self, trait) self.traitparent.set_trait(trait)
def __init__(self, conn, suite): table = ujoin(suite, 'trait', 'package') TraitRelation.__init__(self, conn, suite, table, name='TraitPackage') self.cmd.set_fields(['package', 'action']) self.traitparent = TraitParent(conn, suite)
def __init__(self, conn, suite): table = ujoin(suite, 'scripts') TraitRelation.__init__(self, conn, suite, table, name='TraitScript') self.textfiles = TextFileManager(self.conn) self._jtable = '%s as s join textfiles as t ' % table self._jtable += 'on s.scriptfile = t.fileid'
def __init__(self, conn, suite): table = ujoin(suite, 'trait', 'parent') TraitRelation.__init__(self, conn, suite, table, name='TraitParent') self.graph = kjGraph([(r.trait, r.parent) for r in self.cmd.select()])
def get_row(self, template): return TraitRelation.get_row(self, 'template', template)