Beispiel #1
0
 def __init__(self, filename):
     TreemapNode.__init__(self, filename)
     if filename.endswith(".csv"):
         self.createFromCSV(filename)
     elif filename.endswith(".xml"):
         self.createFromXML(filename)
     self.MergeSingleChildNodes("/")
Beispiel #2
0
 def makeTree(self):
     matchlcinfo = self.getMatchLcInfo()
     lcinfo = self.getLcInfo()        
     tmrootnode = TreemapNode("Duplication Map - ")
     for fname, lc in lcinfo.iteritems():
         namelist = fname.split(os.sep)
         node = tmrootnode.addChild(namelist)
         node.setProp(SIZE_PROP, lc)
         node.setProp(CLR_PROP, matchlcinfo.get(fname, 0))
         node.setProp('filename', fname)
     tmrootnode.MergeSingleChildNodes('/')
     return(tmrootnode)
Beispiel #3
0
 def __init__(self, filename, **kwargs):
     TreemapNode.__init__(self,filename)
     self.childseperator = kwargs.get('childseperator', '.')
     self.fieldseperator = kwargs.get('fieldseperator', ',')
     self.createFromCSV(filename)
     self.MergeSingleChildNodes(self.childseperator)