use of org.iobserve.model.provider.file.AllocationModelHandler in project iobserve-analysis by research-iobserve.
the class ModelGenerationFactory method generateAndSaveAllocation.
private static Allocation generateAndSaveAllocation(final URI outputLocation, final System systemModel, final ResourceEnvironment resEnvModel) {
final AllocationGeneration allocationGen = new AllocationGeneration(systemModel, resEnvModel);
final Allocation allocationModel = allocationGen.generateAllocation();
final AllocationModelHandler allocationModelProvider = new AllocationModelHandler();
final URI allocationModelURI = URI.createFileURI(outputLocation.toFileString() + File.separator + resEnvModel.getEntityName() + ".allocation");
allocationModelProvider.save(allocationModelURI, allocationModel);
return allocationModel;
}
use of org.iobserve.model.provider.file.AllocationModelHandler in project iobserve-analysis by research-iobserve.
the class PCMModelHandler method save.
/**
* Saves all currently available models in this provider into the snapshot location.
*
* @param fileLocationURI
* the location directory for the snapshot
*/
public void save(final URI fileLocationURI) {
new AllocationModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.ALLOCATION_SUFFIX), this.allocationModel);
new CloudProfileModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.CLOUD_PROFILE_SUFFIX), this.cloudProfileModel);
new CostModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.COST_SUFFIX), this.costModel);
new DesignDecisionModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.DESIGN_DECISION_SUFFIX), this.designDecisionModel);
new RepositoryModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.REPOSITORY_SUFFIX), this.repositoryModel);
new ResourceEnvironmentModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.RESOURCE_ENVIRONMENT_SUFFIX), this.resourceEnvironmentModel);
new SystemModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.SYSTEM_SUFFIX), this.systemModel);
new UsageModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.USAGE_MODEL_SUFFIX), this.usageModel);
new QMLDeclarationsModelHandler().save(fileLocationURI.appendFileExtension(PCMModelHandler.QML_DECLARATIONS_MODEL), this.qmlDeclarationsModel);
}
use of org.iobserve.model.provider.file.AllocationModelHandler in project iobserve-analysis by research-iobserve.
the class ModelTransformer method saveModels.
private void saveModels() {
new DesignDecisionModelHandler().save(this.processedModelDir.appendFileExtension(PCMModelHandler.DESIGN_DECISION_SUFFIX), this.decisionModel);
new AllocationModelHandler().save(this.processedModelDir.appendFileExtension(PCMModelHandler.ALLOCATION_SUFFIX), this.allocationModel);
new CostModelHandler().save(this.processedModelDir.appendFileExtension(PCMModelHandler.COST_SUFFIX), this.costModel);
new ResourceEnvironmentModelHandler().save(this.processedModelDir.appendFileExtension(PCMModelHandler.RESOURCE_ENVIRONMENT_SUFFIX), this.resourceEnvironmentModel);
}
Aggregations