private void consolidateFalseNode(final ExpandSelectTreeNodeImpl node) { Iterator<Map.Entry<String, ExpandSelectTreeNode>> iterator = node.getLinks().entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, ExpandSelectTreeNode> entry = iterator.next(); ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) entry.getValue(); if (!subNode.isExpanded()) { node.putLink(entry.getKey(), null); } else { consolidate(subNode); } } }
private void consolidateFalseNode(final ExpandSelectTreeNodeImpl node) { Iterator<Map.Entry<String, ExpandSelectTreeNode>> iterator = node.getLinks().entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, ExpandSelectTreeNode> entry = iterator.next(); ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) entry.getValue(); if (!subNode.isExpanded()) { node.putLink(entry.getKey(), null); } else { consolidate(subNode); } } }
private void consolidateFalseNode(final ExpandSelectTreeNodeImpl node) { Iterator<Map.Entry<String, ExpandSelectTreeNode>> iterator = node.getLinks().entrySet().iterator(); while (iterator.hasNext()) { Map.Entry<String, ExpandSelectTreeNode> entry = iterator.next(); ExpandSelectTreeNodeImpl subNode = (ExpandSelectTreeNodeImpl) entry.getValue(); if (!subNode.isExpanded()) { node.putLink(entry.getKey(), null); } else { consolidate(subNode); } } }
private void handleCustomLinks(final EdmEntityType entityType) throws EdmException { for (Map.Entry<String, ExpandSelectTreeNode> entry : customExpandedNavigationProperties.entrySet()) { EdmTyped navigationProperty = entityType.getProperty(entry.getKey()); if (navigationProperty == null) { throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(entry.getKey())); } if (!(navigationProperty instanceof EdmNavigationProperty)) { throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(entry.getKey())); } putLink(entry.getKey(), (ExpandSelectTreeNodeImpl) entry.getValue()); } }
private void handleCustomLinks(final EdmEntityType entityType) throws EdmException { for (Map.Entry<String, ExpandSelectTreeNode> entry : customExpandedNavigationProperties.entrySet()) { EdmTyped navigationProperty = entityType.getProperty(entry.getKey()); if (navigationProperty == null) { throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(entry.getKey())); } if (!(navigationProperty instanceof EdmNavigationProperty)) { throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(entry.getKey())); } putLink(entry.getKey(), (ExpandSelectTreeNodeImpl) entry.getValue()); } }
private void handleCustomLinks(final EdmEntityType entityType) throws EdmException { for (Map.Entry<String, ExpandSelectTreeNode> entry : customExpandedNavigationProperties.entrySet()) { EdmTyped navigationProperty = entityType.getProperty(entry.getKey()); if (navigationProperty == null) { throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(entry.getKey())); } if (!(navigationProperty instanceof EdmNavigationProperty)) { throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(entry.getKey())); } putLink(entry.getKey(), (ExpandSelectTreeNodeImpl) entry.getValue()); } }
/** * Updates the expand select tree ({@link #expandSelectTree}) for this {@link ReadEntryResult} ( * {@link #readEntryResult}). * * @param navigationPropertyName * @param inlineEntries * @throws EntityProviderException */ private void updateExpandSelectTree(final String navigationPropertyName, final List<ODataEntry> inlineEntries) throws EntityProviderException { expandSelectTree.setExpanded(); ExpandSelectTreeNodeImpl subNode = getExpandSelectTreeNode(inlineEntries); expandSelectTree.putLink(navigationPropertyName, subNode); }
/** * Updates the expand select tree ({@link #expandSelectTree}) for this {@link ReadEntryResult} ( * {@link #readEntryResult}). * * @param navigationPropertyName * @param inlineEntries * @throws EntityProviderException */ private void updateExpandSelectTree(final String navigationPropertyName, final List<ODataEntry> inlineEntries) throws EntityProviderException { expandSelectTree.setExpanded(); ExpandSelectTreeNodeImpl subNode = getExpandSelectTreeNode(inlineEntries); expandSelectTree.putLink(navigationPropertyName, subNode); }
/** * Updates the expand select tree ({@link #expandSelectTree}) for this {@link ReadEntryResult} ( * {@link #readEntryResult}). * * @param navigationPropertyName * @param inlineEntries * @throws EntityProviderException */ private void updateExpandSelectTree(final String navigationPropertyName, final List<ODataEntry> inlineEntries) throws EntityProviderException { expandSelectTree.setExpanded(); ExpandSelectTreeNodeImpl subNode = getExpandSelectTreeNode(inlineEntries); expandSelectTree.putLink(navigationPropertyName, subNode); }
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()); }
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 void handleLinks(final EdmEntityType entityType, final List<String> names, final ExpandSelectTreeNodeImpl subNode) throws EdmException { for (String navigationPropertyName : names) { EdmTyped navigationProperty = entityType.getProperty(navigationPropertyName); if (navigationProperty == null) { throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(navigationPropertyName)); } else if (!(navigationProperty instanceof EdmNavigationProperty)) { throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(navigationPropertyName)); } putLink(navigationPropertyName, subNode); } }
private void handleLinks(final EdmEntityType entityType, final List<String> names, final ExpandSelectTreeNodeImpl subNode) throws EdmException { for (String navigationPropertyName : names) { EdmTyped navigationProperty = entityType.getProperty(navigationPropertyName); if (navigationProperty == null) { throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(navigationPropertyName)); } else if (!(navigationProperty instanceof EdmNavigationProperty)) { throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(navigationPropertyName)); } putLink(navigationPropertyName, subNode); } }
private void handleLinks(final EdmEntityType entityType, final List<String> names, final ExpandSelectTreeNodeImpl subNode) throws EdmException { for (String navigationPropertyName : names) { EdmTyped navigationProperty = entityType.getProperty(navigationPropertyName); if (navigationProperty == null) { throw new EdmException(EdmException.NAVIGATIONPROPERTYNOTFOUND.addContent(navigationPropertyName)); } else if (!(navigationProperty instanceof EdmNavigationProperty)) { throw new EdmException(EdmException.MUSTBENAVIGATIONPROPERTY.addContent(navigationPropertyName)); } putLink(navigationPropertyName, 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; } }