Class CheckStatementPattern
java.lang.Object
org.eclipse.rdf4j.federated.algebra.CheckStatementPattern
- All Implemented Interfaces:
Serializable,Cloneable,BoundJoinTupleExpr,FedXTupleExpr,QueryRef,StatementTupleExpr,VariableExpr,QueryModelNode,TupleExpr
A statement pattern with no free variables when provided with some particular BindingSet in evaluate. For evaluation
a boolean ASK query is performed.
Wraps a StatementTupleExpr
- Author:
- Andreas Schwarte
- See Also:
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionclone()Returns a (deep) clone of this query model node.evaluate(BindingSet bindings) Evaluate this expression using the provided bindingsGets the names of the bindings that are guaranteed to be present in the results produced by this tuple expression.Gets the names of the bindings that are, or can be, returned by this tuple expression when it is evaluated.doubleintgetId()getOrder()Gets the node's parent.Retrieve the attached query information of the tuple expressionlongdoubleReturns the number of tuples that this QueryNode predicts will be outputted.Returns the signature of this query model node.getSupportedOrders(AvailableStatementOrder tripleSource) longbooleanhasFreeVarsFor(BindingSet binding) returns true iff this statement has free variables in the presence of the specified binding setvoidreplaceChildNode(QueryModelNode current, QueryModelNode replacement) Replaces one of the child nodes with a new node.voidreplaceWith(QueryModelNode replacement) Substitutes this node with a new node in the query model tree.voidsetCostEstimate(double costEstimate) voidvoidsetParentNode(QueryModelNode parent) Sets the node's parent.voidsetResultSizeActual(long resultSizeActual) voidsetResultSizeEstimate(double resultSizeEstimate) voidsetTotalTimeNanosActual(long totalTimeNanosActual) <X extends Exception>
voidvisit(QueryModelVisitor<X> visitor) Visits this node.<X extends Exception>
voidvisitChildren(QueryModelVisitor<X> visitor) Visits the children of this node.Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.eclipse.rdf4j.query.algebra.QueryModelNode
equals, toString
-
Field Details
-
stmt
-
id
-
queryInfo
-
-
Constructor Details
-
CheckStatementPattern
-
-
Method Details
-
getStatementPattern
-
getFreeVarCount
public int getFreeVarCount()- Specified by:
getFreeVarCountin interfaceFedXTupleExpr- Returns:
- the number of free (i.e. unbound) variables in this expression
-
getFreeVars
- Specified by:
getFreeVarsin interfaceVariableExpr- Returns:
- a list of free (i.e. unbound) variables in this expression
-
getId
- Specified by:
getIdin interfaceStatementTupleExpr- Returns:
- the id of this expr
-
getStatementSources
- Specified by:
getStatementSourcesin interfaceStatementTupleExpr- Returns:
- a list of sources that are relevant for evaluation of this expression
-
hasFreeVarsFor
Description copied from interface:StatementTupleExprreturns true iff this statement has free variables in the presence of the specified binding set- Specified by:
hasFreeVarsForin interfaceStatementTupleExpr- Returns:
- whether the statement has free vars
-
getAssuredBindingNames
Description copied from interface:TupleExprGets the names of the bindings that are guaranteed to be present in the results produced by this tuple expression.- Specified by:
getAssuredBindingNamesin interfaceTupleExpr- Returns:
- A set of binding names.
-
getBindingNames
Description copied from interface:TupleExprGets the names of the bindings that are, or can be, returned by this tuple expression when it is evaluated.- Specified by:
getBindingNamesin interfaceTupleExpr- Returns:
- A set of binding names.
-
getParentNode
Description copied from interface:QueryModelNodeGets the node's parent.- Specified by:
getParentNodein interfaceQueryModelNode- Returns:
- The parent node, if any.
-
getSignature
Description copied from interface:QueryModelNodeReturns the signature of this query model node. Signatures normally include the node's name and any parameters, but not parent or child nodes. This method is used byQueryModelNode.toString().- Specified by:
getSignaturein interfaceQueryModelNode- Returns:
- The node's signature, e.g. SLICE (offset=10, limit=10).
-
replaceChildNode
Description copied from interface:QueryModelNodeReplaces one of the child nodes with a new node.- Specified by:
replaceChildNodein interfaceQueryModelNode- Parameters:
current- The current child node.replacement- The new child node.
-
replaceWith
Description copied from interface:QueryModelNodeSubstitutes this node with a new node in the query model tree.- Specified by:
replaceWithin interfaceQueryModelNode- Parameters:
replacement- The new node.
-
setParentNode
Description copied from interface:QueryModelNodeSets the node's parent.- Specified by:
setParentNodein interfaceQueryModelNode- Parameters:
parent- The parent node for this node.
-
visit
Description copied from interface:QueryModelNodeVisits this node. The node reports itself to the visitor with the proper runtime type.- Specified by:
visitin interfaceQueryModelNode- Throws:
X extends Exception
-
visitChildren
Description copied from interface:QueryModelNodeVisits the children of this node. The node callsQueryModelNode.visit(QueryModelVisitor)on all of its child nodes.- Specified by:
visitChildrenin interfaceQueryModelNode- Throws:
X extends Exception
-
clone
Description copied from interface:QueryModelNodeReturns a (deep) clone of this query model node. This method recursively clones the entire node tree, starting from this nodes. -
getResultSizeEstimate
public double getResultSizeEstimate()Description copied from interface:QueryModelNodeReturns the number of tuples that this QueryNode predicts will be outputted. For a StatementPattern this would be the estimated cardinality provided by the EvaluationStatistics. For a Join the would be the resulting number of joined tuples.- Specified by:
getResultSizeEstimatein interfaceQueryModelNode- Returns:
- rows
-
setResultSizeEstimate
public void setResultSizeEstimate(double resultSizeEstimate) - Specified by:
setResultSizeEstimatein interfaceQueryModelNode
-
getResultSizeActual
public long getResultSizeActual()- Specified by:
getResultSizeActualin interfaceQueryModelNode
-
setResultSizeActual
public void setResultSizeActual(long resultSizeActual) - Specified by:
setResultSizeActualin interfaceQueryModelNode
-
getCostEstimate
public double getCostEstimate()- Specified by:
getCostEstimatein interfaceQueryModelNode
-
setCostEstimate
public void setCostEstimate(double costEstimate) - Specified by:
setCostEstimatein interfaceQueryModelNode
-
getTotalTimeNanosActual
public long getTotalTimeNanosActual()- Specified by:
getTotalTimeNanosActualin interfaceQueryModelNode
-
setTotalTimeNanosActual
public void setTotalTimeNanosActual(long totalTimeNanosActual) - Specified by:
setTotalTimeNanosActualin interfaceQueryModelNode
-
evaluate
Description copied from interface:StatementTupleExprEvaluate this expression using the provided bindings- Specified by:
evaluatein interfaceStatementTupleExpr- Returns:
- the result iteration
- Throws:
QueryEvaluationException
-
getQueryInfo
Description copied from interface:QueryRefRetrieve the attached query information of the tuple expression- Specified by:
getQueryInfoin interfaceQueryRef- Returns:
- the
QueryInfo
-
getSupportedOrders
- Specified by:
getSupportedOrdersin interfaceTupleExpr
-
setOrder
-
getOrder
-