Package org.apache.clerezza.rdf.core.sparql.query

Examples of org.apache.clerezza.rdf.core.sparql.query.Expression


        ClerezzaSparqlObject argument1 = (ClerezzaSparqlObject) adapter.adaptTo(numericFunctionAtom1,
            ConstructQuery.class);
        ClerezzaSparqlObject argument2 = (ClerezzaSparqlObject) adapter.adaptTo(numericFunctionAtom2,
            ConstructQuery.class);

        Expression lhsOperand = (Expression) argument1.getClerezzaObject();
        Expression rhsOperand = (Expression) argument2.getClerezzaObject();

        BinaryOperation binaryOperation = new BinaryOperation("+", lhsOperand, rhsOperand);

        return (T) new ClerezzaSparqlObject(binaryOperation);
View Full Code Here


            ConstructQuery.class);
        ;

        Object arg = argumentCSO.getClerezzaObject();

        Expression argumentExpression;
        if (arg instanceof Variable) {
            argumentExpression = (Variable) arg;
        } else if (arg instanceof UriRef) {
            argumentExpression = new UriRefExpression((UriRef) arg);
        } else {
View Full Code Here

        ClerezzaSparqlObject clerezzaArgument1 = (ClerezzaSparqlObject) adapter.adaptTo(argument1,
            ConstructQuery.class);
        ClerezzaSparqlObject clerezzaArgument2 = (ClerezzaSparqlObject) adapter.adaptTo(argument2,
            ConstructQuery.class);

        Expression lhe = (Expression) clerezzaArgument1.getClerezzaObject();
        Expression rhe = (Expression) clerezzaArgument2.getClerezzaObject();

        return (T) new ClerezzaSparqlObject(new BinaryOperation(">", lhe, rhe));

    }
View Full Code Here

        ClerezzaSparqlObject clerezzaArgument1 = (ClerezzaSparqlObject) adapter.adaptTo(argument1,
            ConstructQuery.class);
        ClerezzaSparqlObject clerezzaArgument2 = (ClerezzaSparqlObject) adapter.adaptTo(argument2,
            ConstructQuery.class);

        Expression lhe = (Expression) clerezzaArgument1.getClerezzaObject();
        Expression rhe = (Expression) clerezzaArgument2.getClerezzaObject();

        return (T) new ClerezzaSparqlObject(new BinaryOperation("<=", lhe, rhe));

    }
View Full Code Here

        org.apache.stanbol.rules.manager.atoms.NumberAtom tmp = (org.apache.stanbol.rules.manager.atoms.NumberAtom) ruleAtom;

        String number = tmp.getNumber();

        Expression exp = null;

        if (number.startsWith("\"") && number.endsWith("\"")) {
            number = number.substring(1, number.length() - 1);
        }
View Full Code Here

        org.apache.stanbol.rules.manager.atoms.StringAtom tmp = (org.apache.stanbol.rules.manager.atoms.StringAtom) ruleAtom;

        String string = tmp.getString();

        Expression exp = null;

        if (string.startsWith("\"") && string.endsWith("\"")) {
            string = string.substring(1, string.length() - 1);
        }
View Full Code Here

        ClerezzaSparqlObject argument1 = (ClerezzaSparqlObject) adapter.adaptTo(numericFunctionAtom1,
            ConstructQuery.class);
        ClerezzaSparqlObject argument2 = (ClerezzaSparqlObject) adapter.adaptTo(numericFunctionAtom2,
            ConstructQuery.class);

        Expression lhsOperand = (Expression) argument1.getClerezzaObject();
        Expression rhsOperand = (Expression) argument2.getClerezzaObject();

        BinaryOperation binaryOperation = new BinaryOperation("-", lhsOperand, rhsOperand);

        return (T) new ClerezzaSparqlObject(binaryOperation);
    }
View Full Code Here

        ClerezzaSparqlObject clerezzaArgument1 = (ClerezzaSparqlObject) adapter.adaptTo(argument1,
            ConstructQuery.class);
        ClerezzaSparqlObject clerezzaArgument2 = (ClerezzaSparqlObject) adapter.adaptTo(argument2,
            ConstructQuery.class);

        Expression lhe = (Expression) clerezzaArgument1.getClerezzaObject();
        Expression rhe = (Expression) clerezzaArgument2.getClerezzaObject();

        return (T) new ClerezzaSparqlObject(new BinaryOperation(">=", lhe, rhe));

    }
View Full Code Here

        ClerezzaSparqlObject argument1 = (ClerezzaSparqlObject) adapter.adaptTo(stringFunctionAtom1,
            ConstructQuery.class);
        ClerezzaSparqlObject argument2 = (ClerezzaSparqlObject) adapter.adaptTo(stringFunctionAtom2,
            ConstructQuery.class);

        Expression lhe = (Expression) argument1.getClerezzaObject();
        Expression rhe = (Expression) argument2.getClerezzaObject();

        BinaryOperation binaryOperation = new BinaryOperation("!=", lhe, rhe);

        return (T) new ClerezzaSparqlObject(binaryOperation);
View Full Code Here

        ClerezzaSparqlObject argument1 = (ClerezzaSparqlObject) adapter.adaptTo(numericFunctionAtom1,
            ConstructQuery.class);
        ClerezzaSparqlObject argument2 = (ClerezzaSparqlObject) adapter.adaptTo(numericFunctionAtom2,
            ConstructQuery.class);

        Expression lhsOperand = (Expression) argument1.getClerezzaObject();
        Expression rhsOperand = (Expression) argument2.getClerezzaObject();

        BinaryOperation binaryOperation = new BinaryOperation("/", lhsOperand, rhsOperand);

        return (T) new ClerezzaSparqlObject(binaryOperation);
View Full Code Here

TOP

Related Classes of org.apache.clerezza.rdf.core.sparql.query.Expression

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.