}
//Get Compound Groups
for(int j =0; j < superGroupsTreeModel.getChildCount(superGroupsTopNode);j++){
String currentSuperGroupName = superGroupsTreeModel.getChild(superGroupsTopNode, j).toString();
CompoundGroup currentSuperGroup = new CompoundGroup(currentSuperGroupName);
allCompoundGroups.add(currentSuperGroup);
SuperGroupsTreeNode currentNode = (SuperGroupsTreeNode) superGroupsTreeModel.getChild(superGroupsTopNode, j);
// Get all Children of each Compound Group Branches
for(int i =0; i < superGroupsTreeModel.getChildCount(currentNode);i++){
String currentGroupName = (String) superGroupsTreeModel.getChild(currentNode, i).toString();
Iterator<?> it = allGroups.iterator();
while (it.hasNext()) {
Group currentGroup = (Group) it.next();
if (currentGroupName.equals(currentGroup.name)) {
currentGroup.addAncestor(currentSuperGroup);
currentSuperGroup.addGroup(currentGroup);
}
}
}
}
//Fill empty sets
Iterator<?> it = allAssignedComponents.iterator();
while (it.hasNext()) {
Component currentComponent = (Component) it.next();
if (currentComponent.roleAncestor.size() == 0) {
currentComponent.addAncestorRole(new Role(""));
}
}
it = allGroups.iterator();
while (it.hasNext()) {
Group currentGroup = (Group) it.next();
if (currentGroup.children.size() == 0) {
currentGroup.addChild(new Component(""));
}
if (currentGroup.ancestors.size() == 0) {
currentGroup.addAncestor(new CompoundGroup(""));
}
}
it = allRoles.iterator();
while (it.hasNext()) {