/** * Set the keyword query parser that will be used to parse boolean expressions found in the JSON * query objects. */ public void setKeywordQueryParser(final KeywordQueryParser keywordParser) { // ensure that the default operator of the keyword parser is in synch keywordParser.setDefaultOperator(this.getDefaultOperator()); // set keyword query parser this.getQueryConfigHandler().set(ConfigurationKeys.KEYWORD_PARSER, keywordParser); // configure builders with the new keyword parser final JsonQueryTreeBuilder builder = (JsonQueryTreeBuilder) this.getQueryBuilder(); builder.setBuilders(keywordParser); }
@Override public void setQueryConfigHandler(final QueryConfigHandler config) { super.setQueryConfigHandler(config); final KeywordQueryParser keywordParser = this.getKeywordQueryParser(); // ensure that the default operator of the keyword parser is in synch keywordParser.setDefaultOperator(this.getDefaultOperator()); // configure builders with the keyword parser final JsonQueryTreeBuilder builder = (JsonQueryTreeBuilder) this.getQueryBuilder(); builder.setBuilders(keywordParser); }
public JsonQueryParser() { super( new JsonQueryConfigHandler(), new JsonSyntaxParser(), new JsonQueryNodeProcessorPipeline(null), new JsonQueryTreeBuilder(null)); final KeywordQueryParser keywordParser = this.getKeywordQueryParser(); // ensure that the default operator of the keyword parser is in synch keywordParser.setDefaultOperator(this.getDefaultOperator()); // configure builders with the keyword parser final JsonQueryTreeBuilder builder = (JsonQueryTreeBuilder) this.getQueryBuilder(); builder.setBuilders(keywordParser); }