Package FAtiMA.Core.sensorEffector
Class SpeechAct
java.lang.Object
FAtiMA.Core.sensorEffector.RemoteAction
FAtiMA.Core.sensorEffector.SpeechAct
- All Implemented Interfaces:
Serializable
Represents a SpeechAct
- Author:
- Joao Dias
- See Also:
-
Field Summary
FieldsModifier and TypeFieldDescriptionstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final Stringstatic final StringFields inherited from class FAtiMA.Core.sensorEffector.RemoteAction
_actionType, _cameraAngle, _cameraShot, _cameraTarget, _emotion, _intensity, _parameters, _subject, _target -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new empty SpeechActSpeechAct(ValuedAction speechAction, AgentModel am) Creates a new SpeechAct from a ValuedAction -
Method Summary
Modifier and TypeMethodDescriptionvoidAddContextVariable(String name, String value) Adds a context variable (name-value pair) to the SpeechActGets the SpeechAct's meaning (ex: insult, greeting, etc)Gets the SpeechAct's receiverGets the SpeechAct's senderGets the specific utterance of the SpeechAct (ex: "Hi John")static booleanisSpeechAct(String action) Checks if the received action corresponds to a SpeechAct or not (it may be a Question, a Reply, a Suppport, etc)static RemoteActionParseFromXml(String xml) Parses a SpeechAct from a XML formatted StringvoidsetAMSummary(String summary) voidsetMeaning(String string) Sets the SpeechAct's meaning (ex: insult, greeting)voidsetReceiver(String string) Sets the SpeechAct's receivervoidSets the SpeechAct's sendervoidsetUtterance(String string) Sets the SpeechAct specific utterance (ex: "what a wimp", "hi Paul")toEvent(short actionEventType) Converts the SpeechAct to an EventConverts the SpeechAct to XML that is ready to be sent to the LanguageEngine for the generation of a specific utterancetoXML()Converts the SpeechAct to XML (the inverse of the Parse method)Methods inherited from class FAtiMA.Core.sensorEffector.RemoteAction
AddParameter, cameraToXMl, getActionType, GetParameters, getSubject, getTarget, setActionType, setCameraAngle, setCameraShot, setCameraTarget, setIntensity, setSubject, setTarget
-
Field Details
-
Question
- See Also:
-
Reply
- See Also:
-
Reinforce
- See Also:
-
Speech
- See Also:
-
Confrontation
- See Also:
-
UserSpeech
- See Also:
-
CopingSpeech
- See Also:
-
-
Constructor Details
-
SpeechAct
public SpeechAct()Creates a new empty SpeechAct -
SpeechAct
Creates a new SpeechAct from a ValuedAction
-
-
Method Details
-
ParseFromXml
Parses a SpeechAct from a XML formatted String- Parameters:
xml- - the XML string to be parsed- Returns:
- the parsed SpeechAct
-
isSpeechAct
Checks if the received action corresponds to a SpeechAct or not (it may be a Question, a Reply, a Suppport, etc)- Parameters:
action- - the action to check- Returns:
- true if the action actually corresponds to a SpeechAct, false otherwise
-
AddContextVariable
Adds a context variable (name-value pair) to the SpeechAct- Parameters:
name- - the name of the context variablevalue- - the value of the context variable
-
getContextVariables
-
getReceiver
Gets the SpeechAct's receiver- Returns:
- the receiver
-
getSender
Gets the SpeechAct's sender- Returns:
- the sender of the SpeechAct
-
getMeaning
Gets the SpeechAct's meaning (ex: insult, greeting, etc)- Returns:
- the meaning of the SpeechAct
-
getUtterance
Gets the specific utterance of the SpeechAct (ex: "Hi John")- Returns:
- the SpeechAct's utterance
-
setReceiver
Sets the SpeechAct's receiver- Parameters:
string- - the receiver to store in the SpeechAct
-
setSender
Sets the SpeechAct's sender- Parameters:
string- - the sender to store in the SpeechAct
-
setMeaning
Sets the SpeechAct's meaning (ex: insult, greeting)- Parameters:
string- - the type to store in the SpeechAct
-
setUtterance
Sets the SpeechAct specific utterance (ex: "what a wimp", "hi Paul")- Parameters:
string- - the utterance to store in the SpeechAct
-
getAMSummary
-
setAMSummary
-
toEvent
Converts the SpeechAct to an Event- Overrides:
toEventin classRemoteAction- Returns:
- the converted Event
-
toXML
Converts the SpeechAct to XML (the inverse of the Parse method)- Overrides:
toXMLin classRemoteAction- Returns:
- a XML string that contains the SpeechAct information
-
toLanguageEngine
Converts the SpeechAct to XML that is ready to be sent to the LanguageEngine for the generation of a specific utterance- Returns:
- a XML string that contains the SpeechAct information
-
toPlainStringMessage
- Overrides:
toPlainStringMessagein classRemoteAction- Returns:
- string
-