blob: 337c1d4a59e3e6bcaf2115ca5e0430fab290be35 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Copyright 2017 Yahoo Holdings. Licensed under the terms of the Apache 2.0 license. See LICENSE in the project root.
package com.yahoo.search.query.textserialize.serializer;
import com.yahoo.prelude.query.Item;
import com.yahoo.search.query.textserialize.item.ItemExecutorRegistry;
/**
* @author tonytv
*/
public class QueryTreeSerializer {
public String serialize(Item root) {
ItemIdMapper itemIdMapper = new ItemIdMapper();
return ItemExecutorRegistry.getByType(root.getItemType()).itemToForm(root, itemIdMapper).serialize(itemIdMapper);
}
}
|