Changeset 711
- Timestamp:
- 11/12/2010 07:38:05 PM (10 years ago)
- 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 66 66 import FAtiMA.Core.wellFormedNames.Name; 67 67 import FAtiMA.Core.wellFormedNames.Symbol; 68 import FAtiMA.socialRelations.LikeCondition;69 68 70 69 … … 179 178 } 180 179 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 195 180 public void RecentEvent(Attributes attributes) 196 181 { -
AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/util/parsers/AgentLoaderHandler.java
r679 r711 74 74 import FAtiMA.Core.wellFormedNames.Substitution; 75 75 import FAtiMA.Core.wellFormedNames.Symbol; 76 import FAtiMA.socialRelations.LikeRelation;77 import FAtiMA.socialRelations.RespectRelation;78 76 79 77 public class AgentLoaderHandler extends ReflectXMLHandler { … … 267 265 } 268 266 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 287 268 } -
AgentMind/branches/FAtiMA-Modular/FAtiMA/src/FAtiMA/Core/util/parsers/GoalLoaderHandler.java
r697 r711 61 61 import FAtiMA.Core.wellFormedNames.Substitution; 62 62 import FAtiMA.Core.wellFormedNames.Symbol; 63 import FAtiMA.socialRelations.LikeCondition;64 65 63 66 64 public class GoalLoaderHandler extends ReflectXMLHandler { … … 180 178 } 181 179 182 public void LikeRelation(Attributes attributes)183 {184 LikeCondition lc;185 186 try187 {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 199 180 public void SucessConditions(Attributes attributes) 200 181 {
Note: See TracChangeset
for help on using the changeset viewer.