Package eu.qualimaster.easy.extension
Class ObservableMapping
java.lang.Object
eu.qualimaster.easy.extension.ObservableMapping
A static mapping between implementing classes of observables and variables of the model.
- Author:
- El-Sharkawy
-
Field Summary
FieldsModifier and TypeFieldDescriptionMapping for observables of algorithms.Mapping for observables, do not have an own mapping (currently, only algorithms have an own mapping).Reverse mapping forALGORITHM_OBSERVABLES.Reverse mapping forGENERAL_OBSERVABLES. -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic StringmapAlgorithmObservable(String implementingObservableName) Returns the variable name for anIObservableof an algorithm.static StringmapGeneralObservable(String implementingObservableName) Returns the variable name for anIObservable(not useable for algorithms).static StringmapReverseAlgorithmObservable(String variableObservableName) ReturnsIObservable.name()for a given runtime variable of the IVML model of an algorithm.static StringmapReverseGeneralObservable(String variableObservableName) ReturnsIObservable.name()for a given runtime variable of the IVML model (not useable for algorithms).private static voidPart of the static block, adds a mapping between class name of an obervable and the model item to the two maps.private static voidputAlgorithmMapping(eu.qualimaster.observables.IObservable observable, String variableName) Part of the static block, adds a mapping between class name of an obervable and the algorithm item to the map.
-
Field Details
-
ALGORITHM_OBSERVABLES
Mapping for observables of algorithms. -
REVERSE_ALGORITHM_MAPPING
Reverse mapping forALGORITHM_OBSERVABLES. -
GENERAL_OBSERVABLES
Mapping for observables, do not have an own mapping (currently, only algorithms have an own mapping). -
REVERSE_GENERAL_MAPPING
Reverse mapping forGENERAL_OBSERVABLES.
-
-
Constructor Details
-
ObservableMapping
public ObservableMapping()
-
-
Method Details
-
putAlgorithmMapping
private static void putAlgorithmMapping(eu.qualimaster.observables.IObservable observable, String variableName) Part of the static block, adds a mapping between class name of an obervable and the algorithm item to the map.- Parameters:
observable- The implementing obervable enumeration.variableName- The name of the model element.
-
put
Part of the static block, adds a mapping between class name of an obervable and the model item to the two maps. Not suitable for algorithms as they have different slot names for the same observables as the other elements.- Parameters:
observable- The implementing observable enumeration.variableName- The name of the model element.
-
mapAlgorithmObservable
Returns the variable name for anIObservableof an algorithm.- Parameters:
implementingObservableName- The name of anIObservableimplementation.- Returns:
- the variable name of the IVML model, or
nullif there is no suchIObservable.
-
mapReverseAlgorithmObservable
ReturnsIObservable.name()for a given runtime variable of the IVML model of an algorithm.- Parameters:
variableObservableName- a runtime variable of an algorithm- Returns:
IObservable.name()ornullif there exist no suchIObservablefor the given variable name. This must be an variable name and not a display name!
-
mapGeneralObservable
Returns the variable name for anIObservable(not useable for algorithms).- Parameters:
implementingObservableName- The name of anIObservableimplementation.- Returns:
- the variable name of the IVML model, or
nullif there is no suchIObservable.
-
mapReverseGeneralObservable
ReturnsIObservable.name()for a given runtime variable of the IVML model (not useable for algorithms).- Parameters:
variableObservableName- a runtime variable- Returns:
IObservable.name()ornullif there exist no suchIObservablefor the given variable name. This must be an variable name and not a display name!
-