Class PipelineContentsContainer
java.lang.Object
eu.qualimaster.easy.extension.internal.PipelineContentsContainer
Stores information of a pipeline, which is relevant for the
IvmlElementIdentifier.- Author:
- El-Sharkawy, Holger Eichelberger
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionstatic enumDenotes which kind of model element was mapped / shall be returned. -
Field Summary
FieldsModifier and TypeFieldDescriptionprivate 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.Modelsprivate Stringprivate List<net.ssehub.easy.varModel.confModel.IDecisionVariable> private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> private List<net.ssehub.easy.varModel.confModel.IDecisionVariable> -
Constructor Summary
ConstructorsConstructorDescriptionDefault constructor.PipelineContentsContainer(String pipelineName) Constructor for debugging purpose. -
Method Summary
Modifier and TypeMethodDescription(package private) voidaddDataManagementElement(net.ssehub.easy.varModel.confModel.IDecisionVariable dataManagement) Adds a DataManagement element of the pipeline.(package private) voidaddFamilyElement(net.ssehub.easy.varModel.confModel.IDecisionVariable familyElement) Adds a family element.(package private) voidaddReplaySink(net.ssehub.easy.varModel.confModel.IDecisionVariable replaySink) Adds a ReplaySink of the pipeline.(package private) voidaddSink(net.ssehub.easy.varModel.confModel.IDecisionVariable sink) Adds a non ReplaySink of the pipeline.(package private) voidaddSource(net.ssehub.easy.varModel.confModel.IDecisionVariable source) Adds a source of the pipeline.private voidcollectAlgorithmFromFamily(net.ssehub.easy.varModel.confModel.Configuration config, net.ssehub.easy.varModel.model.values.ContainerValue referencedOrgAlgos, List<net.ssehub.easy.varModel.confModel.IDecisionVariable> runtimeAlgorithms) Part ofgatherAlgorithms(), collects one (original) algorithm together with its mapped counterpart.private voidCreates the algorithm structure, this includes the original algorithms as well as the mapped runtime counterparts.private voidgatherMappedNonFamilyElement(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.IDecisionVariablegetMappedInstance(PipelineContentsContainer.MappedInstanceType type, String orgName) 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.ModelsReturns (and initializes lazily) the underlying models instance.private eu.qualimaster.coordination.INameMappingReturns 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> getSinks()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.booleanhasMapping(PipelineContentsContainer.MappedInstanceType type, String orgName) Returns whether there is a mapping (not necessarily a mapped instance) for the given (configured) item.(package private) voidinit()Creates structured information for dependent information, which is not collected directly during visiting.static booleanisMappingVariable(net.ssehub.easy.varModel.confModel.IDecisionVariable var) Returns whether the givenIDecisionVariableis a mapped runtime counterpart of a model element.toString()
-
Field Details
-
allMappedVariables
-
pipelineName
-
sources
-
familyElements
-
dataManagementElements
-
sinks
-
replaySinks
-
algorithmMapping
-
sourceMapping
-
sinkMapping
-
models
private eu.qualimaster.coordination.RepositoryConnector.Models models
-
-
Constructor Details
-
PipelineContentsContainer
public PipelineContentsContainer()Default constructor. -
PipelineContentsContainer
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 givenIDecisionVariableis a mapped runtime counterpart of a model element.- Parameters:
var- TheIDecisionVariableto test.- Returns:
trueif it is a runtime variable,falseif 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 ofgatherAlgorithms(), collects one (original) algorithm together with its mapped counterpart.- Parameters:
config- The top level configuration, needed for queryingIDecisionVariables.referencedOrgAlgos- A container value containing reference values to algorithms.runtimeAlgorithms- A list of already mapped counterparts. Maybenull, 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 ofsources, sinksslotName- 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
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:
truefor mapping,falseelse
-
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
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
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
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
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
-