Class SubSelect
java.lang.Object
org.eclipse.rdf4j.sparqlbuilder.core.query.Query<SubSelect>
org.eclipse.rdf4j.sparqlbuilder.graphpattern.SubSelect
- All Implemented Interfaces:
QueryElement, GraphPattern
-
Field Summary
Fields inherited from class Query
bnodeCount, from, groupBy, having, limit, LIMIT, offset, OFFSET, orderBy, values, varCount, whereModifier and TypeFieldDescriptionprotected intprotected intprotected static final Stringprotected intprotected static final Stringprotected intprotected QueryPattern -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionall()Specify that this query's projection should select all in-scope expressionsall(boolean selectAll) Specify if this query's projection should select all in-scope expressions or not.distinct()Specify the query's projection to be distinctdistinct(boolean isDistinct) Specify if the query's projection should be distinct or notprotected StringbooleanisEmpty()select(Projectable... projectables) Add expressions to the query's projectionselect(Projection select) Set this query's projectionMethods inherited from class Query
bNode, from, from, groupBy, groupBy, having, having, limit, offset, orderBy, orderBy, values, var, where, whereModifier and TypeMethodDescriptionbNode()A shortcut.Set the Dataset clause for this queryAdd datasets to this queryAdd grouping specifiers for the query results.Set this query's Group By clausehaving(Expression<?>... constraints) Specify constraints for this query's Having clause.Set this query's Having clauselimit(int limit) Set a limit on the number of results returned by this query.offset(int offset) Specify an offset in query results.Specify orderings for the query resultsSet this query's Order By clausevalues(Consumer<Values.VariablesBuilder> valuesConfigurer) var()A shortcut.where(QueryPattern where) Set the query pattern of this querywhere(GraphPattern... queryPatterns) Add graph patterns to this query's query patternMethods inherited from class Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface GraphPattern
and, filter, filterExists, filterExists, filterNotExists, from, minus, optional, optional, union, valuesModifier and TypeMethodDescriptiondefault GraphPatternand(GraphPattern... patterns) Convert this graph pattern into a group graph pattern, combining this graph pattern with the given patterns:default GraphPatternfilter(Expression<?> constraint) Convert this graph pattern into a group graph pattern and add a filter:default GraphPatternfilterExists(boolean exists, GraphPattern... patterns) Create anEXISTSorNOT EXISTSfilter expression with the given patterns based on theexistsparamater and add it to this graph pattern (converting this to a group graph pattern in the process)default GraphPatternfilterExists(GraphPattern... patterns) Create anEXISTS{}filter expression with the given graph patterns and add it to this graph pattern (converting this to a group graph pattern in the process):default GraphPatternfilterNotExists(GraphPattern... patterns) Create aNOT EXISTS{}filter expression with the given graph patterns and add it to this graph pattern (converting this to a group graph pattern in the process):default GraphPatternConvert this graph pattern into a named group graph pattern:default GraphPatternminus(GraphPattern... patterns) Create aMINUSgraph pattern with the given graph patterns and add it to this graph pattern (converting this to a group graph pattern in the process):default GraphPatternoptional()Convert this graph pattern into an optional group graph pattern:default GraphPatternoptional(boolean isOptional) Specify if this graph pattern should be optional.default GraphPatternunion(GraphPattern... patterns) Convert this graph pattern into an alternative graph pattern, combining this graph pattern with the given patterns:default GraphPatternvalues(Consumer<Values.VariablesBuilder> valuesConfigurer)
-
Constructor Details
-
SubSelect
public SubSelect()
-
-
Method Details
-
distinct
-
distinct
Specify if the query's projection should be distinct or not- Parameters:
isDistinct- if this query's projection should be distinct- Returns:
- this
- See Also:
-
all
Specify that this query's projection should select all in-scope expressionsNOTE: setting this takes precedence over any expressions added to the projection via
select(Projectable...)when printing- Returns:
- this
- See Also:
-
all
Specify if this query's projection should select all in-scope expressions or not.NOTE: if called with
true, this setting will take precedence over any expressions added to the projection viaselect(Projectable...)when printing- Parameters:
selectAll- if all in-scope expressions should be selected- Returns:
- this
- See Also:
-
select
Add expressions to the query's projectionNOTE: if SELECT * has been specified (by
all()or callingall(boolean)withtrue), that will take precedence over specified expressions when converting to string viagetQueryString()- Parameters:
projectables- expressions to add- Returns:
- this
- See Also:
-
select
Set this query's projection- Parameters:
select- theProjectionto set- Returns:
- this
-
isEmpty
public boolean isEmpty()- Specified by:
isEmptyin interfaceGraphPattern- Returns:
- if this pattern is a collection of GraphPatterns (ie., Group or Alternative patterns), returns if the collection contains any patterns
-
getQueryActionString
- Specified by:
getQueryActionStringin classQuery<SubSelect>
-
getQueryString
- Specified by:
getQueryStringin interfaceQueryElement- Overrides:
getQueryStringin classQuery<SubSelect>- Returns:
- the String representing the SPARQL syntax of this element
-