private void updateExpandSelectTree(final String navigationPropertyName, final ODataEntry entry) { expandSelectTree.setExpanded(); expandSelectTree.setExplicitlySelected(); expandSelectTree.putLink(navigationPropertyName, (ExpandSelectTreeNodeImpl) entry.getExpandSelectTree()); }
private void updateExpandSelectTree(final String navigationPropertyName, final ODataFeed feed) { List<ODataEntry> entries = feed.getEntries(); if (!entries.isEmpty()) { updateExpandSelectTree(navigationPropertyName, entries.get(0)); } else { expandSelectTree.setExpanded(); expandSelectTree.setExplicitlySelected(); expandSelectTree.putLink(navigationPropertyName, new ExpandSelectTreeNodeImpl()); } }
private void updateExpandSelectTree(final String navigationPropertyName, final ODataFeed feed) { List<ODataEntry> entries = feed.getEntries(); if (!entries.isEmpty()) { updateExpandSelectTree(navigationPropertyName, entries.get(0)); } else { expandSelectTree.setExpanded(); expandSelectTree.setExplicitlySelected(); expandSelectTree.putLink(navigationPropertyName, new ExpandSelectTreeNodeImpl()); } }
private void updateExpandSelectTree(final String navigationPropertyName, final ODataEntry entry) { expandSelectTree.setExpanded(); expandSelectTree.setExplicitlySelected(); expandSelectTree.putLink(navigationPropertyName, (ExpandSelectTreeNodeImpl) entry.getExpandSelectTree()); }
private void updateExpandSelectTree(final String navigationPropertyName, final ODataFeed feed) { List<ODataEntry> entries = feed.getEntries(); if (entries.size() > 0) { updateExpandSelectTree(navigationPropertyName, entries.get(0)); } else { expandSelectTree.setExpanded(); expandSelectTree.setExplicitlySelected(); expandSelectTree.putLink(navigationPropertyName, new ExpandSelectTreeNodeImpl()); } }
private void updateExpandSelectTree(final String navigationPropertyName, final ODataEntry entry) { expandSelectTree.setExpanded(); expandSelectTree.setExplicitlySelected(); expandSelectTree.putLink(navigationPropertyName, (ExpandSelectTreeNodeImpl) entry.getExpandSelectTree()); }
public ExpandSelectTreeNodeImpl create() throws EdmException { // Initial node ExpandSelectTreeNodeImpl root = new ExpandSelectTreeNodeImpl(); if (!initialSelect.isEmpty()) { // Create a full expand tree createSelectTree(root); } else { // If no select is given the root node is explicitly selected for all expand clauses root.setExplicitlySelected(); } // Merge in the expand tree mergeExpandTree(root); // consolidate the tree consolidate(root); return root; }
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); } }
public ExpandSelectTreeNodeImpl create() throws EdmException { // Initial node ExpandSelectTreeNodeImpl root = new ExpandSelectTreeNodeImpl(); if (!initialSelect.isEmpty()) { // Create a full expand tree createSelectTree(root); } else { // If no select is given the root node is explicitly selected for all expand clauses root.setExplicitlySelected(); } // Merge in the expand tree mergeExpandTree(root); // consolidate the tree consolidate(root); return root; }
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); } }
public ExpandSelectTreeNodeImpl create() throws EdmException { // Initial node ExpandSelectTreeNodeImpl root = new ExpandSelectTreeNodeImpl(); if (!initialSelect.isEmpty()) { // Create a full expand tree createSelectTree(root); } else { // If no select is given the root node is explicitly selected for all expand clauses root.setExplicitlySelected(); } // Merge in the expand tree mergeExpandTree(root); // consolidate the tree consolidate(root); return root; }
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 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; } }
@Override public ExpandSelectTreeNode build() throws EdmException { EdmEntityType entityType = entitySet.getEntityType(); if (selectedPropertyNames != null) { handleProperties(entityType); } if (selectedNavigationPropertyNames != null) { setAllKindFalse(); handleLinks(entityType, selectedNavigationPropertyNames, null); } if (expandedNavigationPropertyNames != null) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); subNode.setExplicitlySelected(); handleLinks(entityType, expandedNavigationPropertyNames, subNode); } if (customExpandedNavigationProperties != null) { handleCustomLinks(entityType); } return ExpandSelectTreeNodeImpl.this; }
@Override public ExpandSelectTreeNode build() throws EdmException { EdmEntityType entityType = entitySet.getEntityType(); if (selectedPropertyNames != null) { handleProperties(entityType); } if (selectedNavigationPropertyNames != null) { setAllKindFalse(); handleLinks(entityType, selectedNavigationPropertyNames, null); } if (expandedNavigationPropertyNames != null) { ExpandSelectTreeNodeImpl subNode = new ExpandSelectTreeNodeImpl(); subNode.setExplicitlySelected(); handleLinks(entityType, expandedNavigationPropertyNames, subNode); } if (customExpandedNavigationProperties != null) { handleCustomLinks(entityType); } return ExpandSelectTreeNodeImpl.this; }
private void createSelectTree(final ExpandSelectTreeNodeImpl root) throws EdmException { for (SelectItem item : initialSelect) { ExpandSelectTreeNodeImpl actualNode = root; for (NavigationPropertySegment navSegement : item.getNavigationPropertySegments()) { actualNode = addSelectNode(actualNode, navSegement.getNavigationProperty().getName()); } if (item.getProperty() != null) { actualNode.addProperty(item.getProperty()); } else if (item.isStar()) { actualNode.setAllExplicitly(); } else { // The actual node is a navigation property and has no property or star so it is explicitly selected actualNode.setExplicitlySelected(); } } }
private void createSelectTree(final ExpandSelectTreeNodeImpl root) throws EdmException { for (SelectItem item : initialSelect) { ExpandSelectTreeNodeImpl actualNode = root; for (NavigationPropertySegment navSegement : item.getNavigationPropertySegments()) { actualNode = addSelectNode(actualNode, navSegement.getNavigationProperty().getName()); } if (item.getProperty() != null) { actualNode.addProperty(item.getProperty()); } else if (item.isStar()) { actualNode.setAllExplicitly(); } else { // The actual node is a navigation property and has no property or star so it is explicitly selected actualNode.setExplicitlySelected(); } } }
private void createSelectTree(final ExpandSelectTreeNodeImpl root) throws EdmException { for (SelectItem item : initialSelect) { ExpandSelectTreeNodeImpl actualNode = root; for (NavigationPropertySegment navSegement : item.getNavigationPropertySegments()) { actualNode = addSelectNode(actualNode, navSegement.getNavigationProperty().getName()); } if (item.getProperty() != null) { actualNode.addProperty(item.getProperty()); } else if (item.isStar()) { actualNode.setAllExplicitly(); } else { // The actual node is a navigation property and has no property or star so it is explicitly selected actualNode.setExplicitlySelected(); } } }