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
Esempio n. 2
0
 def _capabilitiesRequestFinished(self):
     self.processalgs = []
     self.server.parseCapabilitiesXML()
     for process in self.server.processes:
         self.processalgs.append( WpsAlgorithm(process) )
     Sextante.updateAlgsList()
Esempio n. 3
0
 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