Package org.sindice.siren.qparser.keyword.nodes

Examples of org.sindice.siren.qparser.keyword.nodes.TopLevelQueryNode


  private QueryConfigHandler queryConfig;

  @Override
  public QueryNode process(final QueryNode queryTree)
  throws QueryNodeException {
    final TopLevelQueryNode top = (TopLevelQueryNode) queryTree;

    if (this.getQueryConfigHandler().has(KeywordConfigurationKeys.ALLOW_TWIG)) {
      if (!this.getQueryConfigHandler().get(KeywordConfigurationKeys.ALLOW_TWIG)) {
        // Wraps the children into a BooleanQueryNode, so that the parent
        // pointers are correct.
        // This relies on the BooleanSingleChildOptimizationQueryNodeProcessor
        return new BooleanQueryNode(top.getChildren());
      }
    } else {
      throw new IllegalArgumentException("KeywordConfigurationKeys.ALLOW_TWIG should be set on the KeywordQueryConfigHandler");
    }
    return queryTree;
View Full Code Here


      this.queryNodeList = actualQueryNodeList;
      this.latestNodeVerified = false;
    }
    else if (node instanceof TopLevelQueryNode) {
      final ArrayList<QueryNode> actualQueryNodeList = this.queryNodeList;
      final TopLevelQueryNode topNode = (TopLevelQueryNode) node;
      final QueryNode child = topNode.getChildren().get(0);
      topNode.set(Arrays.asList(this.process(child)));
      actualQueryNodeList.add(topNode);
      this.queryNodeList = actualQueryNodeList;
      this.latestNodeVerified = false;
    }
    else if (node instanceof DatatypeQueryNode) {
View Full Code Here

implements KeywordQueryBuilder {

  @Override
  public Query build(final QueryNode queryNode)
  throws QueryNodeException {
    final TopLevelQueryNode top = (TopLevelQueryNode) queryNode;
    final Query q = (Query) top.getChildren().get(0)
                               .getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);

    return this.wrap(q);
  }
View Full Code Here

TOP

Related Classes of org.sindice.siren.qparser.keyword.nodes.TopLevelQueryNode

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.