def fromXML(self, node):
        if node.nodeName != 'workflow':
            return None
        
        annotations = []
        others = []
        
        modules = {}
        connections = {}
        abstractionRefs = {}
        
        # read attributes
        id = self.convertFromStr(self.getAttribute(node, 'id'), 'long')
        name = self.convertFromStr(self.getAttribute(node, 'name'), 'str')
        
        
        # read children
        for child in list(node.childNodes):
            if child.nodeName == 'module':
                module = self.getDao('module').fromXML(child)
                modules[module.db_id] = module
            elif child.nodeName == 'connection':
                connection = self.getDao('connection').fromXML(child)
                connections[connection.db_id] = connection
            elif child.nodeName == 'annotation':
                annotation = self.getDao('annotation').fromXML(child)
                annotations.append(annotation)
            elif child.nodeName == 'other':
                other = self.getDao('other').fromXML(child)
                others.append(other)
            elif child.nodeName == 'abstractionRef':
                abstractionRef = self.getDao('abstractionRef').fromXML(child)
                abstractionRefs[abstractionRef.db_id] = abstractionRef
            elif child.nodeType == child.TEXT_NODE and child.nodeValue.strip() == '':
                # node.removeChild(child)
                pass
            elif child.nodeType != child.TEXT_NODE:
                print '*** ERROR *** nodeName = %s' % child.nodeName
        
        obj = DBWorkflow(id=id,
                         name=name,
                         modules=modules,
                         connections=connections,
                         annotations=annotations,
                         others=others,
                         abstractionRefs=abstractionRefs)
        obj.is_dirty = False
        return obj
dataset/ETHPy150Open VisTrails/VisTrails/vistrails/db/versions/v0_6_0/persistence/xml/auto_gen.py/DBWorkflowXMLDAOBase.fromXML/original