Search in sources :

Example 1 with GetDeprecatedEntitiesResult

use of edu.stanford.bmir.protege.web.shared.entity.GetDeprecatedEntitiesResult in project webprotege by protegeproject.

the class GetDeprecatedEntitiesActionHandler method execute.

@Nonnull
@Override
public GetDeprecatedEntitiesResult execute(@Nonnull GetDeprecatedEntitiesAction action, @Nonnull ExecutionContext executionContext) {
    PageRequest pageRequest = action.getPageRequest();
    Optional<Page<OWLEntityData>> page = entityStream(action.getEntityTypes(), rootOntology, Imports.INCLUDED).filter(deprecatedEntityChecker::isDeprecated).map(renderingManager::getRendering).sorted().collect(toPageNumber(pageRequest.getPageNumber()).forPageSize(pageRequest.getPageSize()));
    return new GetDeprecatedEntitiesResult(page.orElse(Page.emptyPage()));
}
Also used : PageRequest(edu.stanford.bmir.protege.web.shared.pagination.PageRequest) GetDeprecatedEntitiesResult(edu.stanford.bmir.protege.web.shared.entity.GetDeprecatedEntitiesResult) Page(edu.stanford.bmir.protege.web.shared.pagination.Page) Nonnull(javax.annotation.Nonnull)

Aggregations

GetDeprecatedEntitiesResult (edu.stanford.bmir.protege.web.shared.entity.GetDeprecatedEntitiesResult)1 Page (edu.stanford.bmir.protege.web.shared.pagination.Page)1 PageRequest (edu.stanford.bmir.protege.web.shared.pagination.PageRequest)1 Nonnull (javax.annotation.Nonnull)1