Search in sources :

Example 1 with PerformEntitySearchAction

use of edu.stanford.bmir.protege.web.shared.search.PerformEntitySearchAction in project webprotege by protegeproject.

the class SearchPresenter method performSearch.

private void performSearch() {
    GWT.log("[SearchPresenter] Performing search");
    if (view.getSearchString().isEmpty()) {
        view.clearSearchMatches();
        return;
    }
    int pageNumber = view.getPageNumber();
    dispatchServiceManager.execute(new PerformEntitySearchAction(projectId, view.getSearchString(), entityTypes, PageRequest.requestPage(pageNumber)), view, result -> {
        Page<EntitySearchResult> results = result.getResults();
        view.setSearchMatches(result.getTotalResultCount(), results.getPageElements());
        view.setPageCount(results.getPageCount());
        view.setPageNumber(results.getPageNumber());
    });
}
Also used : PerformEntitySearchAction(edu.stanford.bmir.protege.web.shared.search.PerformEntitySearchAction) EntitySearchResult(edu.stanford.bmir.protege.web.shared.search.EntitySearchResult)

Aggregations

EntitySearchResult (edu.stanford.bmir.protege.web.shared.search.EntitySearchResult)1 PerformEntitySearchAction (edu.stanford.bmir.protege.web.shared.search.PerformEntitySearchAction)1