public class BindingsClause extends GroupMemberNodeBase<BindingsClause> implements IBindingProducerNode, IJoinNode, IReorderableNode
Modifier and Type | Class and Description |
---|---|
static interface |
BindingsClause.Annotations |
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
BindingsClause(BindingsClause bindings)
Deep copy constructor.
|
BindingsClause(BOp[] args,
Map<String,Object> anns) |
BindingsClause(LinkedHashSet<IVariable<?>> declaredVars,
List<IBindingSet> bindingSets) |
Modifier and Type | Method and Description |
---|---|
List<FilterNode> |
getAttachedJoinFilters()
Return the FILTER(s) associated with this
IJoinNode . |
List<IBindingSet> |
getBindingSets()
The binding sets -or-
null . |
int |
getBindingSetsCount()
Return the #of binding sets.
|
int |
getDeclaredVariableCount()
Return the #of declared variables.
|
LinkedHashSet<IVariable<?>> |
getDeclaredVariables()
Return the ordered set of declared variables for the BINDINGS clause.
|
LinkedHashSet<IVariable<?>> |
getDefinitelyProducedBindings()
Return the ordered set of variables that will definitely be bound by
this bindings/values clause.
|
Set<IVariable<?>> |
getDesiredBound(StaticAnalysis sa)
Get variables that are not required to be bound, but desired in the
sense that we want them to be bound when evaluating the construct.
|
long |
getEstimatedCardinality(StaticOptimizer opt)
Return the estimated cardinality - either the range count of a
statement pattern or some computed estimated cardinality for a join
group.
|
Set<IVariable<?>> |
getRequiredBound(StaticAnalysis sa)
Return the variables used in the node that *must* be bound prior to
evaluating the node.
|
boolean |
isMinus()
Return
true iff this is a join group representing a SPARQL
MINUS operator. |
boolean |
isOptional()
Return whether or not this is an join with "optional" semantics.
|
boolean |
isReorderable()
The decision about whether to re-order can no longer be made simply
by examining the type - individual instances of a particular type
may or may not be reorderable.
|
void |
setAttachedJoinFilters(List<FilterNode> filters) |
void |
setBindingSets(List<IBindingSet> bindingSets) |
void |
setDeclaredVariables(LinkedHashSet<IVariable<?>> declaredVars) |
String |
toString(int indent)
The contract of this method at this level is under-specified.
|
getContext, getParent, getParentGraphPatternGroup, getParentJoinGroup, setParent
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
getContext, getParent, getParentGraphPatternGroup, getParentJoinGroup, setParent
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toString
getProperty
public BindingsClause(BindingsClause bindings)
bindings
- public BindingsClause(LinkedHashSet<IVariable<?>> declaredVars, List<IBindingSet> bindingSets)
declaredVars
- The ordered set of declared variables.bindingSets
- The set of solutions.public final int getDeclaredVariableCount()
public final LinkedHashSet<IVariable<?>> getDeclaredVariables()
public final void setDeclaredVariables(LinkedHashSet<IVariable<?>> declaredVars)
public final LinkedHashSet<IVariable<?>> getDefinitelyProducedBindings()
public final int getBindingSetsCount()
public final List<IBindingSet> getBindingSets()
null
.public final void setBindingSets(List<IBindingSet> bindingSets)
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
public final List<FilterNode> getAttachedJoinFilters()
IJoinNode
IJoinNode
. Such filters
will be run with the JOIN for this statement pattern. As such, they MUST
NOT rely on materialization of variables which would not have been bound
before that JOIN.getAttachedJoinFilters
in interface IJoinNode
null
(it may
return an empty list)(.ASTSimpleOptionalOptimizer
,
ASTAttachJoinFiltersOptimizer
public final void setAttachedJoinFilters(List<FilterNode> filters)
setAttachedJoinFilters
in interface IJoinNode
public boolean isOptional()
IJoinNode
isOptional
in interface IJoinNode
public boolean isMinus()
IJoinNode
true
iff this is a join group representing a SPARQL
MINUS operator.public Set<IVariable<?>> getRequiredBound(StaticAnalysis sa)
IVariableBindingRequirements
IVariableBindingRequirements#getRequiredBound()
interface cannot be satisified, the query may still be valid and return
results (for the SPARQL 1.1 service example mentioned above, it may not,
for the FILTER it may).
The set of these variables must be disjoint from
IVariableBindingRequirements#getRequiredUnound()
.getRequiredBound
in interface IVariableBindingRequirements
public Set<IVariable<?>> getDesiredBound(StaticAnalysis sa)
IVariableBindingRequirements
IVariableBindingRequirements.getRequiredBound(StaticAnalysis)
.getDesiredBound
in interface IVariableBindingRequirements
public boolean isReorderable()
IReorderableNode
isReorderable
in interface IReorderableNode
public long getEstimatedCardinality(StaticOptimizer opt)
IReorderableNode
getEstimatedCardinality
in interface IReorderableNode
opt
- This optimizer can be used to help work out the estimateCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.