public void add(List ind, Results res)
throws Exception {
if (names.size() == 0) {
for (Iterator i = ind.iterator(); i.hasNext();) {
Variable var = (Variable)i.next();
values.add(new ArrayList());
names.add(var.getName());
}
}
for (int i = 0; i < ind.size(); i++) {
Variable var = (Variable)ind.get(i);
List row = (List)values.get(i);
Object value = var.getValue();
if (row.contains(value) == false) {
row.add(value);
}
}
Map m = root;
for (Iterator i = ind.iterator(); i.hasNext();) {
Variable var = (Variable)i.next();
if (i.hasNext()) {
Map next = (Map)m.get(var.getValue());
if (next == null) {
next = new LinkedHashMap();
m.put(var.getValue(), next);
}
m = next;
}
else {
if (filter != null) {
m.put(var.getValue(), BeanUtils.getProperty(res, filter));
}
else {
m.put(var.getValue(), res);
}
}
}
}