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, setParentgetQueryHints, toStringaddExplainHint, getExplainHints, getQueryHint, getQueryHint, getQueryHintAsBoolean, getQueryHintAsBoolean, getQueryHintAsInteger, replaceAllWith, setQueryHint, setQueryHintsaddArg, addArg, addArgIfAbsent, annotations, annotationsEqual, argIterator, args, arity, clearProperty, copyAll, get, getProperty, indexOf, removeArg, replaceWith, setArg, setArgs, setId, setProperty, setUnboundProperty, toArray, toArrayannotationsEqual, annotationsToString, annotationsToString, annotationValueToString, checkArgs, clone, equals, getEvaluationContext, getId, getProperty, getRequiredProperty, hashCode, indent, isController, mutation, shortenNamefinalize, getClass, notify, notifyAll, wait, wait, waitannotations, argIterator, args, arity, clone, get, getEvaluationContext, getId, getProperty, getRequiredProperty, isController, setProperty, toArray, toArray, toStringgetPropertypublic 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.Scopepublic final void setScope(org.openrdf.query.algebra.StatementPattern.Scope scope)
public String toString(int indent)
CoreBaseBOpCoreBaseBOp.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 BOptoString in interface IQueryNodetoString in class CoreBaseBOppublic String toShortString()
CoreBaseBOpBOp.toShortString in interface BOptoShortString in class CoreBaseBOppublic Set<IVariable<?>> getProducedBindings()
public Set<IVariable<?>> getRequiredBound(StaticAnalysis sa)
IVariableBindingRequirementsIVariableBindingRequirements#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 IVariableBindingRequirementspublic Set<IVariable<?>> getDesiredBound(StaticAnalysis sa)
IVariableBindingRequirementsIVariableBindingRequirements.getRequiredBound(StaticAnalysis).getDesiredBound in interface IVariableBindingRequirementsCopyright © 2006–2019 SYSTAP, LLC DBA Blazegraph. All rights reserved.