Search in sources :

Example 1 with CreateNamedIndividualsAction

use of edu.stanford.bmir.protege.web.shared.dispatch.actions.CreateNamedIndividualsAction in project webprotege by protegeproject.

the class IndividualsListPresenter method handleCreateIndividuals.

private void handleCreateIndividuals() {
    controller.clear();
    controller.setEntityType(EntityType.NAMED_INDIVIDUAL);
    controller.setCreateEntityHandler(createFromText -> {
        dispatchServiceManager.execute(new CreateNamedIndividualsAction(projectId, currentType, createFromText), result -> {
            Set<OWLNamedIndividualData> individuals = result.getIndividuals();
            view.addListData(individuals);
            if (!individuals.isEmpty()) {
                OWLNamedIndividualData next = individuals.iterator().next();
                view.setSelectedIndividual(next);
            }
        });
    });
    WebProtegeDialog.showDialog(controller);
}
Also used : CreateNamedIndividualsAction(edu.stanford.bmir.protege.web.shared.dispatch.actions.CreateNamedIndividualsAction) OWLNamedIndividualData(edu.stanford.bmir.protege.web.shared.entity.OWLNamedIndividualData)

Aggregations

CreateNamedIndividualsAction (edu.stanford.bmir.protege.web.shared.dispatch.actions.CreateNamedIndividualsAction)1 OWLNamedIndividualData (edu.stanford.bmir.protege.web.shared.entity.OWLNamedIndividualData)1