Changeset 978


Ignore:
Timestamp:
02/18/2011 02:17:46 PM (9 years ago)
Author:
joao.dias
Message:
 
Location:
AgentMind/branches/FAtiMA-Modular/FAtiMA.ReactiveComponent/src/FAtiMA/ReactiveComponent
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.ReactiveComponent/src/FAtiMA/ReactiveComponent/ActionTendencies.java

    r961 r978  
    6868         
    6969        protected ArrayList<Action> _actions; 
    70         private HashMap<String,Long> _filteredActions; 
     70        protected HashMap<String,Long> _filteredActions; 
    7171         
    7272        /** 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.ReactiveComponent/src/FAtiMA/ReactiveComponent/ReactiveComponent.java

    r972 r978  
    109109        } 
    110110         
     111        @Override 
    111112        public void actionSelectedForExecution(ValuedAction action) 
    112113        {                
     
    266267                } catch (Exception e) { 
    267268                        throw new RuntimeException( 
    268                                         "Error on loading goals from the agent XML Files:" + e); 
     269                                        "Error reading the agent XML Files:" + e); 
    269270                } 
    270271        } 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA.ReactiveComponent/src/FAtiMA/ReactiveComponent/parsers/ReactiveLoaderHandler.java

    r971 r978  
    2626         
    2727        private ReactiveComponent _reactiveComponent; 
    28         private Action _action; 
    29     private ElicitingEmotion _elicitingEmotion; 
     28        protected Action _action; 
     29        protected ElicitingEmotion _elicitingEmotion; 
    3030    private Reaction _eventReaction; 
    3131    private Substitution _self; 
    3232         
     33    public ReactiveLoaderHandler(){ 
     34        //this is just because of compatibility issues. 
     35        this._self = new Substitution(new Symbol("[SELF]"), new Symbol(Constants.SELF)); 
     36    
     37    } 
     38     
    3339        public ReactiveLoaderHandler(ReactiveComponent reactiveComponent) 
    3440        { 
    3541                this._reactiveComponent = reactiveComponent; 
    36                 //this is just because of compatibility issues. 
    37         this._self = new Substitution(new Symbol("[SELF]"), new Symbol(Constants.SELF)); 
     42                this._self = new Substitution(new Symbol("[SELF]"), new Symbol(Constants.SELF)); 
    3843        } 
    3944         
     
    5358    } 
    5459 
    55     public void ElicitingEmotion(Attributes attributes) throws InvalidEmotionTypeException { 
    56         String emotionName; 
    57         Integer minIntensity; 
    58   
    59          
    60         emotionName = attributes.getValue("type"); 
     60    protected void parseElicitingEmotion(String emotionName, Integer minIntensity){ 
    6161         
    6262        //Just to prevent typing errors 
     
    6767                emotionName = "fears_confirmed"; 
    6868                } 
    69          
     69    
    7070        emotionName = emotionName.toUpperCase(Locale.ENGLISH); 
    71          
    72         minIntensity = new Integer(attributes.getValue("minIntensity")); 
     71  
    7372        _elicitingEmotion = new ElicitingEmotion(emotionName,minIntensity.intValue()); 
    7473        _action.SetElicitingEmotion(_elicitingEmotion); 
     74    } 
     75     
     76    public void ElicitingEmotion(Attributes attributes) throws InvalidEmotionTypeException { 
     77        parseElicitingEmotion(attributes.getValue("type"),new Integer(attributes.getValue("minIntensity"))); 
    7578        _reactiveComponent.getActionTendencies().AddAction(_action); 
    7679    } 
Note: See TracChangeset for help on using the changeset viewer.