def __add_tier(self, tier, token_tier_name):
        """
        adds a tier to the document graph (either as additional attributes
        to the token nodes or as a span node with outgoing edges to the token
        nodes it represents)
        """
        if tier.attrib['category'] == token_tier_name:
            self.__add_tokens(tier)
        else:
            if self.is_token_annotation_tier(tier):
                self.__add_token_annotation_tier(tier)

            else:
                self.__add_span_tier(tier)
adds a tier to the document graph (either as additional attributes
        to the token nodes or as a span node with outgoing edges to the token
        nodes it represents)