Class EmotionalEpisodeCondition

java.lang.Object
FAtiMA.Core.conditions.Condition
FAtiMA.emotionalIntelligence.EmotionalEpisodeCondition
All Implemented Interfaces:
FAtiMA.Core.wellFormedNames.IGroundable, Serializable, Cloneable

public class EmotionalEpisodeCondition extends FAtiMA.Core.conditions.Condition
See Also:
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    protected FAtiMA.Core.wellFormedNames.Symbol
     
    protected float
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    EmotionalEpisodeCondition(FAtiMA.Core.wellFormedNames.Symbol episode, FAtiMA.Core.wellFormedNames.Symbol emotion, float value)
     
     
  • Method Summary

    Modifier and Type
    Method
    Description
    boolean
    CheckCondition(FAtiMA.Core.AgentModel am)
    Checks if the
    Clones this EmotionCondition, returning an equal copy.
    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
    FAtiMA.Core.wellFormedNames.Name
     
    protected ArrayList<FAtiMA.Core.wellFormedNames.Substitution>
    GetValueBindings(FAtiMA.Core.AgentModel am)
     
    boolean
     
    void
    MakeGround(FAtiMA.Core.wellFormedNames.Substitution subst)
    Applies a set of substitutions to the object, grounding it.
    void
    MakeGround(ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)
    Applies a set of substitutions to the object, grounding it.
    Parses a EmotionCondition given a XML attribute list
    void
    ReplaceUnboundVariables(int variableID)
    Replaces all unbound variables in the object by applying a numeric identifier to each one.

    Methods inherited from class FAtiMA.Core.conditions.Condition

    CheckActivation, getName, getToM, hasChangedVerifiability, isVerifiable, setName, setToM, setVerifiable

    Methods inherited from class java.lang.Object

    equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • _emotion

      protected FAtiMA.Core.wellFormedNames.Symbol _emotion
    • _value

      protected float _value
  • Constructor Details

    • EmotionalEpisodeCondition

      public EmotionalEpisodeCondition(FAtiMA.Core.wellFormedNames.Symbol episode, FAtiMA.Core.wellFormedNames.Symbol emotion, float value)
    • EmotionalEpisodeCondition

      public EmotionalEpisodeCondition(EmotionalEpisodeCondition eec)
  • Method Details

    • ParseEmotionalEpisodeCondition

      public static EmotionalEpisodeCondition ParseEmotionalEpisodeCondition(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:
      CheckCondition in class FAtiMA.Core.conditions.Condition
      Returns:
      status
    • clone

      public Object clone()
      Clones this EmotionCondition, returning an equal copy. If this clone is changed afterwards, the original object remains the same.
      Specified by:
      clone in class FAtiMA.Core.conditions.Condition
      Returns:
      The EmotionCondition's copy.
    • GetValidBindings

      public 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:
      GetValidBindings in class FAtiMA.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:
      GetValue in class FAtiMA.Core.conditions.Condition
    • GetValueBindings

      protected ArrayList<FAtiMA.Core.wellFormedNames.Substitution> GetValueBindings(FAtiMA.Core.AgentModel am)
      Specified by:
      GetValueBindings in class FAtiMA.Core.conditions.Condition
    • isGrounded

      public boolean isGrounded()
      Specified by:
      isGrounded in interface FAtiMA.Core.wellFormedNames.IGroundable
      Overrides:
      isGrounded in class FAtiMA.Core.conditions.Condition
    • MakeGround

      public void MakeGround(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:
      MakeGround in interface FAtiMA.Core.wellFormedNames.IGroundable
      Overrides:
      MakeGround in class FAtiMA.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:
      MakeGround in interface FAtiMA.Core.wellFormedNames.IGroundable
      Overrides:
      MakeGround in class FAtiMA.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:
      ReplaceUnboundVariables in interface FAtiMA.Core.wellFormedNames.IGroundable
      Overrides:
      ReplaceUnboundVariables in class FAtiMA.Core.conditions.Condition
      Parameters:
      variableID - - the identifier to be applied