public class RCapability extends RElement
Modifier and Type | Field and Description |
---|---|
protected RBeliefbase |
beliefbase
The beliefbase.
|
protected java.util.Map<java.lang.Class<?>,java.util.Collection<RGoal>> |
cgoals
The goals by goal type (class or string).
|
protected static boolean |
DEBUG
Flag to save first exceptions.
|
protected IDeliberationStrategy |
delstr
The deliberation strategy.
|
protected REventbase |
eventbase
The eventbase.
|
protected java.util.Map<RElement,java.lang.Exception> |
ex
The map of exceptions.
|
protected RExpressionbase |
expressionbase
The expressionbase.
|
protected RGoalbase |
goalbase
The goalbase.
|
protected java.util.Collection<RGoal> |
goals
The goals.
|
protected java.util.Map<MGoal,java.util.Collection<RGoal>> |
mgoals
The goals by model element.
|
protected java.util.Map<MPlan,java.util.Collection<RPlan>> |
mplans
The plans by model element.
|
protected RPlanbase |
planbase
The planbase.
|
protected java.util.Collection<RPlan> |
plans
The plans.
|
agent, cnt, id, modelelement
Constructor and Description |
---|
RCapability(MCapability mcapa,
jadex.bridge.IInternalAccess agent)
Create a new bdi state.
|
Modifier and Type | Method and Description |
---|---|
void |
addGoal(RGoal goal)
Add a new goal.
|
void |
addPlan(RPlan plan)
Add a new plan.
|
boolean |
containsGoal(java.lang.Object goal)
Test if a goal is contained.
|
protected void |
determineValid(RPlan plan,
RPlan orig,
java.lang.StringBuffer buf) |
protected void |
dumpGoals() |
protected void |
dumpGoalsPeriodically(jadex.bridge.IInternalAccess ia) |
protected void |
dumpPlans() |
protected void |
dumpPlansPeriodically(jadex.bridge.IInternalAccess ia) |
static java.lang.String |
getBeautifiedName(java.lang.String name)
Get beautified element name.
|
RBeliefbase |
getBeliefbase()
Get the beliefbase.
|
static java.lang.String |
getCapabilityPart(java.lang.String name)
Get the capability part of a complex element name.
|
IDeliberationStrategy |
getDeliberationStrategy()
Get the deliberationStrategy.
|
REventbase |
getEventbase()
Get the eventbase.
|
RExpressionbase |
getExpressionbase()
Get the expressionbase.
|
RGoalbase |
getGoalbase()
Get the goalbase.
|
java.util.Collection<RGoal> |
getGoals()
Get the goals.
|
java.util.Collection<RGoal> |
getGoals(java.lang.Class<?> type)
Get goals of a specific pojo type.
|
java.util.Collection<RGoal> |
getGoals(MGoal mgoal)
Get goals of a specific pojo type.
|
static java.lang.String |
getNamePart(java.lang.String name)
Get the name part of a complex element name.
|
RPlanbase |
getPlanbase()
Get the planbase.
|
java.util.Collection<RPlan> |
getPlans()
Get the plans.
|
java.util.Collection<RPlan> |
getPlans(MPlan mplan)
Get goals of a specific pojo type.
|
RGoal |
getRGoal(java.lang.Object pojogoal)
Get the rGoal for a pojogoal.
|
void |
removeGoal(RGoal goal)
Remove a goal.
|
void |
removePlan(RPlan plan)
Remove a plan.
|
void |
setBeliefbase(RBeliefbase beliefbase)
The beliefbase to set.
|
void |
setDeliberationStrategy(IDeliberationStrategy delstr)
The deliberationStrategy to set.
|
void |
setExpressionbase(RExpressionbase expressionbase)
The expressionbase to set.
|
void |
setGoals(java.util.Collection<RGoal> goals)
Set the goals.
|
void |
setPlanbase(RPlanbase planbase)
Set the planbase.
|
void |
setPlans(java.util.Collection<RPlan> plans)
Set the plans.
|
getAgent, getCapability, getId, getMCapability, getModelElement, getRuleSystem, setId, setModelElement, toString
protected static final boolean DEBUG
protected java.util.Map<RElement,java.lang.Exception> ex
protected java.util.Collection<RGoal> goals
protected java.util.Map<MGoal,java.util.Collection<RGoal>> mgoals
protected java.util.Map<java.lang.Class<?>,java.util.Collection<RGoal>> cgoals
protected java.util.Collection<RPlan> plans
protected java.util.Map<MPlan,java.util.Collection<RPlan>> mplans
protected IDeliberationStrategy delstr
protected RBeliefbase beliefbase
protected RGoalbase goalbase
protected RExpressionbase expressionbase
protected REventbase eventbase
protected RPlanbase planbase
public RCapability(MCapability mcapa, jadex.bridge.IInternalAccess agent)
public java.util.Collection<RGoal> getGoals()
public java.util.Collection<RGoal> getGoals(MGoal mgoal)
type
- The type.public java.util.Collection<RGoal> getGoals(java.lang.Class<?> type)
type
- The type.public RGoal getRGoal(java.lang.Object pojogoal)
public boolean containsGoal(java.lang.Object goal)
type
- The type.public void setGoals(java.util.Collection<RGoal> goals)
goals
- The goals to set.public void addGoal(RGoal goal)
goal
- The goal.public void removeGoal(RGoal goal)
goal
- The goal.public java.util.Collection<RPlan> getPlans()
public void setPlans(java.util.Collection<RPlan> plans)
plans
- The plans to set.public java.util.Collection<RPlan> getPlans(MPlan mplan)
type
- The type.public void addPlan(RPlan plan)
plan
- The plan.public void removePlan(RPlan plan)
plan
- The plan.public RBeliefbase getBeliefbase()
public void setBeliefbase(RBeliefbase beliefbase)
beliefbase
- The beliefbase to setpublic RExpressionbase getExpressionbase()
public void setExpressionbase(RExpressionbase expressionbase)
expressionbase
- The expressionbase to setpublic REventbase getEventbase()
public RGoalbase getGoalbase()
public RPlanbase getPlanbase()
public void setPlanbase(RPlanbase planbase)
planbase
- The planbase to setpublic IDeliberationStrategy getDeliberationStrategy()
public void setDeliberationStrategy(IDeliberationStrategy delstr)
delstr
- The deliberationStrategy to setprotected void dumpGoalsPeriodically(jadex.bridge.IInternalAccess ia)
protected void dumpPlansPeriodically(jadex.bridge.IInternalAccess ia)
protected void dumpGoals()
protected void dumpPlans()
protected void determineValid(RPlan plan, RPlan orig, java.lang.StringBuffer buf)
plan
- orig
- buf
- public static java.lang.String getCapabilityPart(java.lang.String name)
public static java.lang.String getNamePart(java.lang.String name)
public static java.lang.String getBeautifiedName(java.lang.String name)