public static Collection<OPPStructuralLinkPart> getOutgoingStructuralLinks(OPPNode node) { return (Collection) node.getOutgoingLinks() .stream() .filter(l -> l instanceof OPPStructuralLinkPart) .collect(Collectors.toList()); }
/** * Detach all links from the node and from the other connecting node, storing the connection * information in local data structures. */ private void detachLinks() { links = new ArrayList<OPPLink>(); linkSources = new HashMap<OPPLink, OPPNode>(); linkTargets = new HashMap<OPPLink, OPPNode>(); links.addAll(node.getIncomingLinks()); links.addAll(node.getOutgoingLinks()); for (OPPLink link : links) { linkSources.put(link, link.getSource()); linkTargets.put(link, link.getTarget()); link.setSource(null); link.setTarget(null); link.setOpd(null); } }