+ private void setInputForRelatedTaxa(ConversationHolder conversation, Set<Taxon> taxa){
+ if(taxa.size() == 1){
+ Taxon taxon = taxa.iterator().next();
+ Set<TaxonNode> nodes = taxon.getTaxonNodes();
+ TaxonNode taxonNode = ChooseFromMultipleTaxonNodesDialog.choose(nodes);
+ init(taxonNode);
+ }else if(taxa.size() > 1){
+ Iterator<Taxon> taxonIterator = taxa.iterator();
+ Set<TaxonNode> nodes = new HashSet<>();
+ while (taxonIterator.hasNext()){
+
+ nodes.addAll(taxonIterator.next().getTaxonNodes());
+ }
+ TaxonNode taxonNode = ChooseFromMultipleAcceptedTaxaDialog.choose(nodes);
+ if(taxonNode != null){
+ taxonNode = CdmStore.getService(ITaxonNodeService.class).load(taxonNode.getUuid(), getTaxonNodePropertyPaths());
+ }
+ if(taxonNode != null){
+ init(taxonNode);
+ }
+ } else if (taxa.size() == 0) {
+ // this is an undesired state
+ MessagingUtils.warningDialog(INCORRECT_STATE,TaxonEditorInputE4.class,Messages.TaxonEditorInput_TAXON_NOT_IN_CLASSIFICATION);
+ }
+ }
+