vocabularyDao.saveOrUpdate(voc);\r
}\r
}\r
- initializeAndStore(vocabularyType.getClazz(),vocUuid, terms, vocabularyMap); //TODO \r
+ initializeAndStore(vocabularyType, terms, vocabularyMap); //TODO \r
}\r
\r
transactionManager.commit(txStatus);\r
* loaded terms with their <code>UUID</code> as key\r
* @param vocabularyMap \r
*/\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
+ protected void initializeAndStore(VocabularyEnum vocType, Map<UUID,DefinedTermBase> terms, Map<UUID, TermVocabulary<?>> vocabularyMap) {\r
+ Class<? extends DefinedTermBase<?>> clazz = vocType.getClazz();\r
+ UUID vocabularyUuid = vocType.getUuid();\r
+ \r
+ if (logger.isDebugEnabled()){ logger.debug("Loading vocabulary for class " + clazz.getSimpleName() + " with uuid " + vocabularyUuid );}\r
\r
TermVocabulary<?> persistedVocabulary;\r
if (vocabularyMap == null || vocabularyMap.get(vocabularyUuid) == null ){\r
persistedVocabulary = vocabularyMap.get(vocabularyUuid);\r
}\r
\r
- \r
- logger.debug("Initializing terms in vocabulary for class " + clazz.getSimpleName() + " with uuid " + vocabularyUuid );\r
+ if (logger.isDebugEnabled()){ 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
\r
\r
//fill term store\r
- logger.debug("Setting defined Terms for class " + clazz.getSimpleName() + ", " + persistedVocabulary.getTerms().size() + " in vocabulary");\r
+ if (logger.isDebugEnabled()){ logger.debug("Setting defined Terms for class " + clazz.getSimpleName() + ", " + persistedVocabulary.getTerms().size() + " in vocabulary");}\r
super.setDefinedTerms(clazz, persistedVocabulary);\r
- logger.debug("Second pass - DONE");\r
+ if (logger.isDebugEnabled()){ logger.debug("Second pass - DONE");}\r
\r
}\r
\r