Class ConfigurationInitializer
java.lang.Object
eu.qualimaster.easy.extension.internal.ConfigurationInitializer
Configuration initialization utility functions. [map into VIL]
- Author:
- Holger Eichelberger
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static voidaddVariableMapping(net.ssehub.easy.varModel.confModel.IDecisionVariable var, String fieldName, eu.qualimaster.coordination.RuntimeVariableMapping result) Adds the variable mapping forvaron fieldfieldNametoresult.static eu.qualimaster.coordination.RuntimeVariableMappingcreateVariableMapping(net.ssehub.easy.varModel.confModel.Configuration config, eu.qualimaster.coordination.RuntimeVariableMapping result) Creates a runtime variable mapping forconfiguration.static voidinitializeConfiguration(net.ssehub.easy.varModel.confModel.Configuration config, String newVariablePrefix, boolean initActual, eu.qualimaster.coordination.RuntimeVariableMapping mapping) Initializes a QM model with runtime instances.static voidinitializeConfiguration(net.ssehub.easy.varModel.confModel.Configuration config, String newVariablePrefix, eu.qualimaster.coordination.RuntimeVariableMapping mapping) Initializes a QM model with runtime instances.private static String[]Selects from the given available and actual name, whether both or only available shall be returned.
-
Constructor Details
-
ConfigurationInitializer
public ConfigurationInitializer()
-
-
Method Details
-
initializeConfiguration
public static void initializeConfiguration(net.ssehub.easy.varModel.confModel.Configuration config, String newVariablePrefix, eu.qualimaster.coordination.RuntimeVariableMapping mapping) throws net.ssehub.easy.instantiation.core.model.common.VilException Initializes a QM model with runtime instances. [preliminary, separate concerns] Actual instances are initialized by default.- Parameters:
config- the configurationnewVariablePrefix- the prefix for the new variablesmapping- optional runtime mapping to be updated (may be null)- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case that initialization fails
-
initializeConfiguration
public static void initializeConfiguration(net.ssehub.easy.varModel.confModel.Configuration config, String newVariablePrefix, boolean initActual, eu.qualimaster.coordination.RuntimeVariableMapping mapping) throws net.ssehub.easy.instantiation.core.model.common.VilException Initializes a QM model with runtime instances. [preliminary, separate concerns]- Parameters:
config- the configurationnewVariablePrefix- the prefix for the new variablesinitActual- whether actual instance shall be initialized by defaultmapping- optional runtime mapping to be updated (may be null)- Throws:
net.ssehub.easy.instantiation.core.model.common.VilException- in case that initialization fails
-
select
Selects from the given available and actual name, whether both or only available shall be returned.- Parameters:
initActual- include or excludeactualavailable- the name of the available collection slotactual- the name of the actual slot- Returns:
- the selected slot names
-
createVariableMapping
public static eu.qualimaster.coordination.RuntimeVariableMapping createVariableMapping(net.ssehub.easy.varModel.confModel.Configuration config, eu.qualimaster.coordination.RuntimeVariableMapping result) throws net.ssehub.easy.varModel.model.ModelQueryException Creates a runtime variable mapping forconfiguration.- Parameters:
config- the configurationresult- the runtime configuration mapping to modify (a new one is created if null)- Returns:
- the runtime variable mapping
- Throws:
net.ssehub.easy.varModel.model.ModelQueryException- in case of problems accessing model elements
-
addVariableMapping
private static void addVariableMapping(net.ssehub.easy.varModel.confModel.IDecisionVariable var, String fieldName, eu.qualimaster.coordination.RuntimeVariableMapping result) Adds the variable mapping forvaron fieldfieldNametoresult.- Parameters:
var- the variable to analyzefieldName- the field name to analyzeresult- the mapping to be modified as a side effect
-