Package jadex.bdiv3.model
Class SBDIModel
- java.lang.Object
-
- jadex.bdiv3.model.SBDIModel
-
public class SBDIModel extends java.lang.Object
Helper methods for pojo BDI and BDI V3X models.
-
-
Constructor Summary
Constructors Constructor Description SBDIModel()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description protected static java.util.Set<java.lang.String>
convertEvents(java.lang.String capa, java.util.Set<java.lang.String> evs, IBDIModel bdimodel)
protected static java.util.List<EventType>
convertEventTypes(java.lang.String capa, java.util.Collection<EventType> evs, IBDIModel bdimodel)
protected static MTrigger
convertTrigger(IBDIModel bdimodel, java.lang.String capa, MTrigger trigger, boolean copy)
Convert a plan trigger or waitqueue and map the events.protected static MCondition
copyCondition(IBDIModel bdimodel, java.lang.String capa, MCondition cond)
Copy a condition and adapt the events.protected static MConfigBeliefElement
copyConfigBelief(IBDIModel bdimodel, java.lang.String capaname, MConfigBeliefElement cbel, java.util.List<MConfigBeliefElement> test)
Copy a config belief element.protected static MConfigParameterElement
copyConfigParameterElement(IBDIModel bdimodel, java.lang.String capaname, MConfigParameterElement cpel, java.util.List<MConfigParameterElement> test)
Copy a config parameter element.protected static void
copyConfiguration(IBDIModel bdimodel, java.lang.String capaname, ConfigurationInfo cinner, ConfigurationInfo couter, MConfiguration inner, MConfiguration outer)
Copy an inner configuration into an outer one.protected static UnparsedExpression
copyExpression(java.lang.String scope, UnparsedExpression upex)
Copy an expression.protected static java.util.List<UnparsedExpression>
copyExpressions(java.lang.String scope, java.util.List<UnparsedExpression> upes)
Copy expressions.protected static MParameter
copyParameter(IBDIModel bdimodel, java.lang.ClassLoader cl, java.lang.String capaname, MParameter param)
Copy a parameter and adapt events.static UnparsedExpression
findBeliefDefaultValue(BDIXModel model, MBelief mbel, java.lang.String configname)
Find the belief/ref value.static java.util.List<UnparsedExpression>
findBeliefSetDefaultValues(BDIXModel model, MBelief mbel, java.lang.String configname)
Find the beliefset/ref value.static void
mergeSubcapabilities(IBDIModel bdimodel, java.util.Map<java.lang.String,IBDIModel> capas, java.lang.ClassLoader cl)
Add elements from sub capabilities into model.static void
replaceReferences(IBDIModel bdimodel)
Add elements from sub capabilities into model.
-
-
-
Method Detail
-
mergeSubcapabilities
public static void mergeSubcapabilities(IBDIModel bdimodel, java.util.Map<java.lang.String,IBDIModel> capas, java.lang.ClassLoader cl)
Add elements from sub capabilities into model.- Parameters:
bdimodel
- The model.capas
- The sub capabilities.
-
copyConfiguration
protected static void copyConfiguration(IBDIModel bdimodel, java.lang.String capaname, ConfigurationInfo cinner, ConfigurationInfo couter, MConfiguration inner, MConfiguration outer)
Copy an inner configuration into an outer one.
-
copyConfigBelief
protected static MConfigBeliefElement copyConfigBelief(IBDIModel bdimodel, java.lang.String capaname, MConfigBeliefElement cbel, java.util.List<MConfigBeliefElement> test)
Copy a config belief element.
-
copyConfigParameterElement
protected static MConfigParameterElement copyConfigParameterElement(IBDIModel bdimodel, java.lang.String capaname, MConfigParameterElement cpel, java.util.List<MConfigParameterElement> test)
Copy a config parameter element.
-
copyParameter
protected static MParameter copyParameter(IBDIModel bdimodel, java.lang.ClassLoader cl, java.lang.String capaname, MParameter param)
Copy a parameter and adapt events.
-
replaceReferences
public static void replaceReferences(IBDIModel bdimodel)
Add elements from sub capabilities into model.- Parameters:
bdimodel
- The model.capas
- The sub capabilities.
-
findBeliefDefaultValue
public static UnparsedExpression findBeliefDefaultValue(BDIXModel model, MBelief mbel, java.lang.String configname)
Find the belief/ref value. Returns the expression of the default value.
-
findBeliefSetDefaultValues
public static java.util.List<UnparsedExpression> findBeliefSetDefaultValues(BDIXModel model, MBelief mbel, java.lang.String configname)
Find the beliefset/ref value. Returns the expressions of the default values.
-
convertTrigger
protected static MTrigger convertTrigger(IBDIModel bdimodel, java.lang.String capa, MTrigger trigger, boolean copy)
Convert a plan trigger or waitqueue and map the events. Create a copy if desired.
-
convertEvents
protected static java.util.Set<java.lang.String> convertEvents(java.lang.String capa, java.util.Set<java.lang.String> evs, IBDIModel bdimodel)
-
convertEventTypes
protected static java.util.List<EventType> convertEventTypes(java.lang.String capa, java.util.Collection<EventType> evs, IBDIModel bdimodel)
-
copyCondition
protected static MCondition copyCondition(IBDIModel bdimodel, java.lang.String capa, MCondition cond)
Copy a condition and adapt the events.
-
copyExpression
protected static UnparsedExpression copyExpression(java.lang.String scope, UnparsedExpression upex)
Copy an expression. Adds correct scope.
-
copyExpressions
protected static java.util.List<UnparsedExpression> copyExpressions(java.lang.String scope, java.util.List<UnparsedExpression> upes)
Copy expressions. Adds correct scope.
-
-