Class PipelineVisitor

java.lang.Object
eu.qualimaster.easy.extension.internal.PipelineVisitor

public class PipelineVisitor extends Object
Visits a pipeline variable and gathers PipelineContentsContainer.
Author:
El-Sharkawy
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    (package private) static interface 
    Performs optional variable mapping.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private net.ssehub.easy.varModel.confModel.Configuration
     
     
    private boolean
     
    private Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private boolean
     
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    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.
    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 Type
    Method
    Description
    private net.ssehub.easy.varModel.confModel.IDecisionVariable
    extractVar(net.ssehub.easy.varModel.model.values.ReferenceValue refValue)
    Extracts an IDecisionVariable from the given ReferenceValue.
    Returns the gathered information (directly available after calling the constructor).
    private void
    visitAvailable(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement, net.ssehub.easy.varModel.confModel.IDecisionVariable oVar)
    Visits the available collection in pipelineElement and links original and copied variables.
    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 in pipelineElement and links original and copied variables.
    private void
    visitContainerValue(net.ssehub.easy.varModel.model.values.ContainerValue containerValue)
    Iterates through a container, extracts all referenced variables, and calls the visit method.
    private void
    visitPipelineElement(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement)
    Responsible for visiting the next element and storing relevant information.
    private void
    visitProcessingElement(net.ssehub.easy.varModel.confModel.IDecisionVariable pipelineElement)
    General part of the visitation method for pipeline elements.

    Methods inherited from class java.lang.Object

    clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
  • Field Details

    • container

      private PipelineContentsContainer container
    • config

      private net.ssehub.easy.varModel.confModel.Configuration config
    • containerInitialized

      private boolean containerInitialized
    • initializeRuntimeMapping

      private boolean initializeRuntimeMapping
    • done

      private Set<net.ssehub.easy.varModel.confModel.IDecisionVariable> 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 - true runtime variables will be mapped, false mapping 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 - true runtime variables will be mapped, false mapping 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

      public PipelineContentsContainer 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 in pipelineElement and links original and copied variables.
      Parameters:
      pipelineElement - the element to visit
      oVar - 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 in pipelineElement and links original and copied variables.
      Parameters:
      oValue - the original value (may be variable or collection)
      aValue - the copied (available) value
      eltName - 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 an IDecisionVariable from the given ReferenceValue.
      Parameters:
      refValue - A value pointing to an element of a pipeline.
      Returns:
      The referenced IDecisionVariable or in case of any errors null.