예제 #1
0
    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
예제 #2
0
    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
예제 #3
0
    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
예제 #4
0
    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
예제 #5
0
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
예제 #6
0
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