':param json_tree: dict
:return: (array of tupple, dict of TermType)'

@staticmethod
def map_term_type_tree(json_tree):

    category_to_term_type = []
    term_types = {}
    terms = {}
    for (category_key, json_term_types) in json_tree.items():
        for (term_type_key, term_type_content) in json_term_types.items():
            term_type_id = int(term_type_key)
            category_to_term_type.append((int(category_key), term_type_id))
            if (term_type_id not in term_types):
                term_type = TermType()
                term_type.id = term_type_id
                term_type.name = term_type_content.get(u'type')
                term_type.mode = term_type_content.get(u'mode')
                term_types[term_type.id] = term_type
                for (term_id, term_name) in term_type_content.get(u'terms').items():
                    if (term_id not in terms):
                        term = Term(id=int(term_id), name=term_name)
                        term_type.terms.append(term)
    return (category_to_term_type, term_types)
