Class IvmlElementIdentifier
java.lang.Object
net.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
eu.qualimaster.easy.extension.internal.IvmlElementIdentifier
- All Implemented Interfaces:
PipelineVisitor.IVariableMapper
public class IvmlElementIdentifier
extends net.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
implements PipelineVisitor.IVariableMapper
Uses
IvmlElements and IObservables to identify temporary value mappings.- Author:
- El-Sharkawy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionprivate static enumPart of the iterator, stores which kind of observable/variable mapper shall be used.static classA 2-tuple consisting ofIvmlElementandIObservable, which are used to generate unique identifiers.private static classHandles profiling lifecycle information. -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescriptionIvmlElementIdentifier(net.ssehub.easy.varModel.confModel.Configuration config) Sole constructor for this class. -
Method Summary
Modifier and TypeMethodDescriptionprotected voidassignValue(net.ssehub.easy.varModel.confModel.IDecisionVariable variable, net.ssehub.easy.varModel.model.values.Value value) private voidfillSegmentList(PipelineContentsContainer.MappedInstanceType type, String[] arraySegments, List<String> segments) Part ofsplitID(String)to fill the list for mapped runtime variable instances.protected net.ssehub.easy.varModel.confModel.AssignmentStategetIDIterator(String observableID) private PipelineContentsContainergetPipelineInfos(String pipName) Returns the collected mappings for elements of the specified pipeline.protected StringiDecisionVariableToID(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) protected booleanvoidmap(net.ssehub.easy.varModel.confModel.IDecisionVariable original, net.ssehub.easy.varModel.confModel.IDecisionVariable copy) Maps original and copied variables.protected Objectprotected net.ssehub.easy.varModel.confModel.IDecisionVariablemapVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) private voidsetValueForAvailableAlgorithms(net.ssehub.easy.varModel.model.values.Value value, net.ssehub.easy.varModel.confModel.IDecisionVariable familyElement, String slot) Sets the specified value to all available algorithms of the given family element.Splits a given ID into segments for iteration through the element parts.protected net.ssehub.easy.varModel.model.values.ValuetoIVMLValue(net.ssehub.easy.varModel.confModel.IDecisionVariable trgVariable, Object oValue) protected String
-
Field Details
-
MAIN_PROJECT_ID
- See Also:
-
PROFILING_PIPELINES
-
pipelines
-
pipelineInfos
-
cachedIDSegments
-
varMapping
private Map<net.ssehub.easy.varModel.confModel.IDecisionVariable,net.ssehub.easy.varModel.confModel.IDecisionVariable> varMapping
-
-
Constructor Details
-
IvmlElementIdentifier
public IvmlElementIdentifier(net.ssehub.easy.varModel.confModel.Configuration config) Sole constructor for this class.- Parameters:
config- The used configuration, needed to perform queries.
-
-
Method Details
-
map
public void map(net.ssehub.easy.varModel.confModel.IDecisionVariable original, net.ssehub.easy.varModel.confModel.IDecisionVariable copy) Description copied from interface:PipelineVisitor.IVariableMapperMaps original and copied variables.- Specified by:
mapin interfacePipelineVisitor.IVariableMapper- Parameters:
original- the original variablecopy- the copied variable
-
getPipelineInfos
Returns the collected mappings for elements of the specified pipeline.- Parameters:
pipName- The configured name of the pipeline.- Returns:
- A container containing all elements + mapped elements.
-
variableToID
- Specified by:
variableToIDin classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
-
isNestedVariable
- Specified by:
isNestedVariablein classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
-
getIDIterator
- Specified by:
getIDIteratorin classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
-
splitID
Splits a given ID into segments for iteration through the element parts. Will also use a cached to minimize String operations.- Parameters:
id- The ID to split into individual segments.- Returns:
- An list of the split elements.
-
fillSegmentList
private void fillSegmentList(PipelineContentsContainer.MappedInstanceType type, String[] arraySegments, List<String> segments) Part ofsplitID(String)to fill the list for mapped runtime variable instances.- Parameters:
type- The type of mapped variablearraySegments- The already split ID for an variablesegments- The empty list to fill via side effect
-
iDecisionVariableToID
protected String iDecisionVariableToID(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) - Specified by:
iDecisionVariableToIDin classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
-
mapValue
- Overrides:
mapValuein classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
-
mapVariable
protected net.ssehub.easy.varModel.confModel.IDecisionVariable mapVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable variable) - Overrides:
mapVariablein classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
-
toIVMLValue
protected net.ssehub.easy.varModel.model.values.Value toIVMLValue(net.ssehub.easy.varModel.confModel.IDecisionVariable trgVariable, Object oValue) throws net.ssehub.easy.varModel.model.values.ValueDoesNotMatchTypeException - Specified by:
toIVMLValuein classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>- Throws:
net.ssehub.easy.varModel.model.values.ValueDoesNotMatchTypeException
-
assignValue
protected void assignValue(net.ssehub.easy.varModel.confModel.IDecisionVariable variable, net.ssehub.easy.varModel.model.values.Value value) throws net.ssehub.easy.varModel.confModel.ConfigurationException - Overrides:
assignValuein classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>- Throws:
net.ssehub.easy.varModel.confModel.ConfigurationException
-
getAssignmentState
protected net.ssehub.easy.varModel.confModel.AssignmentState getAssignmentState()- Overrides:
getAssignmentStatein classnet.ssehub.easy.instantiation.rt.core.model.confModel.AbstractVariableIdentifier<IvmlElementIdentifier.ObservableTuple>
-
setValueForAvailableAlgorithms
private void setValueForAvailableAlgorithms(net.ssehub.easy.varModel.model.values.Value value, net.ssehub.easy.varModel.confModel.IDecisionVariable familyElement, String slot) throws net.ssehub.easy.varModel.confModel.ConfigurationException Sets the specified value to all available algorithms of the given family element.- Parameters:
value- The value to set.familyElement- A family element of a pipeline.slot- The slot to configure with the given value.- Throws:
net.ssehub.easy.varModel.confModel.ConfigurationException- in case that the types of the variable declaration andvaluedo not comply
-