search/engine/api/src/main/java/net/sf/mmm/search/view/base/AbstractSearchServlet.java
/**
   * This method updates the {@link #getEntryTypeViews() entry type views}. <br>
   * The {@link SearchEngineConfiguration} defines the {@link SearchEntryType}s. For this view these
   * {@link SearchEntryType}s are reduced to those types that actually exist in the search-index. Then they
   * are {@link SearchEntryTypeViewBean#combine(SearchEntryType, long) combined} and finally sorted according
   * to the {@link SearchEntryType#getTitle() title}. <br>
   * This way the view can present the proper titles of the types and the search can filter even on combined
   * types.
   */
This method updates the  #getEntryTypeViews() entry type views.
This method updates the #getEntryTypeViews () entry type views .
private void updateSourceViews() {
    Map<String, SearchSourceViewBean> sourceViewMap = new TreeMap<String, SearchSourceViewBean>();
    for (SearchSource source : this.configurationHolder.getBean().getSources()) {
      SearchSourceViewBean view = new SearchSourceViewBean(source);
      String sourceId = view.getId();
      boolean add;
      long count;
      if (SearchSource.ID_ANY.equals(sourceId)) {
        count = this.searchEngine.getTotalEntryCount();
        add = true;
      } else {
        count = this.searchEngine.count(SearchEntry.FIELD_SOURCE, sourceId);
        add = (count > 0);
      }
      if (add) {
        view.setEntryCount(count);
        sourceViewMap.put(sourceId, view);
      }
    }
    this.sourceViews = sourceViewMap.values();
  }
private void updateSourceViews ( ) { Map < String , SearchSourceViewBean > sourceViewMap = new TreeMap < String , SearchSourceViewBean > ( ) ; for ( SearchSource source : this . configurationHolder . getBean ( ) . getSources ( ) ) { SearchSourceViewBean view = new SearchSourceViewBean ( source ) ; String sourceId = view . getId ( ) ; boolean add ; long count ; if ( SearchSource . ID_ANY . equals ( sourceId ) ) { count = this . searchEngine . getTotalEntryCount ( ) ; add = true ; } else { count = this . searchEngine . count ( SearchEntry . FIELD_SOURCE , sourceId ) ; add = ( count > 0 ) ; } if ( add ) { view . setEntryCount ( count ) ; sourceViewMap . put ( sourceId , view ) ; } } this . sourceViews = sourceViewMap . values ( ) ; }
This method updates the {@link #getEntryTypeViews() entry type views}.
This method updates the { @link #getEntryTypeViews () entry type views } .