Search in sources :

Example 1 with DynamicParser

use of com.amazon.dynamicparser.DynamicParser in project zype-firebuilder by zype.

the class ZypeSearchManager method getSearchContentsObservable.

private Observable<Object> getSearchContentsObservable(String feed, ISearchResult iSearchResult) {
    DynamicParser parser = new DynamicParser();
    ZypeContentTranslator zypeContentTranslator = new ZypeContentTranslator();
    parser.addTranslatorImpl(zypeContentTranslator.getName(), zypeContentTranslator);
    String[] params = new String[] { (String) "" };
    return parser.cookRecipeObservable(recipeSearchContents, feed, null, params).map(contentAsObject -> {
        Content content = (Content) contentAsObject;
        if (content != null) {
            iSearchResult.onSearchResult(content, false);
        }
        return content;
    });
}
Also used : ZypeContentTranslator(com.amazon.android.model.translators.ZypeContentTranslator) Content(com.amazon.android.model.content.Content) DynamicParser(com.amazon.dynamicparser.DynamicParser)

Aggregations

Content (com.amazon.android.model.content.Content)1 ZypeContentTranslator (com.amazon.android.model.translators.ZypeContentTranslator)1 DynamicParser (com.amazon.dynamicparser.DynamicParser)1