private void add(RootNode node, List<String> path, int index) {
      if (index < path.size()) {
        String name = path.get(index);
        Group group = groups.get(name);
        if (group == null) {
          group = new Group(name);
          groups.put(name, group);
        }
        group.add(node, path, index + 1);
      }
      else {
        roots.add(node);
      }
    }
private void add(RootNode node, List<String> path, int index)