def makeGrpTreeNone(self): """Make tree with no grouping.""" tree = TMNode((_("Dataset"), _("Size"), _("Type"), _("File")), None) for name, ds in self.doc.data.iteritems(): child = DatasetNode(self.doc, name, ("name", "size", "type", "linkfile"), None) # add if not filtered for filtering if not self.datasetFilterOut(ds, child): tree.insertChildSorted(child) return tree
def makeGrpTreeNone(self): """Make tree with no grouping.""" tree = TMNode( ("Dataset", "Size", "Type", "File"), None ) for name, ds in self.doc.data.iteritems(): child = DatasetNode( self.doc, name, ("name", "size", "type", "linkfile"), None ) # add if not filtered for filtering if not self.datasetFilterOut(ds, child): tree.insertChildSorted(child) return tree
def __init__(self, doc, dsname, cols, parent): ds = doc.data[dsname] data = [] assert cols[0] == "name" for c in cols: if c == "name": data.append( dsname ) elif c == "size": data.append( ds.userSize() ) elif c == "type": data.append( ds.dstype ) elif c == "linkfile": data.append( os.path.basename(datasetLinkFile(ds)) ) TMNode.__init__(self, tuple(data), parent) self.doc = doc self.cols = cols
def __init__(self, doc, dsname, cols, parent): ds = doc.data[dsname] data = [] assert cols[0] == "name" for c in cols: if c == "name": data.append(dsname) elif c == "size": data.append(ds.userSize()) elif c == "type": data.append(ds.dstype) elif c == "linkfile": data.append(os.path.basename(datasetLinkFile(ds))) TMNode.__init__(self, tuple(data), parent) self.doc = doc self.cols = cols
def treeFromList(nodelist, rootdata): """Construct a tree from a list of nodes.""" tree = TMNode( rootdata, None ) for node in nodelist: tree.insertChildSorted(node) return tree
def treeFromList(nodelist, rootdata): """Construct a tree from a list of nodes.""" tree = TMNode(rootdata, None) for node in nodelist: tree.insertChildSorted(node) return tree