Package org.sindice.siren.qparser.keyword.config

Examples of org.sindice.siren.qparser.keyword.config.KeywordQueryConfigHandler


  @SuppressWarnings("unchecked")
  public Query parse(final HashMap<ConfigurationKey, Object> keys, final String query)
  throws QueryNodeException {
    final KeywordQueryParser parser = new KeywordQueryParser();
    if (keys != null) {
      final KeywordQueryConfigHandler config = new KeywordQueryConfigHandler();
      for (Entry<ConfigurationKey, Object> key: keys.entrySet()) {
        config.set(key.getKey(), key.getValue());
      }
      parser.setQueryConfigHandler(config);
    }
    return parser.parse(query, SirenTestCase.DEFAULT_TEST_FIELD);
  }
View Full Code Here


   * Constructs a {@link KeywordQueryParser} object.
   */
  public KeywordQueryParser() {
    super();
    this.setSyntaxParser(new KeywordSyntaxParser());
    this.setQueryConfigHandler(new KeywordQueryConfigHandler());
    this.setQueryNodeProcessor(new KeywordQueryNodeProcessorPipeline(this.getQueryConfigHandler()));
    this.setQueryBuilder(new KeywordQueryTreeBuilder());
  }
View Full Code Here

TOP

Related Classes of org.sindice.siren.qparser.keyword.config.KeywordQueryConfigHandler

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.