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

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


    // Check to see if the child node is an AND or OR. If not, then
    // there must be just a single value in the query expression
    rootNode = new TreeNode();
    rootNode.setType(RootNode.class);
    currentNode = rootNode;
    EvaluationContext ctx = new EvaluationContext();
    script.childrenAccept(this, ctx);
  }
View Full Code Here


    // Check to see if the child node is an AND or OR. If not, then
    // there must be just a single value in the query expression
    rootNode = new TreeNode();
    rootNode.setType(RootNode.class);
    currentNode = rootNode;
    EvaluationContext ctx = new EvaluationContext();
    script.childrenAccept(this, ctx);
  }
View Full Code Here

    return rolledUpTerms;
  }
 
  public Object visit(ASTOrNode node, Object data) {
    boolean previouslyInOrContext = false;
    EvaluationContext ctx = null;
    if (null != data && data instanceof EvaluationContext) {
      ctx = (EvaluationContext) data;
      previouslyInOrContext = ctx.inOrContext;
    } else {
      ctx = new EvaluationContext();
    }
    ctx.inOrContext = true;
    // Are we being called from the checkChildren method? If so, then we
    // are rolling up terms. If not, then we need to call check children.
    if (currentlyInCheckChildren) {
View Full Code Here

    return null;
  }
 
  public Object visit(ASTAndNode node, Object data) {
    boolean previouslyInAndContext = false;
    EvaluationContext ctx = null;
    if (null != data && data instanceof EvaluationContext) {
      ctx = (EvaluationContext) data;
      previouslyInAndContext = ctx.inAndContext;
    } else {
      ctx = new EvaluationContext();
    }
    ctx.inAndContext = true;
    // Are we being called from the checkChildren method? If so, then we
    // are rolling up terms. If not, then we need to call check children.
    if (currentlyInCheckChildren) {
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 = 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, 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 = 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 = 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 = 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 = 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

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.