/// <summary>
        /// Gets a tree node.
        /// </summary>
        /// <param name="taxonId">The taxon id.</param>
        /// <returns>A tree node or null if not found.</returns>
        public ITaxonRelationsTreeNode GetTreeNode(int taxonId)
        {
            ITaxonRelationsTreeNode node;

            TreeNodeDictionary.TryGetValue(taxonId, out node);
            return(node);
        }
        /// <summary>
        /// Gets the tree nodes.
        /// </summary>
        /// <param name="taxonIds">The taxon ids.</param>
        /// <returns>A list with tree nodes.</returns>
        public List <ITaxonRelationsTreeNode> GetTreeNodes(IEnumerable <int> taxonIds)
        {
            List <ITaxonRelationsTreeNode> treeNodes = new List <ITaxonRelationsTreeNode>();

            foreach (int taxonId in taxonIds)
            {
                ITaxonRelationsTreeNode node;
                if (TreeNodeDictionary.TryGetValue(taxonId, out node))
                {
                    treeNodes.Add(node);
                }
            }

            return(treeNodes);
        }
 /// <summary>
 /// Tries to get tree node.
 /// </summary>
 /// <param name="taxonId">The taxon identifier.</param>
 /// <param name="treeNode">The tree node.</param>
 /// <returns>True if the node was found; otherwise false.</returns>
 public bool TryGetTreeNode(int taxonId, out ITaxonRelationsTreeNode treeNode)
 {
     return(TreeNodeDictionary.TryGetValue(taxonId, out treeNode));
 }