use of edu.stanford.bmir.protege.web.shared.obo.GetOboTermRelationshipsAction in project webprotege by protegeproject.
the class OBOTermRelationshipPortletPresenter method displayEntity.
@Override
protected void displayEntity(OWLEntity entity) {
Optional<OWLEntity> current = getSelectedEntity();
if (!current.isPresent()) {
editor.clearValue();
pristineValue = Optional.empty();
return;
}
if (!(current.get() instanceof OWLClass)) {
editor.clearValue();
pristineValue = Optional.empty();
return;
}
dispatch.execute(new GetOboTermRelationshipsAction(getProjectId(), entity.asOWLClass()), this, result -> {
List<OBORelationship> listOfRels = new ArrayList<>(result.getRelationships().getRelationships());
pristineValue = Optional.of(listOfRels);
editor.setValue(listOfRels);
});
}
Aggregations