public abstract class QueryBase extends QueryNodeBase implements IBindingProducerNode, IGraphPatternContainer, IProjectionDecl
IGroupNode
,
ProjectionNode
,
GroupByNode
,
HavingNode
,
OrderByNode
,
SliceNode
,
Serialized FormModifier and Type | Class and Description |
---|---|
static interface |
QueryBase.Annotations |
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
QueryBase(BOp[] args,
Map<String,Object> anns)
Shallow copy constructor.
|
QueryBase(QueryBase queryBase)
Deep copy constructor.
|
QueryBase(QueryType queryType) |
Modifier and Type | Method and Description |
---|---|
BindingsClause |
getBindingsClause()
Return the BINDINGS.
|
ConstructNode |
getConstruct()
Return the construction -or-
null if there is no construction. |
GraphPatternGroup<IGroupMemberNode> |
getGraphPattern()
Return the graph pattern.
|
GroupByNode |
getGroupBy()
Return the
GroupByNode -or- null if there is none. |
HavingNode |
getHaving()
Return the
HavingNode -or- null if there is none. |
boolean |
getIncludeInferred() |
OrderByNode |
getOrderBy()
Return the order by clause -or-
null if there is no order
by. |
Set<IVariable<?>> |
getProjectedVars(Set<IVariable<?>> vars)
Return the set of variables projected out of this query (this is a NOP if
there is no
ProjectionNode for the query, which can happen for an
ASK query). |
ProjectionNode |
getProjection()
Return the projection -or-
null if there is no projection. |
QueryType |
getQueryType()
Return the type of query.
|
Set<IVariable<?>> |
getSelectExprVars(Set<IVariable<?>> vars)
Return the set of variables on which the
ProjectionNode for this
query depends (this is a NOP if there is no ProjectionNode for
the query, which can happen for an ASK query). |
SliceNode |
getSlice()
Return the slice -or-
null if there is no slice. |
long |
getTimeout() |
GraphPatternGroup |
getWhereClause()
Return the
GraphPatternGroup for the WHERE clause. |
boolean |
hasSlice()
Return
true iff there is a SliceNode and either the
LIMIT and/or OFFSET has been specified with a non-default value. |
boolean |
hasWhereClause()
Return true if this query has a WHERE clause, false if not.
|
void |
setBindingsClause(BindingsClause bindings)
Set the BINDINGS.
|
void |
setConstruct(ConstructNode construct)
Set or clear the construction.
|
void |
setGraphPattern(GraphPatternGroup<IGroupMemberNode> graphPattern)
Set the graph pattern.
|
void |
setGroupBy(GroupByNode groupBy)
Set or clear the
GroupByNode . |
void |
setHaving(HavingNode having)
Set or clear the
HavingNode . |
void |
setIncludeInferred(boolean includeInferred) |
void |
setOrderBy(OrderByNode orderBy)
Set or clear the
OrderByNode . |
void |
setProjection(ProjectionNode projection)
Set or clear the projection.
|
void |
setQueryType(QueryType queryType)
Set the type of query.
|
void |
setSlice(SliceNode slice)
Set or clear the slice.
|
void |
setTimeout(long timeout)
Set the timeout (milliseconds) for the query.
|
void |
setWhereClause(GraphPatternGroup whereClause)
Set the
GraphPatternGroup for the WHERE clause. |
String |
toString(int indent)
The contract of this method at this level is under-specified.
|
getQueryHints, toString
addExplainHint, getExplainHints, getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHintAsInteger, replaceAllWith, setQueryHint, setQueryHints
addArg, addArg, addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, indexOf, removeArg, replaceWith, setArg, setArgs, setId, setProperty, setUnboundProperty, toArray, toArray
annotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenName, toShortString
finalize, getClass, notify, notifyAll, wait, wait, wait
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toString
getProperty
public QueryBase(QueryBase queryBase)
public QueryBase(QueryType queryType)
public QueryType getQueryType()
public void setQueryType(QueryType queryType)
public ConstructNode getConstruct()
null
if there is no construction.public void setConstruct(ConstructNode construct)
construction
- The construction (may be null
).public void setProjection(ProjectionNode projection)
IProjectionDecl
setProjection
in interface IProjectionDecl
projection
- The projection (may be null
).public ProjectionNode getProjection()
IProjectionDecl
null
if there is no projection.getProjection
in interface IProjectionDecl
public Set<IVariable<?>> getProjectedVars(Set<IVariable<?>> vars)
IProjectionDecl
ProjectionNode
for the query, which can happen for an
ASK query). This DOES NOT report the variables which are used by the
SELECT expressions, just the variables which are PROJECTED out by the
BINDs.getProjectedVars
in interface IProjectionDecl
vars
- The projected variables are added to this set.public Set<IVariable<?>> getSelectExprVars(Set<IVariable<?>> vars)
ProjectionNode
for this
query depends (this is a NOP if there is no ProjectionNode
for
the query, which can happen for an ASK query). This DOES NOT report the
variables which are projected OUT of the query, just those used by the
SELECT expressions.vars
- The variables used by the select expressions are added to this
set.public GraphPatternGroup getWhereClause()
GraphPatternGroup
for the WHERE clause.null
.public GraphPatternGroup<IGroupMemberNode> getGraphPattern()
IGraphPatternContainer
getGraphPattern
in interface IGraphPatternContainer
public void setGraphPattern(GraphPatternGroup<IGroupMemberNode> graphPattern)
IGraphPatternContainer
setGraphPattern
in interface IGraphPatternContainer
public void setWhereClause(GraphPatternGroup whereClause)
GraphPatternGroup
for the WHERE clause.whereClause
- The "WHERE" clause.public boolean hasWhereClause()
public GroupByNode getGroupBy()
GroupByNode
-or- null
if there is none.public void setGroupBy(GroupByNode groupBy)
GroupByNode
.groupBy
- The new value (may be null
).public HavingNode getHaving()
HavingNode
-or- null
if there is none.public void setHaving(HavingNode having)
HavingNode
.having
- The new value (may be null
).public SliceNode getSlice()
null
if there is no slice.public void setSlice(SliceNode slice)
slice
- The slice (may be null
).public boolean hasSlice()
true
iff there is a SliceNode
and either the
LIMIT and/or OFFSET has been specified with a non-default value.public OrderByNode getOrderBy()
null
if there is no order
by.public void setOrderBy(OrderByNode orderBy)
OrderByNode
.orderBy
- The order by (may be null
).public boolean getIncludeInferred()
public void setIncludeInferred(boolean includeInferred)
public long getTimeout()
QueryBase.Annotations.TIMEOUT
public void setTimeout(long timeout)
QueryBase.Annotations.TIMEOUT
public void setBindingsClause(BindingsClause bindings)
bindings
- public BindingsClause getBindingsClause()
public String toString(int indent)
CoreBaseBOp
CoreBaseBOp.toString()
Or:
- return a pretty-print representation of the object with indent
Note that the former contract may or may not include recursive descent through a tree-like
object, whereas the latter almost certainly does.toString
in interface BOp
toString
in interface IQueryNode
toString
in class CoreBaseBOp
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.