Package org.apache.accumulo.examples.wikisearch.parser.QueryParser

Examples of org.apache.accumulo.examples.wikisearch.parser.QueryParser.EvaluationContext


    decodeResults(left, right, fieldName, value);
    // We need to check to see if we are in a NOT context. If so,
    // then we need to reverse the negation.
    boolean negated = false;
    if (null != data && data instanceof EvaluationContext) {
      EvaluationContext ctx = (EvaluationContext) data;
      if (ctx.inNotContext)
        negated = !negated;
    }
    QueryTerm term = new QueryTerm(negated, JexlOperatorConstants.getOperator(node.getClass()), value.getObject());
    this.currentNode.getTerms().put(fieldName.toString(), term);
View Full Code Here


    decodeResults(left, right, fieldName, value);
    // We need to check to see if we are in a NOT context. If so,
    // then we need to reverse the negation.
    boolean negated = true;
    if (null != data && data instanceof EvaluationContext) {
      EvaluationContext ctx = (EvaluationContext) data;
      if (ctx.inNotContext)
        negated = !negated;
    }
    QueryTerm term = new QueryTerm(negated, "!~", value.getObject());
    this.currentNode.getTerms().put(fieldName.toString(), term);
View Full Code Here

    return null;
  }
 
  public Object visit(ASTNotNode node, Object data) {
    boolean previouslyInNotContext = false;
    EvaluationContext ctx = null;
    if (null != data && data instanceof EvaluationContext) {
      ctx = (EvaluationContext) data;
      previouslyInNotContext = ctx.inNotContext;
    } else {
      ctx = new EvaluationContext();
    }
    ctx.inNotContext = true;
    // Create a new node in the tree to represent the NOT
    // Create a new And node under the current node.
    TreeNode notNode = new TreeNode();
View Full Code Here

TOP

Related Classes of org.apache.accumulo.examples.wikisearch.parser.QueryParser.EvaluationContext

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.