src/POData/UriProcessor/QueryProcessor/ExpandProjectionParser/ExpandedProjectionNode.php
/**
     * Remove all child 'ExpandedProjectionNode's of this node which are 
     * not selected, Recursively invoke the same function for selected 
     * node, so that all unnecessary nodes will be removed from the subtree.
     * 
     * @return void
     */
Remove all child 'ExpandedProjectionNode's of this node which are
not selected, Recursively invoke the same function for selected
node, so that all unnecessary nodes will be removed from the subtree.

@return void
Remove all child ' ExpandedProjectionNode ' s of this node which are not selected Recursively invoke the same function for selected node so that all unnecessary nodes will be removed from the subtree . @return void
public function removeNonSelectedNodes()
    {
        foreach ($this->_childNodes as $propertyName => $node) {
            if ($node instanceof ExpandedProjectionNode) {
                if (!$this->_selectSubtree && !$node->_selectionFound) {
                    unset($this->_childNodes[$propertyName]);
                } else {
                    $node->removeNonSelectedNodes();
                }
            }    
        }
    }
public function removeNonSelectedNodes ( ) { foreach ( $ this -> _childNodes as $ propertyName => $ node ) { if ( $ node instanceof ExpandedProjectionNode ) { if ( ! $ this -> _selectSubtree && ! $ node -> _selectionFound ) { unset ( $ this -> _childNodes [ $ propertyName ] ) ; } else { $ node -> removeNonSelectedNodes ( ) ; } } } }
Remove all child 'ExpandedProjectionNode's of this node which are
 not selected, Recursively invoke the same function for selected
 node, so that all unnecessary nodes will be removed from the subtree.
Remove all child ' ExpandedProjectionNode ' s of this node which are not selected Recursively invoke the same function for selected node so that all unnecessary nodes will be removed from the subtree .
//Possilbe Node status flags are: //for $expand=A/B/C/D, X/Y // | SF | SST | // | T  | F   |  For $select=A/B, this is status of A // | T  | T   |  For $select=A/B, this is status of B // | F  | T   |  For $select=A/B, this is status of C and D // | F  | F   |  For $select=A/B, this is status of X and Y //