use of edu.stanford.bmir.protege.web.shared.hierarchy.HierarchyId in project webprotege by protegeproject.
the class PropertyHierarchyPortletViewImpl method handleTabSelectionChanged.
private void handleTabSelectionChanged() {
int selection = switcher.getSelectedTab();
HierarchyId hierarchyId = hierarchyIds.get(selection);
IsWidget view = views.get(selection);
hierarchyContainer.setWidget(view);
hierarchyIdSelectedHandler.handleHierarchyIdSelected(hierarchyId);
}
use of edu.stanford.bmir.protege.web.shared.hierarchy.HierarchyId in project webprotege by protegeproject.
the class GetEntityHierarchyChildrenActionHandler method execute.
@Nonnull
@Override
public GetHierarchyChildrenResult execute(@Nonnull GetHierarchyChildrenAction action, @Nonnull ExecutionContext executionContext) {
HierarchyId hierarchyId = action.getHierarchyId();
Optional<HierarchyProvider<OWLEntity>> hierarchyProvider = hierarchyProviderMapper.getHierarchyProvider(hierarchyId);
if (!hierarchyProvider.isPresent()) {
return emptyResult();
}
OWLEntity parent = action.getEntity();
GraphNode<EntityHierarchyNode> parentNode = nodeRenderer.toGraphNode(parent, hierarchyProvider.get());
SuccessorMap.Builder<EntityHierarchyNode> successorMap = SuccessorMap.builder();
hierarchyProvider.get().getChildren(parent).stream().filter(child -> isNotDeprecatedTopLevelEntity(parent, child)).map(child -> nodeRenderer.toGraphNode(child, hierarchyProvider.get())).forEach(childNode -> successorMap.add(parentNode, childNode));
successorMap.sort(comparing(GraphNode::getUserObject));
return new GetHierarchyChildrenResult(successorMap.build());
}
Aggregations