Changeset 711


Ignore:
Timestamp:
11/12/2010 07:38:05 PM (9 years ago)
Author:
joao.dias
Message:
 
Location:
AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/util/parsers
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/util/parsers/ActionsLoaderHandler.java

    r687 r711  
    6666import FAtiMA.Core.wellFormedNames.Name; 
    6767import FAtiMA.Core.wellFormedNames.Symbol; 
    68 import FAtiMA.socialRelations.LikeCondition; 
    6968 
    7069 
     
    179178        } 
    180179         
    181         public void LikeCondition(Attributes attributes) throws InvalidEmotionTypeException, ContextParsingException { 
    182           LikeCondition l; 
    183                    
    184           l = LikeCondition.ParseSocialCondition(attributes); 
    185           //l.MakeGround(_self); 
    186  
    187           if(_precondition)  
    188                 _currentOperator.AddPrecondition(l); 
    189           else { 
    190                 String operatorName = _currentOperator.getName().GetFirstLiteral().toString(); 
    191                 _currentOperator.AddEffect(new Effect(_am, operatorName,_probability, l));       
    192           } 
    193         } 
    194          
    195180        public void RecentEvent(Attributes attributes) 
    196181        { 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/util/parsers/AgentLoaderHandler.java

    r679 r711  
    7474import FAtiMA.Core.wellFormedNames.Substitution; 
    7575import FAtiMA.Core.wellFormedNames.Symbol; 
    76 import FAtiMA.socialRelations.LikeRelation; 
    77 import FAtiMA.socialRelations.RespectRelation; 
    7876 
    7977public class AgentLoaderHandler extends ReflectXMLHandler { 
     
    267265    } 
    268266     
    269     public void Relation(Attributes attributes) 
    270     { 
    271         float respect; 
    272         String target = attributes.getValue("target"); 
    273         float like = Float.parseFloat(attributes.getValue("like")); 
    274         LikeRelation.getRelation(Constants.SELF, target).setValue(_am.getMemory(),like); 
    275          
    276         String auxRespect = attributes.getValue("respect"); 
    277         if(auxRespect == null) 
    278         { 
    279                 respect = 0; 
    280         } 
    281         else  
    282         { 
    283                 respect = Float.parseFloat(auxRespect); 
    284         } 
    285         RespectRelation.getRelation(Constants.SELF, target).setValue(_am.getMemory(),respect); 
    286     } 
     267    
    287268} 
  • AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/util/parsers/GoalLoaderHandler.java

    r697 r711  
    6161import FAtiMA.Core.wellFormedNames.Substitution; 
    6262import FAtiMA.Core.wellFormedNames.Symbol; 
    63 import FAtiMA.socialRelations.LikeCondition; 
    64  
    6563 
    6664public class GoalLoaderHandler extends ReflectXMLHandler { 
     
    180178    } 
    181179     
    182     public void LikeRelation(Attributes attributes) 
    183     { 
    184         LikeCondition lc; 
    185          
    186         try 
    187         { 
    188                 lc = LikeCondition.ParseSocialCondition(attributes); 
    189                          
    190                 lc.MakeGround(_self); 
    191                 _currentGoal.AddCondition(_conditionType, lc); 
    192         } 
    193         catch(Exception e) 
    194         { 
    195                 e.printStackTrace(); 
    196         } 
    197     } 
    198  
    199180    public void SucessConditions(Attributes attributes) 
    200181    { 
Note: See TracChangeset for help on using the changeset viewer.