Ejemplo n.º 1
0
  /**
   * 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);
  }
Ejemplo n.º 2
0
  @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);
  }
Ejemplo n.º 3
0
  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);
  }