Class PathEvaluationContext
Evaluation Context for evaluating complex property paths in SPARQL.
Inheritance
System.Object
PathEvaluationContext
Inherited Members
System.Object.Equals(System.Object)
System.Object.Equals(System.Object, System.Object)
System.Object.GetHashCode()
System.Object.GetType()
System.Object.MemberwiseClone()
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.ToString()
Namespace: VDS.RDF.Query.Paths
Assembly: dotNetRDF.dll
Syntax
public class PathEvaluationContext
Constructors
| Improve this Doc 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
| Improve this Doc View SourceCanAbortEarly
Gets whether pattern evaluation can be aborted early.
Declaration
public bool CanAbortEarly { get; }
Property Value
Type | Description |
---|---|
System.Boolean |
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).
|
Improve this Doc
View Source
CompletePaths
Gets the hash set of complete paths generated so far.
Declaration
public HashSet<PotentialPath> CompletePaths { get; }
Property Value
Type | Description |
---|---|
System.Collections.Generic.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 |
---|---|
System.Boolean |
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 |
---|---|
System.Boolean |
IsReversed
Gets/Sets whether the Path is currently reversed.
Declaration
public bool IsReversed { get; set; }
Property Value
Type | Description |
---|---|
System.Boolean |
PathEnd
Gets the pattern which is the end of the path.
Declaration
public PatternItem PathEnd { 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 |
---|---|
System.Collections.Generic.HashSet<PotentialPath> |
PathStart
Gets the pattern which is the start of the path.
Declaration
public PatternItem PathStart { get; }
Property Value
Type | Description |
---|---|
PatternItem |
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 |
---|---|
System.Boolean |
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
| Improve this Doc 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. |