use of org.ndx.agile.architecture.base.AgileArchitectureSection in project agile-architecture-documentation-system by Riduidel.
the class DocumentsCollector method collect.
/**
* Collect elements of all sections produced for the given component
* @param element the element for which we want the output
* @param builder output generator used
*/
public void collect(Element element, OutputBuilder builder) {
for (AgileArchitectureSection section : AgileArchitectureSection.values()) {
File sectionFolderFor = builder.outputDirectoryFor(section, element);
File[] filesArray = sectionFolderFor.listFiles((dir, name) -> name.toLowerCase().endsWith(".adoc"));
if (filesArray != null && filesArray.length > 0) {
Set<File> files = Stream.of(filesArray).map(file -> file.getAbsoluteFile()).collect(Collectors.toCollection(() -> new TreeSet<File>()));
hierarchy.get(section).put(element, files);
}
}
}
Aggregations