Search in sources :

Example 1 with RepositoryModelHandler

use of org.iobserve.model.provider.file.RepositoryModelHandler 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);
}
Also used : RepositoryModelHandler(org.iobserve.model.provider.file.RepositoryModelHandler) AllocationModelHandler(org.iobserve.model.provider.file.AllocationModelHandler) CostModelHandler(org.iobserve.model.provider.file.CostModelHandler) DesignDecisionModelHandler(org.iobserve.model.provider.file.DesignDecisionModelHandler) ResourceEnvironmentModelHandler(org.iobserve.model.provider.file.ResourceEnvironmentModelHandler) UsageModelHandler(org.iobserve.model.provider.file.UsageModelHandler) QMLDeclarationsModelHandler(org.iobserve.model.provider.file.QMLDeclarationsModelHandler) CloudProfileModelHandler(org.iobserve.model.provider.file.CloudProfileModelHandler) SystemModelHandler(org.iobserve.model.provider.file.SystemModelHandler)

Example 2 with RepositoryModelHandler

use of org.iobserve.model.provider.file.RepositoryModelHandler in project iobserve-analysis by research-iobserve.

the class ModelGenerationFactory method createNewModel.

public static void createNewModel(final CommandLine commandLine) throws InitializationException, IOException {
    ModelGenerationFactory.LOGGER.info("Creating new model!");
    final URI repoLocation = URI.createFileURI(commandLine.getOptionValue("i"));
    final URI outputLocation = URI.createFileURI(commandLine.getOptionValue("o"));
    ModelGenerationFactory.LOGGER.info("Copying repository model to new location.");
    final RepositoryModelHandler repoModelProvider = new RepositoryModelHandler();
    repoModelProvider.load(repoLocation);
    ModelGenerationFactory.copyRepoToOutput(outputLocation, repoModelProvider);
    ModelGenerationFactory.LOGGER.info("Generating system model.");
    final System systemModel = ModelGenerationFactory.generateAndSaveSystem(commandLine, outputLocation);
    ModelGenerationFactory.LOGGER.info("Generating resource environment model.");
    final ResourceEnvironment resEnvModel = ModelGenerationFactory.generateAndSaveResourceEnvironment(commandLine, outputLocation, systemModel.getEntityName());
    ModelGenerationFactory.LOGGER.info("Generating allocation model.");
    ModelGenerationFactory.generateAndSaveAllocation(outputLocation, systemModel, resEnvModel);
    ModelGenerationFactory.LOGGER.info("Generating done!");
}
Also used : RepositoryModelHandler(org.iobserve.model.provider.file.RepositoryModelHandler) ResourceEnvironment(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment) URI(org.eclipse.emf.common.util.URI) System(org.palladiosimulator.pcm.system.System)

Aggregations

RepositoryModelHandler (org.iobserve.model.provider.file.RepositoryModelHandler)2 URI (org.eclipse.emf.common.util.URI)1 AllocationModelHandler (org.iobserve.model.provider.file.AllocationModelHandler)1 CloudProfileModelHandler (org.iobserve.model.provider.file.CloudProfileModelHandler)1 CostModelHandler (org.iobserve.model.provider.file.CostModelHandler)1 DesignDecisionModelHandler (org.iobserve.model.provider.file.DesignDecisionModelHandler)1 QMLDeclarationsModelHandler (org.iobserve.model.provider.file.QMLDeclarationsModelHandler)1 ResourceEnvironmentModelHandler (org.iobserve.model.provider.file.ResourceEnvironmentModelHandler)1 SystemModelHandler (org.iobserve.model.provider.file.SystemModelHandler)1 UsageModelHandler (org.iobserve.model.provider.file.UsageModelHandler)1 ResourceEnvironment (org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment)1 System (org.palladiosimulator.pcm.system.System)1