|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectunsw.cse.framescript.Term
unsw.cse.framescript.Domain
public class Domain
A domain is responsible for knowing the current state of a conversation. The domain knows what the topics are and what the current context is. When a user inputs an utterance it is given to a domain which is then responsible for determining the order of topics/contexts in which to try to find an appropriate response.
Method Summary | |
---|---|
boolean |
equals(Term t)
Compares two Terms for equality. |
Term |
eval(Instance currentObject,
StackFrame stackframe)
Evaluates a Term. |
Conversation |
getActiveConversation()
Gets the current active conversation. |
Pattern |
getResponse(Pattern input)
Gets the response from the domain for a given user input. |
void |
gotoScript(Script script)
Changes the current context to the given script. |
void |
gotoTopic(Script topic)
Changes the topic to the given script and changes the current context. |
void |
registerTopic(Script topic)
Registers a script as a topic for the domain. |
void |
setActiveConversation(Conversation conversation)
Sets a conversation as being active with the domain. |
java.lang.String |
toString()
Turns the Term into a string. |
Methods inherited from class unsw.cse.framescript.Term |
---|
assign, asString, fullMatch, indents, mapVars, match |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Method Detail |
---|
public Term eval(Instance currentObject, StackFrame stackframe) throws FSException
Term
eval
in class Term
currentObject
- the enclosing instance frame for the code being evaluatedstackframe
- StackFrame that holds the values for any variables
FSException
- if any errors occur in performing the evaluationpublic boolean equals(Term t)
Term
equals
in class Term
t
- Term to be compared to
public java.lang.String toString()
Term
toString
in class Term
public Pattern getResponse(Pattern input) throws FSException
input
- the input to respond to
FSException
- if there is any error responding to the inputpublic void registerTopic(Script topic)
topic
- the script registering as a topicpublic void gotoScript(Script script) throws FSException
script
- the script that is to become the current context
FSException
- any errors running daemonspublic void gotoTopic(Script topic) throws FSException
topic
- the script to become the current topic and current context
FSException
- any errors in any daemonspublic Conversation getActiveConversation()
public void setActiveConversation(Conversation conversation)
conversation
- the conversation that is being activated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |