public static String getFullPath(CategorizedDescriptor entity, Category category) { String path = entity.getName(); while (category != null) { path = category.getName() + "/" + path; category = category.getCategory(); } return path; }
public static String getFullPath(Category category) { return getFullPath(Descriptors.toDescriptor(category), category.getCategory()); }