com.bigdata.rdf.sparql.ast.service
Class ServiceNode

java.lang.Object
  extended by com.bigdata.bop.CoreBaseBOp
      extended by com.bigdata.bop.ModifiableBOpBase
          extended by com.bigdata.rdf.sparql.ast.ASTBase
              extended by com.bigdata.rdf.sparql.ast.QueryNodeBase
                  extended by com.bigdata.rdf.sparql.ast.GroupMemberNodeBase<IGroupMemberNode>
                      extended by com.bigdata.rdf.sparql.ast.service.ServiceNode
All Implemented Interfaces:
BOp, IBindingProducerNode, IGraphPatternContainer, IGroupMemberNode, IJoinNode, IQueryNode, IPropertySet, Serializable, Cloneable

public class ServiceNode
extends GroupMemberNodeBase<IGroupMemberNode>
implements IJoinNode, IGraphPatternContainer

An extension point for external service calls which produce solution multisets (a SPARQL SERVICE). TODO It would make the internal APIs significantly easier if we modeled this as a type of GraphPatternGroup, similar to JoinGroupNode and UnionNode.

See Also:
Serialized Form

Field Summary
 
Fields inherited from class com.bigdata.bop.CoreBaseBOp
DEFAULT_INITIAL_CAPACITY
 
Fields inherited from interface com.bigdata.bop.BOp
NOANNS, NOARGS
 
Constructor Summary
ServiceNode(BOp[] args, Map<String,Object> anns)
          Required shallow copy constructor.
ServiceNode(ServiceNode op)
          Required deep copy constructor.
ServiceNode(TermNode serviceRef, GraphPatternGroup<IGroupMemberNode> groupNode)
          Construct a function node in the AST.
 
Method Summary
 List<FilterNode> getAttachedJoinFilters()
          Return the FILTER(s) associated with this IJoinNode.
 String getExprImage()
           
 GraphPatternGroup<IGroupMemberNode> getGraphPattern()
          Return the graph pattern.
 Map<String,String> getPrefixDecls()
           
 Set<IVariable<?>> getProjectedVars()
           
 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)
          Pretty print with an indent.
 
Methods inherited from class com.bigdata.rdf.sparql.ast.GroupMemberNodeBase
getContext, getParent, getParentGraphPatternGroup, getParentJoinGroup, setParent
 
Methods inherited from class com.bigdata.rdf.sparql.ast.QueryNodeBase
toString
 
Methods inherited from class com.bigdata.rdf.sparql.ast.ASTBase
getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHints, replaceAllWith, setQueryHint, setQueryHints
 
Methods inherited from class com.bigdata.bop.ModifiableBOpBase
addArg, addArg, addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, mutation, removeArg, replaceWith, setArg, setArgs, setId, setProperty, setUnboundProperty, toArray, toArray
 
Methods inherited from class com.bigdata.bop.CoreBaseBOp
annotationsEqual, annotationsToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, toShortString
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

ServiceNode

public ServiceNode(ServiceNode op)
Required deep copy constructor.


ServiceNode

public ServiceNode(BOp[] args,
                   Map<String,Object> anns)
Required shallow copy constructor.


ServiceNode

public ServiceNode(TermNode serviceRef,
                   GraphPatternGroup<IGroupMemberNode> groupNode)
Construct a function node in the AST.

Parameters:
serviceRef - The value expression for the SERVICE URI.
groupNode - The graph pattern used to invoke the service.
See Also:
ServiceRegistry
Method Detail

getServiceRef

public TermNode getServiceRef()
The service reference.


setServiceRef

public void setServiceRef(TermNode serviceRef)
Set the service reference.


getGraphPattern

public GraphPatternGroup<IGroupMemberNode> getGraphPattern()
Description copied from interface: IGraphPatternContainer
Return the graph pattern.

Specified by:
getGraphPattern in interface IGraphPatternContainer

setGraphPattern

public void setGraphPattern(GraphPatternGroup<IGroupMemberNode> graphPattern)
Description copied from interface: IGraphPatternContainer
Set the graph pattern.

Specified by:
setGraphPattern in interface IGraphPatternContainer

isOptional

public final boolean isOptional()
Returns false.

Specified by:
isOptional in interface IJoinNode

isMinus

public final boolean isMinus()
Returns false.

Specified by:
isMinus in interface IJoinNode

isSilent

public final boolean isSilent()

setSilent

public final void setSilent(boolean silent)

getExprImage

public String getExprImage()

setExprImage

public void setExprImage(String serviceExpressionString)
Set the text "image" of the SPARQL SERVICE clause. This will be used IFF we generate a SPARQL query for a remote SPARQL end point. You must also specify the prefix declarations for that text "image".


getPrefixDecls

public Map<String,String> getPrefixDecls()

setPrefixDecls

public void setPrefixDecls(Map<String,String> prefixDecls)
Set the prefix declarations for the group graph pattern. This will be used IFF we generate a SPARQL query for a remote SPARQL end point. You must also specify the text "image".


setProjectedVars

public void setProjectedVars(Set<IVariable<?>> projectedVars)
Parameters:
projectedVars -
See Also:
Blank nodes in SERVICE graph patterns

getProjectedVars

public Set<IVariable<?>> getProjectedVars()
See Also:
Annotations#PROJECTED_VARS

setTimeout

public void setTimeout(Long timeout)

getTimeout

public long getTimeout()
Return the timeout for evaluation of this SERVICE request.

Returns:
The timeout -or- Annotations#DEFAULT_TIMEOUT if the timeout was not explicitly configured.
See Also:
Annotations#TIMEOUT

getAttachedJoinFilters

public final List<FilterNode> getAttachedJoinFilters()
Description copied from interface: IJoinNode
Return the FILTER(s) associated with this 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.

Specified by:
getAttachedJoinFilters in interface IJoinNode
Returns:
The attached join filters and never null (it may return an empty list)(.
See Also:
ASTSimpleOptionalOptimizer, ASTAttachJoinFiltersOptimizer

setAttachedJoinFilters

public final void setAttachedJoinFilters(List<FilterNode> filters)
Specified by:
setAttachedJoinFilters in interface IJoinNode

toString

public String toString(int indent)
Description copied from interface: IQueryNode
Pretty print with an indent.

Specified by:
toString in interface IQueryNode


Copyright © 2006-2012 SYSTAP, LLC. All Rights Reserved.