public static Item parse(String serializedQuery) {
        try {
            ItemContext context = new ItemContext();
            Object result = new Parser(new StringReader(serializedQuery.replace("'", "\"")), new ItemFormHandler(), context).start();
            context.connectItems();

            if (!(result instanceof Item)) {
                throw new RuntimeException("The serialized query '" + serializedQuery + "' did not evaluate to an Item" +
                                           "(type = " + result.getClass() + ")");
            }
            return (Item) result;
        } catch (ParseException | TokenMgrException e) {
            throw new RuntimeException(e);
        }
    }
@author Tony Vaagenes
Facade
Allows serializing/deserializing  a query to the programmatic format.
container-search/src/main/java/com/yahoo/search/query/textserialize/TextSerialize.java