Package FAtiMA.ReactiveComponent
Class EmotionalReactionTreeNode
java.lang.Object
FAtiMA.ReactiveComponent.EmotionalReactionTreeNode
- All Implemented Interfaces:
FAtiMA.Core.IIntegrityTester,IReactionNode,Serializable,Cloneable
Represents a Node in the emotional reaction tree, that is matched
against incoming events. This class implements a very fast mechanism
of finding emotional reaction rules that match with a given event.
- Author:
- Joao Dias
- See Also:
-
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionCreates a new EmotionalReactionTreeNodeEmotionalReactionTreeNode(String type, String value) Deprecated.do not use this constructor anymore, use EmotionalReactionTreeNode(String type) instead -
Method Summary
Modifier and TypeMethodDescriptionvoidAdds an Emotional Reaction rule bellow this nodevoidCheckIntegrity(FAtiMA.Core.IntegrityValidator val) Checks the integrity of all emotional Reaction rules stored bellow the node, testing if one of them refers a SpeechAct not defined.clone()getReaction(FAtiMA.Core.sensorEffector.Event e) MatchEvent(FAtiMA.Core.sensorEffector.Event e) Tries to match a given event with all Reaction rules stored under this node.toString()Converts the node to a String
-
Field Details
-
actionNode
-
subjectNode
-
targetNode
-
param1Node
-
param2Node
-
param3Node
-
-
Constructor Details
-
EmotionalReactionTreeNode
Deprecated.do not use this constructor anymore, use EmotionalReactionTreeNode(String type) insteadCreates a new EmotionalReactionTreeNode- Parameters:
type- - the type of the node: action,subject,target,nullvalue- - not used for anything
-
EmotionalReactionTreeNode
Creates a new EmotionalReactionTreeNode- Parameters:
type- - the type of the node: action,subject,target,null
-
-
Method Details
-
AddEmotionalReaction
Adds an Emotional Reaction rule bellow this node- Parameters:
er- - the Reaction to add
-
CheckIntegrity
public void CheckIntegrity(FAtiMA.Core.IntegrityValidator val) throws FAtiMA.Core.exceptions.UnknownSpeechActException Checks the integrity of all emotional Reaction rules stored bellow the node, testing if one of them refers a SpeechAct not defined. In that case, it throws an exception- Specified by:
CheckIntegrityin interfaceFAtiMA.Core.IIntegrityTester- Throws:
FAtiMA.Core.exceptions.UnknownSpeechActException
-
MatchEvent
Tries to match a given event with all Reaction rules stored under this node.- Parameters:
e- - the event o match againts the reaction rules- Returns:
- the appropriate reaction rule if a match is found, null otherwise
-
toString
Converts the node to a String -
clone
- Specified by:
clonein interfaceIReactionNode- Overrides:
clonein classObject
-
getReaction
- Specified by:
getReactionin interfaceIReactionNode
-