Revision 02c718f2
Added by Katja Luther over 3 years ago
eu.etaxonomy.taxeditor.store/src/main/java/eu/etaxonomy/taxeditor/termtree/e4/TermTreeEditor.java | ||
---|---|---|
444 | 444 |
protected void addAllNodesToMap(TermNodeDto root){ |
445 | 445 |
if (!uuidTermMap.containsKey(root.getUuid())){ |
446 | 446 |
uuidTermMap.put(root.getUuid(), root); |
447 |
if (root.getTerm() != null){ |
|
448 |
getTreeDtoForUuid(root.getTree().getUuid()).addTerm(root.getTerm()); |
|
449 |
} |
|
447 |
// if (root.getTerm() != null){
|
|
448 |
// getTreeDtoForUuid(root.getTree().getUuid()).addTerm(root.getTerm());
|
|
449 |
// }
|
|
450 | 450 |
} |
451 | 451 |
for (TermNodeDto child: root.getChildren()){ |
452 | 452 |
uuidTermMap.put(child.getUuid(), child); |
453 |
if (child.getTerm() != null){ |
|
454 |
getTreeDtoForUuid(child.getTree().getUuid()).addTerm(child.getTerm()); |
|
455 |
} |
|
453 |
// if (child.getTerm() != null){
|
|
454 |
// getTreeDtoForUuid(child.getTree().getUuid()).addTerm(child.getTerm());
|
|
455 |
// }
|
|
456 | 456 |
if (child.getChildren() != null && !child.getChildren().isEmpty()){ |
457 | 457 |
addAllNodesToMap(child); |
458 | 458 |
} |
... | ... | |
463 | 463 |
public boolean checkDuplicates(UUID termUuid, UUID treeUuid) { |
464 | 464 |
TermTreeDto tree = this.getTreeDtoForUuid(treeUuid); |
465 | 465 |
for (TermDto dto: tree.getTerms()){ |
466 |
if (dto.getUuid().equals(termUuid)) { |
|
466 |
if (dto != null && dto.getUuid().equals(termUuid)) {
|
|
467 | 467 |
return true; |
468 | 468 |
} |
469 | 469 |
} |
Also available in: Unified diff
ref #8776: correct enable/disable allowDuplicates