use of org.palladiosimulator.pcm.allocation.AllocationFactory in project iobserve-analysis by research-iobserve.
the class AllocationModelFactory method addAllocationContext.
/**
* Add an {@link AllocationContext} for the given {@link ResourceContainer} and
* {@link AssemblyContext} if they are absent to this model. No check for duplication is done!
*
* @param model
* allocation model
* @param resContainer
* container
* @param asmCtx
* assembly context
*/
public static void addAllocationContext(final Allocation model, final ResourceContainer resContainer, final AssemblyContext asmCtx) {
final AllocationFactory factory = AllocationFactory.eINSTANCE;
final AllocationContext allocationCtx = factory.createAllocationContext();
allocationCtx.setEntityName(asmCtx.getEntityName());
allocationCtx.setAssemblyContext_AllocationContext(asmCtx);
allocationCtx.setResourceContainer_AllocationContext(resContainer);
model.getAllocationContexts_Allocation().add(allocationCtx);
}
use of org.palladiosimulator.pcm.allocation.AllocationFactory in project iobserve-analysis by research-iobserve.
the class DeploymentResourceContainerTest method addAllocationContext.
/**
* Add an {@link AllocationContext} for the given {@link ResourceContainer} and
* {@link AssemblyContext} if they are absent to this model. No check for duplication is done!
*
* @param model
* allocation model
* @param resContainer
* container
* @param asmCtx
* assembly context
*/
private void addAllocationContext(final Allocation model, final ResourceContainer resContainer, final AssemblyContext asmCtx) {
final AllocationFactory factory = AllocationFactory.eINSTANCE;
final AllocationContext allocationCtx = factory.createAllocationContext();
allocationCtx.setEntityName(asmCtx.getEntityName());
allocationCtx.setAssemblyContext_AllocationContext(asmCtx);
allocationCtx.setResourceContainer_AllocationContext(resContainer);
model.getAllocationContexts_Allocation().add(allocationCtx);
}
Aggregations