Class Expression<T extends Expression<T>>
- java.lang.Object
-
- org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection<T>
-
- org.eclipse.rdf4j.sparqlbuilder.core.StandardQueryElementCollection<Operand>
-
- org.eclipse.rdf4j.sparqlbuilder.constraint.Expression<T>
-
- Type Parameters:
T
- the type of Expression (ie, Function or Operation). Used to support fluency
- All Implemented Interfaces:
Operand
,Assignable
,Groupable
,Orderable
,QueryElement
- Direct Known Subclasses:
Aggregate
,CustomFunction
,Function
,NotIn
,Operation
public abstract class Expression<T extends Expression<T>> extends StandardQueryElementCollection<Operand> implements Operand, Orderable, Groupable, Assignable
A SPARQL expression. Used by filters, having clauses, order and group by clauses, assignments, and as arguments to other expressions.
-
-
Field Summary
Fields Modifier and Type Field Description protected SparqlOperator
operator
private static java.util.function.Function<java.lang.String,java.lang.String>
WRAPPER
-
Fields inherited from class org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection
elements
-
-
Constructor Summary
Constructors Constructor Description Expression(SparqlOperator operator)
Expression(SparqlOperator operator, java.lang.String delimeter)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description (package private) T
addOperand(Operand... operands)
(package private) Operand
getOperand(int index)
T
parenthesize()
Indicate that this expression should be wrapped in parentheses when converted to a query stringT
parenthesize(boolean parenthesize)
Indicate if this expression should be wrapped in parentheses when converted to a query string-
Methods inherited from class org.eclipse.rdf4j.sparqlbuilder.core.StandardQueryElementCollection
getQueryString, printBodyIfEmpty, printNameIfEmpty, resetWrapperMethod, setOperatorName, setOperatorName, setWrapperMethod
-
Methods inherited from class org.eclipse.rdf4j.sparqlbuilder.core.QueryElementCollection
addElements, addElements, isEmpty
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.eclipse.rdf4j.sparqlbuilder.core.Assignable
as
-
Methods inherited from interface org.eclipse.rdf4j.sparqlbuilder.core.QueryElement
getQueryString
-
-
-
-
Field Detail
-
WRAPPER
private static final java.util.function.Function<java.lang.String,java.lang.String> WRAPPER
-
operator
protected SparqlOperator operator
-
-
Constructor Detail
-
Expression
Expression(SparqlOperator operator)
-
Expression
Expression(SparqlOperator operator, java.lang.String delimeter)
-
-
Method Detail
-
parenthesize
public T parenthesize()
Indicate that this expression should be wrapped in parentheses when converted to a query string- Returns:
- this
-
parenthesize
public T parenthesize(boolean parenthesize)
Indicate if this expression should be wrapped in parentheses when converted to a query string- Parameters:
parenthesize
-- Returns:
- this
-
getOperand
Operand getOperand(int index)
-
-