@Override public ExpandSelectTreeNodeBuilder createExpandSelectTreeNodeBuilder() { ExpandSelectTreeNodeImpl expandSelectTreeNode = new ExpandSelectTreeNodeImpl(); return expandSelectTreeNode.new ExpandSelectTreeNodeBuilderImpl(); }
@Override public ExpandSelectTreeNodeBuilder createExpandSelectTreeNodeBuilder() { ExpandSelectTreeNodeImpl expandSelectTreeNode = new ExpandSelectTreeNodeImpl(); return expandSelectTreeNode.new ExpandSelectTreeNodeBuilderImpl(); }
@Override public ExpandSelectTreeNodeBuilder createExpandSelectTreeNodeBuilder() { ExpandSelectTreeNodeImpl expandSelectTreeNode = new ExpandSelectTreeNodeImpl(); return expandSelectTreeNode.new ExpandSelectTreeNodeBuilderImpl(); }
/** * Ensure that instance field {@link #resultEntry} exists. * If it not already exists create an instance (as well as all other necessary objects like: {@link #properties}, * {@link #mediaMetadata}, {@link #entryMetadata}, {@link #expandSelectTree}). */ private void ensureODataEntryExists() { if (resultEntry == null) { properties = new HashMap<String, Object>(); mediaMetadata = new MediaMetadataImpl(); entryMetadata = new EntryMetadataImpl(); expandSelectTree = new ExpandSelectTreeNodeImpl(); resultEntry = new ODataEntryImpl(properties, mediaMetadata, entryMetadata, expandSelectTree); } }
/** * Ensure that instance field {@link #resultEntry} exists. * If it not already exists create an instance (as well as all other necessary objects like: {@link #properties}, * {@link #mediaMetadata}, {@link #entryMetadata}, {@link #expandSelectTree}). */ private void ensureODataEntryExists() { if (resultEntry == null) { properties = new HashMap<String, Object>(); mediaMetadata = new MediaMetadataImpl(); entryMetadata = new EntryMetadataImpl(); expandSelectTree = new ExpandSelectTreeNodeImpl(); resultEntry = new ODataEntryImpl(properties, mediaMetadata, entryMetadata, expandSelectTree); } }
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 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()); } }
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; }
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; }
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; }
/** * Initializes the {@link XmlEntryConsumer} to be ready for reading an entry. * @param readProperties * @throws EntityProviderException */ private void initialize(final EntityProviderReadProperties readProperties) throws EntityProviderException { properties = new HashMap<String, Object>(); mediaMetadata = new MediaMetadataImpl(); entryMetadata = new EntryMetadataImpl(); expandSelectTree = new ExpandSelectTreeNodeImpl(); readEntryResult = new ODataEntryImpl(properties, mediaMetadata, entryMetadata, expandSelectTree); typeMappings = EntityTypeMapping.create(readProperties.getTypeMappings()); }
/** * Initializes the {@link XmlEntryConsumer} to be ready for reading an entry. * @param readProperties * @throws EntityProviderException */ private void initialize(final EntityProviderReadProperties readProperties) throws EntityProviderException { properties = new HashMap<String, Object>(); mediaMetadata = new MediaMetadataImpl(); entryMetadata = new EntryMetadataImpl(); expandSelectTree = new ExpandSelectTreeNodeImpl(); readEntryResult = new ODataEntryImpl(properties, mediaMetadata, entryMetadata, expandSelectTree); typeMappings = EntityTypeMapping.create(readProperties.getTypeMappings()); }
/** * Initializes the {@link XmlEntryConsumer} to be ready for reading an entry. * @param readProperties * @throws EntityProviderException */ private void initialize(final EntityProviderReadProperties readProperties) throws EntityProviderException { properties = new HashMap<String, Object>(); mediaMetadata = new MediaMetadataImpl(); entryMetadata = new EntryMetadataImpl(); expandSelectTree = new ExpandSelectTreeNodeImpl(); readEntryResult = new ODataEntryImpl(properties, mediaMetadata, entryMetadata, expandSelectTree); typeMappings = EntityTypeMapping.create(readProperties.getTypeMappings()); }
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; } }
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; }