# - - - T a x a T r e e . s e t R o o t
def setRoot ( self, taxon ):
'''Store the root taxon.
'''
There are two conditions for successfully storing the root.
There must not already be a root taxon.
The candidate taxon must be at the highest rank in the hierarchy, that is, its depth must be zero.
#-- 1 --
if self.root is not None:
raise ValueError ( "There is already a root taxon: "
"'%s'" % self.root )
elif taxon.rank.depth != 0:
raise ValueError ( "The root taxon must have rank "
"%s." % self.hier[0] )
else:
self.root = taxon