private ExpandSelectTreeNodeImpl addExpandNode(final ExpandSelectTreeNodeImpl actualNode, final String navigationPropertyName) { Map<String, ExpandSelectTreeNode> links = actualNode.getLinks(); if (!links.containsKey(navigationPropertyName)) { if (actualNode.isExplicitlySelected() || (actualNode.isExplicitlySelected() && actualNode.isExpanded())) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); subNode.setExpanded(); subNode.setExplicitlySelected(); actualNode.putLink(navigationPropertyName, subNode); return subNode; } else { return null; } } else { ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) links.get(navigationPropertyName); subNode.setExpanded(); return subNode; } }
private ExpandSelectTreeNodeImpl addExpandNode(final ExpandSelectTreeNodeImpl actualNode, final String navigationPropertyName) { Map<String, ExpandSelectTreeNode> links = actualNode.getLinks(); if (!links.containsKey(navigationPropertyName)) { if (actualNode.isExplicitlySelected() || (actualNode.isExplicitlySelected() && actualNode.isExpanded())) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); subNode.setExpanded(); subNode.setExplicitlySelected(); actualNode.putLink(navigationPropertyName, subNode); return subNode; } else { return null; } } else { ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) links.get(navigationPropertyName); subNode.setExpanded(); return subNode; } }
private ExpandSelectTreeNodeImpl addExpandNode(final ExpandSelectTreeNodeImpl actualNode, final String navigationPropertyName) { Map<String, ExpandSelectTreeNode> links = actualNode.getLinks(); if (!links.containsKey(navigationPropertyName)) { if (actualNode.isExplicitlySelected() || (actualNode.isExplicitlySelected() && actualNode.isExpanded())) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); subNode.setExpanded(); subNode.setExplicitlySelected(); actualNode.putLink(navigationPropertyName, subNode); return subNode; } else { return null; } } else { ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) links.get(navigationPropertyName); subNode.setExpanded(); return subNode; } }
private void consolidateTrueNode(final ExpandSelectTreeNodeImpl node) { Map<String, ExpandSelectTreeNode> links = node.getLinks(); Set<Entry<String, ExpandSelectTreeNode>> linkEntries = links.entrySet(); List<String> toRemove = new ArrayList<String>(); for (Entry<String, ExpandSelectTreeNode> entry : linkEntries) { ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) entry.getValue(); if (subNode.isExpanded() && node.isExplicitlySelected()) { subNode.setExplicitlySelected(); consolidate(subNode); } else if (subNode.isExpanded()) { consolidate(subNode); } else { toRemove.add(entry.getKey()); } } // for (String key : toRemove) { node.removeLink(key); } }
private void consolidateTrueNode(final ExpandSelectTreeNodeImpl node) { Map<String, ExpandSelectTreeNode> links = node.getLinks(); Set<Entry<String, ExpandSelectTreeNode>> linkEntries = links.entrySet(); List<String> toRemove = new ArrayList<String>(); for (Entry<String, ExpandSelectTreeNode> entry : linkEntries) { ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) entry.getValue(); if (subNode.isExpanded() && node.isExplicitlySelected()) { subNode.setExplicitlySelected(); consolidate(subNode); } else if (subNode.isExpanded()) { consolidate(subNode); } else { toRemove.add(entry.getKey()); } } // for (String key : toRemove) { node.removeLink(key); } }
private void consolidateTrueNode(final ExpandSelectTreeNodeImpl node) { Map<String, ExpandSelectTreeNode> links = node.getLinks(); Set<Entry<String, ExpandSelectTreeNode>> linkEntries = links.entrySet(); List<String> toRemove = new ArrayList<String>(); for (Entry<String, ExpandSelectTreeNode> entry : linkEntries) { ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) entry.getValue(); if (subNode.isExpanded() && node.isExplicitlySelected()) { subNode.setExplicitlySelected(); consolidate(subNode); } else if (subNode.isExpanded()) { consolidate(subNode); } else { toRemove.add(entry.getKey()); } } // for (String key : toRemove) { node.removeLink(key); } }
private ExpandSelectTreeNodeImpl addSelectNode(final ExpandSelectTreeNodeImpl actualNode, final String navigationPropertyName) { Map<String, ExpandSelectTreeNode> links = actualNode.getLinks(); if (!links.containsKey(navigationPropertyName)) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); actualNode.putLink(navigationPropertyName, subNode); if (actualNode.isExplicitlySelected()) { // if a node was explicitly selected all sub nodes are explicitly selected subNode.setExplicitlySelected(); } else { if (actualNode.getAllKind() == AllKinds.IMPLICITLYTRUE) { actualNode.setAllKindFalse(); } } return subNode; } else { return (ExpandSelectTreeNodeImpl) links.get(navigationPropertyName); } }
private ExpandSelectTreeNodeImpl addSelectNode(final ExpandSelectTreeNodeImpl actualNode, final String navigationPropertyName) { Map<String, ExpandSelectTreeNode> links = actualNode.getLinks(); if (!links.containsKey(navigationPropertyName)) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); actualNode.putLink(navigationPropertyName, subNode); if (actualNode.isExplicitlySelected()) { // if a node was explicitly selected all sub nodes are explicitly selected subNode.setExplicitlySelected(); } else { if (actualNode.getAllKind() == AllKinds.IMPLICITLYTRUE) { actualNode.setAllKindFalse(); } } return subNode; } else { return (ExpandSelectTreeNodeImpl) links.get(navigationPropertyName); } }
private ExpandSelectTreeNodeImpl addSelectNode(final ExpandSelectTreeNodeImpl actualNode, final String navigationPropertyName) { Map<String, ExpandSelectTreeNode> links = actualNode.getLinks(); if (!links.containsKey(navigationPropertyName)) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); actualNode.putLink(navigationPropertyName, subNode); if (actualNode.isExplicitlySelected()) { // if a node was explicitly selected all sub nodes are explicitly selected subNode.setExplicitlySelected(); } else { if (actualNode.getAllKind() == AllKinds.IMPLICITLYTRUE) { actualNode.setAllKindFalse(); } } return subNode; } else { return (ExpandSelectTreeNodeImpl) links.get(navigationPropertyName); } }