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

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


        final NodeNumericQueryNode upperNode = new NodeNumericQueryNode(field, upperNumber);

        final boolean lowerInclusive = termRangeNode.isLowerInclusive();
        final boolean upperInclusive = termRangeNode.isUpperInclusive();

        return new NodeNumericRangeQueryNode(lowerNode, upperNode, lowerInclusive, upperInclusive, na);
      }
    }
    return node;
  }
View Full Code Here


        final CharSequence field = fieldNode.getField();
        final NodeNumericQueryNode lowerNode = new NodeNumericQueryNode(field, number);
        final NodeNumericQueryNode upperNode = new NodeNumericQueryNode(field, number);

        return new NodeNumericRangeQueryNode(lowerNode, upperNode, true, true, na);
      }
    }
    return node;

  }
View Full Code Here

    // empty constructor
  }

  public NodeNumericRangeQuery<? extends Number> build(final QueryNode queryNode)
  throws QueryNodeException {
    final NodeNumericRangeQueryNode numericRangeNode = (NodeNumericRangeQueryNode) queryNode;

    final NumericQueryNode lowerNumericNode = numericRangeNode.getLowerBound();
    final NumericQueryNode upperNumericNode = numericRangeNode.getUpperBound();

    final Number lowerNumber, upperNumber;

    if (lowerNumericNode != null) {
      lowerNumber = lowerNumericNode.getValue();
    }
    else {
      lowerNumber = null;
    }

    if (upperNumericNode != null) {
      upperNumber = upperNumericNode.getValue();
    }
    else {
      upperNumber = null;
    }

    final NumericAnalyzer numericAnalyzer = numericRangeNode.getNumericAnalyzer();
    final NumericType numberType = numericRangeNode.getNumericType();
    final String field = numericRangeNode.getField().toString();
    final boolean minInclusive = numericRangeNode.isLowerInclusive();
    final boolean maxInclusive = numericRangeNode.isUpperInclusive();
    final int precisionStep = numericAnalyzer.getPrecisionStep();

    switch (numberType) {
      case LONG:
        return NodeNumericRangeQuery.newLongRange(field, precisionStep,
View Full Code Here

TOP

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

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.