private void HandleNodeGroupNodeAdditions(Node nd) { // basic case where the node group is empty... if (this.queryNodeGroup.GetNodeCount() == 0) { Debug.WriteLine("Adding a single node to an empty nodeGroup. the URI was " + nd.GetFullUriName()); this.queryNodeGroup.AddOneNode(nd, null, null, null); this.nodegroupCanvas.CheckNodeAdded(); } else { // add it as needed. // get all of the fullUris for the potential targets: List <String> targetUris = new List <String>(); foreach (Node n in this.queryNodeGroup.GetNodeList()) { targetUris.Add(n.GetFullUriName()); } List <OntologyPath> availablePaths = this.oInfo.FindAllPaths(nd.GetFullUriName(), targetUris, "http://"); // build the path that captures this connection of the start class to the new one. Dictionary <String, ListViewPathAnchorEntry> precursorPaths = new Dictionary <string, ListViewPathAnchorEntry>(); // add an empty precursor path. these things are useful... ListViewPathAnchorEntry baseEntry = new ListViewPathAnchorEntry(null); precursorPaths.Add("disconnected", baseEntry); foreach (OntologyPath op in availablePaths) { String acn = op.GetAnchorClassName(); foreach (Node matchingNode in this.queryNodeGroup.GetNodeByURI(acn)) { String sId = matchingNode.GetSparqlID(); if (precursorPaths.ContainsKey(sId)) { precursorPaths[sId].AddNewPath(op); } else { ListViewPathAnchorEntry curr = new ListViewPathAnchorEntry(matchingNode); curr.AddNewPath(op); precursorPaths.Add(sId, curr); } } } // add to the listview. this.connectionPositionView.ItemsSource = precursorPaths.Values; FlyoutBase.ShowAttachedFlyout(this.ontologyBoxControl); } }