public Integer getTier() {
        Integer tier = 1;
        if (!parents.isEmpty()) {
            int tmpTier = 0;
            int maxTier = 0;
            for (Long parentId : parents) {
                tmpTier = nodes.get(parentId).getTier();
                if (maxTier < tmpTier) {
                    maxTier = tmpTier;
                }

            }
            tier += maxTier;
        }

        return tier;
    }