public class MCapability extends MElement
| Modifier and Type | Field and Description | 
|---|---|
protected java.util.Map<java.lang.String,java.lang.String> | 
beliefreferences
The belief mappings (abstract/reference name -> concrete belief name). 
 | 
protected java.util.List<MBelief> | 
beliefs
The beliefs. 
 | 
protected java.util.List<MCondition> | 
conditions
The expressions. 
 | 
protected java.util.List<MConfiguration> | 
configurations
The configurations. 
 | 
protected java.util.Map<java.lang.String,java.lang.String> | 
eventreferences
The event mappings (abstract/reference name -> concrete name). 
 | 
protected java.util.Map<java.lang.String,java.lang.String> | 
expressionreferences
The expression mappings (abstract/reference name -> concrete name). 
 | 
protected java.util.List<UnparsedExpression> | 
expressions
The expressions. 
 | 
protected java.util.Map<java.lang.String,java.lang.String> | 
goalreferences
The goal mappings (abstract/reference name -> concrete name). 
 | 
protected java.util.List<MGoal> | 
goals
The goals. 
 | 
protected java.util.List<MInternalEvent> | 
ievents
The internal events. 
 | 
protected java.util.List<MMessageEvent> | 
messages
The message events. 
 | 
protected java.util.List<MPlan> | 
plans
The plans. 
 | 
protected java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> | 
pubs
The goal/service publications. 
 | 
protected java.util.Map<java.lang.String,java.lang.String> | 
resultmappings
The result mappings   | 
protected java.util.List<MServiceCall> | 
services
The services. 
 | 
protected java.util.List<MCapabilityReference> | 
subcapabilities
The subcapabilities. 
 | 
CAPABILITY_SEPARATOR, description, name| Constructor and Description | 
|---|
MCapability()
Bean Constructor. 
 | 
MCapability(java.lang.String name)
Create a capability. 
 | 
| Modifier and Type | Method and Description | 
|---|---|
void | 
addBelief(MBelief belief)
Add a belief. 
 | 
void | 
addBeliefReference(java.lang.String reference,
                  java.lang.String concrete)
Add a belief reference (abstract/reference name -> concrete belief name). 
 | 
void | 
addCapability(MCapabilityReference subcapability)
Add a sub capability. 
 | 
void | 
addCondition(MCondition condition)
Add a condition. 
 | 
void | 
addConfiguration(MConfiguration config)
Add a configuration. 
 | 
void | 
addEventReference(java.lang.String reference,
                 java.lang.String concrete)
Add a event reference (abstract/reference name -> concrete event name). 
 | 
void | 
addExpression(UnparsedExpression expression)
Add a expression. 
 | 
void | 
addExpressionReference(java.lang.String reference,
                      java.lang.String concrete)
Add a expression reference (abstract/reference name -> concrete expression name). 
 | 
void | 
addGoal(MGoal goal)
Add a goal. 
 | 
void | 
addGoalPublication(ClassInfo ci,
                  MGoal mgoal,
                  java.lang.String methodname)
Add a publication info. 
 | 
void | 
addGoalReference(java.lang.String reference,
                java.lang.String concrete)
Add a goal reference (abstract/reference name -> concrete goal name). 
 | 
void | 
addInternalEvent(MInternalEvent event)
Add an internal event. 
 | 
void | 
addMessageEvent(MMessageEvent message)
Add a message. 
 | 
void | 
addPlan(MPlan plan)
Add a plan. 
 | 
protected static java.util.Map<java.lang.String,java.lang.String> | 
addReference(java.util.Map<java.lang.String,java.lang.String> references,
            java.lang.String reference,
            java.lang.String concrete)
Add a reference and resolve transitive dependencies. 
 | 
void | 
addResultMapping(java.lang.String belief,
                java.lang.String result)
Add a result mapping. 
 | 
void | 
addservice(MServiceCall ser)
Add a service. 
 | 
MBelief | 
getBelief(java.lang.String name)
Get a belief. 
 | 
java.util.Map<java.lang.String,java.lang.String> | 
getBeliefReferences()
Get the fully qualified belief references (abstract/reference name -> concrete belief name). 
 | 
java.util.List<MBelief> | 
getBeliefs()
Get the beliefs. 
 | 
java.util.List<MCapabilityReference> | 
getCapabilities()
Get the sub capabilities. 
 | 
MCondition | 
getCondition(java.lang.String name)
Get a condition. 
 | 
java.util.List<MCondition> | 
getConditions()
Get the conditions. 
 | 
MConfiguration | 
getConfiguration(java.lang.String name)
Get the configurations. 
 | 
java.util.List<MConfiguration> | 
getConfigurations()
Get the configurations. 
 | 
java.util.Map<java.lang.String,java.lang.String> | 
getEventReferences()
Get the fully qualified event references (abstract/reference name -> concrete event name). 
 | 
UnparsedExpression | 
getExpression(java.lang.String name)
Get a expression. 
 | 
java.util.Map<java.lang.String,java.lang.String> | 
getExpressionReferences()
Get the fully qualified expression references (abstract/reference name -> concrete expression name). 
 | 
java.util.List<UnparsedExpression> | 
getExpressions()
Get the expressions. 
 | 
MGoal | 
getGoal(java.lang.String name)
Get the goal for its name. 
 | 
java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> | 
getGoalPublications()
Get the pubs. 
 | 
java.util.Map<java.lang.String,java.lang.String> | 
getGoalReferences()
Get the fully qualified goal references (abstract/reference name -> concrete goal name). 
 | 
java.util.List<MGoal> | 
getGoals()
Get the goals. 
 | 
MInternalEvent | 
getInternalEvent(java.lang.String name)
Get an internal event. 
 | 
java.util.List<MInternalEvent> | 
getInternalEvents()
Get the Internals. 
 | 
MMessageEvent | 
getMessageEvent(java.lang.String name)
Get a message event. 
 | 
java.util.List<MMessageEvent> | 
getMessageEvents()
Get the messages. 
 | 
MPlan | 
getPlan(java.lang.String name)
Get the plan for its name. 
 | 
java.util.List<MPlan> | 
getPlans()
Get the plans. 
 | 
protected static java.util.Map<java.lang.String,java.lang.String> | 
getReferences(java.util.Map<java.lang.String,java.lang.String> references)
Get references or empty map. 
 | 
MGoal | 
getResolvedGoal(java.lang.String scope,
               java.lang.String name)
Get a goal by resolved name. 
 | 
MInternalEvent | 
getResolvedInternalEvent(java.lang.String scope,
                        java.lang.String name)
Get an internal event by resolved name. 
 | 
MMessageEvent | 
getResolvedMessageEvent(java.lang.String scope,
                       java.lang.String name)
Get a message event by resolved name. 
 | 
java.util.Map<java.lang.String,java.lang.String> | 
getResultMappings()
Get the result mappings (concrete belief->result name). 
 | 
MServiceCall | 
getService(java.lang.String name)
Get the plan for its name. 
 | 
java.util.List<MServiceCall> | 
getServices()
Get the services. 
 | 
boolean | 
hasBelief(java.lang.String name)
Test if a belief is contained. 
 | 
boolean | 
hasCondition(java.lang.String name)
Test if a condition is contained. 
 | 
boolean | 
hasExpression(java.lang.String name)
Test if a expression is contained. 
 | 
boolean | 
hasInternalEvent(java.lang.String name)
Test if an internal event is contained. 
 | 
boolean | 
hasMessageEvent(java.lang.String name)
Test if a message is contained. 
 | 
void | 
removeBelief(MBelief belief)
Remove a belief. 
 | 
void | 
setBeliefs(java.util.List<MBelief> beliefs)
Set the beliefs. 
 | 
void | 
setCapabilities(java.util.List<MCapabilityReference> subcapabilities)
Set the sub capabilities. 
 | 
void | 
setConditions(java.util.List<MCondition> conditions)
Set the conditions. 
 | 
void | 
setConfigurations(java.util.List<MConfiguration> configurations)
Set the configurations. 
 | 
void | 
setExpressions(java.util.List<UnparsedExpression> expressions)
Set the expressions. 
 | 
void | 
setGoalPublications(java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)
The pubs to set. 
 | 
void | 
setGoals(java.util.List<MGoal> goals)
Set the goals. 
 | 
void | 
setInternalEvents(java.util.List<MInternalEvent> ievents)
Set the internal events. 
 | 
void | 
setMessageEvents(java.util.List<MMessageEvent> messages)
Set the messages. 
 | 
void | 
setPlans(java.util.List<MPlan> plans)
Set the plans. 
 | 
void | 
setServices(java.util.List<MServiceCall> services)
Set the services. 
 | 
void | 
sortPlans(java.lang.ClassLoader cl)
Sorts plans according to their line numbers in the source
  to guarantee their natural declaration order. 
 | 
equals, getCapabilityName, getDescription, getElementName, getName, hashCode, internalName, setDescription, setFlatName, setName, toStringprotected java.util.List<MBelief> beliefs
protected java.util.List<MGoal> goals
protected java.util.List<MPlan> plans
protected java.util.List<MMessageEvent> messages
protected java.util.List<MServiceCall> services
protected java.util.List<UnparsedExpression> expressions
protected java.util.List<MConfiguration> configurations
protected java.util.Map<java.lang.String,java.lang.String> beliefreferences
protected java.util.Map<java.lang.String,java.lang.String> resultmappings
protected java.util.Map<java.lang.String,java.lang.String> goalreferences
protected java.util.Map<java.lang.String,java.lang.String> eventreferences
protected java.util.Map<java.lang.String,java.lang.String> expressionreferences
protected java.util.List<MCapabilityReference> subcapabilities
protected java.util.List<MInternalEvent> ievents
protected java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs
protected java.util.List<MCondition> conditions
public MCapability()
public MCapability(java.lang.String name)
public java.util.List<MBelief> getBeliefs()
public void setBeliefs(java.util.List<MBelief> beliefs)
beliefs - The beliefs to set.public void addBelief(MBelief belief)
public void removeBelief(MBelief belief)
public boolean hasBelief(java.lang.String name)
public MBelief getBelief(java.lang.String name)
public java.util.List<MGoal> getGoals()
public void setGoals(java.util.List<MGoal> goals)
goals - The goals to set.public void addGoal(MGoal goal)
public MGoal getGoal(java.lang.String name)
public java.util.List<MPlan> getPlans()
public void setPlans(java.util.List<MPlan> plans)
plans - The plans to set.public void addPlan(MPlan plan)
public MPlan getPlan(java.lang.String name)
public void sortPlans(java.lang.ClassLoader cl)
public java.util.List<MInternalEvent> getInternalEvents()
public void setInternalEvents(java.util.List<MInternalEvent> ievents)
ievents - The internal events to set.public void addInternalEvent(MInternalEvent event)
public boolean hasInternalEvent(java.lang.String name)
public MInternalEvent getInternalEvent(java.lang.String name)
public java.util.List<MMessageEvent> getMessageEvents()
public void setMessageEvents(java.util.List<MMessageEvent> messages)
messages - The messages to set.public void addMessageEvent(MMessageEvent message)
public boolean hasMessageEvent(java.lang.String name)
public MMessageEvent getMessageEvent(java.lang.String name)
public MGoal getResolvedGoal(java.lang.String scope, java.lang.String name)
scope - The local scope.name - The name, relative to scope.public MInternalEvent getResolvedInternalEvent(java.lang.String scope, java.lang.String name)
scope - The local scope.name - The name, relative to scope.public MMessageEvent getResolvedMessageEvent(java.lang.String scope, java.lang.String name)
scope - The local scope.name - The name, relative to scope.public java.util.List<MConfiguration> getConfigurations()
public void setConfigurations(java.util.List<MConfiguration> configurations)
configurations - The configurations to set.public void addConfiguration(MConfiguration config)
public MConfiguration getConfiguration(java.lang.String name)
public java.util.List<MServiceCall> getServices()
public void setServices(java.util.List<MServiceCall> services)
services - The services to set.public MServiceCall getService(java.lang.String name)
public void addservice(MServiceCall ser)
public java.util.List<MCapabilityReference> getCapabilities()
public void setCapabilities(java.util.List<MCapabilityReference> subcapabilities)
subcapabilities - The sub capabilities to set.public void addCapability(MCapabilityReference subcapability)
public java.util.List<UnparsedExpression> getExpressions()
public void setExpressions(java.util.List<UnparsedExpression> expressions)
expressions - The expressions to set.public void addExpression(UnparsedExpression expression)
public boolean hasExpression(java.lang.String name)
public UnparsedExpression getExpression(java.lang.String name)
public java.util.List<MCondition> getConditions()
public void setConditions(java.util.List<MCondition> conditions)
conditions - The conditions to set.public void addCondition(MCondition condition)
public boolean hasCondition(java.lang.String name)
public MCondition getCondition(java.lang.String name)
public java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> getGoalPublications()
public void setGoalPublications(java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)
pubs - The pubs to setpublic void addGoalPublication(ClassInfo ci, MGoal mgoal, java.lang.String methodname)
public java.util.Map<java.lang.String,java.lang.String> getBeliefReferences()
public void addBeliefReference(java.lang.String reference,
                               java.lang.String concrete)
reference - The fully qualified abstract / reference belief name.concrete - The fully qualified concrete belief name.public java.util.Map<java.lang.String,java.lang.String> getResultMappings()
public void addResultMapping(java.lang.String belief,
                             java.lang.String result)
belief - The concrete belief name (fully qualified).result - The result name.public java.util.Map<java.lang.String,java.lang.String> getExpressionReferences()
public void addExpressionReference(java.lang.String reference,
                                   java.lang.String concrete)
reference - The fully qualified abstract / reference expression name.concrete - The fully qualified concrete expression name.public java.util.Map<java.lang.String,java.lang.String> getEventReferences()
public void addEventReference(java.lang.String reference,
                              java.lang.String concrete)
reference - The fully qualified abstract / reference event name.concrete - The fully qualified concrete event name.public java.util.Map<java.lang.String,java.lang.String> getGoalReferences()
public void addGoalReference(java.lang.String reference,
                             java.lang.String concrete)
reference - The fully qualified abstract / reference goal name.concrete - The fully qualified concrete goal name.protected static java.util.Map<java.lang.String,java.lang.String> addReference(java.util.Map<java.lang.String,java.lang.String> references,
                                                                               java.lang.String reference,
                                                                               java.lang.String concrete)
protected static java.util.Map<java.lang.String,java.lang.String> getReferences(java.util.Map<java.lang.String,java.lang.String> references)