def get_wf(self,token_id):
        """
        Returns the token object for the given token identifier
        @type token_id: string
        @param token_id: the token identifier
        @rtype: L{Cwf}
        @return: the token object
        """  
        wf_node = self.idx.get(token_id)
        if wf_node is not None:
            return Cwf(node=wf_node,type=self.type)
        else:
            for wf_node in self.__get_wf_nodes():
                if self.type == 'NAF': label_id = 'id'
                elif self.type == 'KAF': label_id = 'wid'
                if wf_node.get(label_id) == token_id:
                    return Cwf(node=wf_node, type=self.type)                                                                
            return None
def get_wf ( self , token_id ) : wf_node = self . idx . get ( token_id ) if wf_node is not None : return Cwf ( node = wf_node , type = self . type ) else : for wf_node in self . __get_wf_nodes ( ) : if self . type == 'NAF' : label_id = 'id' elif self . type == 'KAF' : label_id = 'wid' if wf_node . get ( label_id ) == token_id : return Cwf ( node = wf_node , type = self . type ) return None
Returns the token object for the given token identifier
        @type token_id: string
        @param token_id: the token identifier
        @rtype: L{Cwf}
        @return: the token object