// build lists
HashMap<String, ArrayList<BasicObjectManager>> elements = new HashMap<String, ArrayList<BasicObjectManager>>();
// add all
for (String s : project.getObjects().keySet()) {
BasicObjectManager b = project.getObjects().get(s);
// containts?
if (!elements.containsKey(b.getGroup())) {
elements.put(b.getGroup(), new ArrayList<BasicObjectManager>());
}
// add it
elements.get(b.getGroup()).add(b);
}
// build it
// build content