Search in sources :

Example 6 with ModelImporter

use of org.iobserve.model.ModelImporter in project iobserve-analysis by research-iobserve.

the class PrivacyViolationDetectionServiceMain method createTeetimeConfiguration.

@Override
protected PipelineConfiguration createTeetimeConfiguration() throws ConfigurationException {
    /**
     * load models.
     */
    try {
        final ModelImporter modelHandler = new ModelImporter(this.parameterConfiguration.getModelInitDirectory());
        /**
         * initialize database.
         */
        final IModelResource<CorrespondenceModel> correspondenceModelResource = this.loadResourceAndInitDB(CorrespondencePackage.eINSTANCE, modelHandler.getCorrespondenceModel());
        final IModelResource<Repository> repositoryModelResource = this.loadResourceAndInitDB(RepositoryPackage.eINSTANCE, modelHandler.getRepositoryModel());
        final IModelResource<ResourceEnvironment> resourceEnvironmentModelResource = this.loadResourceAndInitDB(ResourceenvironmentPackage.eINSTANCE, modelHandler.getResourceEnvironmentModel());
        final IModelResource<System> systemModelResource = this.loadResourceAndInitDB(SystemPackage.eINSTANCE, modelHandler.getSystemModel());
        final IModelResource<Allocation> allocationModelResource = this.loadResourceAndInitDB(AllocationPackage.eINSTANCE, modelHandler.getAllocationModel());
        final IModelResource<DataProtectionModel> privacyModelResource = this.loadResourceAndInitDB(PrivacyPackage.eINSTANCE, modelHandler.getPrivacyModel());
        return new PipelineConfiguration(this.kiekerConfiguration, correspondenceModelResource, repositoryModelResource, resourceEnvironmentModelResource, systemModelResource, allocationModelResource, privacyModelResource, this.parameterConfiguration.getWarningFile(), this.parameterConfiguration.getAlarmsFile(), this.parameterConfiguration.getModelDumpDirectory());
    } catch (final DBException | IOException e) {
        throw new ConfigurationException(e);
    }
}
Also used : DBException(org.iobserve.model.persistence.DBException) ResourceEnvironment(org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment) DataProtectionModel(org.iobserve.model.privacy.DataProtectionModel) CorrespondenceModel(org.iobserve.model.correspondence.CorrespondenceModel) IOException(java.io.IOException) System(org.palladiosimulator.pcm.system.System) ModelImporter(org.iobserve.model.ModelImporter) Repository(org.palladiosimulator.pcm.repository.Repository) Allocation(org.palladiosimulator.pcm.allocation.Allocation) ConfigurationException(kieker.common.exception.ConfigurationException)

Aggregations

ModelImporter (org.iobserve.model.ModelImporter)6 File (java.io.File)4 IOException (java.io.IOException)2 HostComponentAllocationGraph (org.iobserve.adaptation.data.graph.HostComponentAllocationGraph)2 HostComponentAllocationGraphFactory (org.iobserve.adaptation.data.graph.HostComponentAllocationGraphFactory)2 CorrespondenceModel (org.iobserve.model.correspondence.CorrespondenceModel)2 DBException (org.iobserve.model.persistence.DBException)2 DataProtectionModel (org.iobserve.model.privacy.DataProtectionModel)2 Allocation (org.palladiosimulator.pcm.allocation.Allocation)2 Repository (org.palladiosimulator.pcm.repository.Repository)2 ResourceEnvironment (org.palladiosimulator.pcm.resourceenvironment.ResourceEnvironment)2 System (org.palladiosimulator.pcm.system.System)2 ConfigurationException (kieker.common.exception.ConfigurationException)1 Neo4JModelResource (org.iobserve.model.persistence.neo4j.Neo4JModelResource)1 AllocationGroupsContainer (org.iobserve.planning.data.AllocationGroupsContainer)1 UsageModel (org.palladiosimulator.pcm.usagemodel.UsageModel)1