def addXmlModule(self, moduleName): """ Reads an xml-module with an unique id and adds it to the workspace... @type moduleName: str @param moduleName: the name of the module which should be defined in a moduleName.xml File in the searchPath of the moduleReader ('modules/' by default) @raise ModuleNotFoundError: if the given moduleName-module couldn't be found in the searchpath @raise ModuleDefinitionError: if the given moduleName-xml-module wasn't valid @rtype : model.module.Module @return: Returns added module. """ mr = XmlModuleReader() module = mr.getModule(moduleName) module.id = self._getNextId() self.addModule(module) return module
def _getXmlModuleList(self): """ Returns list of module names. """ mr = XmlModuleReader() return mr.getModulesObjects()