Class PathEvaluationContext
Evaluation Context for evaluating complex property paths in SPARQL.
Inherited Members
Namespace: VDS.RDF.Query.Paths
Assembly: dotNetRdf.dll
Syntax
public class PathEvaluationContext
Constructors
| Edit this page View SourcePathEvaluationContext(PathEvaluationContext)
Creates a new Path Evaluation Context copied from the given Context.
Declaration
public PathEvaluationContext(PathEvaluationContext context)
Parameters
Type | Name | Description |
---|---|---|
PathEvaluationContext | context | Path Evaluation Context. |
PathEvaluationContext(SparqlEvaluationContext, PatternItem, PatternItem)
Creates a new Path Evaluation Context.
Declaration
public PathEvaluationContext(SparqlEvaluationContext context, PatternItem start, PatternItem end)
Parameters
Type | Name | Description |
---|---|---|
SparqlEvaluationContext | context | SPARQL Evaluation Context. |
PatternItem | start | End point of the Path. |
PatternItem | end | Start point of the Path. |
Properties
| Edit this page View SourceCanAbortEarly
Gets whether pattern evaluation can be aborted early.
Declaration
public bool CanAbortEarly { get; }
Property Value
Type | Description |
---|---|
bool |
Remarks
Useful when both the start and end of the path are fixed (non-variables) which means that we can stop evaluating once we find the path (if it exists).
CompletePaths
Gets the hash set of complete paths generated so far.
Declaration
public HashSet<PotentialPath> CompletePaths { get; }
Property Value
Type | Description |
---|---|
HashSet<PotentialPath> |
IsFirst
Gets/Sets whether this is the first part of the Path to be evaluated.
Declaration
public bool IsFirst { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsLast
Gets/Sets whether this is the last part of the Path to be evaluated.
Declaration
public bool IsLast { get; set; }
Property Value
Type | Description |
---|---|
bool |
IsReversed
Gets/Sets whether the Path is currently reversed.
Declaration
public bool IsReversed { get; set; }
Property Value
Type | Description |
---|---|
bool |
PathEnd
Gets the pattern which is the end of the path.
Declaration
public PatternItem PathEnd { get; }
Property Value
Type | Description |
---|---|
PatternItem |
PathStart
Gets the pattern which is the start of the path.
Declaration
public PatternItem PathStart { get; }
Property Value
Type | Description |
---|---|
PatternItem |
Paths
Gets the hash set of incomplete paths generated so far.
Declaration
public HashSet<PotentialPath> Paths { get; }
Property Value
Type | Description |
---|---|
HashSet<PotentialPath> |
PermitsNewPaths
Gets/Sets whether new paths can be introduced when not evaluating the first part of the path.
Declaration
public bool PermitsNewPaths { get; set; }
Property Value
Type | Description |
---|---|
bool |
Remarks
This is required when we have a path like ?x foaf:knows* /foaf:knows ?y and ?x is not bound prior to the path being executed. Since we permit zero-length paths we should return the names of everyone even if they don't know anyone.
The cases where ?x is already bound are handled elsewhere as we can just introduce zero-length paths for every existing binding for ?x.
SparqlContext
Gets the SPARQL Evaluation Context.
Declaration
public SparqlEvaluationContext SparqlContext { get; }
Property Value
Type | Description |
---|---|
SparqlEvaluationContext |
Methods
| Edit this page View SourceAddCompletePath(PotentialPath)
Adds a new path to the list of complete paths.
Declaration
public void AddCompletePath(PotentialPath p)
Parameters
Type | Name | Description |
---|---|---|
PotentialPath | p | Path. |
AddPath(PotentialPath)
Adds a new path to the list of current incomplete paths.
Declaration
public void AddPath(PotentialPath p)
Parameters
Type | Name | Description |
---|---|---|
PotentialPath | p | Path. |