private String stringifySubTree ( IntermediateQuery query , QueryNode subTreeRoot , String rootOffsetString ) { StringBuilder strBuilder = new StringBuilder ( ) ; strBuilder . append ( rootOffsetString + subTreeRoot + "\n" ) ; for ( QueryNode child : query . getChildren ( subTreeRoot ) ) { strBuilder . append ( stringifySubTree ( query , child , rootOffsetString + TAB_STR ) ) ; } return strBuilder . toString ( ) ; }
Recursive method .