Class PipelineVisitor
java.lang.Object
eu.qualimaster.easy.extension.internal.PipelineVisitor
Visits a pipeline variable and gathers
PipelineContentsContainer.- Author:
- El-Sharkawy
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescription(package private) static interfacePerforms optional variable mapping. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate net.ssehub.easy.varModel.confModel.Configurationprivate PipelineContentsContainerprivate booleanprivate Set<net.ssehub.easy.varModel.confModel.IDecisionVariable> private booleanprivate PipelineVisitor.IVariableMapper -
Constructor Summary
ConstructorsConstructorDescriptionPipelineVisitor(net.ssehub.easy.varModel.confModel.IDecisionVariable pipeline, boolean initializeRuntimeMapping) Constructor for deciding whether runtime instances shall be mapped or whether this is not needed.PipelineVisitor(net.ssehub.easy.varModel.confModel.IDecisionVariable pipeline, boolean initializeRuntimeMapping, PipelineVisitor.IVariableMapper mapper) Constructor for deciding whether runtime instances shall be mapped or whether this is not needed.PipelineVisitor(net.ssehub.easy.varModel.confModel.IDecisionVariable pipeline, PipelineVisitor.IVariableMapper mapper) Constructor which will map runtime clones. -
Method Summary
Modifier and TypeMethodDescriptionprivate net.ssehub.easy.varModel.confModel.IDecisionVariableextractVar(net.ssehub.easy.varModel.model.values.ReferenceValue refValue) Extracts anIDecisionVariablefrom the givenReferenceValue.Returns the gathered information (directly available after calling the constructor).private voidvisitAvailable(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement, net.ssehub.easy.varModel.confModel.IDecisionVariable oVar) Visits the available collection inpipelineElementand links original and copied variables.private voidvisitAvailable(net.ssehub.easy.varModel.model.values.Value oValue, net.ssehub.easy.varModel.model.values.Value aValue, String eltName) Visits the available collection inpipelineElementand links original and copied variables.private voidvisitContainerValue(net.ssehub.easy.varModel.model.values.ContainerValue containerValue) Iterates through a container, extracts all referenced variables, and calls the visit method.private voidvisitPipelineElement(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement) Responsible for visiting the next element and storing relevant information.private voidvisitProcessingElement(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement) General part of the visitation method for pipeline elements.
-
Field Details
-
container
-
config
private net.ssehub.easy.varModel.confModel.Configuration config -
containerInitialized
private boolean containerInitialized -
initializeRuntimeMapping
private boolean initializeRuntimeMapping -
done
-
mapper
-
-
Constructor Details
-
PipelineVisitor
PipelineVisitor(net.ssehub.easy.varModel.confModel.IDecisionVariable pipeline, PipelineVisitor.IVariableMapper mapper) Constructor which will map runtime clones.- Parameters:
pipeline- The pipeline for which the information should be extracted.mapper- optional variable mapper instance
-
PipelineVisitor
public PipelineVisitor(net.ssehub.easy.varModel.confModel.IDecisionVariable pipeline, boolean initializeRuntimeMapping) Constructor for deciding whether runtime instances shall be mapped or whether this is not needed. No mapper.- Parameters:
pipeline- The pipeline for which the information should be extracted.initializeRuntimeMapping-trueruntime variables will be mapped,falsemapping is not needed. Mapping (true) is only needed during adaptation, no mapping (false) is needed in QM-Iconf application.
-
PipelineVisitor
public PipelineVisitor(net.ssehub.easy.varModel.confModel.IDecisionVariable pipeline, boolean initializeRuntimeMapping, PipelineVisitor.IVariableMapper mapper) Constructor for deciding whether runtime instances shall be mapped or whether this is not needed.- Parameters:
pipeline- The pipeline for which the information should be extracted.initializeRuntimeMapping-trueruntime variables will be mapped,falsemapping is not needed. Mapping (true) is only needed during adaptation, no mapping (false) is needed in QM-Iconf application.mapper- variable mapper instance to link original and copied variables
-
-
Method Details
-
getPipelineContents
Returns the gathered information (directly available after calling the constructor).- Returns:
- The referenced variables of the pipeline.
-
visitPipelineElement
private void visitPipelineElement(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement) Responsible for visiting the next element and storing relevant information.- Parameters:
pipelineElement- The currently visited element (node or flow) of the pipeline.
-
visitAvailable
private void visitAvailable(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement, net.ssehub.easy.varModel.confModel.IDecisionVariable oVar) Visits the available collection inpipelineElementand links original and copied variables.- Parameters:
pipelineElement- the element to visitoVar- the original data variable
-
visitAvailable
private void visitAvailable(net.ssehub.easy.varModel.model.values.Value oValue, net.ssehub.easy.varModel.model.values.Value aValue, String eltName) Visits the available collection inpipelineElementand links original and copied variables.- Parameters:
oValue- the original value (may be variable or collection)aValue- the copied (available) valueeltName- the element name
-
visitProcessingElement
private void visitProcessingElement(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement) General part of the visitation method for pipeline elements. Visits the outgoing flow of a processing element (Datamanagement or FamilyElement).- Parameters:
pipelineElement- A Datamanagement or FamilyElement
-
visitContainerValue
private void visitContainerValue(net.ssehub.easy.varModel.model.values.ContainerValue containerValue) Iterates through a container, extracts all referenced variables, and calls the visit method.- Parameters:
containerValue- A container of references.
-
extractVar
private net.ssehub.easy.varModel.confModel.IDecisionVariable extractVar(net.ssehub.easy.varModel.model.values.ReferenceValue refValue) Extracts anIDecisionVariablefrom the givenReferenceValue.- Parameters:
refValue- A value pointing to an element of a pipeline.- Returns:
- The referenced
IDecisionVariableor in case of any errorsnull.
-