Package org.jrdf.query.expression.logic

Examples of org.jrdf.query.expression.logic.LogicExpression


        Expression tmpExpression = null;
        if (lhs instanceof Filter && rhs instanceof Filter) {
            Expression llhs = ((Filter) lhs).getLhs();
            Expression lrhs = ((Filter) rhs).getLhs();
            tmpExpression = new Conjunction(llhs, lrhs);
            LogicExpression andExp = new LogicAndExpression(((Filter) lhs).getRhs(),
                ((Filter) rhs).getRhs());
            tmpExpression = new Filter(tmpExpression, andExp);
        } else if (lhs instanceof Filter) {
            tmpExpression = constructConjFilter((Filter) lhs, rhs);
        } else if (rhs instanceof Filter) {
View Full Code Here


        expression = new Optional(lhs, rhs);
        return null;
    }

    public Void visitFilter(Filter filter) {
        LogicExpression logicExpression = (LogicExpression) getNext(filter.getRhs());
        expression = getNext(filter.getLhs());
        if (logicExpression != null) {
            expression = new Filter(expression, logicExpression);
        }
        return null;
View Full Code Here

    }

    @Override
    public void caseABooleanNotUnaryExpression(ABooleanNotUnaryExpression node) {
        try {
            final LogicExpression exp;
            PPrimaryExpression primaryExpression = node.getPrimaryExpression();
            if (primaryExpression instanceof ABracketedExpressionPrimaryExpression) {
                primaryExpression.apply(this);
                exp = (LogicExpression) expression;
            } else {
View Full Code Here

    @Override
    public void caseAConditionalAndExpression(AConditionalAndExpression node) {
        try {
            node.getValueLogical().apply(this);
            LogicExpression exp1 = (LogicExpression) expression;
            final LinkedList<PMoreValueLogical> list = node.getMoreValueLogical();
            for (PMoreValueLogical rhs : list) {
                rhs.apply(this);
                final LogicExpression exp2 = getExpression();
                exp1 = new LogicAndExpression(exp1, exp2);
            }
            expression = exp1;
        } catch (ParserException e) {
            exception = e;
View Full Code Here

    @Override
    public void caseAConditionalOrExpression(AConditionalOrExpression node) {
        try {
            node.getConditionalAndExpression().apply(this);
            LogicExpression exp1 = (LogicExpression) expression;
            final LinkedList<PMoreConditionalAndExpression> list = node.getMoreConditionalAndExpression();
            for (PMoreConditionalAndExpression rhs : list) {
                rhs.apply(this);
                final LogicExpression exp2 = getExpression();
                exp1 = new LogicOrExpression(exp1, exp2);
            }
            expression = exp1;
        } catch (ParserException e) {
            exception = e;
View Full Code Here

TOP

Related Classes of org.jrdf.query.expression.logic.LogicExpression

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.