public void addChildDefinition(ChildDefinition newChild) {
this.sequenceOfChildDefinitions.add(newChild);
}
public EntryList makeChildList(final Collection parentEntry){
final EntryList theChildList = new SimpleEntryList();
final Set unicityExcluder = new HashSet();
final Iterator sequence = sequenceOfChildDefinitions.iterator();
while (sequence.hasNext()){
final ChildDefinition cd = (ChildDefinition) sequence.next();
final EntryList theSorter;
if (cd.hasSpecificSorting()) {
theSorter = new SortingEntryList(cd);
} else {
theSorter = new SimpleEntryList();
}
cd.visitDefinedChildEntries(parentEntry, new EntryVisitor() {
public void visit(Entry visitedEntry)
{
Object uniqueKey = visitedEntry.getLocalUniqueKey();
if (!unicityExcluder.contains(uniqueKey)){
if (cd.filterAccepts(visitedEntry)){
//theChildList.addEntry(visitedEntry);
cd.applyAttributeReaders(visitedEntry);
theSorter.addEntry(visitedEntry);
unicityExcluder.add(uniqueKey);
}
}
}
});