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

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


                .get(0).getClass()));
        UnaryOperation uop = (UnaryOperation) constraints.get(0);
        Assert.assertTrue(uop.getOperatorString().equals("!"));
        Assert.assertTrue(BuiltInCall.class.isAssignableFrom(uop.getOperand()
                .getClass()));
        BuiltInCall bic = (BuiltInCall) uop.getOperand();
        Assert.assertTrue(bic.getName().equals("BOUND"));
        Variable var3 = new Variable(variable3);
        Assert.assertTrue(bic.getArguements().get(0).equals(var3));

        GraphPattern gp = (GraphPattern) ggp.getGraphPatterns().toArray()[0];
        Assert.assertTrue(OptionalGraphPattern.class.isAssignableFrom(gp.getClass()));
        OptionalGraphPattern ogp = (OptionalGraphPattern) gp;
        Assert.assertTrue(BasicGraphPattern.class.isAssignableFrom(
View Full Code Here


        List<Expression> arguments = new ArrayList<Expression>();
        arguments.add(x);
        arguments.add(new LiteralExpression(LiteralFactory.getInstance().
                createTypedLiteral(".*uni.*")));
        BuiltInCall constraint = new BuiltInCall("REGEX", arguments);
        queryPattern.addConstraint(constraint);
        selectQuery.setQueryPattern(queryPattern);
        Assert.assertTrue(selectQuery.toString()
                .replaceAll("( |\n)+", " ").trim().equals(queryString));
    }
View Full Code Here

TOP

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

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.