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

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


      this.queryNodeList = actualQueryNodeList;
      this.latestNodeVerified = false;
    }
    else if (node instanceof ArrayQueryNode) {
      final ArrayList<QueryNode> actualQueryNodeList = this.queryNodeList;
      final ArrayQueryNode arrayNode = (ArrayQueryNode) node;
      final List<QueryNode> children = arrayNode.getChildren();
      final List<QueryNode> newChildren = new ArrayList<QueryNode>();
      for (final QueryNode child : children) {
        // The unary modifier sets the occurrence of this value in the TwigQuery
        if (!(child instanceof ModifierQueryNode)) {
          newChildren.add(this.process(child));
        } else {
          newChildren.add(child);
        }
      }
      arrayNode.set(newChildren);
      actualQueryNodeList.add(arrayNode);
      this.queryNodeList = actualQueryNodeList;
      this.latestNodeVerified = false;
    }
    else if (node instanceof TopLevelQueryNode) {
View Full Code Here


    }
    if (!(child instanceof WildcardNodeQueryNode)) {
      // Build the child operand
      final Object v = child.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
      if (v instanceof ArrayQuery) { // array of children nodes
        final ArrayQueryNode aqn = (ArrayQueryNode) child;
        final List<Query> children = ((ArrayQuery) v).getElements();
        for (int i = 0; i < children.size(); i++) {
          twigQuery.addChild((NodeQuery) children.get(i),
            NodeQueryBuilderUtil.getModifierValue(aqn.getChildren().get(i), NodeBooleanClause.Occur.MUST));
        }
      } else if (v instanceof Query) {
        final NodeQuery valQuery = (NodeQuery) v;
        twigQuery.addChild(valQuery, Occur.MUST);
      } else {
View Full Code Here

implements StandardQueryBuilder {

  @Override
  public Query build(final QueryNode queryNode)
  throws QueryNodeException {
    final ArrayQueryNode arrayNode = (ArrayQueryNode) queryNode;
    final List<QueryNode> children = arrayNode.getChildren();
    final ArrayQuery arrayQuery = new ArrayQuery();

    for (final QueryNode child : children) {
      final Object v = child.getTag(QueryTreeBuilder.QUERY_TREE_BUILDER_TAGID);
      if (v == null) { // DummyNode such as the EmptyNodeQueryNode
View Full Code Here

TOP

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

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.