Java Code Examples for org.apache.jena.sparql.syntax.ElementFilter#getExpr()
The following examples show how to use
org.apache.jena.sparql.syntax.ElementFilter#getExpr() .
You can vote up the ones you like or vote down the ones you don't like,
and go to the original project or source file by following the links above each example. You may check out the related API usage on the sidebar.
Example 1
Source File: SPARQLExtFormatterElement.java From sparql-generate with Apache License 2.0 | 6 votes |
@Override public void visit(ElementFilter el) { out.print("FILTER "); Expr expr = el.getExpr(); SPARQLExtFmtExprSPARQL v = new SPARQLExtFmtExprSPARQL(out, context); // This assumes that complex expressions are bracketted // (parens) as necessary except for some cases: // Plain variable or constant boolean addParens = false; if (expr.isVariable()) { addParens = true; } if (expr.isConstant()) { addParens = true; } if (addParens) { out.print("( "); } v.format(expr); if (addParens) { out.print(" )"); } }
Example 2
Source File: RuleSystemToUnionQuery.java From quetzal with Eclipse Public License 2.0 | 4 votes |
@Override public void visit(ElementFilter filter) { org.apache.jena.sparql.expr.Expr expr = filter.getExpr(); expr = expr.copySubstitute(this); result = new ElementFilter(expr); }
Example 3
Source File: StatisticsVisitor.java From IGUANA with GNU Affero General Public License v3.0 | votes |
public void startElement(ElementFilter el) {this.filter=true;el.getExpr();}