public void enrichCollectionWithTaxonomyMap(SearchResultContainer collectionResultContainer) { if (collectionResultContainer.getSearchResults() != null) { for (SearchResult srContainer : collectionResultContainer.getSearchResults()) { Content findByContent = this.getContentRepository().findContentByGooruId(srContainer.getId()); if (findByContent != null) { Map<Integer, List<Code>> taxonomyMapByCode = TaxonomyUtil.getTaxonomyMapByCode(findByContent.getTaxonomySet(), taxonomyService); srContainer.setTaxonomyMapByCode(taxonomyMapByCode); Integer numberOfQuestions = assessmentRepository.getAssessmentQuestionsCount(findByContent.getContentId()); srContainer.setNumberOfResources(numberOfQuestions); } } } }