TransactionStatus txStatus = transactionManager.getTransaction(txDefinition);\r
\r
//new\r
- //load uuids\r
+ //load uuids from csv files\r
logger.info("Start new ... " );\r
Map<UUID, Set<UUID>> uuidMap = new HashMap<UUID, Set<UUID>>();\r
Map<UUID, VocabularyEnum> vocTypeMap = new HashMap<UUID, VocabularyEnum>();\r
vocabularyDao.saveOrUpdate(voc);\r
}\r
}\r
- secondPass(vocabularyType.getClazz(),vocUuid, terms, vocabularyMap); //TODO \r
+ initializeAndStore(vocabularyType.getClazz(),vocUuid, terms, vocabularyMap); //TODO \r
}\r
\r
//load all persisted vocabularies\r
* loaded terms with their <code>UUID</code> as key\r
* @param vocabularyMap \r
*/\r
- protected void secondPass(Class clazz, UUID vocabularyUuid, Map<UUID,DefinedTermBase> terms, Map<UUID, TermVocabulary<?>> vocabularyMap) {\r
+ protected void initializeAndStore(Class clazz, UUID vocabularyUuid, Map<UUID,DefinedTermBase> terms, Map<UUID, TermVocabulary<?>> vocabularyMap) {\r
logger.debug("Loading vocabulary for class " + clazz.getSimpleName() + " with uuid " + vocabularyUuid );\r
\r
TermVocabulary<?> persistedVocabulary;\r
\r
\r
logger.debug("Initializing terms in vocabulary for class " + clazz.getSimpleName() + " with uuid " + vocabularyUuid );\r
+ //not really needed anymore as we do term initializing from the beginning now\r
if (persistedVocabulary != null){\r
for(Object object : persistedVocabulary.getTerms()) {\r
DefinedTermBase<?> definedTermBase = (DefinedTermBase) object;\r
for(VocabularyEnum vocabularyType : VocabularyEnum.values()) {\r
Class<? extends DefinedTermBase<?>> clazz = vocabularyType.getClazz();\r
UUID vocabularyUuid = vocabularyType.getUuid();\r
- secondPass(clazz, vocabularyUuid,new HashMap<UUID,DefinedTermBase>(), null);\r
+ initializeAndStore(clazz, vocabularyUuid,new HashMap<UUID,DefinedTermBase>(), null);\r
}\r
transactionManager.commit(txStatus);\r
//txStatus = transactionManager.getTransaction(txDefinition);\r