/** * Get a name identifying the kind of expression, in terms meaningful to a user. * * @return a name identifying the kind of expression, in terms meaningful to a user. * The name will always be in the form of a lexical XML QName, and should match the name used * in explain() output displaying the expression. */ @Override public String getExpressionName() { return Token.tokens[getOperator()] + "-expression"; }
/** * Get a name identifying the kind of expression, in terms meaningful to a user. * * @return a name identifying the kind of expression, in terms meaningful to a user. * The name will always be in the form of a lexical XML QName, and should match the name used * in explain() output displaying the expression. */ @Override public String getExpressionName() { return Token.tokens[getOperator()] + "-expression"; }
/** * Construct a list containing the "anded" subexpressions of an expression: * if the expression is (A and B and C), this returns (A, B, C). * @param exp the expression to be decomposed * @param list the list to which the subexpressions are to be added. */ public static void listAndComponents(Expression exp, List list) { if (exp instanceof BooleanExpression && ((BooleanExpression)exp).getOperator() == Token.AND) { for (Iterator iter = exp.iterateSubExpressions(); iter.hasNext();) { listAndComponents((Expression)iter.next(), list); } } else { list.add(exp); } // TODO: could do more complete analysis to convert the expression to conjunctive normal form. // This is done by applying various transformations: // not(not(X)) => X // not(P and Q) => not(P) or not(Q) // not(P or Q) => not(P) and not(Q) // A or (B and C) => (A or B) and (A or C) } }
/** * Construct a list containing the "anded" subexpressions of an expression: * if the expression is (A and B and C), this returns (A, B, C). * @param exp the expression to be decomposed * @param list the list to which the subexpressions are to be added. */ public static void listAndComponents(Expression exp, List list) { if (exp instanceof BooleanExpression && ((BooleanExpression)exp).getOperator() == Token.AND) { for (Iterator iter = exp.iterateSubExpressions(); iter.hasNext();) { listAndComponents((Expression)iter.next(), list); } } else { list.add(exp); } // TODO: could do more complete analysis to convert the expression to conjunctive normal form. // This is done by applying various transformations: // not(not(X)) => X // not(P and Q) => not(P) or not(Q) // not(P or Q) => not(P) and not(Q) // A or (B and C) => (A or B) and (A or C) } }
/** * Construct a list containing the "anded" subexpressions of an expression: * if the expression is (A and B and C), this returns (A, B, C). * @param exp the expression to be decomposed * @param list the list to which the subexpressions are to be added. */ public static void listAndComponents(Expression exp, List list) { if (exp instanceof BooleanExpression && ((BooleanExpression)exp).getOperator() == Token.AND) { for (Iterator iter = exp.iterateSubExpressions(); iter.hasNext();) { listAndComponents((Expression)iter.next(), list); } } else { list.add(exp); } // TODO: could do more complete analysis to convert the expression to conjunctive normal form. // This is done by applying various transformations: // not(not(X)) => X // not(P and Q) => not(P) or not(Q) // not(P or Q) => not(P) and not(Q) // A or (B and C) => (A or B) and (A or C) } }
/** * Construct a list containing the "anded" subexpressions of an expression: * if the expression is (A and B and C), this returns (A, B, C). * * @param exp the expression to be decomposed * @param list the list to which the subexpressions are to be added. */ public static void listAndComponents(Expression exp, List<Expression> list) { if (exp instanceof BooleanExpression && ((BooleanExpression) exp).getOperator() == Token.AND) { for (Operand o : exp.operands()) { listAndComponents(o.getChildExpression(), list); } } else { list.add(exp); } }
/** * Construct a list containing the "anded" subexpressions of an expression: * if the expression is (A and B and C), this returns (A, B, C). * * @param exp the expression to be decomposed * @param list the list to which the subexpressions are to be added. */ public static void listAndComponents(Expression exp, List<Expression> list) { if (exp instanceof BooleanExpression && ((BooleanExpression) exp).getOperator() == Token.AND) { for (Operand o : exp.operands()) { listAndComponents(o.getChildExpression(), list); } } else { list.add(exp); } }
Comparison compType = getComparison(((BooleanExpression) ex).getOperator()); if (compType != null) { ExpressionContainer exCont = getCurrentContainer(query, collectId);