Package FAtiMA.Core
Class ActionLibrary
- java.lang.Object
-
- FAtiMA.Core.ActionLibrary
-
- All Implemented Interfaces:
java.io.Serializable
public class ActionLibrary extends java.lang.Object implements java.io.Serializable- Author:
- Joao Dias Class that stores the STRIPS definition of the domain actions
- See Also:
- Serialized Form
-
-
Constructor Summary
Constructors Constructor Description ActionLibrary()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddAction(Step action)voidcheckIntegrity(IntegrityValidator val)Checks the integrity of the Planner operators/Steps/actions.StepgetAction(int id, Name actionName)StepgetAction(java.lang.String name)Gets the operator that corresponds to the given namejava.util.ArrayList<Step>getActions()voidLoadActionsFile(java.lang.String xmlFile, AgentModel am)
-
-
-
Method Detail
-
addAction
public void addAction(Step action)
-
checkIntegrity
public void checkIntegrity(IntegrityValidator val) throws UnspecifiedVariableException, UnknownSpeechActException
Checks the integrity of the Planner operators/Steps/actions. For instance it checks if a operator references a SpeechAct not defined, or if it uses a unbound variable (in effects or preconditions) not used in the operator's name- Parameters:
val- - the IntegrityValidator used to detect problems- Throws:
UnspecifiedVariableException- - thrown when the operator uses a unbound variable in the effects or preconditions without using the same variable in the step's nameUnknownSpeechActException- - thrown when the operator references a SpeechAct not defined
-
getAction
public Step getAction(java.lang.String name)
Gets the operator that corresponds to the given name- Parameters:
name- - the name of the step to get- Returns:
- the searched step if it is found, null otherwise
-
getActions
public java.util.ArrayList<Step> getActions()
-
LoadActionsFile
public void LoadActionsFile(java.lang.String xmlFile, AgentModel am) throws ActionsParsingException- Throws:
ActionsParsingException
-
-