Class 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
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected FAtiMA.Core.wellFormedNames.Symbol _emotion  
      protected float _value  
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      boolean CheckCondition​(FAtiMA.Core.AgentModel am)
      Checks if the
      java.lang.Object clone()
      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 EmotionalState
      FAtiMA.Core.wellFormedNames.Name GetValue()  
      protected java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> GetValueBindings​(FAtiMA.Core.AgentModel am)  
      boolean isGrounded()  
      void MakeGround​(FAtiMA.Core.wellFormedNames.Substitution subst)
      Applies a set of substitutions to the object, grounding it.
      void MakeGround​(java.util.ArrayList<FAtiMA.Core.wellFormedNames.Substitution> bindings)
      Applies a set of substitutions to the object, grounding it.
      static EmotionalEpisodeCondition ParseEmotionalEpisodeCondition​(org.xml.sax.Attributes attributes)
      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 Detail

      • _emotion

        protected FAtiMA.Core.wellFormedNames.Symbol _emotion
      • _value

        protected float _value
    • Constructor Detail

      • EmotionalEpisodeCondition

        public EmotionalEpisodeCondition​(FAtiMA.Core.wellFormedNames.Symbol episode,
                                         FAtiMA.Core.wellFormedNames.Symbol emotion,
                                         float value)
    • 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:
        CheckCondition in class FAtiMA.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:
        clone in class FAtiMA.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:
        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 java.util.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​(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:
        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