/*
* First level
*/
for (int i=0;i<5;i++) {
Hierarhy hier = new Hierarhy();
hier.setName(i + " leaf");
addAttributes (hier);
/*
* Second level
*/
for (int j=0;j<5;j++) {
Hierarhy hier1 = new Hierarhy();
hier1.setName(i + "." + j + " leaf");
hier1.setParent(hier);
hier.getChildren().add(hier1);
addAttributes (hier1);
for (int k=0;k<5;k++) {
Hierarhy hier2 = new Hierarhy();
hier2.setName(i + "." + j + "." + k + " leaf");
hier2.setParent(hier1);
hier1.getChildren().add(hier2);
addAttributes (hier2);
}
}