Class RCapability

java.lang.Object
jadex.bdi.runtime.impl.RElement
jadex.bdi.runtime.impl.RCapability

public class RCapability extends RElement
Runtime element for storing goal and plan instances.
  • Field Details

  • Constructor Details

    • RCapability

      public RCapability(MCapability mcapa)
      Create a new bdi state.
  • Method Details

    • getGoals

      public Collection<RGoal> getGoals()
      Get the goals.
      Returns:
      The goals.
    • getGoals

      public Collection<RGoal> getGoals(MGoal mgoal)
      Get goals of a specific pojo type.
      Parameters:
      type - The type.
      Returns:
      The goals.
    • getGoals

      public Collection<RGoal> getGoals(Class<?> type)
      Get goals of a specific pojo type.
      Parameters:
      type - The type.
      Returns:
      The goals.
    • getRGoal

      public RGoal getRGoal(Object pojogoal)
      Get the rGoal for a pojogoal.
    • containsGoal

      public boolean containsGoal(Object goal)
      Test if a goal is contained. Goal can be either pojogoal or an IGoal.
      Parameters:
      type - The type.
      Returns:
      The goals.
    • setGoals

      public void setGoals(Collection<RGoal> goals)
      Set the goals.
      Parameters:
      goals - The goals to set.
    • addGoal

      public void addGoal(RGoal goal)
      Add a new goal.
      Parameters:
      goal - The goal.
    • removeGoal

      public void removeGoal(RGoal goal)
      Remove a goal.
      Parameters:
      goal - The goal.
    • getPlans

      public Collection<RPlan> getPlans()
      Get the plans.
      Returns:
      The plans.
    • setPlans

      public void setPlans(Collection<RPlan> plans)
      Set the plans.
      Parameters:
      plans - The plans to set.
    • getPlans

      public Collection<RPlan> getPlans(MPlan mplan)
      Get goals of a specific pojo type.
      Parameters:
      type - The type.
      Returns:
      The goals.
    • addPlan

      public void addPlan(RPlan plan)
      Add a new plan.
      Parameters:
      plan - The plan.
    • removePlan

      public void removePlan(RPlan plan)
      Remove a plan.
      Parameters:
      plan - The plan.
    • setDeliberationStrategy

      public void setDeliberationStrategy(IDeliberationStrategy delstr)
      The deliberationStrategy to set.
      Parameters:
      delstr - The deliberationStrategy to set
    • dumpGoalsPeriodically

      protected void dumpGoalsPeriodically()
    • dumpPlansPeriodically

      protected void dumpPlansPeriodically()
    • dumpGoals

      protected void dumpGoals()
    • dumpPlans

      protected void dumpPlans()
    • determineValid

      protected void determineValid(RPlan plan, RPlan orig, StringBuffer buf)
      Parameters:
      plan -
      orig -
      buf -
    • getCapabilityPart

      public static String getCapabilityPart(String name)
      Get the capability part of a complex element name.
    • getNamePart

      public static String getNamePart(String name)
      Get the name part of a complex element name.
    • getBeautifiedName

      public static String getBeautifiedName(String name)
      Get beautified element name.