private SidePanelSection createConceptGraphArcsSidePanelSection( ViewContentDisplay contentDisplay) { assert ((DropEnabledViewContentDisplay) contentDisplay).getDelegate() instanceof Graph : "invalid content display type " + contentDisplay; Graph graphViewContentDisplay = (Graph) ((DropEnabledViewContentDisplay) contentDisplay).getDelegate(); VerticalPanel panel = new VerticalPanel(); Iterable<ArcItemContainer> arcItemContainers = graphViewContentDisplay.getArcItemContainers(); for (final ArcItemContainer arcItemContainer : arcItemContainers) { String arcTypeId = arcItemContainer.getArcType().getArcTypeID(); String label = "unknown"; if (DirectConceptMappingArcType.ID.equals(arcTypeId)) { label = "Mapping Relationship"; panel.add(createArcTypeContainerControl(label, arcItemContainer)); } else if (MappingArcType.ID.equals(arcTypeId)) { label = "Mapping"; // disabled the options to edit the style of the arcs of the // Mapping Nodes - likely to be permanent // panel.add(createArcTypeContainerControl(label, // arcItemContainer)); } else if (ConceptArcType.ID.equals(arcTypeId)) { label = "Is-A Relationship"; panel.add(createArcTypeContainerControl(label, arcItemContainer)); } else if (CompositionArcType.ID.equals(arcTypeId)) { label = "Part-Of Relationship"; panel.add(createArcTypeContainerControl(label, arcItemContainer)); } } return new SidePanelSection("Arcs", panel); }
private SidePanelSection createOntologyGraphArcsSidePanelSection( ViewContentDisplay contentDisplay) { assert ((DropEnabledViewContentDisplay) contentDisplay).getDelegate() instanceof Graph : "invalid content display type " + contentDisplay; Graph graphViewContentDisplay = (Graph) ((DropEnabledViewContentDisplay) contentDisplay).getDelegate(); VerticalPanel panel = new VerticalPanel(); Iterable<ArcItemContainer> arcItemContainers = graphViewContentDisplay.getArcItemContainers(); for (final ArcItemContainer arcItemContainer : arcItemContainers) { String arcTypeId = arcItemContainer.getArcType().getArcTypeID(); String label = "unknown"; if (OntologyMappingArcType.ID.equals(arcTypeId)) { label = "Ontology Mapping"; panel.add(createArcTypeContainerControl(label, arcItemContainer)); } } return new SidePanelSection("Arcs", panel); }