TaxonNode childTaxonNode;
if(parentTaxonNode == null){
- // parent seems to of type TaxonomicTree
+ // parent seems might be of type TaxonomicTree
TaxonomicTree tree = CdmStore.getTaxonService().getTaxonomicTreeByUuid(parentNodeUuid);
- childTaxon = Taxon.NewInstance(newTaxonName, CdmStore.getDefault().getDefaultSec());
+ childTaxon = Taxon.NewInstance(newTaxonName, tree.getReference());
- childTaxonNode = tree.addRoot(childTaxon, null);
+ childTaxonNode = tree.addRoot(childTaxon, null, null);
}else{
// logic to add new taxon name
childTaxon = Taxon.NewInstance(newTaxonName, parentTaxonNode.getTaxon().getSec());
- childTaxonNode = parentTaxonNode.addChild(childTaxon);
+ childTaxonNode = parentTaxonNode.addChild(childTaxon, parentTaxonNode.getReferenceForParentChildRelation(), null);
}
// commit the conversation and throw it away
conversation.commit(true);