Exemplo n.º 1
0
 def __elaboratePlanNode(self, plan):
   """docstring for __elaboratePlanNode"""
   isIntended = False
   for agent in plan.agents:
     if agent.mentalState.intention == int_intendThat:
       isIntended = True
       break
   if plan.mentalState.intention == int_intendThat:
     isIntended = True
   if isIntended:
     if plan.complexity == "complex":
       # assume the system be cooperative
       plan.mentalState.intention = int_intendThat
       if plan.mentalState.execStatus == exec_noRecipe:
         recipe = self.kb.selectRecipe(plan.actionName)
         if recipe:
           plan.parseRecipe(recipe)
           plan.mentalState.execStatus = exec_hasRecipe
       missingParams = False
       if plan.mentalState.execStatus != exec_paramReady:
         for param in plan.params:
           self.__elaborateParamNode(param)
           if param.status == param_status_notReady or param.status == param_status_fail:
             missingParams = True
       if not missingParams:
         for subPlan in plan.subPlans:
           subPlan.mentalState.intention = int_intendThat
           self.__elaboratePlanNode(subPlan)
     else:
       plan.mentalState.intention = int_intendTo
       self.agenda.append(plan)
       BasicActions.execute(plan, self.mapCtrl)
Exemplo n.º 2
0
 def process(self, message):
     """process the incoming message, mocked up to test ArcPy atm"""
     response = {}
     if message["speech"]:
         if message["speech"]["operation"] == "buffer":
             input_file = "C:\Work\Data\World\CITIES.SHP"
             distance = 10
             output_file = "C:\Work\Data\World\CITIES_buffer.SHP"
             BasicActions.buffer(input_file, output_file, distance)
             response["response"] = {
                 "map": {"output_layers": [output_file,]}
             }
             
     return response
Exemplo n.º 3
0
 def __init__(self):
     self.ba = BasicActions.BasicActions()
     self.importMapping = {}
     return
Exemplo n.º 4
0
 def close_rodo(self, driver):
     BasicActions.wait_element(driver, self.locator.BUTTON_close_rodo)
     self.button_rodo = driver.find_element_by_xpath(
         self.locator.BUTTON_close_rodo)
     self.button_rodo.click()
Exemplo n.º 5
0
    def __init__(self, driver):
        self.locator = LoginPageLocators()
        find = driver.find_element_by_xpath

        BasicActions.wait_element(driver, self.locator.CONTAINER_login)
        self.button_login = find(self.locator.BUTTON_login)
Exemplo n.º 6
0
 def __init__(self):
     self.ua = UCMActions.UCMActions()
     self.ba = BasicActions.BasicActions()
     return