All Downloads are FREE. Search and download functionalities are using the official Maven repository.

edu.stanford.protege.webprotege.ontology.SetOntologyAnnotationsCommandHandler Maven / Gradle / Ivy

The newest version!
package edu.stanford.protege.webprotege.ontology;

import edu.stanford.protege.webprotege.api.ActionExecutor;
import edu.stanford.protege.webprotege.ipc.CommandHandler;
import edu.stanford.protege.webprotege.ipc.ExecutionContext;
import edu.stanford.protege.webprotege.ipc.WebProtegeHandler;
import javax.annotation.Nonnull;
import reactor.core.publisher.Mono;

/**
 * Matthew Horridge
 * Stanford Center for Biomedical Informatics Research
 * 2021-08-21
 */
@WebProtegeHandler
public class SetOntologyAnnotationsCommandHandler implements CommandHandler {

    private final ActionExecutor executor;

    public SetOntologyAnnotationsCommandHandler(ActionExecutor executor) {
        this.executor = executor;
    }

    @Nonnull
    @Override
    public String getChannelName() {
        return SetOntologyAnnotationsAction.CHANNEL;
    }

    @Override
    public Class getRequestClass() {
        return SetOntologyAnnotationsAction.class;
    }

    @Override
    public Mono handleRequest(SetOntologyAnnotationsAction request,
                                                            ExecutionContext executionContext) {
        return executor.executeRequest(request, executionContext);
    }
}




© 2015 - 2025 Weber Informatics LLC | Privacy Policy