Search in sources :

Example 1 with GetEntityRenderingAction

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

the class ClassNameFieldEditor method setValue.

@Override
public void setValue(FormDataValue object) {
    Optional<OWLEntity> entity = object.asOWLEntity();
    entity.ifPresent(e -> {
        dispatchServiceManager.execute(new GetEntityRenderingAction(projectId, e), result -> editor.setValue(result.getEntityData()));
    });
    if (!entity.isPresent()) {
        editor.clearValue();
    }
}
Also used : OWLEntity(org.semanticweb.owlapi.model.OWLEntity) GetEntityRenderingAction(edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction)

Aggregations

GetEntityRenderingAction (edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction)1 OWLEntity (org.semanticweb.owlapi.model.OWLEntity)1