protected Condition parseLogicAnd(Node n, Object template) { ConditionLogicAnd cond = new ConditionLogicAnd(); for (n = n.getFirstChild(); n != null; n = n.getNextSibling()) { if (n.getNodeType() == Node.ELEMENT_NODE) { cond.add(parseCondition(n, template)); } } if ((cond.conditions == null) || (cond.conditions.length == 0)) { _log.severe("Empty <and> condition in " + _file); } return cond; }
protected Condition joinAnd(Condition cond, Condition c) { if (cond == null) { return c; } if (cond instanceof ConditionLogicAnd) { ((ConditionLogicAnd) cond).add(c); return cond; } ConditionLogicAnd and = new ConditionLogicAnd(); and.add(cond); and.add(c); return and; }