|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunsw.cse.mica.agent.DefaultAgent
unsw.cse.framescript.MicaBot
public class MicaBot
A Mica agent that acts as a bridge between Mica and FrameScript.
Field Summary | |
---|---|
static java.lang.String |
AlternativeUtterancesSlot
|
static int |
DefaultPort
|
static java.lang.String |
DefaultServer
|
static java.lang.String |
InputTextMob
|
static java.lang.String |
mobPrefix
|
static java.lang.String |
OutputTextMob
|
static java.lang.String |
ParamDomain
|
static java.lang.String |
ParamFile
|
static java.lang.String |
ParamInit
|
static java.lang.String |
ParamTopic
|
static boolean |
TransientOutputs
|
static java.lang.String |
UtteranceSlot
|
Fields inherited from class unsw.cse.mica.agent.DefaultAgent |
---|
at |
Fields inherited from interface unsw.cse.framescript.Conversation |
---|
AlternateRequest, NoMoreAlternatesResponse |
Constructor Summary | |
---|---|
MicaBot()
|
Method Summary | |
---|---|
static MicaBot |
check_micabot(Atom functionName,
Instance currentObject,
Term[] arg,
int n,
StackFrame frame)
Convenience routine to check micabot arguments for built-in functions. |
static Instance |
check_mob(Atom functionName,
Instance currentObject,
Term[] arg,
int n,
StackFrame frame)
Convenience routine to check mob arguments for built-in functions. |
Atom |
connect(java.lang.String agentName)
|
void |
deleteMob(java.lang.String mobName)
|
static MicaBot |
getCurrentMicaBot(Atom functor)
|
static MobInstance |
getMobInstance(unsw.cse.mica.data.Mob m,
MicaBot bot)
|
static MobGeneric |
getMobType(java.lang.String mobType,
MicaBot bot,
unsw.cse.mica.data.TypeManager tm)
|
static java.lang.String |
getMobType(Term t)
|
Pattern |
getResponse(Pattern input)
Asks the MicaBot to process a given pattern. |
java.lang.String |
getResponse(java.lang.String input)
Asks the MicaBot to get a response to an input string. |
java.lang.String |
getResponse(java.lang.String input,
java.lang.String[] alternatives)
Asks the MicaBot to get a response to an input string. |
void |
handleDeletedMob(unsw.cse.mica.data.Mob m)
|
void |
handleNewMob(unsw.cse.mica.data.Mob m)
|
void |
handleReplacedMob(unsw.cse.mica.data.Mob oldMob,
unsw.cse.mica.data.Mob newMob)
|
void |
handleTypeManagerChanged()
|
static void |
init(MicaBot bot)
|
void |
init(unsw.cse.mica.util.MicaProperties args)
|
static void |
main(java.lang.String[] args)
|
void |
processInput(Pattern input)
Tells the conversation to treat a pattern as user input. |
void |
processInput(java.lang.String input)
Tells the conversation to treat a string as user input. |
void |
processInput(java.lang.String input,
java.lang.String[] alternatives)
Tells the conversation to treat a string as user input. |
FSList |
queryMica(java.lang.String query)
|
Instance |
readMob(java.lang.String mobName)
|
void |
register(java.lang.String mobType)
|
void |
replaceMob(Instance mob)
|
static void |
reportException(java.lang.Exception e,
MicaBot bot)
|
void |
sendResponse(java.lang.String response)
|
void |
setNoMoreAltsSuffix(Term suffix)
Sets a string that will be returned with the NOMORESALTS response. |
void |
setTransport(unsw.cse.mica.agent.AgentTransport at)
Ensures that MicaBot uses a synchronised agent transport. |
void |
terminate()
|
void |
unregister(java.lang.String mobType)
|
Instance |
writeAndWaitForReply(Instance mob,
long timeout)
|
Atom |
writeMob(Instance mob)
|
Methods inherited from class unsw.cse.mica.agent.DefaultAgent |
---|
getTransport |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final java.lang.String DefaultServer
public static final int DefaultPort
public static final java.lang.String mobPrefix
public static java.lang.String InputTextMob
public static java.lang.String OutputTextMob
public static java.lang.String UtteranceSlot
public static java.lang.String AlternativeUtterancesSlot
public static java.lang.String ParamInit
public static java.lang.String ParamFile
public static java.lang.String ParamDomain
public static java.lang.String ParamTopic
public static boolean TransientOutputs
Constructor Detail |
---|
public MicaBot()
Method Detail |
---|
public void setTransport(unsw.cse.mica.agent.AgentTransport at)
setTransport
in interface unsw.cse.mica.agent.Agent
setTransport
in class unsw.cse.mica.agent.DefaultAgent
public void init(unsw.cse.mica.util.MicaProperties args) throws unsw.cse.mica.MicaException
init
in interface unsw.cse.mica.agent.Agent
init
in class unsw.cse.mica.agent.DefaultAgent
unsw.cse.mica.MicaException
public void handleNewMob(unsw.cse.mica.data.Mob m)
handleNewMob
in interface unsw.cse.mica.agent.MessageHandler
handleNewMob
in class unsw.cse.mica.agent.DefaultAgent
public void handleReplacedMob(unsw.cse.mica.data.Mob oldMob, unsw.cse.mica.data.Mob newMob)
handleReplacedMob
in interface unsw.cse.mica.agent.MessageHandler
handleReplacedMob
in class unsw.cse.mica.agent.DefaultAgent
public void handleDeletedMob(unsw.cse.mica.data.Mob m)
handleDeletedMob
in interface unsw.cse.mica.agent.MessageHandler
handleDeletedMob
in class unsw.cse.mica.agent.DefaultAgent
public void handleTypeManagerChanged()
handleTypeManagerChanged
in interface unsw.cse.mica.agent.MessageHandler
handleTypeManagerChanged
in class unsw.cse.mica.agent.DefaultAgent
public void terminate()
terminate
in interface unsw.cse.mica.agent.Agent
terminate
in class unsw.cse.mica.agent.DefaultAgent
public void processInput(java.lang.String input) throws FSException
Conversation
processInput
in interface Conversation
FSException
public void processInput(java.lang.String input, java.lang.String[] alternatives) throws FSException
Conversation
processInput
in interface Conversation
FSException
public void processInput(Pattern input) throws FSException
Conversation
processInput
in interface Conversation
FSException
public void setNoMoreAltsSuffix(Term suffix)
Conversation
setNoMoreAltsSuffix
in interface Conversation
public void sendResponse(java.lang.String response) throws unsw.cse.mica.MicaException
unsw.cse.mica.MicaException
public java.lang.String getResponse(java.lang.String input) throws FSException
input
- the text to be processed
FSException
public java.lang.String getResponse(java.lang.String input, java.lang.String[] alternatives) throws FSException
input
- the text to be processedalternatives
- alternative recognition results
FSException
public Pattern getResponse(Pattern input) throws FSException
input
- the pattern to be processed
FSException
public static MobInstance getMobInstance(unsw.cse.mica.data.Mob m, MicaBot bot)
public static MobGeneric getMobType(java.lang.String mobType, MicaBot bot, unsw.cse.mica.data.TypeManager tm)
public static void reportException(java.lang.Exception e, MicaBot bot)
public static java.lang.String getMobType(Term t)
public Atom connect(java.lang.String agentName) throws FSMicaException
FSMicaException
public void register(java.lang.String mobType) throws FSMicaException
FSMicaException
public void unregister(java.lang.String mobType) throws FSMicaException
FSMicaException
public Atom writeMob(Instance mob) throws FSMicaException
FSMicaException
public void replaceMob(Instance mob) throws FSMicaException
FSMicaException
public Instance readMob(java.lang.String mobName) throws FSMicaException
FSMicaException
public void deleteMob(java.lang.String mobName) throws FSMicaException
FSMicaException
public FSList queryMica(java.lang.String query) throws FSMicaException
FSMicaException
public Instance writeAndWaitForReply(Instance mob, long timeout) throws FSMicaException
FSMicaException
public static void main(java.lang.String[] args) throws FSException
FSException
public static MicaBot check_micabot(Atom functionName, Instance currentObject, Term[] arg, int n, StackFrame frame) throws FSException
functionName
- name of the function calling the routinecurrentObject
- the current enclosing instance framearg
- the arguements to the functionn
- the index of the argument being checkedframe
- a StackFrame containing contextual information
FRSerror
- if the argument isn't a micabot
FSException
public static Instance check_mob(Atom functionName, Instance currentObject, Term[] arg, int n, StackFrame frame) throws FSException
functionName
- name of the function calling the routinecurrentObject
- the current enclosing instance framearg
- the arguements to the functionn
- the index of the argument being checkedframe
- a StackFrame containing contextual information
FRSerror
- if the argument isn't a mob
FSException
public static MicaBot getCurrentMicaBot(Atom functor) throws FSException
FSException
public static void init(MicaBot bot) throws FSException
FSException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |