Examples of BuiltInCall


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

      UnaryOperation uo = (UnaryOperation) e;
      s.append(uo.getOperatorString()).append(" (");
      appendExpression(s, uo.getOperand());
      s.append(")");
    } else if (e instanceof BuiltInCall) {
      BuiltInCall b = (BuiltInCall) e;
      appendCall(s, b.getName(), b.getArguements());
    } else if (e instanceof FunctionCall) {
      FunctionCall f = (FunctionCall) e;
      appendCall(s, f.getName().getUnicodeString(), f.getArguements());
    } else if (e instanceof LiteralExpression) {
      appendLiteralExpression(s, (LiteralExpression) e);
View Full Code Here

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

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

    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

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

        }

        List<Expression> expressions = new ArrayList<Expression>();
        expressions.add(argumentExpression);

        return (T) new ClerezzaSparqlObject(new BuiltInCall("isBLANK", expressions));

    }
View Full Code Here

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

        iriArgument = (ClerezzaSparqlObject) adapter.adaptTo(parameterFunctionAtom, ConstructQuery.class);

        List<Expression> iriArgumentExpressions = new ArrayList<Expression>();
        iriArgumentExpressions.add((Expression) iriArgument.getClerezzaObject());

        BuiltInCall iriBuiltInCall = new BuiltInCall("IRI", iriArgumentExpressions);

        if (variableUriResource instanceof VariableAtom) {
            String variableName = ((VariableAtom) variableUriResource).getVariableName();
            Variable variable = new Variable(variableName);

            List<Expression> bindArgumentExpressions = new ArrayList<Expression>();
            bindArgumentExpressions.add(iriBuiltInCall);
            bindArgumentExpressions.add(variable);

            BuiltInCall bindBuiltInCall = new BuiltInCall("BIND", iriArgumentExpressions);

            return (T) new ClerezzaSparqlObject(bindBuiltInCall);
        } else {
            throw new org.apache.stanbol.rules.base.api.RuleAtomCallExeption(getClass());
        }
View Full Code Here

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

        List<Expression> bindArgumentExpressions = new ArrayList<Expression>();
        bindArgumentExpressions.add((Expression) binding.getClerezzaObject());
        bindArgumentExpressions.add((Expression) variable.getClerezzaObject());

        BuiltInCall bindBuiltInCall = new BuiltInCall("BIND", bindArgumentExpressions);

        return (T) new ClerezzaSparqlObject(bindBuiltInCall);

    }
View Full Code Here

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

            ConstructQuery.class);

        List<Expression> expressions = new ArrayList<Expression>();
        expressions.add((Expression) clerezzaSparqlObject.getClerezzaObject());

        return (T) new ClerezzaSparqlObject(new BuiltInCall("STR", expressions));
    }
View Full Code Here

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

        ClerezzaSparqlObject variable = (ClerezzaSparqlObject) adapter.adaptTo(variableAtom,
            ConstructQuery.class);

        List<Expression> iriArgumentExpressions = new ArrayList<Expression>();
        iriArgumentExpressions.add((Expression) binding.getClerezzaObject());
        BuiltInCall iriBuiltInCall = new BuiltInCall("IRI", iriArgumentExpressions);

        List<Expression> bindArgumentExpressions = new ArrayList<Expression>();
        bindArgumentExpressions.add(iriBuiltInCall);
        bindArgumentExpressions.add((Expression) variable.getClerezzaObject());

        BuiltInCall bindBuiltInCall = new BuiltInCall("BIND", bindArgumentExpressions);

        return (T) new ClerezzaSparqlObject(bindBuiltInCall);

    }
View Full Code Here

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

            ConstructQuery.class);

        List<Expression> argumentExpressions = new ArrayList<Expression>();
        argumentExpressions.add((Expression) argument1.getClerezzaObject());

        BuiltInCall builtInCall = new BuiltInCall("BOUND", argumentExpressions);

        UnaryOperation unaryOperation = new UnaryOperation("!", builtInCall);

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

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

            UnaryOperation uo = (UnaryOperation) e;
            s.append(uo.getOperatorString()).append(" (");
            appendExpression(s, uo.getOperand());
            s.append(")");
        } else if (e instanceof BuiltInCall) {
            BuiltInCall b = (BuiltInCall) e;
            appendCall(s, b.getName(), b.getArguements());
        } else if (e instanceof FunctionCall) {
            FunctionCall f = (FunctionCall) e;
            appendCall(s, f.getName().getUnicodeString(), f.getArguements());
        } else if (e instanceof LiteralExpression) {
            appendLiteralExpression(s, (LiteralExpression) e);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.