Search in sources :

Example 6 with ResourceContainerPrivacy

use of org.palladiosimulator.pcm.resourceenvironmentprivacy.ResourceContainerPrivacy in project iobserve-analysis by research-iobserve.

the class ResourceEnvironmentGeneration method createResourceContainer.

private ResourceContainerPrivacy createResourceContainer(final String prefix) {
    final ResourceContainerPrivacy resContainer = ResourceEnvironmentGeneration.RES_ENV_PRIVACY_FACTORY.createResourceContainerPrivacy();
    resContainer.setEntityName(prefix + "_ResCon");
    final int randGeoLocation = ThreadLocalRandom.current().nextInt(this.countryCodes.length);
    resContainer.setGeolocation(this.countryCodes[randGeoLocation].getNumeric());
    return resContainer;
}
Also used : ResourceContainerPrivacy(org.palladiosimulator.pcm.resourceenvironmentprivacy.ResourceContainerPrivacy)

Example 7 with ResourceContainerPrivacy

use of org.palladiosimulator.pcm.resourceenvironmentprivacy.ResourceContainerPrivacy in project iobserve-analysis by research-iobserve.

the class ResourceEnvironmentModelFactory method createResourceContainerPrivacy.

/**
 * Create a {@link ResourceContainer} with the given name, without checking if it already
 * exists. Use {@link #createResourceContainerIfAbsent(String)} instead if you wont create the
 * container if it is already available.
 *
 * @param model
 *            resource environment model
 * @param name
 *            name of the new container
 * @return builder
 */
public static ResourceContainer createResourceContainerPrivacy(final ResourceEnvironment model, final String name) {
    final ResourceContainerPrivacy resContainer = ResourceenvironmentPrivacyFactory.eINSTANCE.createResourceContainerPrivacy();
    resContainer.setEntityName(name);
    model.getResourceContainer_ResourceEnvironment().add(resContainer);
    return resContainer;
}
Also used : ResourceContainerPrivacy(org.palladiosimulator.pcm.resourceenvironmentprivacy.ResourceContainerPrivacy)

Aggregations

ResourceContainerPrivacy (org.palladiosimulator.pcm.resourceenvironmentprivacy.ResourceContainerPrivacy)7 HashMap (java.util.HashMap)2 ResourceContainer (org.palladiosimulator.pcm.resourceenvironment.ResourceContainer)2 AssemblyConnectorPrivacy (org.palladiosimulator.pcm.compositionprivacy.AssemblyConnectorPrivacy)1 DataPrivacyLvl (org.palladiosimulator.pcm.compositionprivacy.DataPrivacyLvl)1 AssemblyContext (org.palladiosimulator.pcm.core.composition.AssemblyContext)1 ResourceEnvironment (org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment)1