Revision 60e8c5d1
Added by Andreas Müller over 6 years ago
cdmlib-persistence/src/main/java/eu/etaxonomy/cdm/database/PersistentTermInitializer.java | ||
---|---|---|
101 | 101 |
logger.info("PersistentTermInitializer.omit == true, returning without initializing terms"); |
102 | 102 |
return; |
103 | 103 |
} else { |
104 |
Map<UUID,DefinedTermBase> terms = new HashMap<UUID,DefinedTermBase>();
|
|
104 |
Map<UUID,DefinedTermBase> terms = new HashMap<>(); |
|
105 | 105 |
logger.info("PersistentTermInitializer.omit == false, initializing " + VocabularyEnum.values().length + " term classes"); |
106 | 106 |
|
107 | 107 |
DateTime start = new DateTime(); |
... | ... | |
110 | 110 |
|
111 | 111 |
//load uuids from csv files |
112 | 112 |
logger.info("Start new ... " ); |
113 |
Map<UUID, Set<UUID>> uuidMap = new HashMap<UUID, Set<UUID>>();
|
|
114 |
Map<UUID, VocabularyEnum> vocTypeMap = new HashMap<UUID, VocabularyEnum>();
|
|
113 |
Map<UUID, Set<UUID>> uuidMap = new HashMap<>(); |
|
114 |
Map<UUID, VocabularyEnum> vocTypeMap = new HashMap<>(); |
|
115 | 115 |
|
116 | 116 |
for(VocabularyEnum vocabularyType : VocabularyEnum.values()) { |
117 | 117 |
UUID vocUUID = termLoader.loadUuids(vocabularyType, uuidMap); |
... | ... | |
123 | 123 |
|
124 | 124 |
//find and create missing terms and load vocabularies from repository |
125 | 125 |
logger.info("Create missing terms ... " ); |
126 |
Map<UUID, TermVocabulary<?>> vocabularyMap = new HashMap<UUID, TermVocabulary<?>>();
|
|
127 |
Map<UUID, Set<UUID>> missingTermUuids = new HashMap<UUID, Set<UUID>>();
|
|
126 |
Map<UUID, TermVocabulary<?>> vocabularyMap = new HashMap<>(); |
|
127 |
Map<UUID, Set<UUID>> missingTermUuids = new HashMap<>(); |
|
128 | 128 |
|
129 | 129 |
vocabularyDao.missingTermUuids(uuidMap, missingTermUuids, vocabularyMap); |
130 | 130 |
|
Also available in: Unified diff
cleanup