in apache-whisker-xml/src/main/java/org/apache/creadur/whisker/fromxml/JDomBuilder.java [561:579]
public Collection<WithinDirectory> collectContents(final Document document,
final Map<String, License> licenses,
final Map<String, Organisation> organisations)
throws DuplicateElementException {
final Collection<WithinDirectory> results = new TreeSet<WithinDirectory>();
@SuppressWarnings("unchecked")
final List<Element> children = document.getRootElement().getChildren(
"within");
for (Element element : children) {
boolean addedSuccessfully = results.add(directory(element,
licenses, organisations));
if (!addedSuccessfully) {
throw new DuplicateElementException("Duplicate parameter '"
+ element.getAttribute("dir").getValue() + "'");
}
}
return results;
}