Package FAtiMA.emotionalIntelligence
Class EmotionalEpisodeCondition
- java.lang.Object
-
- FAtiMA.Core.conditions.Condition
-
- FAtiMA.emotionalIntelligence.EmotionalEpisodeCondition
-
- All Implemented Interfaces:
FAtiMA.Core.wellFormedNames.IGroundable,java.io.Serializable,java.lang.Cloneable
public class EmotionalEpisodeCondition extends FAtiMA.Core.conditions.Condition- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description EmotionalEpisodeCondition(FAtiMA.Core.wellFormedNames.Symbol episode, FAtiMA.Core.wellFormedNames.Symbol emotion, float value)EmotionalEpisodeCondition(EmotionalEpisodeCondition eec)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description booleanCheckCondition(FAtiMA.Core.AgentModel am)Checks if thejava.lang.Objectclone()Clones this EmotionCondition, returning an equal copy.java.util.ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet>GetValidBindings(FAtiMA.Core.AgentModel am)This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the agent's EmotionalStateFAtiMA.Core.wellFormedNames.NameGetValue()protected java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution>GetValueBindings(FAtiMA.Core.AgentModel am)booleanisGrounded()voidMakeGround(FAtiMA.Core.wellFormedNames.Substitution subst)Applies a set of substitutions to the object, grounding it.voidMakeGround(java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)Applies a set of substitutions to the object, grounding it.static EmotionalEpisodeConditionParseEmotionalEpisodeCondition(org.xml.sax.Attributes attributes)Parses a EmotionCondition given a XML attribute listvoidReplaceUnboundVariables(int variableID)Replaces all unbound variables in the object by applying a numeric identifier to each one.
-
-
-
Constructor Detail
-
EmotionalEpisodeCondition
public EmotionalEpisodeCondition(FAtiMA.Core.wellFormedNames.Symbol episode, FAtiMA.Core.wellFormedNames.Symbol emotion, float value)
-
EmotionalEpisodeCondition
public EmotionalEpisodeCondition(EmotionalEpisodeCondition eec)
-
-
Method Detail
-
ParseEmotionalEpisodeCondition
public static EmotionalEpisodeCondition ParseEmotionalEpisodeCondition(org.xml.sax.Attributes attributes) throws FAtiMA.Core.exceptions.InvalidEmotionTypeException
Parses a EmotionCondition given a XML attribute list- Parameters:
attributes- - A list of XMl attributes- Returns:
- - the EmotionCondition Parsed
- Throws:
FAtiMA.Core.exceptions.InvalidEmotionTypeException
-
CheckCondition
public boolean CheckCondition(FAtiMA.Core.AgentModel am)
Checks if the- Specified by:
CheckConditionin classFAtiMA.Core.conditions.Condition- Returns:
- status
-
clone
public java.lang.Object clone()
Clones this EmotionCondition, returning an equal copy. If this clone is changed afterwards, the original object remains the same.- Specified by:
clonein classFAtiMA.Core.conditions.Condition- Returns:
- The EmotionCondition's copy.
-
GetValidBindings
public java.util.ArrayList<FAtiMA.Core.wellFormedNames.SubstitutionSet> GetValidBindings(FAtiMA.Core.AgentModel am)
This method finds all the possible sets of Substitutions that applied to the condition will make it valid (true) according to the agent's EmotionalState- Overrides:
GetValidBindingsin classFAtiMA.Core.conditions.Condition- Returns:
- A list with all SubstitutionsSets that make the condition valid
- See Also:
EmotionalState
-
GetValue
public FAtiMA.Core.wellFormedNames.Name GetValue()
- Specified by:
GetValuein classFAtiMA.Core.conditions.Condition
-
GetValueBindings
protected java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> GetValueBindings(FAtiMA.Core.AgentModel am)
- Specified by:
GetValueBindingsin classFAtiMA.Core.conditions.Condition
-
isGrounded
public boolean isGrounded()
- Specified by:
isGroundedin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
isGroundedin classFAtiMA.Core.conditions.Condition
-
MakeGround
public void MakeGround(java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)
Applies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.- Specified by:
MakeGroundin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
MakeGroundin classFAtiMA.Core.conditions.Condition- Parameters:
bindings- - A list of substitutions of the type "[Variable]/value"- See Also:
Substitution
-
MakeGround
public void MakeGround(FAtiMA.Core.wellFormedNames.Substitution subst)
Applies a set of substitutions to the object, grounding it. Example: Applying the substitution "[X]/John" in the name "Weak([X])" returns "Weak(John)". Attention, this method modifies the original object.- Specified by:
MakeGroundin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
MakeGroundin classFAtiMA.Core.conditions.Condition- Parameters:
subst- - a substitution of the type "[Variable]/value"- See Also:
Substitution
-
ReplaceUnboundVariables
public void ReplaceUnboundVariables(int variableID)
Replaces all unbound variables in the object by applying a numeric identifier to each one. For example, the variable [x] becomes [x4] if the received ID is 4. Attention, this method modifies the original object.- Specified by:
ReplaceUnboundVariablesin interfaceFAtiMA.Core.wellFormedNames.IGroundable- Overrides:
ReplaceUnboundVariablesin classFAtiMA.Core.conditions.Condition- Parameters:
variableID- - the identifier to be applied
-
-