Did I find the right examples for you? yes no      Crawl my project      Python Jobs

All Samples(68)  |  Call(68)  |  Derive(0)  |  Import(0)

src/s/p/SPADE-2.2.1/spade/Agent.py   SPADE(Download)
        MessageReceiver.MessageReceiver.__init__(self)
        self._agent_log = []  # Log system
        self._aid = AID.aid(name=agentjid, addresses=["xmpp://" + agentjid])
        self._jabber = None
        self._serverplatform = serverplatform
        #search by name
        aad = AmsAgentDescription()
        aad.setAID(AID.aid(name=query))
        res = self.searchAgent(aad)
        if res:
            agentslist += res
 
        #search by address
        aad = AmsAgentDescription()
        aad.setAID(AID.aid(addresses=[query]))
 
        #search by owner
        s = Service(owner=AID.aid(name=query))
        search = self.searchService(s)
 
    def WUIController_sent(self, receivers=[], performative=None, sender=None, reply_with=None, reply_by=None, reply_to=None, in_reply_to=None, encoding=None, language=None, ontology=None, protocol=None, conversation_id=None, content=""):
        msg = ACLMessage.ACLMessage()
        if isinstance(receivers, types.StringType):
            a = AID.aid(name=receivers, addresses=["xmpp://" + receivers])
            msg.addReceiver(a)

src/s/p/spade-HEAD/spade/Agent.py   spade(Download)
        MessageReceiver.MessageReceiver.__init__(self)
        self._agent_log = []  # Log system
        self._aid = AID.aid(name=agentjid, addresses=["xmpp://" + agentjid])
        self._jabber = None
        self._serverplatform = serverplatform
        #search by name
        aad = AmsAgentDescription()
        aad.setAID(AID.aid(name=query))
        res = self.searchAgent(aad)
        if res:
            agentslist += res
 
        #search by address
        aad = AmsAgentDescription()
        aad.setAID(AID.aid(addresses=[query]))
 
        #search by owner
        s = Service(owner=AID.aid(name=query))
        search = self.searchService(s)
 
    def WUIController_sent(self, receivers=[], performative=None, sender=None, reply_with=None, reply_by=None, reply_to=None, in_reply_to=None, encoding=None, language=None, ontology=None, protocol=None, conversation_id=None, content=""):
        msg = ACLMessage.ACLMessage()
        if isinstance(receivers, types.StringType):
            a = AID.aid(name=receivers, addresses=["xmpp://" + receivers])
            msg.addReceiver(a)

src/s/p/SPADE-2.2.1/spade/AMS.py   SPADE(Download)
                    reply_address = frm
                    if typ == "subscribe":
                        frm = AID.aid(name=str(frm), addresses=["xmpp://" + str(frm)])
                        aad = AmsAgentDescription()
                        aad.name = frm
        if co:
            try:
                self.name = AID.aid(co=co["fipa:aid"])
            except:
                self.name = None
        if content is not None:
            if "name" in content:
                self.name = AID.aid()
                self.name.loadSL0(content.name)
 

src/s/p/spade-HEAD/spade/AMS.py   spade(Download)
                    reply_address = frm
                    if typ == "subscribe":
                        frm = AID.aid(name=str(frm), addresses=["xmpp://" + str(frm)])
                        aad = AmsAgentDescription()
                        aad.name = frm
        if co:
            try:
                self.name = AID.aid(co=co["fipa:aid"])
            except:
                self.name = None
        if content is not None:
            if "name" in content:
                self.name = AID.aid()
                self.name.loadSL0(content.name)
 

src/s/p/SPADE-2.2.1/spade/DF.py   SPADE(Download)
                co = co["df-agent-description"]
            if co.name:
                self.name = AID.aid(co=co.name)
            if co.services:
                self.services = []
    def getName(self):
        if self.name is not None:
            return self.name.getName()
        else:
            return AID.aid()
    def loadSL0(self, content):
        if content is not None:
            if "name" in content:
                self.name = AID.aid()
                self.name.loadSL0(content.name)
                name = co.service.name
            if co.service.owner:
                owner = AID.aid(co=co.service.owner)
            if co.service.ontology:
                ontology = co.service.ontology

src/s/p/spade-HEAD/spade/DF.py   spade(Download)
                co = co["df-agent-description"]
            if co.name:
                self.name = AID.aid(co=co.name)
            if co.services:
                self.services = []
    def getName(self):
        if self.name is not None:
            return self.name.getName()
        else:
            return AID.aid()
    def loadSL0(self, content):
        if content is not None:
            if "name" in content:
                self.name = AID.aid()
                self.name.loadSL0(content.name)
                name = co.service.name
            if co.service.owner:
                owner = AID.aid(co=co.service.owner)
            if co.service.ontology:
                ontology = co.service.ontology

src/s/p/SPADE-2.2.1/spade/ACLParser.py   SPADE(Download)
        """
 
        aid = AID.aid()
 
        if 'name' in _aid:
 
        if self.SENDER_TAG == localName.lower():
            self.aid = AID.aid()
            self.aidTag = self.SENDER_TAG
 
        if self.RECEIVER_TAG == localName.lower():
            self.aid = AID.aid()
 
        if self.REPLY_TO_TAG == localName.lower():
            self.aid = AID.aid()
            self.aidTag = self.REPLY_TO_TAG
 
        if self.RESOLVERS_TAG == localName.lower():
            self.aid = AID.aid()

src/s/p/spade-HEAD/spade/ACLParser.py   spade(Download)
        """
 
        aid = AID.aid()
 
        if 'name' in _aid:
 
        if self.SENDER_TAG == localName.lower():
            self.aid = AID.aid()
            self.aidTag = self.SENDER_TAG
 
        if self.RECEIVER_TAG == localName.lower():
            self.aid = AID.aid()
 
        if self.REPLY_TO_TAG == localName.lower():
            self.aid = AID.aid()
            self.aidTag = self.REPLY_TO_TAG
 
        if self.RESOLVERS_TAG == localName.lower():
            self.aid = AID.aid()

src/s/p/SPADE-2.2.1/spade/Envelope.py   SPADE(Download)
        if "to" in r:
            for a in r["to"]:
                aid = AID.aid()
                aid.setName(a["name"])
                for addr in a["addresses"]:
                    aid.addAddress(addr)
                self.addTo(aid)
        if "from" in r:
            aid = AID.aid()
        if "intended-receiver" in r:
            for ag in r["intended-receiver"]:
                aid = AID.aid()
                aid.setName(ag["name"])
                for addr in ag["addresses"]:

src/s/p/SPADE-2.2.1/spade/Behaviour.py   SPADE(Download)
 
        if "sender" in p:
            s = AID.aid()
            s.loadJSON(p["sender"])
            self.setSender(s)
 
        if "receivers" in p:
            for i in p["receivers"]:
                s = AID.aid()
        if "reply-to" in p:
            for i in p["reply-to"]:
                s = AID.aid()
            s.loadJSON(i)
            self.addReplyTo(s)

  1 | 2  Next