Search in sources :

Example 1 with GetProjectPrefixDeclarationsResult

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

the class GetProjectPrefixDeclarationsActionHandler method execute.

@Nonnull
@Override
public GetProjectPrefixDeclarationsResult execute(@Nonnull GetProjectPrefixDeclarationsAction action, @Nonnull ExecutionContext executionContext) {
    ProjectId projectId = action.getProjectId();
    List<PrefixDeclaration> decls = store.find(projectId).getPrefixes().entrySet().stream().map(entry -> PrefixDeclaration.get(entry.getKey(), entry.getValue())).collect(toList());
    return new GetProjectPrefixDeclarationsResult(projectId, decls);
}
Also used : GetProjectPrefixDeclarationsAction(edu.stanford.bmir.protege.web.shared.project.GetProjectPrefixDeclarationsAction) PrefixDeclaration(edu.stanford.bmir.protege.web.shared.project.PrefixDeclaration) BuiltInAction(edu.stanford.bmir.protege.web.shared.access.BuiltInAction) Preconditions.checkNotNull(com.google.common.base.Preconditions.checkNotNull) Inject(javax.inject.Inject) AbstractProjectActionHandler(edu.stanford.bmir.protege.web.server.dispatch.AbstractProjectActionHandler) List(java.util.List) Collectors.toList(java.util.stream.Collectors.toList) AccessManager(edu.stanford.bmir.protege.web.server.access.AccessManager) ExecutionContext(edu.stanford.bmir.protege.web.server.dispatch.ExecutionContext) GetProjectPrefixDeclarationsResult(edu.stanford.bmir.protege.web.shared.project.GetProjectPrefixDeclarationsResult) ProjectId(edu.stanford.bmir.protege.web.shared.project.ProjectId) Nonnull(javax.annotation.Nonnull) Nullable(javax.annotation.Nullable) GetProjectPrefixDeclarationsResult(edu.stanford.bmir.protege.web.shared.project.GetProjectPrefixDeclarationsResult) PrefixDeclaration(edu.stanford.bmir.protege.web.shared.project.PrefixDeclaration) ProjectId(edu.stanford.bmir.protege.web.shared.project.ProjectId) Nonnull(javax.annotation.Nonnull)

Aggregations

Preconditions.checkNotNull (com.google.common.base.Preconditions.checkNotNull)1 AccessManager (edu.stanford.bmir.protege.web.server.access.AccessManager)1 AbstractProjectActionHandler (edu.stanford.bmir.protege.web.server.dispatch.AbstractProjectActionHandler)1 ExecutionContext (edu.stanford.bmir.protege.web.server.dispatch.ExecutionContext)1 BuiltInAction (edu.stanford.bmir.protege.web.shared.access.BuiltInAction)1 GetProjectPrefixDeclarationsAction (edu.stanford.bmir.protege.web.shared.project.GetProjectPrefixDeclarationsAction)1 GetProjectPrefixDeclarationsResult (edu.stanford.bmir.protege.web.shared.project.GetProjectPrefixDeclarationsResult)1 PrefixDeclaration (edu.stanford.bmir.protege.web.shared.project.PrefixDeclaration)1 ProjectId (edu.stanford.bmir.protege.web.shared.project.ProjectId)1 List (java.util.List)1 Collectors.toList (java.util.stream.Collectors.toList)1 Nonnull (javax.annotation.Nonnull)1 Nullable (javax.annotation.Nullable)1 Inject (javax.inject.Inject)1