use of org.obiba.mica.micaConfig.domain.MicaConfig in project mica2 by obiba.
the class TaxonomyService method initializeTaxonomyTaxonomy.
private void initializeTaxonomyTaxonomy() {
if (taxonomyTaxonomy != null)
return;
taxonomyTaxonomy = copy(micaConfigService.getTaxonomyTaxonomy());
MicaConfig config = micaConfigService.getConfig();
if (!config.isNetworkEnabled() || config.isSingleNetworkEnabled()) {
taxonomyTaxonomy.removeVocabulary("network");
}
if (!config.isStudyDatasetEnabled() && !config.isHarmonizationDatasetEnabled()) {
taxonomyTaxonomy.removeVocabulary("dataset");
taxonomyTaxonomy.removeVocabulary("variable");
}
if (config.isSingleStudyEnabled() && !config.isHarmonizationDatasetEnabled()) {
taxonomyTaxonomy.removeVocabulary("study");
}
}
Aggregations