Package jadex.bdiv3x.runtime
Class RGoalbase
- java.lang.Object
-
- jadex.bdiv3.runtime.impl.RElement
-
- jadex.bdiv3x.runtime.RGoalbase
-
-
Field Summary
Fields Modifier and Type Field Description protected java.lang.String
scope
The scope (for local views).
-
Constructor Summary
Constructors Constructor Description RGoalbase(IInternalAccess agent, java.lang.String scope)
Create a new goalbase.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description boolean
containsGoal(IGoal goal)
Test if an adopted goal is already contained in the goal base.IGoal
createGoal(java.lang.String type)
Create a goal from a template goal.<T> IFuture<T>
dispatchTopLevelGoal(IGoal goal)
Dispatch a new top-level goal.IGoal[]
getGoals()
Get all the adopted goals in this scope (including subgoals).IGoal[]
getGoals(java.lang.String type)
Get all proprietary goals of a specified type (=model element name).-
Methods inherited from class jadex.bdiv3.runtime.impl.RElement
getAgent, getCapability, getId, getMCapability, getModelElement, getRuleSystem, setId, setModelElement, toString
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface jadex.bdiv3x.runtime.IElement
getModelElement
-
-
-
-
Constructor Detail
-
RGoalbase
public RGoalbase(IInternalAccess agent, java.lang.String scope)
Create a new goalbase.
-
-
Method Detail
-
containsGoal
public boolean containsGoal(IGoal goal)
Test if an adopted goal is already contained in the goal base.- Specified by:
containsGoal
in interfaceIGoalbase
- Parameters:
goal
- The goal to test.- Returns:
- True, if the goal is contained.
-
getGoals
public IGoal[] getGoals(java.lang.String type)
Get all proprietary goals of a specified type (=model element name).
-
getGoals
public IGoal[] getGoals()
Get all the adopted goals in this scope (including subgoals).
-
createGoal
public IGoal createGoal(java.lang.String type)
Create a goal from a template goal. To be processed, the goal has to be dispatched as subgoal or adopted as top-level goal.- Specified by:
createGoal
in interfaceIGoalbase
- Parameters:
type
- The template goal name as specified in the ADF.- Returns:
- The created goal.
-
dispatchTopLevelGoal
public <T> IFuture<T> dispatchTopLevelGoal(IGoal goal)
Dispatch a new top-level goal.- Specified by:
dispatchTopLevelGoal
in interfaceIGoalbase
- Parameters:
goal
- The new goal.
-
-