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