throw new RuntimeException("Unknown search result type: " + result.toString());
}
}
if (!serviceResults.isEmpty()) {
EntryAggregatorView serviceAggregator = new EntryAggregatorView();
populateServiceEntries(serviceResults, serviceAggregator, serviceTagProcessors);
searchResults.addSection("Services", serviceAggregator);
}
if (!methodResults.isEmpty()) {
EntryAggregatorView methodAggregator = new EntryAggregatorView();
for (MethodBundle bundle : methodResults) {
String prefix =
"m/" + bundle.getService().getName() + "/" + bundle.getService().getVersion() + "/";
String serviceTitle =
bundle.getService().displayTitle() + " " + bundle.getService().getVersion();
populateMethodEntry(bundle.getMethod(), serviceTitle, prefix, methodAggregator);
}
searchResults.addSection("Methods", methodAggregator);
}
if (!historyResults.isEmpty()) {
EntryAggregatorView historyAggregator = new EntryAggregatorView();
populateHistoryItems("h/", historyResults, historyAggregator);
searchResults.addSection("History", historyAggregator);
}
if (serviceResults.isEmpty() && methodResults.isEmpty() && historyResults.isEmpty()) {