code: public static <T extends HierarchyEntity<T, ?>> Map<T, String> tag(List<T> datas, String property) {
      final Map<T, String> sortedMap = CollectUtils.newHashMap();
      for (T de : datas) {
        String myId = null;
        if (null == property) {
          myId = String.valueOf(de.getId());
        } else {
          try {
            myId = String.valueOf(PropertyUtils.getProperty(de, property));
          } catch (Exception e) {
            throw new RuntimeException(e);
          }
        }
        myId = myId + "_";
        if (null != de.getParent() && sortedMap.containsKey(de.getParent())) {
          myId = String.valueOf(sortedMap.get(de.getParent()) + myId);
          if (!myId.endsWith("_")) {
            myId += "_";
          }
        }
        updatedTagFor(myId, de, sortedMap);
        sortedMap.put(de, myId);
      }
      for (T de : datas) {
        String tag = sortedMap.get(de);
        if (tag.endsWith("_")) {
          sortedMap.put(de, tag.substring(0, tag.length() - 1));
        }
      }
      return sortedMap;
    }
docs: <p>
  tag.
  </p>
  
  @param datas a {@link java.util.List} object.
  @param property a {@link java.lang.String} object.
  @param <T> a T object.
  @return a {@link java.util.Map} object.