public class ServiceNode extends GroupMemberNodeBase<IGroupMemberNode> implements IJoinNode, IGraphPatternContainer
SERVICE
).
TODO It would make the internal APIs significantly easier if we modeled this
as a type of GraphPatternGroup
, similar to JoinGroupNode
and
UnionNode
.DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
ServiceNode(BOp[] args,
Map<String,Object> anns)
Required shallow copy constructor.
|
ServiceNode(ServiceNode op)
Constructor required for
com.bigdata.bop.BOpUtility#deepCopy(FilterNode) . |
ServiceNode(TermNode serviceRef,
GraphPatternGroup<IGroupMemberNode> groupNode)
Construct a function node in the AST.
|
Modifier and Type | Method and Description |
---|---|
List<FilterNode> |
getAttachedJoinFilters()
Return the FILTER(s) associated with this
IJoinNode . |
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.
|
String |
getExprImage() |
GraphPatternGroup<IGroupMemberNode> |
getGraphPattern()
Return the graph pattern.
|
Map<String,String> |
getPrefixDecls() |
Set<IVariable<?>> |
getProjectedVars() |
Set<IVariable<?>> |
getRequiredBound(StaticAnalysis sa)
Return the variables used in the node that *must* be bound prior to
evaluating the node.
|
ServiceFactory |
getResponsibleServiceFactory()
Returns the service factory that is responsible for handling this
service node.
|
TermNode |
getServiceRef()
The service reference.
|
long |
getTimeout()
Return the timeout for evaluation of this SERVICE request.
|
boolean |
isMinus()
Returns
false . |
boolean |
isOptional()
Returns
false . |
boolean |
isSilent() |
void |
setAttachedJoinFilters(List<FilterNode> filters) |
void |
setExprImage(String serviceExpressionString)
Set the text "image" of the SPARQL SERVICE clause.
|
void |
setGraphPattern(GraphPatternGroup<IGroupMemberNode> graphPattern)
Set the graph pattern.
|
void |
setPrefixDecls(Map<String,String> prefixDecls)
Set the prefix declarations for the group graph pattern.
|
void |
setProjectedVars(Set<IVariable<?>> projectedVars) |
void |
setServiceRef(TermNode serviceRef)
Set the service reference.
|
void |
setSilent(boolean silent) |
void |
setTimeout(Long timeout) |
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
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toShortString, toString
getProperty
public ServiceNode(ServiceNode op)
com.bigdata.bop.BOpUtility#deepCopy(FilterNode)
.public ServiceNode(BOp[] args, Map<String,Object> anns)
public ServiceNode(TermNode serviceRef, GraphPatternGroup<IGroupMemberNode> groupNode)
serviceRef
- The value expression for the SERVICE URI.groupNode
- The graph pattern used to invoke the service.ServiceRegistry
public TermNode getServiceRef()
public void setServiceRef(TermNode serviceRef)
public GraphPatternGroup<IGroupMemberNode> getGraphPattern()
IGraphPatternContainer
getGraphPattern
in interface IGraphPatternContainer
public void setGraphPattern(GraphPatternGroup<IGroupMemberNode> graphPattern)
IGraphPatternContainer
setGraphPattern
in interface IGraphPatternContainer
public final boolean isOptional()
false
.isOptional
in interface IJoinNode
public final boolean isSilent()
public final void setSilent(boolean silent)
public String getExprImage()
public void setExprImage(String serviceExpressionString)
public void setPrefixDecls(Map<String,String> prefixDecls)
public void setProjectedVars(Set<IVariable<?>> projectedVars)
projectedVars
- public void setTimeout(Long timeout)
public long getTimeout()
Annotations#DEFAULT_TIMEOUT
if the
timeout was not explicitly configured.Annotations#TIMEOUT
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 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 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 ServiceFactory getResponsibleServiceFactory()
ServiceFactory
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.