Revision 1bc072c0
Added by Andreas Müller almost 5 years ago
app-import/src/main/java/eu/etaxonomy/cdm/io/redlist/bfnXml/in/BfnXmlImportFeature.java | ||
---|---|---|
178 | 178 |
String childElementName = BfnXmlConstants.EL_LWERT; |
179 | 179 |
createOrUpdateStates(bfnNamespace, elListValues, childElementName, redListCat, state); |
180 | 180 |
} |
181 |
TermVocabulary<?> voc = createOrUpdateTermVocabulary(TermType.Feature, vocabularyService, redListCat, BfnXmlConstants.VOC_REDLIST_FEATURES); |
|
181 |
TermVocabulary<?> voc = createOrUpdateTermVocabulary(state, TermType.Feature, vocabularyService, redListCat, BfnXmlConstants.VOC_REDLIST_FEATURES);
|
|
182 | 182 |
addSource(voc, state); |
183 | 183 |
} |
184 | 184 |
|
... | ... | |
197 | 197 |
|
198 | 198 |
|
199 | 199 |
@SuppressWarnings({ "rawtypes" }) |
200 |
private TermVocabulary createOrUpdateTermVocabulary(TermType termType, IVocabularyService vocabularyService, DefinedTermBase term, String strTermVocabulary) { |
|
200 |
private TermVocabulary createOrUpdateTermVocabulary(BfnXmlImportState state, TermType termType, IVocabularyService vocabularyService, DefinedTermBase term, String strTermVocabulary) {
|
|
201 | 201 |
|
202 | 202 |
//create/get red list feature vocabulary |
203 |
TermVocabulary<DefinedTermBase> termVocabulary = getVocabulary(termType, BfnXmlTransformer.vocRLFeatures, BfnXmlConstants.VOC_REDLIST_FEATURES, BfnXmlConstants.VOC_REDLIST_FEATURES, BfnXmlConstants.VOC_REDLIST_FEATURES, null, false, null); |
|
203 |
TermVocabulary<DefinedTermBase> termVocabulary = getVocabulary(state, termType, BfnXmlTransformer.vocRLFeatures, BfnXmlConstants.VOC_REDLIST_FEATURES, BfnXmlConstants.VOC_REDLIST_FEATURES, BfnXmlConstants.VOC_REDLIST_FEATURES, null, false, null);
|
|
204 | 204 |
termVocabulary.addTerm(term); |
205 | 205 |
vocabularyService.saveOrUpdate(termVocabulary); |
206 | 206 |
|
... | ... | |
242 | 242 |
logger.warn("could not finde state term uuid for " + matchedListValue + " and redlist category"+ redListCat.getTitleCache()+"\n"+e); |
243 | 243 |
} |
244 | 244 |
String vocName = redListCat.getTitleCache() + " States"; |
245 |
stateVocabulary = (OrderedTermVocabulary) getVocabulary(TermType.State, vocabularyStateUuid, vocName, vocName, vocName, null, true, null); |
|
245 |
stateVocabulary = (OrderedTermVocabulary) getVocabulary(state, TermType.State, vocabularyStateUuid, vocName, vocName, vocName, null, true, null);
|
|
246 | 246 |
addSource(stateVocabulary, state); |
247 | 247 |
State stateTerm = getStateTerm(state, stateTermUuid, matchedListValue, matchedListValue, matchedListValue, stateVocabulary); |
248 | 248 |
addSource(stateTerm, state); |
Also available in: Unified diff
add state to getVocabulary for imports