public class PropertyPathNode extends GroupMemberNodeBase<PropertyPathNode> implements IBindingProducerNode
PathNode
instead of a
TermNode
as in a normal statement pattern. This is modeled closely
after StatementPatternNode.Modifier and Type | Class and Description |
---|---|
static interface |
PropertyPathNode.Annotations |
DEFAULT_INITIAL_CAPACITY
Constructor and Description |
---|
PropertyPathNode(BOp[] args,
Map<String,Object> anns)
Required shallow copy constructor.
|
PropertyPathNode(PropertyPathNode op)
Constructor required for
com.bigdata.bop.BOpUtility#deepCopy(FilterNode) . |
PropertyPathNode(TermNode s,
PathNode p,
TermNode o)
A triple pattern.
|
PropertyPathNode(TermNode s,
PathNode p,
TermNode o,
TermNode c,
org.openrdf.query.algebra.StatementPattern.Scope scope)
A quad pattern.
|
Modifier and Type | Method and Description |
---|---|
TermNode |
c()
The variable or constant for the context position (required iff in quads
mode).
|
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.
|
Set<IVariable<?>> |
getProducedBindings()
Return the variables used by the predicate - i.e.
|
Set<IVariable<?>> |
getRequiredBound(StaticAnalysis sa)
Return the variables used in the node that *must* be bound prior to
evaluating the node.
|
org.openrdf.query.algebra.StatementPattern.Scope |
getScope()
The scope for this statement pattern (either named graphs or default
graphs).
|
TermNode |
o()
The variable or constant for the object position (required).
|
PathNode |
p()
The property path (required).
|
TermNode |
s()
The variable or constant for the subject position (required).
|
void |
setC(TermNode c) |
void |
setScope(org.openrdf.query.algebra.StatementPattern.Scope scope) |
String |
toShortString()
General contract is a short (non-recursive) representation of the
BOp . |
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
finalize, getClass, notify, notifyAll, wait, wait, wait
annotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toString
getProperty
public PropertyPathNode(PropertyPathNode op)
com.bigdata.bop.BOpUtility#deepCopy(FilterNode)
.public PropertyPathNode(BOp[] args, Map<String,Object> anns)
public PropertyPathNode(TermNode s, PathNode p, TermNode o)
StatementPattern.Scope
will be
StatementPattern.Scope.DEFAULT_CONTEXTS
, the context will be null
.s
- p
- o
- #PropertyPathNode(TermNode, PathNode, TermNode, TermNode, Scope)
public PropertyPathNode(TermNode s, PathNode p, TermNode o, TermNode c, org.openrdf.query.algebra.StatementPattern.Scope scope)
Note: When a PropertyPathNode
appears in a WHERE clause, the
StatementPattern.Scope
should be marked as StatementPattern.Scope.DEFAULT_CONTEXTS
if it is
NOT embedded within a GRAPH clause and otherwise as
StatementPattern.Scope.NAMED_CONTEXTS
.
The context position of the statement should be null
unless
it is embedded within a GRAPH clause, in which case the context is the
context specified for the parent GRAPH clause.
A null
context in StatementPattern.Scope.DEFAULT_CONTEXTS
is
interpreted as the RDF merge of the graphs in the defaultGraph (as
specified by the DatasetNode
). When non-null
(it can
be bound by the SPARQL UPDATE WITH clause), the defaultGraph
declared by the DatasetNode
is ignored and the context is bound
to the constant specified in that WITH clause.
Absent any other constraints on the query, an unbound variable context in
StatementPattern.Scope.NAMED_CONTEXTS
may be bound to any named graph specified by
the DatasetNode
.
s
- The subject (variable or constant; required).p
- The property path (required).o
- The subject (variable or constant; required).c
- The context (variable or constant; optional).scope
- Either StatementPattern.Scope.DEFAULT_CONTEXTS
or
StatementPattern.Scope.NAMED_CONTEXTS
(required).IllegalArgumentException
- if s, p, or o is null
.IllegalArgumentException
- if scope is null
.IllegalArgumentException
- if scope is StatementPattern.Scope.NAMED_CONTEXTS
and c
is null
.public final TermNode s()
public final PathNode p()
public final TermNode o()
public final TermNode c()
public final void setC(TermNode c)
public final org.openrdf.query.algebra.StatementPattern.Scope getScope()
PropertyPathNode.Annotations.SCOPE
,
StatementPattern.Scope
public final void setScope(org.openrdf.query.algebra.StatementPattern.Scope scope)
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 String toShortString()
CoreBaseBOp
BOp
.toShortString
in interface BOp
toShortString
in class CoreBaseBOp
public Set<IVariable<?>> getProducedBindings()
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
Copyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.