Skip to content

Commit

Permalink
fixed displaying entity as title.
Browse files Browse the repository at this point in the history
  • Loading branch information
alexsilaghi committed Dec 11, 2024
1 parent 25f2206 commit c5eb58c
Showing 1 changed file with 6 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@
import edu.stanford.bmir.protege.web.shared.hierarchy.*;
import edu.stanford.bmir.protege.web.shared.linearization.*;
import edu.stanford.bmir.protege.web.shared.project.ProjectId;
import edu.stanford.bmir.protege.web.shared.renderer.GetEntityRenderingAction;
import edu.stanford.webprotege.shared.annotations.Portlet;
import org.semanticweb.owlapi.model.OWLEntity;

Expand Down Expand Up @@ -63,9 +64,10 @@ public LinearizationPortletPresenter(@Nonnull SelectionModel selectionModel,

@Override
public void startPortlet(PortletUi portletUi, WebProtegeEventBus eventBus) {
portletUi.setWidget(view.asWidget());
setDisplaySelectedEntityNameAsSubtitle(true);

dispatch.execute(GetLinearizationDefinitionsAction.create(), result -> {
portletUi.setWidget(view.asWidget());
setDisplaySelectedEntityNameAsSubtitle(true);
for (LinearizationDefinition definition : result.getDefinitionList()) {
this.definitionMap.put(definition.getWhoficEntityIri(), definition);
}
Expand Down Expand Up @@ -102,6 +104,8 @@ protected void handleAfterSetEntity(Optional<OWLEntity> entityData) {

private void navigateToEntity(Optional<OWLEntity> entityData) {
if (entityData.isPresent()) {
dispatch.execute(GetEntityRenderingAction.create(getProjectId(), entityData.get()),
(result) -> setDisplayedEntity(Optional.of(result.getEntityData())));
this.entityParentsMap.clear();
dispatch.execute(GetEntityLinearizationAction.create(entityData.get().getIRI().toString(), this.getProjectId()), response -> {

Expand All @@ -126,6 +130,5 @@ private void navigateToEntity(Optional<OWLEntity> entityData) {

private void handleSetEntity(Optional<OWLEntity> entity) {
handleAfterSetEntity(entity);

}
}

0 comments on commit c5eb58c

Please sign in to comment.