Class RGoalbase

  • All Implemented Interfaces:
    IElement, IGoalbase

    public class RGoalbase
    extends jadex.bdiv3.runtime.impl.RElement
    implements IGoalbase
    The goal base runtime element.
    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected java.lang.String scope
      The scope (for local views).
      • Fields inherited from class jadex.bdiv3.runtime.impl.RElement

        agent, cnt, id, modelelement
    • 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, getCount, getId, getMCapability, getModelElement, getRuleSystem, setId, setModelElement, toString
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
    • Field Detail

      • scope

        protected java.lang.String scope
        The scope (for local views).
    • 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 interface IGoalbase
        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).
        Specified by:
        getGoals in interface IGoalbase
        Parameters:
        type - The goal type.
        Returns:
        All proprietary goals of the specified type.
      • getGoals

        public IGoal[] getGoals()
        Get all the adopted goals in this scope (including subgoals).
        Specified by:
        getGoals in interface IGoalbase
        Returns:
        All goals and 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 interface IGoalbase
        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 interface IGoalbase
        Parameters:
        goal - The new goal.