private AstSummarize generateTerm(ModelReference sourceModel, List<Source> group) {
Map<String, ModelProperty> resolver = Maps.create();
List<AstPropertyFolding> foldings = Lists.create();
for (ModelProperty property : model.getProperties()) {
Source source = property.getSource();
assert source.getDeclaring().equals(sourceModel);
resolver.put(source.getName(), property);
foldings.add(new AstPropertyFolding(
null,
AstBuilder.getDesciption("{0}({1})",
source.getAggregator().name(),
source.getName()),
Arrays.asList(new AstAttribute[] {
AstBuilder.getOriginalName(property.getName()),
}),
AstBuilder.toName(source.getAggregator()),
AstBuilder.toName(source),
AstBuilder.toName(property)));
}
List<AstSimpleName> grouping = Lists.create();
for (Source source : group) {
ModelProperty property = resolver.get(source.getName());
assert property != null : source;
grouping.add(AstBuilder.toName(property));
}
return new AstSummarize(