Hi, i have a POJO class call LEVEL & his class diagramm like this:
0,1
------------|
| |
| |
\|/ |
level-<>-------
In other words this:
public class Level
{
private int id;
private int label;
private Set labels;
private Level parent;
...
}
I have a method who retrieve from the database ALL the level in a List.
I want for the jdom representation(using org.jdom api) a Tree (like a tree for your directories) like this
LEVEl 1
+++LEVEL 2
++++++LEVEL 3
LEVEL 4
LEVEL 5
I know the algorithm have to be recursive.
Do u have any solution ? Any tool to convert to java class to a jdom tree? Thanks in advance