def _serversAlgsList(self): algs = [] for server in WpsServer.getServers(): action = next((a for a in self.actions if isinstance(a, WpsServerAction) and a.server.connectionName == server.connectionName), None) if action: algs += action.processalgs else: action = WpsServerAction(server) self.actions.append(action) dir = server.processDescriptionFolder(WpsAlgorithmProvider.WpsDescriptionFolder()) if os.path.exists(dir): #load from descriptions for fn in os.listdir(dir): process = ProcessDescription(server, fn) action.processalgs.append( WpsAlgorithm(process) ) algs += action.processalgs return algs
def _capabilitiesRequestFinished(self): self.processalgs = [] self.server.parseCapabilitiesXML() for process in self.server.processes: self.processalgs.append( WpsAlgorithm(process) ) Sextante.updateAlgsList()
def __init__(self, server): self.server = server self.processalgs = [] self.name = "Load processes from server" self.group = WpsAlgorithm.groupName(server)
def _bookmarkAlgsList(self): bookmarkAlgs = [] for process in ProcessDescription.getBookmarks(): bookmarkAlgs.append(WpsAlgorithm(process, True)) return bookmarkAlgs