use of com.yahoo.search.query.textserialize.serializer.DispatchForm in project vespa by vespa-engine.
the class TermConverter method itemToForm.
@Override
public DispatchForm itemToForm(Item item, ItemIdMapper itemIdMapper) {
TermItem termItem = (TermItem) item;
DispatchForm form = new DispatchForm(termItem.getItemType().name());
ItemInitializer.initializeForm(form, item, itemIdMapper);
form.addChild(getValue(termItem));
return form;
}
use of com.yahoo.search.query.textserialize.serializer.DispatchForm in project vespa by vespa-engine.
the class NearConverter method itemToForm.
@Override
public DispatchForm itemToForm(Item item, ItemIdMapper itemIdMapper) {
DispatchForm dispatchForm = super.itemToForm(item, itemIdMapper);
NearItem nearItem = (NearItem) item;
dispatchForm.setProperty(distanceProperty, nearItem.getDistance());
return dispatchForm;
}
use of com.yahoo.search.query.textserialize.serializer.DispatchForm in project vespa by vespa-engine.
the class CompositeConverter method itemToForm.
@Override
public DispatchForm itemToForm(Item item, ItemIdMapper itemIdMapper) {
CompositeItem compositeItem = (CompositeItem) item;
DispatchForm form = new DispatchForm(getFormName(item));
for (ListIterator<Item> i = compositeItem.getItemIterator(); i.hasNext(); ) {
form.addChild(i.next());
}
ItemInitializer.initializeForm(form, item, itemIdMapper);
return form;
}
Aggregations