Package jadex.bdiv3.model
Class MCapability
- java.lang.Object
- 
- jadex.bdiv3.model.MElement
- 
- jadex.bdiv3.model.MCapability
 
 
- 
 public class MCapability extends MElement The capability model.
- 
- 
Field SummaryFields Modifier and Type Field Description protected java.util.Map<java.lang.String,java.lang.String>beliefreferencesThe belief mappings (abstract/reference name -> concrete belief name).protected java.util.List<MBelief>beliefsThe beliefs.protected java.util.List<MCondition>conditionsThe expressions.protected java.util.List<MConfiguration>configurationsThe configurations.protected java.util.Map<java.lang.String,java.lang.String>eventreferencesThe event mappings (abstract/reference name -> concrete name).protected java.util.Map<java.lang.String,java.lang.String>expressionreferencesThe expression mappings (abstract/reference name -> concrete name).protected java.util.List<UnparsedExpression>expressionsThe expressions.protected java.util.Map<java.lang.String,java.lang.String>goalreferencesThe goal mappings (abstract/reference name -> concrete name).protected java.util.List<MGoal>goalsThe goals.protected java.util.List<MInternalEvent>ieventsThe internal events.protected java.util.List<MMessageEvent>messagesThe message events.protected java.util.List<MPlan>plansThe plans.protected java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>>pubsThe goal/service publications.protected java.util.Map<java.lang.String,java.lang.String>resultmappingsThe result mappingsprotected java.util.List<MServiceCall>servicesThe services.protected java.util.List<MCapabilityReference>subcapabilitiesThe subcapabilities.- 
Fields inherited from class jadex.bdiv3.model.MElementCAPABILITY_SEPARATOR, description, name
 
- 
 - 
Constructor SummaryConstructors Constructor Description MCapability()Bean Constructor.MCapability(java.lang.String name)Create a capability.
 - 
Method SummaryAll Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description voidaddBelief(MBelief belief)Add a belief.voidaddBeliefReference(java.lang.String reference, java.lang.String concrete)Add a belief reference (abstract/reference name -> concrete belief name).voidaddCapability(MCapabilityReference subcapability)Add a sub capability.voidaddCondition(MCondition condition)Add a condition.voidaddConfiguration(MConfiguration config)Add a configuration.voidaddEventReference(java.lang.String reference, java.lang.String concrete)Add a event reference (abstract/reference name -> concrete event name).voidaddExpression(UnparsedExpression expression)Add a expression.voidaddExpressionReference(java.lang.String reference, java.lang.String concrete)Add a expression reference (abstract/reference name -> concrete expression name).voidaddGoal(MGoal goal)Add a goal.voidaddGoalPublication(ClassInfo ci, MGoal mgoal, java.lang.String methodname)Add a publication info.voidaddGoalReference(java.lang.String reference, java.lang.String concrete)Add a goal reference (abstract/reference name -> concrete goal name).voidaddInternalEvent(MInternalEvent event)Add an internal event.voidaddMessageEvent(MMessageEvent message)Add a message.voidaddPlan(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.voidaddResultMapping(java.lang.String belief, java.lang.String result)Add a result mapping.voidaddservice(MServiceCall ser)Add a service.MBeliefgetBelief(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.MConditiongetCondition(java.lang.String name)Get a condition.java.util.List<MCondition>getConditions()Get the conditions.MConfigurationgetConfiguration(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).UnparsedExpressiongetExpression(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.MGoalgetGoal(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.MInternalEventgetInternalEvent(java.lang.String name)Get an internal event.java.util.List<MInternalEvent>getInternalEvents()Get the Internals.MMessageEventgetMessageEvent(java.lang.String name)Get a message event.java.util.List<MMessageEvent>getMessageEvents()Get the messages.MPlangetPlan(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.MGoalgetResolvedGoal(java.lang.String scope, java.lang.String name)Get a goal by resolved name.MInternalEventgetResolvedInternalEvent(java.lang.String scope, java.lang.String name)Get an internal event by resolved name.MMessageEventgetResolvedMessageEvent(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).MServiceCallgetService(java.lang.String name)Get the plan for its name.java.util.List<MServiceCall>getServices()Get the services.booleanhasBelief(java.lang.String name)Test if a belief is contained.java.lang.StringhasBeliefIgnoreCase(java.lang.String name)Test if a belief is contained.booleanhasCondition(java.lang.String name)Test if a condition is contained.booleanhasExpression(java.lang.String name)Test if a expression is contained.booleanhasInternalEvent(java.lang.String name)Test if an internal event is contained.booleanhasMessageEvent(java.lang.String name)Test if a message is contained.voidremoveBelief(MBelief belief)Remove a belief.voidsetBeliefs(java.util.List<MBelief> beliefs)Set the beliefs.voidsetCapabilities(java.util.List<MCapabilityReference> subcapabilities)Set the sub capabilities.voidsetConditions(java.util.List<MCondition> conditions)Set the conditions.voidsetConfigurations(java.util.List<MConfiguration> configurations)Set the configurations.voidsetExpressions(java.util.List<UnparsedExpression> expressions)Set the expressions.voidsetGoalPublications(java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs)The pubs to set.voidsetGoals(java.util.List<MGoal> goals)Set the goals.voidsetInternalEvents(java.util.List<MInternalEvent> ievents)Set the internal events.voidsetMessageEvents(java.util.List<MMessageEvent> messages)Set the messages.voidsetPlans(java.util.List<MPlan> plans)Set the plans.voidsetServices(java.util.List<MServiceCall> services)Set the services.voidsortPlans(java.lang.ClassLoader cl)Sorts plans according to their line numbers in the source to guarantee their natural declaration order.- 
Methods inherited from class jadex.bdiv3.model.MElementequals, getCapabilityName, getDescription, getElementName, getName, hashCode, internalName, setDescription, setFlatName, setName, toString
 
- 
 
- 
- 
- 
Field Detail- 
beliefsprotected java.util.List<MBelief> beliefs The beliefs.
 - 
goalsprotected java.util.List<MGoal> goals The goals.
 - 
plansprotected java.util.List<MPlan> plans The plans.
 - 
messagesprotected java.util.List<MMessageEvent> messages The message events.
 - 
servicesprotected java.util.List<MServiceCall> services The services.
 - 
expressionsprotected java.util.List<UnparsedExpression> expressions The expressions.
 - 
configurationsprotected java.util.List<MConfiguration> configurations The configurations.
 - 
beliefreferencesprotected java.util.Map<java.lang.String,java.lang.String> beliefreferences The belief mappings (abstract/reference name -> concrete belief name).
 - 
resultmappingsprotected java.util.Map<java.lang.String,java.lang.String> resultmappings The result mappings- 
goalreferencesprotected java.util.Map<java.lang.String,java.lang.String> goalreferences The goal mappings (abstract/reference name -> concrete name).
 - 
eventreferencesprotected java.util.Map<java.lang.String,java.lang.String> eventreferences The event mappings (abstract/reference name -> concrete name).
 - 
expressionreferencesprotected java.util.Map<java.lang.String,java.lang.String> expressionreferences The expression mappings (abstract/reference name -> concrete name).
 - 
subcapabilitiesprotected java.util.List<MCapabilityReference> subcapabilities The subcapabilities.
 - 
ieventsprotected java.util.List<MInternalEvent> ievents The internal events.
 - 
pubsprotected java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs The goal/service publications.
 - 
conditionsprotected java.util.List<MCondition> conditions The expressions.
 - 
Method Detail- 
getBeliefspublic java.util.List<MBelief> getBeliefs() Get the beliefs.- Returns:
- The beliefs.
 
 - 
setBeliefspublic void setBeliefs(java.util.List<MBelief> beliefs) Set the beliefs.- Parameters:
- beliefs- The beliefs to set.
 
 - 
addBeliefpublic void addBelief(MBelief belief) Add a belief.
 - 
removeBeliefpublic void removeBelief(MBelief belief) Remove a belief.
 - 
hasBeliefpublic boolean hasBelief(java.lang.String name) Test if a belief is contained.
 - 
hasBeliefIgnoreCasepublic java.lang.String hasBeliefIgnoreCase(java.lang.String name) Test if a belief is contained.- Parameters:
- name- The name.
- Returns:
- The correctly spelled belief name or null.
 
 - 
getBeliefpublic MBelief getBelief(java.lang.String name) Get a belief.
 - 
getGoalspublic java.util.List<MGoal> getGoals() Get the goals.- Returns:
- The goals.
 
 - 
setGoalspublic void setGoals(java.util.List<MGoal> goals) Set the goals.- Parameters:
- goals- The goals to set.
 
 - 
addGoalpublic void addGoal(MGoal goal) Add a goal.
 - 
getGoalpublic MGoal getGoal(java.lang.String name) Get the goal for its name.- Returns:
- The goal.
 
 - 
getPlanspublic java.util.List<MPlan> getPlans() Get the plans.- Returns:
- The plans.
 
 - 
setPlanspublic void setPlans(java.util.List<MPlan> plans) Set the plans.- Parameters:
- plans- The plans to set.
 
 - 
addPlanpublic void addPlan(MPlan plan) Add a plan.
 - 
getPlanpublic MPlan getPlan(java.lang.String name) Get the plan for its name.- Returns:
- The plan.
 
 - 
sortPlanspublic void sortPlans(java.lang.ClassLoader cl) Sorts plans according to their line numbers in the source to guarantee their natural declaration order.
 - 
getInternalEventspublic java.util.List<MInternalEvent> getInternalEvents() Get the Internals.- Returns:
- The Internals.
 
 - 
setInternalEventspublic void setInternalEvents(java.util.List<MInternalEvent> ievents) Set the internal events.- Parameters:
- ievents- The internal events to set.
 
 - 
addInternalEventpublic void addInternalEvent(MInternalEvent event) Add an internal event.
 - 
hasInternalEventpublic boolean hasInternalEvent(java.lang.String name) Test if an internal event is contained.
 - 
getInternalEventpublic MInternalEvent getInternalEvent(java.lang.String name) Get an internal event.
 - 
getMessageEventspublic java.util.List<MMessageEvent> getMessageEvents() Get the messages.- Returns:
- The messages.
 
 - 
setMessageEventspublic void setMessageEvents(java.util.List<MMessageEvent> messages) Set the messages.- Parameters:
- messages- The messages to set.
 
 - 
addMessageEventpublic void addMessageEvent(MMessageEvent message) Add a message.
 - 
hasMessageEventpublic boolean hasMessageEvent(java.lang.String name) Test if a message is contained.
 - 
getMessageEventpublic MMessageEvent getMessageEvent(java.lang.String name) Get a message event. Null if not found.
 - 
getResolvedGoalpublic MGoal getResolvedGoal(java.lang.String scope, java.lang.String name) Get a goal by resolved name. Exception if not found. This method is meant handles calls from user code (e.g. createXYZ() in a plan). Internally, all references should be mapped to the correct concrete elements already during loading (e.g. config elements).- Parameters:
- scope- The local scope.
- name- The name, relative to scope.
 
 - 
getResolvedInternalEventpublic MInternalEvent getResolvedInternalEvent(java.lang.String scope, java.lang.String name) Get an internal event by resolved name. Exception if not found. This method is meant handles calls from user code (e.g. createXYZ() in a plan). Internally, all references should be mapped to the correct concrete elements already during loading (e.g. config elements).- Parameters:
- scope- The local scope.
- name- The name, relative to scope.
 
 - 
getResolvedMessageEventpublic MMessageEvent getResolvedMessageEvent(java.lang.String scope, java.lang.String name) Get a message event by resolved name. Exception if not found. This method is meant handles calls from user code (e.g. createXYZ() in a plan). Internally, all references should be mapped to the correct concrete elements already during loading (e.g. config elements).- Parameters:
- scope- The local scope.
- name- The name, relative to scope.
 
 - 
getConfigurationspublic java.util.List<MConfiguration> getConfigurations() Get the configurations.- Returns:
- The configurations.
 
 - 
setConfigurationspublic void setConfigurations(java.util.List<MConfiguration> configurations) Set the configurations.- Parameters:
- configurations- The configurations to set.
 
 - 
addConfigurationpublic void addConfiguration(MConfiguration config) Add a configuration.
 - 
getConfigurationpublic MConfiguration getConfiguration(java.lang.String name) Get the configurations.- Returns:
- The configurations.
 
 - 
getServicespublic java.util.List<MServiceCall> getServices() Get the services.- Returns:
- The services.
 
 - 
setServicespublic void setServices(java.util.List<MServiceCall> services) Set the services.- Parameters:
- services- The services to set.
 
 - 
getServicepublic MServiceCall getService(java.lang.String name) Get the plan for its name.- Returns:
- The plan.
 
 - 
addservicepublic void addservice(MServiceCall ser) Add a service.
 - 
getCapabilitiespublic java.util.List<MCapabilityReference> getCapabilities() Get the sub capabilities.- Returns:
- The sub capabilities.
 
 - 
setCapabilitiespublic void setCapabilities(java.util.List<MCapabilityReference> subcapabilities) Set the sub capabilities.- Parameters:
- subcapabilities- The sub capabilities to set.
 
 - 
addCapabilitypublic void addCapability(MCapabilityReference subcapability) Add a sub capability.
 - 
getExpressionspublic java.util.List<UnparsedExpression> getExpressions() Get the expressions.- Returns:
- The expressions.
 
 - 
setExpressionspublic void setExpressions(java.util.List<UnparsedExpression> expressions) Set the expressions.- Parameters:
- expressions- The expressions to set.
 
 - 
addExpressionpublic void addExpression(UnparsedExpression expression) Add a expression.
 - 
hasExpressionpublic boolean hasExpression(java.lang.String name) Test if a expression is contained.
 - 
getExpressionpublic UnparsedExpression getExpression(java.lang.String name) Get a expression.
 - 
getConditionspublic java.util.List<MCondition> getConditions() Get the conditions.- Returns:
- The conditions.
 
 - 
setConditionspublic void setConditions(java.util.List<MCondition> conditions) Set the conditions.- Parameters:
- conditions- The conditions to set.
 
 - 
addConditionpublic void addCondition(MCondition condition) Add a condition.
 - 
hasConditionpublic boolean hasCondition(java.lang.String name) Test if a condition is contained.
 - 
getConditionpublic MCondition getCondition(java.lang.String name) Get a condition.
 - 
getGoalPublicationspublic java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> getGoalPublications() Get the pubs.- Returns:
- The pubs
 
 - 
setGoalPublicationspublic void setGoalPublications(java.util.Map<ClassInfo,java.util.List<Tuple2<MGoal,java.lang.String>>> pubs) The pubs to set.- Parameters:
- pubs- The pubs to set
 
 - 
addGoalPublicationpublic void addGoalPublication(ClassInfo ci, MGoal mgoal, java.lang.String methodname) Add a publication info.
 - 
getBeliefReferencespublic java.util.Map<java.lang.String,java.lang.String> getBeliefReferences() Get the fully qualified belief references (abstract/reference name -> concrete belief name).
 - 
addBeliefReferencepublic void addBeliefReference(java.lang.String reference, java.lang.String concrete)Add a belief reference (abstract/reference name -> concrete belief name).- Parameters:
- reference- The fully qualified abstract / reference belief name.
- concrete- The fully qualified concrete belief name.
 
 - 
getResultMappingspublic java.util.Map<java.lang.String,java.lang.String> getResultMappings() Get the result mappings (concrete belief->result name). Note: result mappings are inverse to reference mappings!
 - 
addResultMappingpublic void addResultMapping(java.lang.String belief, java.lang.String result)Add a result mapping. Note: result mappings are inverse to reference mappings!- Parameters:
- belief- The concrete belief name (fully qualified).
- result- The result name.
 
 - 
getExpressionReferencespublic java.util.Map<java.lang.String,java.lang.String> getExpressionReferences() Get the fully qualified expression references (abstract/reference name -> concrete expression name).
 - 
addExpressionReferencepublic void addExpressionReference(java.lang.String reference, java.lang.String concrete)Add a expression reference (abstract/reference name -> concrete expression name).- Parameters:
- reference- The fully qualified abstract / reference expression name.
- concrete- The fully qualified concrete expression name.
 
 - 
getEventReferencespublic java.util.Map<java.lang.String,java.lang.String> getEventReferences() Get the fully qualified event references (abstract/reference name -> concrete event name).
 - 
addEventReferencepublic void addEventReference(java.lang.String reference, java.lang.String concrete)Add a event reference (abstract/reference name -> concrete event name).- Parameters:
- reference- The fully qualified abstract / reference event name.
- concrete- The fully qualified concrete event name.
 
 - 
getGoalReferencespublic java.util.Map<java.lang.String,java.lang.String> getGoalReferences() Get the fully qualified goal references (abstract/reference name -> concrete goal name).
 - 
addGoalReferencepublic void addGoalReference(java.lang.String reference, java.lang.String concrete)Add a goal reference (abstract/reference name -> concrete goal name).- Parameters:
- reference- The fully qualified abstract / reference goal name.
- concrete- The fully qualified concrete goal name.
 
 - 
addReferenceprotected 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.
 - 
getReferencesprotected 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.
 
- 
 
- 
 
- 
 
-