blob: 6b92911f39ea1b0dc1fac2f822d21a8b8d43180c (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
|
// Copyright Vespa.ai. 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 Tony Vaagenes
*/
public class QueryTreeSerializer {
public String serialize(Item root) {
ItemIdMapper itemIdMapper = new ItemIdMapper();
return ItemExecutorRegistry.getByType(root.getItemType()).itemToForm(root, itemIdMapper).serialize(itemIdMapper);
}
}
|