Class PipelineContentsContainer

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

public class PipelineContentsContainer extends Object
Stores information of a pipeline, which is relevant for the IvmlElementIdentifier.
Author:
El-Sharkawy, Holger Eichelberger
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static enum 
    Denotes which kind of model element was mapped / shall be returned.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    private Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private static Set<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private eu.qualimaster.coordination.RepositoryConnector.Models
     
    private String
     
    private List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
    private List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
     
  • Constructor Summary

    Constructors
    Constructor
    Description
    Default constructor.
    Constructor for debugging purpose.
  • Method Summary

    Modifier and Type
    Method
    Description
    (package private) void
    addDataManagementElement(net.ssehub.easy.varModel.confModel.IDecisionVariable dataManagement)
    Adds a DataManagement element of the pipeline.
    (package private) void
    addFamilyElement(net.ssehub.easy.varModel.confModel.IDecisionVariable familyElement)
    Adds a family element.
    (package private) void
    addReplaySink(net.ssehub.easy.varModel.confModel.IDecisionVariable replaySink)
    Adds a ReplaySink of the pipeline.
    (package private) void
    addSink(net.ssehub.easy.varModel.confModel.IDecisionVariable sink)
    Adds a non ReplaySink of the pipeline.
    (package private) void
    addSource(net.ssehub.easy.varModel.confModel.IDecisionVariable source)
    Adds a source of the pipeline.
    private void
    collectAlgorithmFromFamily(net.ssehub.easy.varModel.confModel.Configuration config, net.ssehub.easy.varModel.model.values.ContainerValue referencedOrgAlgos, List<net.ssehub.easy.varModel.confModel.IDecisionVariable> runtimeAlgorithms)
    Part of gatherAlgorithms(), collects one (original) algorithm together with its mapped counterpart.
    private void
    Creates the algorithm structure, this includes the original algorithms as well as the mapped runtime counterparts.
    private void
    gatherMappedNonFamilyElement(List<net.ssehub.easy.varModel.confModel.IDecisionVariable> orignalVariables, String slotName, Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable> mapping)
    Creates the mapping structure for mapping runtime variables.
    List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
    Returns a list of all member data management elements of the visited pipeline.
    List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
    Returns a list of all member family elements of the visited pipeline.
    net.ssehub.easy.varModel.confModel.IDecisionVariable
    Returns the mapped instance for the given (configured) item.
    private List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
    getMappedMembers(net.ssehub.easy.varModel.confModel.IDecisionVariable originalVariable)
    Returns all mapped (runtime/adaptation) variables belonging to the given pipeline element.
    private eu.qualimaster.coordination.RepositoryConnector.Models
    Returns (and initializes lazily) the underlying models instance.
    private eu.qualimaster.coordination.INameMapping
    Returns the responsible name mapping.
    List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
    Returns a list of all member replay sinks of the visited pipeline.
    List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
    Returns a list of all member non replay sinks of the visited pipeline.
    List<net.ssehub.easy.varModel.confModel.IDecisionVariable>
    Returns a list of all member sources of the visited pipeline.
    boolean
    Returns whether there is a mapping (not necessarily a mapped instance) for the given (configured) item.
    (package private) void
    Creates structured information for dependent information, which is not collected directly during visiting.
    static boolean
    isMappingVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable var)
    Returns whether the given IDecisionVariable is a mapped runtime counterpart of a model element.
     

    Methods inherited from class java.lang.Object

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

    • allMappedVariables

      private static Set<net.ssehub.easy.varModel.confModel.IDecisionVariable> allMappedVariables
    • pipelineName

      private String pipelineName
    • sources

      private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> sources
    • familyElements

      private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> familyElements
    • dataManagementElements

      private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> dataManagementElements
    • sinks

      private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> sinks
    • replaySinks

      private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> replaySinks
    • algorithmMapping

      private Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable> algorithmMapping
    • sourceMapping

      private Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable> sourceMapping
    • sinkMapping

      private Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable> sinkMapping
    • models

      private eu.qualimaster.coordination.RepositoryConnector.Models models
  • Constructor Details

    • PipelineContentsContainer

      public PipelineContentsContainer()
      Default constructor.
    • PipelineContentsContainer

      public PipelineContentsContainer(String pipelineName)
      Constructor for debugging purpose.
      Parameters:
      pipelineName - The name of the pipeline. Is only used for debugging purpose.
  • Method Details

    • addSource

      void addSource(net.ssehub.easy.varModel.confModel.IDecisionVariable source)
      Adds a source of the pipeline.
      Parameters:
      source - A source of the pipeline.
    • addSink

      void addSink(net.ssehub.easy.varModel.confModel.IDecisionVariable sink)
      Adds a non ReplaySink of the pipeline.
      Parameters:
      sink - A non ReplaySink of the pipeline.
    • addReplaySink

      void addReplaySink(net.ssehub.easy.varModel.confModel.IDecisionVariable replaySink)
      Adds a ReplaySink of the pipeline.
      Parameters:
      replaySink - A ReplaySink of the pipeline.
    • addFamilyElement

      void addFamilyElement(net.ssehub.easy.varModel.confModel.IDecisionVariable familyElement)
      Adds a family element.
      Parameters:
      familyElement - A family element of the pipeline.
    • addDataManagementElement

      void addDataManagementElement(net.ssehub.easy.varModel.confModel.IDecisionVariable dataManagement)
      Adds a DataManagement element of the pipeline.
      Parameters:
      dataManagement - A DataManagement element of the pipeline.
    • isMappingVariable

      public static boolean isMappingVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable var)
      Returns whether the given IDecisionVariable is a mapped runtime counterpart of a model element.
      Parameters:
      var - The IDecisionVariable to test.
      Returns:
      true if it is a runtime variable, false if it is an element of the originally defined model.
    • gatherAlgorithms

      private void gatherAlgorithms()
      Creates the algorithm structure, this includes the original algorithms as well as the mapped runtime counterparts.
    • collectAlgorithmFromFamily

      private void collectAlgorithmFromFamily(net.ssehub.easy.varModel.confModel.Configuration config, net.ssehub.easy.varModel.model.values.ContainerValue referencedOrgAlgos, List<net.ssehub.easy.varModel.confModel.IDecisionVariable> runtimeAlgorithms)
      Part of gatherAlgorithms(), collects one (original) algorithm together with its mapped counterpart.
      Parameters:
      config - The top level configuration, needed for querying IDecisionVariables.
      referencedOrgAlgos - A container value containing reference values to algorithms.
      runtimeAlgorithms - A list of already mapped counterparts. Maybe null, in this case no mapping will be created.
    • getMappedMembers

      private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> getMappedMembers(net.ssehub.easy.varModel.confModel.IDecisionVariable originalVariable)
      Returns all mapped (runtime/adaptation) variables belonging to the given pipeline element.
      Parameters:
      originalVariable - The original element of the pipeline
      Returns:
      All mapped (runtime/adaptation) variables belonging to the given pipeline element (null if there is none)
    • gatherMappedNonFamilyElement

      private void gatherMappedNonFamilyElement(List<net.ssehub.easy.varModel.confModel.IDecisionVariable> orignalVariables, String slotName, Map<String,net.ssehub.easy.varModel.confModel.IDecisionVariable> mapping)
      Creates the mapping structure for mapping runtime variables. This does not work for algorithms of a family, because they have a different nesting structure.
      Parameters:
      orignalVariables - The list of original variables for which the mapped variables shall be retrieved. One of sources, sinks
      slotName - The slot name of the pipeline element, which is pointing to the selected element.
      mapping - The mapping to be filled, e.g., (original source name, mapped source instance).
    • getModels

      private eu.qualimaster.coordination.RepositoryConnector.Models getModels()
      Returns (and initializes lazily) the underlying models instance.
      Returns:
      the models
    • getNameMapping

      private eu.qualimaster.coordination.INameMapping getNameMapping()
      Returns the responsible name mapping.
      Returns:
      the name mapping
    • init

      void init()
      Creates structured information for dependent information, which is not collected directly during visiting.
    • getMappedInstance

      public net.ssehub.easy.varModel.confModel.IDecisionVariable getMappedInstance(PipelineContentsContainer.MappedInstanceType type, String orgName)
      Returns the mapped instance for the given (configured) item.
      Parameters:
      type - Specifies for which kind of pipeline element the mapped element shall be returned.
      orgName - The user defined name of the variable.
      Returns:
      The configured name of the original algorithm from the model.
    • hasMapping

      public boolean hasMapping(PipelineContentsContainer.MappedInstanceType type, String orgName)
      Returns whether there is a mapping (not necessarily a mapped instance) for the given (configured) item.
      Parameters:
      type - Specifies for which kind of pipeline element the mapped element shall be returned.
      orgName - The user defined name of the variable.
      Returns:
      true for mapping, false else
    • getSources

      public List<net.ssehub.easy.varModel.confModel.IDecisionVariable> getSources()
      Returns a list of all member sources of the visited pipeline.
      Returns:
      A unmodifiable list of source elements of the pipeline, won't be null.
    • getSinks

      public List<net.ssehub.easy.varModel.confModel.IDecisionVariable> getSinks()
      Returns a list of all member non replay sinks of the visited pipeline.
      Returns:
      A unmodifiable list of non replay sink elements of the pipeline, won't be null.
    • getReplaySinks

      public List<net.ssehub.easy.varModel.confModel.IDecisionVariable> getReplaySinks()
      Returns a list of all member replay sinks of the visited pipeline.
      Returns:
      A unmodifiable list of replay sink elements of the pipeline, won't be null.
    • getFamilyElements

      public List<net.ssehub.easy.varModel.confModel.IDecisionVariable> getFamilyElements()
      Returns a list of all member family elements of the visited pipeline.
      Returns:
      A unmodifiable list of family elements of the pipeline, won't be null.
    • getDataManagementElements

      public List<net.ssehub.easy.varModel.confModel.IDecisionVariable> getDataManagementElements()
      Returns a list of all member data management elements of the visited pipeline.
      Returns:
      A unmodifiable list of data management elements of the pipeline, won't be null.
    • toString

      public String toString()
      Overrides:
      toString in class Object