private static StringBuilder getAllAnnotations(WordItem w) {
            StringBuilder wordAnnotations = new StringBuilder(WordSerializer.wordAnnotations(w));
            String leafAnnotations = leafAnnotations(w);

            if (!leafAnnotations.isEmpty()) {
                comma(wordAnnotations, 0);
                wordAnnotations.append(leafAnnotations(w));
            }
            return wordAnnotations;
        }
Serialize Vespa query trees to YQL+ strings.

@author Steinar Knutsen
container-search/src/main/java/com/yahoo/search/yql/VespaSerializer.java