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;
}
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;
}
Aggregations